mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-17 14:42:51 +00:00
perf: 任务内容加载太久显示load
This commit is contained in:
parent
7a457e4364
commit
988a9b0606
6
resources/assets/js/store/actions.js
vendored
6
resources/assets/js/store/actions.js
vendored
@ -1881,6 +1881,10 @@ export default {
|
|||||||
if ($A.runNum(task_id) === 0) {
|
if ($A.runNum(task_id) === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dispatch("setLoad", {
|
||||||
|
key: `task-${task_id}`,
|
||||||
|
delay: 1200
|
||||||
|
})
|
||||||
dispatch("call", {
|
dispatch("call", {
|
||||||
url: 'project/task/content',
|
url: 'project/task/content',
|
||||||
data: {
|
data: {
|
||||||
@ -1890,6 +1894,8 @@ export default {
|
|||||||
dispatch("saveTaskContent", result.data)
|
dispatch("saveTaskContent", result.data)
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
|
}).finally(_ => {
|
||||||
|
dispatch("cancelLoad", `task-${task_id}`)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user