zoukankan      html  css  js  c++  java
  • elementUI开关状态

    被骗了吧哈哈哈哈,这只是一个小小的操作相信大家都会我就是充个数,每天记录一点点

    现在每个人都低着头,像船被搁在浅滩,现在是最好的时代,却也最坏

    这次是拿假设做的 定义一个falg为true
    <el-switch v-model=
    "ruleForm.useStatus" @change="switchVhange()"></el-switch> <em v-if="ruleForm.useStatus == true">开启</em> <em v-else>关闭</em>

    data中:

    ruleForm: {
       useStatus: true,
     }
     falg: true
    事件:@change当状态发生改变时触发
     switchVhange() {
          if (this.falg == true) {
            this.$alertMsgBox(
              "是否确定关闭状态",
              "系统提示",
              "此为门店内部信息,请谨慎填写",
              "el-icon-question",
              "#FE9100"
            )
              .then(() => {
                this.$message({
                  type: "success",
                  message: "已关闭"
                });
                this.falg = false;
              })
              .catch(() => {
                this.$message({
                  type: "info",
                  message: "已取消"
                });
                this.ruleForm.useStatus = true;
              });
          } else if (this.falg == false) {
            this.$alertMsgBox(
              "是否确定开启状态",
              "系统提示",
              "此为门店内部信息,请谨慎填写",
              "el-icon-question",
              "#FE9100"
            )
              .then(() => {
                this.$message({
                  type: "success",
                  message: "已开启"
                });
                this.falg = true;
              })
              .catch(() => {
                this.$message({
                  type: "info",
                  message: "已取消"
                });
                this.ruleForm.useStatus = false;
              });
          }
        }


  • 相关阅读:
    containerd
    0/1 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }
    failed to pull image k8s.gcr.io/kube-controller-manage
    journalctl
    How to use Kata Containers and CRI (containerd plugin) with Kubernetes
    kubelet kubeadm kubectl install
    make an overlay with mount
    2018-2-13-不使用数据结构反转栈
    2018-8-10-卷积神经网络全面解析
    论分布式系统内的节点坏盘感知
  • 原文地址:https://www.cnblogs.com/home-/p/11663689.html
Copyright © 2011-2022 走看看