美文网首页
VUE多选框实现

VUE多选框实现

作者: Lucky_福星 | 来源:发表于2018-09-06 14:46 被阅读202次

checkedOne(typeId) {

    var idIndex = this.appList.indexOf(typeId)

      if (idIndex >= 0) {

        this.appList.splice(idIndex, 1)

      } else {

        this.appList.push(typeId)

      }

    },

    checkedAll() {

      // 全选时

      this.appList = []

      this.columTypeList.forEach(function(type) {

        this.appList.push(type.id)

      }, this)

    },

相关文章

网友评论

      本文标题:VUE多选框实现

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