7305,充电中,字体颜色修改

This commit is contained in:
fengerli
2025-12-15 17:32:46 +08:00
parent 80f0ec15b3
commit 666cbfba6d

View File

@ -32,7 +32,7 @@
</view> </view>
<view class="item"> <view class="item">
<text class="lbl">设备状态</text> <text class="lbl">设备状态</text>
<text class="value">{{formData.statu}}</text> <text class="value" :class="formData.statu === '充电中' ? 'red' : 'white'">{{formData.statu}}</text>
</view> </view>
<view class="item"> <view class="item">
<text class="lbl">蓝牙名称</text> <text class="lbl">蓝牙名称</text>
@ -496,7 +496,8 @@
}); });
if ('statu' in json) { if ('statu' in json) {
const chargingVal = json.statu; const chargingVal = json.statu;
const isCharging = chargingVal === 1 || chargingVal === '1' || chargingVal === true || chargingVal === '充电中'; const isCharging = chargingVal === 1 || chargingVal === '1' || chargingVal === true ||
chargingVal === '充电中';
these.formData.statu = isCharging ? '充电中' : '未充电'; these.formData.statu = isCharging ? '充电中' : '未充电';
} }
if ('xuhang' in json) { if ('xuhang' in json) {