以下是美化后的代码示例: ```html <el-col v-for="(item, index) in staticsData" :sm="4" :lg="4"> <el-card shadow="always" :class="{'cardpay': item.pay_channel === 'cardpay', 'cashpay': item.pay_channel === 'cashpay', 'pospay': item.pay_channel === 'pospay', 'digitalcny': item.pay_channel === 'digitalcny' }"> <p style="font-weight: bold">{{ '缴费渠道: ' + (item.pay_channel === 'cardpay'? '银行卡刷卡' : item.pay_channel === 'cashpay'? '现金缴费' : item.pay_channel === 'pospay'? '扫码支付' : '数字人民币') }}</p> 总金额:{{ item.totalValue }} / 总笔数:{{ item.totalCount }} </el-card> </el-col> ``` 注意: 1. 确保数据 `staticsData` 中的 `item.pay_channel` 取值确实为上述几种。 2. 样式类的命名要符合项目整体的规范。 3. 对于动态的条件判断,要注意逻辑的准确性。 [2025-04-28 10:06:54 | AI写代码神器 | 271点数解答]