|
@@ -5,7 +5,7 @@
|
|
|
v-model:selectedKeys="selectedKeys"
|
|
v-model:selectedKeys="selectedKeys"
|
|
|
v-model:openKeys="openKeys"
|
|
v-model:openKeys="openKeys"
|
|
|
@click="menuClick">
|
|
@click="menuClick">
|
|
|
- <a-sub-menu v-for="item in menuList"
|
|
|
|
|
|
|
+ <a-sub-menu v-for="item in filterMenu()"
|
|
|
:key="item.code">
|
|
:key="item.code">
|
|
|
<template #title>
|
|
<template #title>
|
|
|
<span>
|
|
<span>
|
|
@@ -89,9 +89,10 @@ export default defineComponent({
|
|
|
openKeys.value = preOpenKeys.value;
|
|
openKeys.value = preOpenKeys.value;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ const filterMenu = () => menuList.value.filter((e: OperationTabMenu) => e.type === 1);
|
|
|
initData(() => {
|
|
initData(() => {
|
|
|
// 处理路由跳转到菜单栏里第一个对应的页面
|
|
// 处理路由跳转到菜单栏里第一个对应的页面
|
|
|
- const list = unref(menuList);
|
|
|
|
|
|
|
+ const list = filterMenu();
|
|
|
if (list.length && list[0].children && list[0].children.length) {
|
|
if (list.length && list[0].children && list[0].children.length) {
|
|
|
// 处理修改具体某个菜单栏,主要处理页面刷新
|
|
// 处理修改具体某个菜单栏,主要处理页面刷新
|
|
|
let firstIndex = 0,
|
|
let firstIndex = 0,
|
|
@@ -113,7 +114,7 @@ export default defineComponent({
|
|
|
context.emit('chooseMenu', temp);
|
|
context.emit('chooseMenu', temp);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- return { selectedKeys, openKeys, menuList, menuClick, fontIcon };
|
|
|
|
|
|
|
+ return { selectedKeys, openKeys, filterMenu, menuClick, fontIcon };
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|