zoukankan      html  css  js  c++  java
  • element 开关 swich 加提示

    <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', '')
              }
            }
          })
        }

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

  • 相关阅读:
    RocketMQ
    Docker的基本使用
    logstash、ELK
    spring cloud杂文总结
    手写一个starter
    @SpringBootApplication你知多少?
    使用ElasticSearch
    ElasticSearch安装
    啥是ElasticSearch???
    socket、端口、进程的关系
  • 原文地址:https://www.cnblogs.com/boshow/p/13447137.html
Copyright © 2011-2022 走看看