From dfb4d9f04947cbfb2bf966e80f088f2d9cd989b0 Mon Sep 17 00:00:00 2001 From: Nguyendream <728115857@qq.com> Date: Mon, 5 Jul 2021 00:39:29 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=8C=89=E9=92=AEloading?= =?UTF-8?q?=E5=8D=A1=E6=AD=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/vm/vue/index-tree.vue.vm | 10 ++++++---- ruoyi-generator/src/main/resources/vm/vue/index.vue.vm | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm index d43c2ce2..de04567f 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm @@ -300,8 +300,8 @@ export default { }, data() { return { - //按钮loading - buttonLoading: false, + // 按钮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; }); } } diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm index abc799e2..12bb288d 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm @@ -351,8 +351,8 @@ export default { }, data() { return { - //按钮loading - buttonLoading: false, + // 按钮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; }); } }