From ece604875e4a40a5d35cdb94d8b1179d0358df7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=B2=E6=85=A2=E6=88=96=E9=A6=99=E6=A9=99?= <49575330+xiangshu233@users.noreply.github.com> Date: Fri, 21 Oct 2022 17:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=89=E4=B8=AA=20useEchar?= =?UTF-8?q?ts=20hooks=20=E7=A4=BA=E4=BE=8B=20=E9=9A=8F=E4=BE=BF=E6=95=B4?= =?UTF-8?q?=E4=BA=86=E4=B8=AA=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 13 ++- src/layout/DefaultLayout.vue | 7 -- src/layout/components/Header.vue | 20 ---- src/layout/components/Main.vue | 29 ------ src/layout/components/Menu.vue | 29 ------ src/layout/index.vue | 17 ++-- src/router/modules.ts | 3 +- src/styles/common.less | 13 +++ src/views/dashboard/index.vue | 161 +++++++++++-------------------- src/views/message/barChart.vue | 106 ++++++++++++++++++++ src/views/message/index.vue | 12 +-- src/views/message/lineChart.vue | 119 +++++++++++++++++++++++ src/views/message/pieChart.vue | 65 +++++++++++++ src/views/my/index.vue | 23 ++--- 14 files changed, 391 insertions(+), 226 deletions(-) delete mode 100644 src/layout/DefaultLayout.vue delete mode 100644 src/layout/components/Header.vue delete mode 100644 src/layout/components/Main.vue delete mode 100644 src/layout/components/Menu.vue create mode 100644 src/views/message/barChart.vue create mode 100644 src/views/message/lineChart.vue create mode 100644 src/views/message/pieChart.vue diff --git a/src/App.vue b/src/App.vue index a244fa9..205c8e4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,12 @@ @@ -12,9 +14,14 @@ import { computed } from 'vue'; import { useDesignSettingStore } from '@/store/modules/designSetting'; import { darken, lighten } from '@/utils/index'; + import { useRouteStore } from '@/store/modules/route'; + const routeStore = useRouteStore(); const designStore = useDesignSettingStore(); + // 需要缓存的路由组件 + const keepAliveComponents = computed(() => routeStore.keepAliveComponents); + const getDarkMode = computed(() => designStore.getDarkMode); const getThemeVars = computed(() => { diff --git a/src/layout/DefaultLayout.vue b/src/layout/DefaultLayout.vue deleted file mode 100644 index fb62d1f..0000000 --- a/src/layout/DefaultLayout.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/src/layout/components/Header.vue b/src/layout/components/Header.vue deleted file mode 100644 index 1c1b583..0000000 --- a/src/layout/components/Header.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/src/layout/components/Main.vue b/src/layout/components/Main.vue deleted file mode 100644 index 92336f2..0000000 --- a/src/layout/components/Main.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/src/layout/components/Menu.vue b/src/layout/components/Menu.vue deleted file mode 100644 index 536be0f..0000000 --- a/src/layout/components/Menu.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/src/layout/index.vue b/src/layout/index.vue index de3c5c8..fe59085 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -3,6 +3,14 @@