From 3f34b1fc572cd5948005d3cd9a8dfb5c01b1f56f Mon Sep 17 00:00:00 2001 From: black_wind <55363356@qq.com> Date: Tue, 21 Jun 2022 12:12:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=A1=A8=E6=A0=BCwithLoading,=E5=89=8D=E7=AB=AF=E9=80=82?= =?UTF-8?q?=E9=85=8D=E8=A1=A8=E6=A0=BCloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Catch/Table/index.vue | 2 +- src/components/Catch/Table/mixin/operete.js | 8 ++++++++ src/components/Catch/Table/mixin/tableData.js | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Catch/Table/index.vue b/src/components/Catch/Table/index.vue index 8c77e32..0366af8 100644 --- a/src/components/Catch/Table/index.vue +++ b/src/components/Catch/Table/index.vue @@ -51,7 +51,7 @@ { + this.tableLoading && this.setTableLoading() this.source = response.data this.handlePaginateResponse(response) + }).catch(e => { + this.tableLoading && this.setTableLoading() }) } }, + // 设置tableLoading状态 + setTableLoading() { + this.tableLoading = !this.tableLoading + }, // 创建 create(formData) { this.$http.post(this.apiRoute, formData.form).then(response => { diff --git a/src/components/Catch/Table/mixin/tableData.js b/src/components/Catch/Table/mixin/tableData.js index 15a3826..579cb7b 100644 --- a/src/components/Catch/Table/mixin/tableData.js +++ b/src/components/Catch/Table/mixin/tableData.js @@ -12,6 +12,7 @@ export default { }, updateKey: 0, showDialog: false, + tableLoading: this.loading, source: [], pagination: { currentPage: 1, -- Gitee From 9fcd81446443074dc477cb929b2170026607d054 Mon Sep 17 00:00:00 2001 From: black_wind <55363356@qq.com> Date: Tue, 21 Jun 2022 13:43:07 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Catch/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Catch/index.js b/src/components/Catch/index.js index c13bf9f..53b433a 100644 --- a/src/components/Catch/index.js +++ b/src/components/Catch/index.js @@ -16,7 +16,7 @@ import copy from '@/components/Catch/Table/columns/copy' import formCreate from '@form-create/element-ui' import VueHighlightJS from 'vue-highlightjs' import store from '@/store' -import router from '@/router' +import router, { resetRouter } from '@/router' import request from '@/utils/request' @@ -142,6 +142,7 @@ class CatchAdmin { store.dispatch('permission/generateRoutes', [roles, permissions]).then(routes => { if (!routes) new Error('accessRoutes error!') // 动态加入路由 + resetRouter() router.addRoutes(routes) }) }) @@ -205,6 +206,7 @@ class CatchAdmin { method: 'delete' }) } + closeTagView(route, to) { store.dispatch('tagsView/delView', route).then(() => { router.push({ -- Gitee From 4581c9d6d63eb8538c733a60ac21009aee6b9201 Mon Sep 17 00:00:00 2001 From: black_wind <55363356@qq.com> Date: Fri, 1 Jul 2022 20:11:42 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BB=84=E4=BB=B6=E7=9A=84=E5=8A=A0=E8=BD=BDloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tinymce/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue index 6b890fa..42dd846 100644 --- a/src/components/Tinymce/index.vue +++ b/src/components/Tinymce/index.vue @@ -1,5 +1,6 @@