修复 按钮loading卡死的问题

This commit is contained in:
Nguyendream 2021-07-05 00:39:29 +00:00 committed by Gitee
parent 2704e921c8
commit dfb4d9f049
2 changed files with 12 additions and 8 deletions

View File

@ -300,8 +300,8 @@ export default {
}, },
data() { data() {
return { return {
//按钮loading // 按钮loading
buttonLoading: false, buttonLoading: false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 显示搜索条件 // 显示搜索条件
@ -510,17 +510,19 @@ export default {
#end #end
if (this.form.${pkColumn.javaField} != null) { if (this.form.${pkColumn.javaField} != null) {
update${BusinessName}(this.form).then(response => { update${BusinessName}(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => {
this.buttonLoading = false;
}); });
} else { } else {
add${BusinessName}(this.form).then(response => { add${BusinessName}(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => {
this.buttonLoading = false;
}); });
} }
} }

View File

@ -351,8 +351,8 @@ export default {
}, },
data() { data() {
return { return {
//按钮loading // 按钮loading
buttonLoading: false, buttonLoading: false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
@ -567,17 +567,19 @@ export default {
#end #end
if (this.form.${pkColumn.javaField} != null) { if (this.form.${pkColumn.javaField} != null) {
update${BusinessName}(this.form).then(response => { update${BusinessName}(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => {
this.buttonLoading = false;
}); });
} else { } else {
add${BusinessName}(this.form).then(response => { add${BusinessName}(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => {
this.buttonLoading = false;
}); });
} }
} }