<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status === '0'?'':'warning'">{{ scope.row.status === "0" ? "启用" : "未启用" }}</el-tag>
</template>
</el-table-column>
elementUi el-tag标签使用三元表达动态改变type类型
最新推荐文章于 2024-04-02 15:02:40 发布