Commit b24183b4 authored by xinzhedeai's avatar xinzhedeai

add:emptyRouter 访问问题处理

parent 3e2b8acf
<template>
<router-view />
</template>
<script>
export default {
name: "EmptyLayout",
};
</script>
<style scoped>
/* 可以添加一些基础样式 */
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
</style>
\ No newline at end of file
......@@ -4,24 +4,24 @@
class="app-wrapper"
:style="{ '--current-color': theme }"
>
<!-- <div
<div
v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg"
@click="handleClickOutside"
/>
<sidebar v-if="!sidebar.hide" class="sidebar-container" /> -->
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
class="main-container"
>
<!-- <div :class="{ 'fixed-header': fixedHeader }">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div> -->
</div>
<app-main />
<!-- <right-panel>
<settings/>
</right-panel> -->
<right-panel>
<settings />
</right-panel>
</div>
</div>
</template>
......@@ -119,8 +119,4 @@ export default {
.mobile .fixed-header {
width: 100%;
}
.main-container {
margin-left: 0px !important;
}
</style>
......@@ -6,6 +6,7 @@ Vue.use(Router)
/* Layout */
import Layout from '@/layout'
import EmptyLayout from '@/layout/EmptyLayout'
/**
* Note: 路由配置项
......@@ -62,71 +63,76 @@ export const constantRoutes = [
component: () => import('@/views/error/401'),
hidden: true
},
// {
// path: '',
// component: Layout,
// redirect: 'index',
// children: [
// {
// path: 'index',
// component: () => import('@/views/index'),
// name: 'Index',
// meta: { title: '首页', icon: 'dashboard', affix: true }
// }
// ]
// },
{
path: '',
component: Layout,
redirect: 'index',
path: '/dw',
// component: Layout,
component: EmptyLayout,
redirect: 'noredirect',
children: [
{
path: 'index',
component: () => import('@/views/index'),
component: () => import('@/views/index-dw'),
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }
meta: { title: '首页2-dw', icon: 'dashboard', affix: true }
}
]
},
{
path: '/dw',
component: Layout,
path: '/zz',
component: EmptyLayout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'index',
component: () => import('@/views/index-dw'),
component: () => import('@/views/index-zz'),
name: 'Index',
meta: { title: '首页2-dw', icon: 'dashboard', affix: true }
meta: { title: '首页2-zz', icon: 'dashboard', affix: true }
}
]
},
{
path: '/guiji',
component: EmptyLayout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'index',
component: () => import('@/views/index-guiji'),
name: 'Index',
meta: { title: '首页2-gj', icon: 'dashboard', affix: true }
}
]
},
{
path: '/wl',
component: EmptyLayout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'index',
component: () => import('@/views/index-wl'),
name: 'Screen',
meta: { title: '首页-WL', icon: 'dashboard', affix: true }
}
]
},
// {
// path: '/zz',
// component: Layout,
// redirect: 'noredirect',
// children: [
// {
// path: 'index',
// component: () => import('@/views/index-zz'),
// name: 'Index',
// meta: { title: '首页2-zz', icon: 'dashboard', affix: true }
// }
// ]
// },
// {
// path: '/guiji',
// component: Layout,
// redirect: 'noredirect',
// children: [
// {
// path: 'index',
// component: () => import('@/views/index-guiji'),
// name: 'Index',
// meta: { title: '首页2-gj', icon: 'dashboard', affix: true }
// }
// ]
// },
// {
// path: '/wl',
// component: Layout,
// redirect: 'noredirect',
// children: [
// {
// path: 'screen',
// component: () => import('@/views/index-wl'),
// name: 'Screen',
// meta: { title: '首页-WL', icon: 'dashboard', affix: true }
// }
// ]
// },
{
path: '/user',
component: Layout,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment