perf(stock):优化盘前盘后标签显示逻辑

- 修改了盘前盘后标签的显示条件,仅在盘前盘后值大于 0 时显示
- 这个改动可以避免在盘前盘后值为 0时不必要的标签显示,提高界面的可读性和性能
This commit is contained in:
ArvinLovegood 2025-03-05 22:52:31 +08:00
parent db270779e6
commit ec7534ff2c

View File

@ -764,7 +764,7 @@ AI赋能股票分析自选股行情获取成本盈亏展示涨跌报警
<n-gi>
<n-text :type="result.type" >
<n-number-animation :duration="1000" :precision="2" :from="result['上次当前价格']" :to="Number(result['当前价格'])" />
<n-tag size="small" :type="result.type" :bordered="false" v-if="result['盘前盘后']">({{result['盘前盘后']}} {{result['盘前盘后涨跌幅']}}%)</n-tag>
<n-tag size="small" :type="result.type" :bordered="false" v-if="result['盘前盘后']>0">({{result['盘前盘后']}} {{result['盘前盘后涨跌幅']}}%)</n-tag>
</n-text>
<n-text style="padding-left: 10px;" :type="result.type">
<n-number-animation :duration="1000" :precision="3" :from="0" :to="result.changePercent" />%