vue - element-ui -> el-tag 标签状态
发表于:2022-06-29 16:49:44浏览:2371次
<el-tag v-if=" scope.row.status===2" type="danger">禁用</el-tag> <el-tag v-if=" scope.row.status===1" type="success">启用</el-tag>
两个的简写
<el-tag :type="scope.row.status === 1 ? 'success' : 'danger'">{{scope.row.status === 1 ? '启用':'禁用'}}</el-tag>
多个的简写
<el-tag v-for="(item,index) in menuCateMap" v-show="scope.row.type == item.value" :key="index" :type="item.cssName"> {{item.label}} </el-tag>
栏目分类全部>