美文网首页
mint-ui swith

mint-ui swith

作者: 除了吃就是睡 | 来源:发表于2017-09-01 17:02 被阅读0次

    HTML部分

    <div class="page-switch">
          <div class="page-title">Switch</div>
          <div class="page-part page-switch-padding">
            <mt-switch v-model="swithValue" @change="swithChange">
              <label v-text="swith"></label>
            </mt-switch>
          </div>
        </div>
    

    JS部分

    data() {
        return {
          swithValue: false,
          swith: '加载上次'
    }
    methods: {
        swithChange(event) {
          if (event == true) {
            this.swith = '取消加载'
          } else if (event == false) {
            this.swith = '加载上次'
          }
          console.log(event)
        }
    }

    相关文章

      网友评论

          本文标题:mint-ui swith

          本文链接:https://www.haomeiwen.com/subject/eijkjxtx.html