From 2fc3dcfc74c40a756fb5a9b7cf73338e085966cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Mon, 5 Jul 2021 16:35:15 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=94=B9=E6=BC=94=E7=A4=BA?= =?UTF-8?q?=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/demo/demo/index.vue | 6 ++++-- ruoyi-ui/src/views/demo/tree/index.vue | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/demo/demo/index.vue b/ruoyi-ui/src/views/demo/demo/index.vue index 279c4693..a6679f39 100644 --- a/ruoyi-ui/src/views/demo/demo/index.vue +++ b/ruoyi-ui/src/views/demo/demo/index.vue @@ -304,17 +304,19 @@ export default { this.buttonLoading = true; if (this.form.id != null) { updateDemo(this.form).then(response => { - this.buttonLoading = false; this.msgSuccess("修改成功"); this.open = false; this.getList(); + }).finally(() => { + this.buttonLoading = false; }); } else { addDemo(this.form).then(response => { - this.buttonLoading = false; this.msgSuccess("新增成功"); this.open = false; this.getList(); + }).finally(() => { + this.buttonLoading = false; }); } } diff --git a/ruoyi-ui/src/views/demo/tree/index.vue b/ruoyi-ui/src/views/demo/tree/index.vue index afe96c4a..57b152fc 100644 --- a/ruoyi-ui/src/views/demo/tree/index.vue +++ b/ruoyi-ui/src/views/demo/tree/index.vue @@ -255,17 +255,19 @@ export default { this.buttonLoading = true; if (this.form.id != null) { updateTree(this.form).then(response => { - this.buttonLoading = false; this.msgSuccess("修改成功"); this.open = false; this.getList(); + }).finally(() => { + this.buttonLoading = false; }); } else { addTree(this.form).then(response => { - this.buttonLoading = false; this.msgSuccess("新增成功"); this.open = false; this.getList(); + }).finally(() => { + this.buttonLoading = false; }); } }