mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-18 05:18:11 +00:00
perf: 优化任务面板
This commit is contained in:
parent
14775e2861
commit
b13758d3e9
@ -1018,7 +1018,7 @@ export default {
|
|||||||
this.handleColumnDebounce();
|
this.handleColumnDebounce();
|
||||||
},
|
},
|
||||||
windowWidth() {
|
windowWidth() {
|
||||||
this.handleColumnDebounce();
|
this.handleColumnDebounce(100);
|
||||||
},
|
},
|
||||||
projectData() {
|
projectData() {
|
||||||
this.sortData = this.getSort();
|
this.sortData = this.getSort();
|
||||||
@ -1697,7 +1697,14 @@ export default {
|
|||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleColumnDebounce() {
|
handleColumnDebounce(wait = 10) {
|
||||||
|
if (this.columnDebounceWait !== wait) {
|
||||||
|
this.columnDebounceWait = wait;
|
||||||
|
if (this.columnDebounceInvoke) {
|
||||||
|
this.columnDebounceInvoke.cancel();
|
||||||
|
this.columnDebounceInvoke = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!this.columnDebounceInvoke) {
|
if (!this.columnDebounceInvoke) {
|
||||||
this.columnDebounceInvoke = debounce(_ => {
|
this.columnDebounceInvoke = debounce(_ => {
|
||||||
this.$nextTick(_ => {
|
this.$nextTick(_ => {
|
||||||
@ -1710,7 +1717,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 10);
|
}, wait);
|
||||||
}
|
}
|
||||||
this.columnDebounceInvoke();
|
this.columnDebounceInvoke();
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user