mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
perf: 重复添加任务列表的情况
This commit is contained in:
parent
bfb2db8a3f
commit
65b8e2270e
@ -518,6 +518,7 @@ export default {
|
|||||||
searchText: '',
|
searchText: '',
|
||||||
|
|
||||||
addColumnShow: false,
|
addColumnShow: false,
|
||||||
|
addColumnLoad: false,
|
||||||
addColumnName: '',
|
addColumnName: '',
|
||||||
|
|
||||||
sortData: [],
|
sortData: [],
|
||||||
@ -1047,21 +1048,25 @@ export default {
|
|||||||
|
|
||||||
addColumnSubmit() {
|
addColumnSubmit() {
|
||||||
let name = this.addColumnName.trim();
|
let name = this.addColumnName.trim();
|
||||||
if (name === '') {
|
if (name === '' || this.addColumnLoad) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.addColumnLoad = true
|
||||||
this.$store.dispatch("call", {
|
this.$store.dispatch("call", {
|
||||||
url: 'project/column/add',
|
url: 'project/column/add',
|
||||||
data: {
|
data: {
|
||||||
project_id: this.projectId,
|
project_id: this.projectId,
|
||||||
name: name,
|
name: name,
|
||||||
},
|
},
|
||||||
|
spinner: 600,
|
||||||
}).then(({data, msg}) => {
|
}).then(({data, msg}) => {
|
||||||
$A.messageSuccess(msg);
|
$A.messageSuccess(msg);
|
||||||
this.addColumnName = '';
|
this.addColumnName = '';
|
||||||
this.$store.dispatch("saveColumn", data);
|
this.$store.dispatch("saveColumn", data);
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.modalError(msg);
|
$A.modalError(msg);
|
||||||
|
}).finally(() => {
|
||||||
|
this.addColumnLoad = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user