mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 重构路由类型和路由元数据类型,重构多级菜单路由写法
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
<template>
|
||||
<router-view />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
<style scoped></style>
|
@ -61,7 +61,7 @@ function generateBreadcrumb() {
|
||||
function recursionBreadcrumb(routeMatched: RouteLocationMatched[]) {
|
||||
const list: Breadcrumb[] = [];
|
||||
routeMatched.forEach(item => {
|
||||
if (!item.meta?.isNotMenu) {
|
||||
if (!item.meta?.notAsMenu) {
|
||||
const routeName = item.name as RouteKey;
|
||||
const breadcrumItem: Breadcrumb = {
|
||||
key: routeName,
|
||||
|
@ -69,7 +69,7 @@ const activeParentRouteName = ref(getActiveRouteName());
|
||||
|
||||
function getActiveRouteName() {
|
||||
let name = '';
|
||||
const menuMatched = route.matched.filter(item => !item.meta.isNotMenu);
|
||||
const menuMatched = route.matched.filter(item => !item.meta?.notAsMenu);
|
||||
if (menuMatched.length) {
|
||||
name = menuMatched[0].name as string;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ const activeParentRouteName = ref(getActiveRouteName());
|
||||
|
||||
function getActiveRouteName() {
|
||||
let name = '';
|
||||
const menuMatched = route.matched.filter(item => !item.meta.isNotMenu);
|
||||
const menuMatched = route.matched.filter(item => !item.meta?.notAsMenu);
|
||||
if (menuMatched.length) {
|
||||
name = menuMatched[0].name as string;
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import BasicLayout from './BasicLayout/index.vue';
|
||||
import BlankLayout from './BlankLayout/index.vue';
|
||||
import RouterViewLayout from './RouterViewLayout/index.vue';
|
||||
|
||||
export { BasicLayout, BlankLayout, RouterViewLayout };
|
||||
export { BasicLayout, BlankLayout };
|
||||
|
Reference in New Issue
Block a user