feat: 布局调整&默认路由不缓存&公共静态模板&husky提交校验 TS

This commit is contained in:
baiqi 2023-07-21 15:28:04 +08:00 committed by fit2-zhao
parent 500982ccb9
commit 64274427a9
6 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
cd frontend && npm run lint-staged
cd frontend && npm run type:check && npm run lint-staged

View File

@ -360,7 +360,7 @@ export default function usePermission() {
<router-view v-slot="{ Component, route }">
<!-- transition为页面录音切换时提供进出动画平滑过渡页面渲染 -->
<transition name="fade" mode="out-in" appear>
<component :is="Component" v-if="route.meta.ignoreCache" :key="route.fullPath" />
<component :is="Component" v-if="!route.meta.isCache" :key="route.fullPath" />
<!-- keep-alive提供组件状态缓存以便快速渲染组件内容 -->
<keep-alive v-else>
<component :is="Component" :key="route.fullPath" />

Binary file not shown.

View File

@ -34,14 +34,15 @@
<Menu />
</a-drawer>
<a-layout class="layout-content" :style="paddingStyle">
<MsBreadCrumb />
<a-spin :loading="appStore.loading" :tip="appStore.loadingTip">
<a-scrollbar
:style="{
overflow: 'auto',
width: `calc(100vw - ${menuWidth}px)`,
height: 'calc(100vh - 72px)',
}"
>
<MsBreadCrumb />
<a-layout-content>
<PageLayout />
</a-layout-content>
@ -170,7 +171,7 @@
.arco-layout-content {
padding: 16px 16px 16px 0;
min-width: 1000px;
height: calc(100vh - 72px);
min-height: 500px;
}
}
</style>

View File

@ -17,7 +17,7 @@ export interface RouteMeta {
activeMenu?: string; // 激活状态
order?: number; // 排序权重
noAffix?: boolean; // tab展示设置设置为true则不在tab列表展示激活页面的tab
ignoreCache?: boolean; // 缓存设置true则不缓存
isCache?: boolean; // 缓存设置true则不缓存
isTopMenu?: boolean; // 是否为顶部菜单
breadcrumbs?: BreadcrumbItem[]; // 面包屑
}

View File

@ -11,7 +11,7 @@ declare module 'vue-router' {
activeMenu?: string; // 激活状态
order?: number; // 排序权重
noAffix?: boolean; // tab展示设置设置为true则不在tab列表展示激活页面的tab
ignoreCache?: boolean; // 缓存设置true则不缓存
isCache?: boolean; // 缓存设置true则不缓存
isTopMenu?: boolean; // 是否为顶部菜单
breadcrumbs?: BreadcrumbItem[]; // 面包屑
}