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