首页 > 其他 > 详细

element 开关 swich 加提示

时间:2020-08-06 17:16:33      阅读:99      评论:0      收藏:0      [点我收藏+]
<el-table-column v-if="isShowDel" label="是否通过" align="center">
        <template slot-scope="scope">
          <el-switch
            v-model="scope.row.isFinish"
            disabled
            @click.native="setSwitch(scope.row)"
          />
        </template>
      </el-table-column>

  

setSwitch(row) {
      if (row.isFinish) {
        this.$message({
          showClose: true,
          message: 暂时不可操作,如需修改请重新发起计划,
          type: warning
        })
        return
      }
      var _this = this
      const text = row.isFinish ? 关闭 : 启用
      this.$confirm(确定本次计划通过吗?通过以后操作不可逆, 系统提示, {
        confirmButtonText: 确定,
        cancelButtonText: 取消,
        type: warning,
        callback: function(action, instance) {
          if (action === confirm) {
            _this.$emit(switchChange, row)
          } else {
            _this.$emit(switchChange, ‘‘)
          }
        }
      })
    }

 

技术分享图片

 

 系统有一个需求是要再开关上加提示

 

element 开关 swich 加提示

原文:https://www.cnblogs.com/boshow/p/13447137.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!