build(projects): update tsconfig、eslintrc

This commit is contained in:
Soybean
2022-03-12 16:21:40 +08:00
parent 4093dcd6dc
commit 75de2b0604
131 changed files with 1174 additions and 1140 deletions

View File

@ -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;
});