This commit is contained in:
2025-06-30 14:04:40 +08:00
parent 5032bae37d
commit 534e759350
2 changed files with 16 additions and 77 deletions
+15 -41
View File
@@ -99,33 +99,7 @@
const useStore = useUserStore(); const useStore = useUserStore();
const getCommonProps = computed(() => { const getCommonProps = computed(() => {
let menus = unref(menusRef); let menus = unref(menusRef);
if (props.isLeft === '1') { // 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 || [];
// }
}
return { return {
menus, menus,
beforeClickFn: beforeMenuClickFn, beforeClickFn: beforeMenuClickFn,
@@ -145,20 +119,20 @@
const localeStore = useLocaleStore(); const localeStore = useLocaleStore();
const router = useRouter(); const router = useRouter();
function handleMenuClick(path: string, item) { function handleMenuClick(path: string, item) {
if (isYT()) { // if (isYT()) {
const list = usePermissionStore().getBackMenuList as Array<any>; // const list = usePermissionStore().getBackMenuList as Array<any>;
for (let i = 0; i < list.length; i++) { // for (let i = 0; i < list.length; i++) {
if (list[i].path.indexOf(path) > -1) { // if (list[i].path.indexOf(path) > -1) {
router.push(path + '/pageIndexOne'); // router.push(path + '/pageIndexOne');
useUserStore().setSpecialPath(path); // useUserStore().setSpecialPath(path);
break; // break;
} // }
} // }
// useUserStore().setSpecialDownPath(''); // // useUserStore().setSpecialDownPath('');
if (item) { // if (item) {
localeStore.setPathTitle(path, item.title || ''); // localeStore.setPathTitle(path, item.title || '');
} // }
} // }
go(path); go(path);
} }
//update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称 //update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
+1 -36
View File
@@ -5,7 +5,7 @@
ref="sideRef" ref="sideRef"
breakpoint="lg" breakpoint="lg"
collapsible collapsible
:class="[...getSiderClass, isSpecialPath ? 'new-intervene-new' : '']" :class="getSiderClass"
:width="getMenuWidth" :width="getMenuWidth"
:collapsed="getCollapsed" :collapsed="getCollapsed"
:collapsedWidth="getCollapsedWidth" :collapsedWidth="getCollapsedWidth"
@@ -44,29 +44,8 @@
methods: { useUserStoreWithOut }, methods: { useUserStoreWithOut },
components: { Sider: Layout.Sider, LayoutMenu, DragBar, LayoutTrigger }, components: { Sider: Layout.Sider, LayoutMenu, DragBar, LayoutTrigger },
setup() { setup() {
const isSpecialPath = ref<boolean>(false);
const count = ref(0); 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<ElRef>(null); const dragBarRef = ref<ElRef>(null);
const sideRef = ref<ElRef>(null); const sideRef = ref<ElRef>(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;
}
}
</style> </style>