瀏覽代碼

update 更改演示案例

疯狂的狮子li 4 年之前
父節點
當前提交
2fc3dcfc74
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 4 2
      ruoyi-ui/src/views/demo/demo/index.vue
  2. 4 2
      ruoyi-ui/src/views/demo/tree/index.vue

+ 4 - 2
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;
             });
           }
         }

+ 4 - 2
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;
             });
           }
         }