feat: 布局调整&默认路由不缓存&公共静态模板&husky提交校验 TS
This commit is contained in:
parent
500982ccb9
commit
64274427a9
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
cd frontend && npm run lint-staged
|
cd frontend && npm run type:check && npm run lint-staged
|
||||||
|
|
|
@ -360,7 +360,7 @@ export default function usePermission() {
|
||||||
<router-view v-slot="{ Component, route }">
|
<router-view v-slot="{ Component, route }">
|
||||||
<!-- transition为页面录音切换时提供进出动画,平滑过渡页面渲染 -->
|
<!-- transition为页面录音切换时提供进出动画,平滑过渡页面渲染 -->
|
||||||
<transition name="fade" mode="out-in" appear>
|
<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提供组件状态缓存,以便快速渲染组件内容 -->
|
||||||
<keep-alive v-else>
|
<keep-alive v-else>
|
||||||
<component :is="Component" :key="route.fullPath" />
|
<component :is="Component" :key="route.fullPath" />
|
||||||
|
|
Binary file not shown.
|
@ -34,14 +34,15 @@
|
||||||
<Menu />
|
<Menu />
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<a-layout class="layout-content" :style="paddingStyle">
|
<a-layout class="layout-content" :style="paddingStyle">
|
||||||
<MsBreadCrumb />
|
|
||||||
<a-spin :loading="appStore.loading" :tip="appStore.loadingTip">
|
<a-spin :loading="appStore.loading" :tip="appStore.loadingTip">
|
||||||
<a-scrollbar
|
<a-scrollbar
|
||||||
:style="{
|
:style="{
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
width: `calc(100vw - ${menuWidth}px)`,
|
width: `calc(100vw - ${menuWidth}px)`,
|
||||||
|
height: 'calc(100vh - 72px)',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
<MsBreadCrumb />
|
||||||
<a-layout-content>
|
<a-layout-content>
|
||||||
<PageLayout />
|
<PageLayout />
|
||||||
</a-layout-content>
|
</a-layout-content>
|
||||||
|
@ -170,7 +171,7 @@
|
||||||
.arco-layout-content {
|
.arco-layout-content {
|
||||||
padding: 16px 16px 16px 0;
|
padding: 16px 16px 16px 0;
|
||||||
min-width: 1000px;
|
min-width: 1000px;
|
||||||
height: calc(100vh - 72px);
|
min-height: 500px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -17,7 +17,7 @@ export interface RouteMeta {
|
||||||
activeMenu?: string; // 激活状态
|
activeMenu?: string; // 激活状态
|
||||||
order?: number; // 排序权重
|
order?: number; // 排序权重
|
||||||
noAffix?: boolean; // tab展示设置,设置为true则不在tab列表展示激活页面的tab
|
noAffix?: boolean; // tab展示设置,设置为true则不在tab列表展示激活页面的tab
|
||||||
ignoreCache?: boolean; // 缓存设置,true则不缓存
|
isCache?: boolean; // 缓存设置,true则不缓存
|
||||||
isTopMenu?: boolean; // 是否为顶部菜单
|
isTopMenu?: boolean; // 是否为顶部菜单
|
||||||
breadcrumbs?: BreadcrumbItem[]; // 面包屑
|
breadcrumbs?: BreadcrumbItem[]; // 面包屑
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ declare module 'vue-router' {
|
||||||
activeMenu?: string; // 激活状态
|
activeMenu?: string; // 激活状态
|
||||||
order?: number; // 排序权重
|
order?: number; // 排序权重
|
||||||
noAffix?: boolean; // tab展示设置,设置为true则不在tab列表展示激活页面的tab
|
noAffix?: boolean; // tab展示设置,设置为true则不在tab列表展示激活页面的tab
|
||||||
ignoreCache?: boolean; // 缓存设置,true则不缓存
|
isCache?: boolean; // 缓存设置,true则不缓存
|
||||||
isTopMenu?: boolean; // 是否为顶部菜单
|
isTopMenu?: boolean; // 是否为顶部菜单
|
||||||
breadcrumbs?: BreadcrumbItem[]; // 面包屑
|
breadcrumbs?: BreadcrumbItem[]; // 面包屑
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue