<el-table-column label="状态" align="center" min-width="120">
<template slot-scope="scope">
<span v-if="scope.row.status == '0' ">正常</span>
<span v-if="scope.row.status == '1' ">禁用</span>
</template>
</el-table-column>
table中数字转换成文字
最新推荐文章于 2024-08-09 11:14:56 发布
该段代码展示了在Vue.js中使用el-table-column组件来定义表格列,根据scope.row.status的值动态显示正常或禁用状态,列居中对齐,最小宽度设为120。

1340

被折叠的 条评论
为什么被折叠?



