remove: function (array, val) {
for (var i = 0; i < array.length; i++) {
if (array[i] == val) {
array.splice(i, 1);
}
}
return -1;
},
getChecked(index, id) {
this.isChecked = this.$refs.checkboxes[index].$el.attributes[
"aria-checked"
].value;
console.log(id);
console.log(this.isChecked);
if (this.isChecked.length < 5) {
//特么的。简单粗暴
this.arry.push(id);
} else {
this.remove(this.arry, id) //在数组里面找到相对应的进行删除
}
console.log(this.arry);
},
},