v-show使用三元运算符
这里是使用了element-ui
<template slot-scope="scope">
<el-button type="primary" plain v-show="scope.row.level === '0' ? true : false">一级</el-button>
<el-button type="success" plain v-show="scope.row.level === '1' ? true : false">二级</el-button>
<el-button type="danger" plain v-show="scope.row.level === '2' ? true : false">三级</el-button>
</template>