fix(market-ranking): 最新价涨跌色对齐商品期权

- priceColor 方法重写:undefined/0 统一走 text_primary,不再委托 riseFallColor(避免 0 走 text_grey)
- 与 biz_firstpage 对应修改保持一致
This commit is contained in:
clz
2026-07-28 11:16:44 +08:00
parent 34beb5397b
commit e2b98bc5c9
@@ -612,9 +612,14 @@ export struct MarketRankingNodeComponent {
}
private priceColor(item: RankItem): Resource {
if (item.price === undefined || item.price_chg === undefined) {
if (item.price_chg === undefined) {
return $r('app.color.text_primary');
}
return riseFallColor(item.price_chg);
if (item.price_chg > 0) {
return $r('app.color.color_rise');
} else if (item.price_chg < 0) {
return $r('app.color.color_fall');
}
return $r('app.color.text_primary');
}
}