From 534e75935090c5ce29eed797a241f63c84a0cd0b Mon Sep 17 00:00:00 2001 From: wx <645899409@qq.com> Date: Mon, 30 Jun 2025 14:04:40 +0800 Subject: [PATCH] update --- src/layouts/default/menu/index.vue | 56 ++++++----------------- src/layouts/default/sider/LayoutSider.vue | 37 +-------------- 2 files changed, 16 insertions(+), 77 deletions(-) diff --git a/src/layouts/default/menu/index.vue b/src/layouts/default/menu/index.vue index 1877888..b6defbb 100644 --- a/src/layouts/default/menu/index.vue +++ b/src/layouts/default/menu/index.vue @@ -99,33 +99,7 @@ const useStore = useUserStore(); const getCommonProps = computed(() => { let menus = unref(menusRef); - if (props.isLeft === '1') { - let m = usePermissionStore().getBackMenuList; - if (isShowNewLayout(useStore.getSpecialPath)) { - // if (useStore.getSpecialDownPath) { - menus = - ( - m.find((item) => { - return item.path === useStore.getSpecialPath; - })?.children || [] - ).find((item) => { - return item.path === useStore.getSpecialDownPath; - })?.children || []; - - menus = menus.filter((it) => { - return !it.hasOwnProperty('hideMenu') || it.hideMenu === false; - }); - // } else { - // menus = []; - // } - } - // else { - // menus = - // m.find((item) => { - // return item.path === useStore.getSpecialPath; - // })?.children || []; - // } - } + // if (props.isLeft === '1') { return { menus, beforeClickFn: beforeMenuClickFn, @@ -145,20 +119,20 @@ const localeStore = useLocaleStore(); const router = useRouter(); function handleMenuClick(path: string, item) { - if (isYT()) { - const list = usePermissionStore().getBackMenuList as Array; - for (let i = 0; i < list.length; i++) { - if (list[i].path.indexOf(path) > -1) { - router.push(path + '/pageIndexOne'); - useUserStore().setSpecialPath(path); - break; - } - } - // useUserStore().setSpecialDownPath(''); - if (item) { - localeStore.setPathTitle(path, item.title || ''); - } - } + // if (isYT()) { + // const list = usePermissionStore().getBackMenuList as Array; + // for (let i = 0; i < list.length; i++) { + // if (list[i].path.indexOf(path) > -1) { + // router.push(path + '/pageIndexOne'); + // useUserStore().setSpecialPath(path); + // break; + // } + // } + // // useUserStore().setSpecialDownPath(''); + // if (item) { + // localeStore.setPathTitle(path, item.title || ''); + // } + // } go(path); } //update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称 diff --git a/src/layouts/default/sider/LayoutSider.vue b/src/layouts/default/sider/LayoutSider.vue index 7551122..cd01532 100644 --- a/src/layouts/default/sider/LayoutSider.vue +++ b/src/layouts/default/sider/LayoutSider.vue @@ -5,7 +5,7 @@ ref="sideRef" breakpoint="lg" collapsible - :class="[...getSiderClass, isSpecialPath ? 'new-intervene-new' : '']" + :class="getSiderClass" :width="getMenuWidth" :collapsed="getCollapsed" :collapsedWidth="getCollapsedWidth" @@ -44,29 +44,8 @@ methods: { useUserStoreWithOut }, components: { Sider: Layout.Sider, LayoutMenu, DragBar, LayoutTrigger }, setup() { - const isSpecialPath = ref(false); const count = ref(0); - watch( - () => useUserStore().getSpecialPath, - (v: string) => { - if (isShowNewLayout(v)) { - isSpecialPath.value = true; - } else { - isSpecialPath.value = false; - } - }, - { immediate: true } - ); - watch( - () => useUserStore().getSpecialDownPath, - (v, oV) => { - if (v && v !== oV && oV) { - if (getEnvInfo().VITE_PLATFORM === 'YT') count.value++; - } - } - ); - const dragBarRef = ref(null); const sideRef = ref(null); @@ -203,18 +182,4 @@ } } - .new-intervene-new { - top: 60px !important; - z-index: 1; - height: 100% !important; - background-color: transparent; - .ant-layout-sider-children { - height: calc(100% - 63px) !important; - margin-top: 50px !important; - background-color: #ffffff; - } - .ant-layout-sider-trigger { - display: none !important; - } - }