mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 14:47:28 +08:00
chore: prettier code
This commit is contained in:
@@ -71,10 +71,10 @@
|
||||
const breadcrumbList = filterItem(matched);
|
||||
|
||||
if (currentRoute.value.meta?.currentActiveMenu) {
|
||||
breadcrumbList.push(({
|
||||
breadcrumbList.push({
|
||||
...currentRoute.value,
|
||||
name: currentRoute.value.meta?.title || currentRoute.value.name,
|
||||
} as unknown) as RouteLocationMatched);
|
||||
} as unknown as RouteLocationMatched);
|
||||
}
|
||||
routes.value = breadcrumbList;
|
||||
});
|
||||
|
@@ -76,13 +76,11 @@
|
||||
);
|
||||
});
|
||||
|
||||
const getWrapperStyle = computed(
|
||||
(): CSSProperties => {
|
||||
return {
|
||||
height: `calc(100% - ${unref(getIsShowLogo) ? '48px' : '0px'})`,
|
||||
};
|
||||
}
|
||||
);
|
||||
const getWrapperStyle = computed((): CSSProperties => {
|
||||
return {
|
||||
height: `calc(100% - ${unref(getIsShowLogo) ? '48px' : '0px'})`,
|
||||
};
|
||||
});
|
||||
|
||||
const getLogoClass = computed(() => {
|
||||
return [
|
||||
|
@@ -58,12 +58,8 @@ export default defineComponent({
|
||||
getThemeColor,
|
||||
} = useRootSetting();
|
||||
|
||||
const {
|
||||
getOpenPageLoading,
|
||||
getBasicTransition,
|
||||
getEnableTransition,
|
||||
getOpenNProgress,
|
||||
} = useTransitionSetting();
|
||||
const { getOpenPageLoading, getBasicTransition, getEnableTransition, getOpenNProgress } =
|
||||
useTransitionSetting();
|
||||
|
||||
const {
|
||||
getIsHorizontal,
|
||||
|
@@ -89,19 +89,17 @@
|
||||
];
|
||||
});
|
||||
|
||||
const getHiddenDomStyle = computed(
|
||||
(): CSSProperties => {
|
||||
const width = `${unref(getRealWidth)}px`;
|
||||
return {
|
||||
width: width,
|
||||
overflow: 'hidden',
|
||||
flex: `0 0 ${width}`,
|
||||
maxWidth: width,
|
||||
minWidth: width,
|
||||
transition: 'all 0.2s',
|
||||
};
|
||||
}
|
||||
);
|
||||
const getHiddenDomStyle = computed((): CSSProperties => {
|
||||
const width = `${unref(getRealWidth)}px`;
|
||||
return {
|
||||
width: width,
|
||||
overflow: 'hidden',
|
||||
flex: `0 0 ${width}`,
|
||||
maxWidth: width,
|
||||
minWidth: width,
|
||||
transition: 'all 0.2s',
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
prefixCls,
|
||||
|
@@ -147,14 +147,12 @@
|
||||
|
||||
useDragLine(sideRef, dragBarRef, true);
|
||||
|
||||
const getMenuStyle = computed(
|
||||
(): CSSProperties => {
|
||||
return {
|
||||
width: unref(openMenu) ? `${unref(getMenuWidth)}px` : 0,
|
||||
left: `${unref(getMixSideWidth)}px`,
|
||||
};
|
||||
}
|
||||
);
|
||||
const getMenuStyle = computed((): CSSProperties => {
|
||||
return {
|
||||
width: unref(openMenu) ? `${unref(getMenuWidth)}px` : 0,
|
||||
left: `${unref(getMixSideWidth)}px`,
|
||||
};
|
||||
});
|
||||
|
||||
const getIsFixed = computed(() => {
|
||||
/* eslint-disable-next-line */
|
||||
@@ -171,20 +169,16 @@
|
||||
return unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH;
|
||||
});
|
||||
|
||||
const getDomStyle = computed(
|
||||
(): CSSProperties => {
|
||||
const fixedWidth = unref(getIsFixed) ? unref(getRealWidth) : 0;
|
||||
const width = `${unref(getMixSideWidth) + fixedWidth}px`;
|
||||
return getWrapCommonStyle(width);
|
||||
}
|
||||
);
|
||||
const getDomStyle = computed((): CSSProperties => {
|
||||
const fixedWidth = unref(getIsFixed) ? unref(getRealWidth) : 0;
|
||||
const width = `${unref(getMixSideWidth) + fixedWidth}px`;
|
||||
return getWrapCommonStyle(width);
|
||||
});
|
||||
|
||||
const getWrapStyle = computed(
|
||||
(): CSSProperties => {
|
||||
const width = `${unref(getMixSideWidth)}px`;
|
||||
return getWrapCommonStyle(width);
|
||||
}
|
||||
);
|
||||
const getWrapStyle = computed((): CSSProperties => {
|
||||
const width = `${unref(getMixSideWidth)}px`;
|
||||
return getWrapCommonStyle(width);
|
||||
});
|
||||
|
||||
const getMenuEvents = computed(() => {
|
||||
return !unref(getMixSideFixed)
|
||||
|
@@ -106,8 +106,7 @@
|
||||
.getRoutes()
|
||||
.find((item) => item.path === currentActiveMenu);
|
||||
|
||||
findParentRoute &&
|
||||
tabStore.addTab((findParentRoute as unknown) as RouteLocationNormalized);
|
||||
findParentRoute && tabStore.addTab(findParentRoute as unknown as RouteLocationNormalized);
|
||||
} else {
|
||||
tabStore.addTab(unref(route));
|
||||
}
|
||||
|
@@ -30,14 +30,14 @@ export function initAffixTabs(): string[] {
|
||||
* @description: Set fixed tabs
|
||||
*/
|
||||
function addAffixTabs(): void {
|
||||
const affixTabs = filterAffixTabs((router.getRoutes() as unknown) as RouteLocationNormalized[]);
|
||||
const affixTabs = filterAffixTabs(router.getRoutes() as unknown as RouteLocationNormalized[]);
|
||||
affixList.value = affixTabs;
|
||||
for (const tab of affixTabs) {
|
||||
tabStore.addTab(({
|
||||
tabStore.addTab({
|
||||
meta: tab.meta,
|
||||
name: tab.name,
|
||||
path: tab.path,
|
||||
} as unknown) as RouteLocationNormalized);
|
||||
} as unknown as RouteLocationNormalized);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -20,11 +20,9 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
|
||||
const { currentRoute } = useRouter();
|
||||
const { refreshPage, closeAll, close, closeLeft, closeOther, closeRight } = useTabs();
|
||||
|
||||
const getTargetTab = computed(
|
||||
(): RouteLocationNormalized => {
|
||||
return unref(getIsTabs) ? tabContentProps.tabItem : unref(currentRoute);
|
||||
}
|
||||
);
|
||||
const getTargetTab = computed((): RouteLocationNormalized => {
|
||||
return unref(getIsTabs) ? tabContentProps.tabItem : unref(currentRoute);
|
||||
});
|
||||
|
||||
/**
|
||||
* @description: drop-down list
|
||||
|
Reference in New Issue
Block a user