feat:调整路由
This commit is contained in:
parent
7c749a42ea
commit
86df7d9709
@ -168,7 +168,7 @@ function handleTitleClick(val) {
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
line-height: 60px;
|
||||
line-height: 90px;
|
||||
.title_content {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
|
@ -58,11 +58,14 @@ onMounted(() => {
|
||||
&-header {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
margin-bottom: 60px;
|
||||
// margin-bottom: 60px;
|
||||
}
|
||||
&-main {
|
||||
flex: 1;
|
||||
min-height: calc(100vh - 60px);
|
||||
}
|
||||
.base-laytout-header {
|
||||
height: 90px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -2,6 +2,8 @@ import { createRouter, createWebHistory } from 'vue-router';
|
||||
import Layout from '@/layouts/index.vue';
|
||||
|
||||
import demoRouters from './modules/demo';
|
||||
import path from 'path-browserify';
|
||||
import v2 from './modules/v2';
|
||||
|
||||
export const constantRoutes = [
|
||||
// {
|
||||
@ -22,58 +24,59 @@ export const constantRoutes = [
|
||||
component: Layout,
|
||||
redirect: '/home',
|
||||
meta: { title: '首页', icon: 'House' },
|
||||
children: [
|
||||
{
|
||||
path: '/home',
|
||||
component: () => import('@/views/home/index.vue'),
|
||||
name: 'home',
|
||||
meta: { title: '首页', icon: 'House' },
|
||||
},
|
||||
{
|
||||
path: '/land',
|
||||
component: () => import('@/views/land/index.vue'),
|
||||
name: 'land',
|
||||
meta: { title: '土地资源', icon: 'House' },
|
||||
},
|
||||
{
|
||||
path: '/inputs',
|
||||
name: 'inputs',
|
||||
component: () => import('@/views/inputs/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/entities',
|
||||
name: 'entities',
|
||||
component: () => import('@/views/entities/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/breed',
|
||||
name: 'breed',
|
||||
component: () => import('@/views/breed/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/plant',
|
||||
name: 'plant',
|
||||
component: () => import('@/views/plant/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/trace',
|
||||
name: 'trace',
|
||||
component: () => import('@/views/trace/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/early',
|
||||
name: 'early',
|
||||
component: () => import('@/views/early/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
// children: [
|
||||
// {
|
||||
// path: '/home',
|
||||
// component: () => import('@/views/home/index.vue'),
|
||||
// name: 'home',
|
||||
// meta: { title: '首页', icon: 'House' },
|
||||
// },
|
||||
// {
|
||||
// path: '/land',
|
||||
// component: () => import('@/views/land/index.vue'),
|
||||
// name: 'land',
|
||||
// meta: { title: '土地资源', icon: 'House' },
|
||||
// },
|
||||
// {
|
||||
// path: '/inputs',
|
||||
// name: 'inputs',
|
||||
// component: () => import('@/views/inputs/index.vue'),
|
||||
// hidden: true,
|
||||
// },
|
||||
// {
|
||||
// path: '/entities',
|
||||
// name: 'entities',
|
||||
// component: () => import('@/views/entities/index.vue'),
|
||||
// hidden: true,
|
||||
// },
|
||||
// {
|
||||
// path: '/breed',
|
||||
// name: 'breed',
|
||||
// component: () => import('@/views/breed/index.vue'),
|
||||
// hidden: true,
|
||||
// },
|
||||
// {
|
||||
// path: '/plant',
|
||||
// name: 'plant',
|
||||
// component: () => import('@/views/plant/index.vue'),
|
||||
// hidden: true,
|
||||
// },
|
||||
// {
|
||||
// path: '/trace',
|
||||
// name: 'trace',
|
||||
// component: () => import('@/views/trace/index.vue'),
|
||||
// hidden: true,
|
||||
// },
|
||||
// {
|
||||
// path: '/early',
|
||||
// name: 'early',
|
||||
// component: () => import('@/views/early/index.vue'),
|
||||
// hidden: true,
|
||||
// },
|
||||
// ],
|
||||
},
|
||||
...demoRouters,
|
||||
v2,
|
||||
{
|
||||
path: '/test',
|
||||
name: 'test',
|
||||
|
59
src/router/modules/v2.js
Normal file
59
src/router/modules/v2.js
Normal file
@ -0,0 +1,59 @@
|
||||
import Layout from '@/layouts/index.vue';
|
||||
|
||||
export default {
|
||||
path: '/v2',
|
||||
name: 'layout',
|
||||
component: Layout,
|
||||
redirect: '/v2/home',
|
||||
meta: { title: '首页', icon: 'House' },
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: () => import('@/views/home/index.vue'),
|
||||
name: 'home',
|
||||
meta: { title: '首页', icon: 'House' },
|
||||
},
|
||||
{
|
||||
path: 'land',
|
||||
component: () => import('@/views/land/index.vue'),
|
||||
name: 'land',
|
||||
meta: { title: '土地资源', icon: 'House' },
|
||||
},
|
||||
{
|
||||
path: 'inputs',
|
||||
name: 'inputs',
|
||||
component: () => import('@/views/inputs/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'entities',
|
||||
name: 'entities',
|
||||
component: () => import('@/views/entities/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'breed',
|
||||
name: 'breed',
|
||||
component: () => import('@/views/breed/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'plant',
|
||||
name: 'plant',
|
||||
component: () => import('@/views/plant/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'trace',
|
||||
name: 'trace',
|
||||
component: () => import('@/views/trace/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'early',
|
||||
name: 'early',
|
||||
component: () => import('@/views/early/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user