(vue)el-table数据中的数字对应不同状态
<el-table-column prop="strategyState" label="状态" align="center">
<template slot-scope="scope">
<span v-show="scope.row.strategyState === '1'">生效</span>
<span v-show="scope.row.strategyState === '0'">停用</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" style="color:rgb(1,189,178)" @click="edit(scope.row)">编辑 </el-button>
<el-button
v-show="scope.row.strategyState === '0'"
type="text"
style="color:rgb(1,189,178)"
@click="stopSubmit(scope.row, '1')"
>生效</el-button>
<el-button
v-show="scope.row.strategyState === '1'"
type="text"
style="color:rgb(1,189,178)"
@click="stopSubmit(scope.row, '0')"
>停用</el-button>
</template>
</el-table-column>