<template slot-scope="scope" slot="menu">
<el-button v-if="scope.row.useStatus == '1'" type="text" icon="el-icon-remove-pause" size="small"
style="color: #f56c6c" @click="handleDisable(scope.row)">停用
</el-button>
<el-button v-if="scope.row.useStatus == '0' || scope.row.useStatus == ''" type="text"
icon="el-icon-circle-play" size="small" @click="handleEnable(scope.row)">启用
</el-button>
<el-button v-if="scope.row.useStatus == '0' || scope.row.useStatus == ''" type="text" icon="el-icon-delete"
size="small" @click="rowDel(scope.row)">删除
</el-button>
</template>
avue-curd 表格行按钮自定义;根据表格中某个值控制行按钮显隐
最新推荐文章于 2024-03-29 10:03:38 发布
这段代码展示了在Vue.js中使用ElementUI组件进行操作,包括根据`useStatus`状态切换停用和启用功能,以及删除功能。点击按钮触发`handleDisable`,`handleEnable`和`rowDel`方法来改变数据状态或删除记录。
摘要由CSDN通过智能技术生成