首页 > 其他 > 详细

elemetUI开关状态误操作

时间:2019-11-18 12:43:08      阅读:89      评论:0      收藏:0      [点我收藏+]

技术分享图片

 好了,可以倒计时了。。。我想回家

<el-form-item>
     <el-switch  v-model="ruleForm.useStatus" @change="switchVhange()"></el-switch>
      <em v-if="ruleForm.useStatus == true">开启</em>
      <em v-else>关闭</em>
</el-form-item>

ruleForm:{useStatus: true}
switchVhange() {
     if(!this.ruleForm.useStatus == true) {
         this.$alertMsgBox(
              "是否确定关闭状态",
              "系统提示",
              "此为门店内部信息,请谨慎填写",
              "el-icon-question",
               "#FE9100")
          .then(() => {
                this.$messageOK("success", "已关闭");
})
           .catch(() => {
                this.ruleForm.useStatus = true
                this.$messageOK("info", "已取消");
});
         } else if(!this.ruleForm.useStatus == false) {
                this.$alertMsgBox(
                  "是否确定开启状态",
                   "系统提示",
                   "此为门店内部信息,请谨慎填写",
                   "el-icon-question",
                   "#FE9100")
                    .then(() => {
                       this.$messageOK("success", "已开启");
})
                    .catch(() => {
                        this.ruleForm.useStatus = false
                         this.$messageOK("info", "已取消");
 });
                }
            }

elemetUI开关状态误操作

原文:https://www.cnblogs.com/home-/p/11881289.html

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