update
This commit is contained in:
@@ -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<any>;
|
||||
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<any>;
|
||||
// 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 配置成菜单后,打开菜单,显示名称未展示为菜单名称
|
||||
|
||||
@@ -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<boolean>(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<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>
|
||||
|
||||
Reference in New Issue
Block a user