From 514778f64e7708db4443a1c93c902e8294939f50 Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期六, 17 八月 2024 11:10:03 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web
---
src/components/menu/index.vue | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/components/menu/index.vue b/src/components/menu/index.vue
index 4485255..d7db1e6 100644
--- a/src/components/menu/index.vue
+++ b/src/components/menu/index.vue
@@ -31,6 +31,7 @@
const goto = (item: RouteRecordRaw) => {
// Open external link
+
if (regexUrl.test(item.path)) {
openWindow(item.path);
selectedKey.value = [item.name as string];
@@ -84,7 +85,8 @@
};
listenerRouteChange((newRoute) => {
const { requiresAuth, activeMenu, hideInMenu } = newRoute.meta;
- if (requiresAuth && (!hideInMenu || activeMenu)) {
+ // if (requiresAuth && (!hideInMenu || activeMenu)) {//闄ゅ幓杩欎袱涓垽鏂悗锛屽彲浠ユ甯稿睍寮�鑿滃崟
+ if (requiresAuth) {
const menuOpenKeys = findMenuOpenKeys(
(activeMenu || newRoute.name) as string
);
@@ -96,6 +98,7 @@
activeMenu || menuOpenKeys[menuOpenKeys.length - 1],
];
}
+ console.log(selectedKey.value, 48877);
}, true);
const setCollapse = (val: boolean) => {
if (appStore.device === 'desktop')
@@ -139,6 +142,7 @@
};
// selected-keys={selectedKey.value}
+ console.log(selectedKey.value, 68877);
return () => (
<a-menu
mode={topMenu.value ? 'horizontal' : 'vertical'}
@@ -147,6 +151,7 @@
show-collapse-button={appStore.device !== 'mobile'}
auto-open={false}
auto-open-selected={true}
+ selected-keys={selectedKey.value}
level-indent={34}
style="height: 100%;width:100%;"
onCollapse={setCollapse}
--
Gitblit v1.8.0