mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
build(projects): update tsconfig、eslintrc
This commit is contained in:
@ -44,7 +44,7 @@ function setActiveParentRouteName(routeName: string) {
|
||||
}
|
||||
|
||||
const firstDegreeMenus = computed(() =>
|
||||
routeStore.menus.map(item => {
|
||||
routeStore.menus.map((item) => {
|
||||
const { routeName, label } = item;
|
||||
const icon = item?.icon;
|
||||
const hasChildren = Boolean(item.children && item.children.length);
|
||||
@ -53,13 +53,13 @@ const firstDegreeMenus = computed(() =>
|
||||
routeName,
|
||||
label,
|
||||
icon,
|
||||
hasChildren
|
||||
hasChildren,
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
function getActiveParentRouteName() {
|
||||
firstDegreeMenus.value.some(item => {
|
||||
firstDegreeMenus.value.some((item) => {
|
||||
const routeName = route.name as string;
|
||||
const flag = routeName?.includes(item.routeName);
|
||||
if (flag) {
|
||||
@ -85,10 +85,10 @@ function resetFirstDegreeMenus() {
|
||||
|
||||
const activeChildMenus = computed(() => {
|
||||
const menus: GlobalMenuOption[] = [];
|
||||
routeStore.menus.some(item => {
|
||||
routeStore.menus.some((item) => {
|
||||
const flag = item.routeName === activeParentRouteName.value && Boolean(item.children?.length);
|
||||
if (flag) {
|
||||
menus.push(...item.children!);
|
||||
menus.push(...(item.children || []));
|
||||
}
|
||||
return flag;
|
||||
});
|
||||
|
Reference in New Issue
Block a user