types: optimizate layout

This commit is contained in:
xiaoxian521
2021-10-15 13:19:12 +08:00
parent e22e19552a
commit a7c12d93d3
6 changed files with 34 additions and 54 deletions

View File

@@ -17,9 +17,10 @@ const showLogo = ref(storageLocal.getItem("logoVal") || "1");
const isCollapse = computed(() => {
return !pureApp.getSidebarStatus;
});
const activeMenu = computed(() => {
const activeMenu = computed((): string => {
const { meta, path } = route;
if (meta.activeMenu) {
// @ts-ignore
return meta.activeMenu;
}
return path;