美文网首页
实现按钮点击多选 再次点击从数组中移除

实现按钮点击多选 再次点击从数组中移除

作者: asmuzi | 来源:发表于2018-12-20 19:34 被阅读0次
        //移除参考班级
        handleClose(tag) {
          let i = 0;
          this.btnGroupClassList.map((item, index) => {
            if (item.name === tag) {
              i = index;
            }
          });
          this.btnGroupClassList[i].isFirst = true;
          this.partClassList.splice(this.partClassList.indexOf(tag), 1);
    
          // if (this.form.isPart == "isPart1") {
          //   this.partClassList.splice(this.partClassList.indexOf(tag), 1);
          // }
          // if (this.form.isPart == "isPart2") {
          //   this.noPartClassList.splice(this.noPartClassList.indexOf(tag), 1);
          // }
        },
    

    相关文章

      网友评论

          本文标题:实现按钮点击多选 再次点击从数组中移除

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