avue-curd 表格行按钮自定义;根据表格中某个值控制行按钮显隐

  <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>

猜你喜欢

转载自blog.csdn.net/killerdoubie/article/details/131784025
今日推荐