From 0a39390d4e71db686efbe833e6c8f832707aad67 Mon Sep 17 00:00:00 2001 From: taozi <9108791@qq.com> Date: Wed, 1 Feb 2023 21:17:56 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=85=A8=E5=B1=80loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Crud/crud.js | 4 ++++ src/views/monitor/server/index.vue | 2 +- src/views/shop/appVersion/index.vue | 2 +- src/views/shop/cate/index.vue | 2 +- src/views/shop/customer/index.vue | 2 +- src/views/shop/recharge/index.vue | 2 +- src/views/shop/store/index.vue | 2 +- src/views/shop/storestaff/index.vue | 2 +- src/views/system/dept/index.vue | 2 +- src/views/system/job/module/form.vue | 2 +- src/views/system/menu/index.vue | 2 +- src/views/system/role/index.vue | 2 +- src/views/system/timing/index.vue | 2 +- src/views/system/user/index.vue | 2 +- src/views/tools/storage/local/index.vue | 2 +- src/views/wechat/goods/index.vue | 2 +- src/views/wechat/live/index.vue | 2 +- 17 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/components/Crud/crud.js b/src/components/Crud/crud.js index a07ce92..6eb8188 100644 --- a/src/components/Crud/crud.js +++ b/src/components/Crud/crud.js @@ -244,6 +244,7 @@ function CRUD(options) { if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) { return } + crud.status.add = CRUD.STATUS.PROCESSING crud.crudMethod.add(crud.form).then(() => { crud.status.add = CRUD.STATUS.NORMAL crud.resetForm() @@ -251,6 +252,7 @@ function CRUD(options) { callVmHook(crud, CRUD.HOOK.afterSubmit) crud.toQuery() }).catch(() => { + crud.status.add = CRUD.STATUS.PREPARED callVmHook(crud, CRUD.HOOK.afterAddError) }) }, @@ -261,6 +263,7 @@ function CRUD(options) { if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) { return } + crud.status.edit = CRUD.STATUS.PROCESSING crud.crudMethod.edit(crud.form).then(() => { crud.status.edit = CRUD.STATUS.NORMAL crud.getDataStatus(crud.form.id).edit = CRUD.STATUS.NORMAL @@ -269,6 +272,7 @@ function CRUD(options) { callVmHook(crud, CRUD.HOOK.afterSubmit) crud.refresh() }).catch(() => { + crud.status.edit = CRUD.STATUS.PREPARED callVmHook(crud, CRUD.HOOK.afterEditError) }) }, diff --git a/src/views/monitor/server/index.vue b/src/views/monitor/server/index.vue index 6e3c461..8a5dee3 100644 --- a/src/views/monitor/server/index.vue +++ b/src/views/monitor/server/index.vue @@ -27,7 +27,7 @@
diff --git a/src/views/shop/appVersion/index.vue b/src/views/shop/appVersion/index.vue index 18b143e..b0a5fbe 100644 --- a/src/views/shop/appVersion/index.vue +++ b/src/views/shop/appVersion/index.vue @@ -31,7 +31,7 @@ diff --git a/src/views/shop/cate/index.vue b/src/views/shop/cate/index.vue index b1a0322..8370d84 100644 --- a/src/views/shop/cate/index.vue +++ b/src/views/shop/cate/index.vue @@ -33,7 +33,7 @@ diff --git a/src/views/shop/customer/index.vue b/src/views/shop/customer/index.vue index feba8c0..a6bb861 100644 --- a/src/views/shop/customer/index.vue +++ b/src/views/shop/customer/index.vue @@ -70,7 +70,7 @@ diff --git a/src/views/shop/recharge/index.vue b/src/views/shop/recharge/index.vue index 4dd2284..d847523 100644 --- a/src/views/shop/recharge/index.vue +++ b/src/views/shop/recharge/index.vue @@ -18,7 +18,7 @@ diff --git a/src/views/shop/store/index.vue b/src/views/shop/store/index.vue index 7a4643d..e7f88ce 100644 --- a/src/views/shop/store/index.vue +++ b/src/views/shop/store/index.vue @@ -61,7 +61,7 @@ diff --git a/src/views/shop/storestaff/index.vue b/src/views/shop/storestaff/index.vue index 5c20883..cd6ecab 100644 --- a/src/views/shop/storestaff/index.vue +++ b/src/views/shop/storestaff/index.vue @@ -43,7 +43,7 @@ diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index f4e5d67..1e4dbf3 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -38,7 +38,7 @@ diff --git a/src/views/system/job/module/form.vue b/src/views/system/job/module/form.vue index 2e88576..96b573d 100644 --- a/src/views/system/job/module/form.vue +++ b/src/views/system/job/module/form.vue @@ -73,7 +73,7 @@ 取消