在代码中有一处错误,需要进行修正。在表格中展示品牌状态时,使用了一个空的v-if指令,需要将其删除。

<font color="gree"v-if="">{{brand.status}}</font>

修正后的代码如下:

<font color="green" v-if="brand.status === 1">启用</font>
<font color="red" v-else>停用</font>

修正后的代码将根据品牌的状态来展示不同的文字,并使用不同的颜色进行标识。

!DOCTYPE htmlhtml lang=enhead meta charset=UTF-8 meta http-equiv=X-UA-Compatible content=IE=edge meta name=viewport content=width=device-width initial-scale=10 title作业6titleheadbody !--

原文地址: http://www.cveoy.top/t/topic/iPf7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录