element 表格中使用el-switch前弹出提示


    
/**
 * 启用禁用
 * @param callback 当前操作回调
 * @param row 当前操作行
 */
 upadteEnable(callback, row){
     let text = ''
     if (callback) {//修改启用之前是否确认修改
         text = '启用'
         row.enable = false
     } else {
         text = '禁用'
         row.enable = true
     }
     this.$confirm(`确认${text}该逻辑流程吗`, language.confirm_title, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         iconClass: 'icon-warning',
         customClass:'custom-message-box'
      }).then(async () => {
         let body = {
             groupName : row.groupName,
             description : row.description,
             pageList :  row.pageList,
             isAutoPlay : row.isAutoPlay
         }
        // axios.put(`/api/groups/${row.id}?t=${Date.now()}`, body).then(res => {
        //     if (res.data.response) {
        //         this.successTip(language.operate_success);
        //     } else {
        //         this.failTip(language.operate_fail);
        //     }
        //     this.loading = false;
        // }).catch(e => {
        //     console.log(e);
        //     this.loading = false;
        //     if(e.data && e.data.errorInfo) {
        //         this.failTip(e.data.errorInfo);
        //     } else {
        //         this.failTip(language.error_500);
        //     }
        // });
      })
 },

 

你可能感兴趣的:(js,javascript,html,vue.js)