From 7254b65bd9c279cc40c97e8be5447a4c383d99a0 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 4 Mar 2021 15:05:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0loading=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils/loading.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/utils/loading.js b/frontend/src/utils/loading.js index 37af129066..c4673fa18b 100644 --- a/frontend/src/utils/loading.js +++ b/frontend/src/utils/loading.js @@ -18,3 +18,12 @@ export const tryHideLoading = identification => { } } +/** + * 说明 + * 要在view中加loading只需要两个步骤 + * 1.在vue页面文件中加 v-loading="$store.getters.loadingMap[$store.getters.currentPath]" + * 例如:views/system/user/index.vue + * 2.在需要loading的api中添加config {loading: true} + * 例如:api/system/user.js中userLists方法 需要配置loading: true + * 针对整个view页面,需要局部loading请在对应页面中自己添加 + */