|
@@ -66,7 +66,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.activeClassList = JSON.parse(JSON.stringify(this.classList));
|
|
|
+ this.activeClassList = this.classList;
|
|
|
},
|
|
|
methods: {
|
|
|
addClass() {
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
this.addDisabled(arr)
|
|
|
} else {
|
|
|
if (arr.length == 0) {
|
|
|
- this.activeClassList = JSON.parse(JSON.stringify(this.classList));
|
|
|
+ this.activeClassList = this.classList
|
|
|
} else {
|
|
|
this.addDisabled(arr)
|
|
|
}
|
|
@@ -136,12 +136,10 @@ export default {
|
|
|
},
|
|
|
addDisabled(arr){
|
|
|
this.activeClassList = this.activeClassList.map((classes) => {
|
|
|
- if (arr.indexOf(classes.id) != -1) {
|
|
|
- classes.disabled = true;
|
|
|
- } else {
|
|
|
- classes.disabled = false;
|
|
|
- }
|
|
|
- return classes;
|
|
|
+ return {
|
|
|
+ ...classes,
|
|
|
+ disabled: arr.indexOf(classes.id) != -1
|
|
|
+ };
|
|
|
});
|
|
|
}
|
|
|
},
|