mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 06:40:17 +08:00
build(projects): update tsconfig、eslintrc
This commit is contained in:
@@ -35,7 +35,7 @@ interface Props {
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
icon: undefined,
|
||||
isMini: false
|
||||
isMini: false,
|
||||
});
|
||||
|
||||
const { bool: isHover, setTrue, setFalse } = useBoolean();
|
||||
|
||||
@@ -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