refactor(layout): 优化页面布局显示逻辑
- 在 App.vue 中使用 route.meta.withoutLayout 替代原有的 route.path 和 route.name判断逻辑 - 在 router/index.ts 和 materialCenter.ts 中为需要独立布局的路由添加 withoutLayout: true 标记 - 更新 router/typeings.d.ts,添加 withoutLayout属性定义
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<ConfigProvider :locale="zhCN" :theme="redTheme">
|
||||
<router-view v-if="$route.path === '/login' || ['ExploreList', 'ExploreDetail', 'Trial'].includes($route.name)" />
|
||||
<router-view v-if="$route.meta.withoutLayout" />
|
||||
<LayoutBasic v-else />
|
||||
</ConfigProvider>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user