Sometimes the background state is not returned when the Chinese 1,2,3 but this time when this type can not directly attribute directly displayed according prop needs to be judged according to these types we want to display the Chinese, such as tables in a column when you need to display Chinese:
<el-table-column width="100" label="商品状态" align="center"> <template slot-scope="scope"> <el-tag type="success" effect="dark" v-if="scope.row.status==1">在售</el-tag> <el-tag type="warning" effect="dark" v-if="scope.row.status==2">下架</el-tag> <el-tag type="danger" effect="dark" v-if="scope.row.status==3">删除</el-tag> </template> </el-table-column>