feat: 卖出时股票代码输入框只读,只能选择已有持仓

This commit is contained in:
claw_bot 2026-03-10 04:04:08 +00:00
parent a976f2c184
commit b523346eaf

View File

@ -164,7 +164,9 @@
v-model="transactionForm.stockCode"
class="form-input"
:placeholder="transactionType === 'sell' ? '请选择要卖出的持仓' : '请输入股票代码'"
@input="(e) => searchStock(e.detail.value)"
:readonly="transactionType === 'sell'"
@input="transactionType === 'buy' ? searchStock(e.detail.value) : () => {}"
@click="transactionType === 'sell' && searchResults.length > 0 ? () => {} : () => {}"
/>
<!-- 搜索下拉列表/持仓列表 -->
<view class="search-dropdown" v-if="searchResults.length > 0">