!66 修复 按钮loading卡死的问题

Merge pull request !66 from Nguyendream/N/A
This commit is contained in:
疯狂的狮子Li 2021-07-05 01:31:49 +00:00 committed by Gitee
commit 769e298e0a
2 changed files with 12 additions and 8 deletions

View File

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

View File

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