Clean up code
This commit is contained in:
parent
2ab1073826
commit
a883a4f221
|
|
@ -45,11 +45,14 @@
|
||||||
methods: {
|
methods: {
|
||||||
change(enabled, index) {
|
change(enabled, index) {
|
||||||
let type = this.types[index];
|
let type = this.types[index];
|
||||||
this.types.splice(index, 1, {
|
this.types = [
|
||||||
...type,
|
...this.types.slice(0, index),
|
||||||
enabled
|
{
|
||||||
})
|
...type,
|
||||||
console.log();
|
enabled
|
||||||
|
},
|
||||||
|
...this.types.slice(index + 1),
|
||||||
|
];
|
||||||
this.$emit('filter',
|
this.$emit('filter',
|
||||||
this.types
|
this.types
|
||||||
.filter(t => t.enabled)
|
.filter(t => t.enabled)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue