|
@@ -14,6 +14,15 @@ import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
|
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
|
|
const router = useRouter();
|
|
|
const menuRef = ref();
|
|
|
+// 过滤父级菜单
|
|
|
+const menuActiveRef = ref([]);
|
|
|
+usePermissionStoreHook().wholeMenus.forEach(item => {
|
|
|
+ if (item.meta.filterMenu) {
|
|
|
+ } else {
|
|
|
+ menuActiveRef.value.push(item);
|
|
|
+ }
|
|
|
+});
|
|
|
+// -
|
|
|
const defaultActive = ref(null);
|
|
|
|
|
|
const {
|
|
@@ -39,6 +48,7 @@ function getDefaultActive(routePath) {
|
|
|
|
|
|
onMounted(() => {
|
|
|
getDefaultActive(route.path);
|
|
|
+ console.log("route.path", usePermissionStoreHook().wholeMenus);
|
|
|
});
|
|
|
|
|
|
nextTick(() => {
|
|
@@ -72,7 +82,7 @@ const changePassword = () => {
|
|
|
:default-active="defaultActive"
|
|
|
>
|
|
|
<el-menu-item
|
|
|
- v-for="route in usePermissionStoreHook().wholeMenus"
|
|
|
+ v-for="route in menuActiveRef"
|
|
|
:key="route.path"
|
|
|
:index="resolvePath(route) || route.redirect"
|
|
|
>
|