From c25b130b7dfc775f6eaec712360828a719fff16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E4=B8=87?= <52823142+Ten-K@users.noreply.github.com> Date: Wed, 3 Nov 2021 10:13:27 +0800 Subject: [PATCH 1/9] perf: perf sidebar (#91) --- src/layout/components/sidebar/sidebarItem.vue | 15 +++++++++++++-- src/style/sidebar.scss | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/layout/components/sidebar/sidebarItem.vue b/src/layout/components/sidebar/sidebarItem.vue index 968ef6d4e..c1bc5135b 100644 --- a/src/layout/components/sidebar/sidebarItem.vue +++ b/src/layout/components/sidebar/sidebarItem.vue @@ -3,11 +3,13 @@ import path from "path"; import { storageLocal } from "/@/utils/storage"; import { PropType, ref, nextTick } from "vue"; import { childrenType } from "../../types"; +import { useAppStoreHook } from "/@/store/modules/app"; import Icon from "/@/components/ReIcon/src/Icon.vue"; const layout = ref( storageLocal.getItem("responsive-layout") || "vertical-dark" ); const menuMode = layout.value.layout.split("-")[0] === "vertical"; +const pureApp = useAppStoreHook(); const props = defineProps({ item: { @@ -91,7 +93,15 @@ function resolvePath(routePath) { " />