You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
3.0 KiB
123 lines
3.0 KiB
1 year ago
|
// 引入必要的router组件
|
||
|
import {createRouter, createWebHistory} from 'vue-router'
|
||
|
// 引入视图
|
||
|
// const root = () => import('../App.vue')
|
||
|
const tableDemo1 = () => import('../views/Table_Demo1.vue')
|
||
|
const tableDemo2 = () => import('../views/Table_Demo2.vue')
|
||
|
const tableDemo3 = () => import('../views/Table_Demo3.vue')
|
||
|
const tableDemo4 = () => import('../views/Table_Demo4.vue')
|
||
|
const tableDemo5 = () => import('../views/Table_Demo5.vue')
|
||
|
const tableDemo6 = () => import('../views/Table_Demo6.vue')
|
||
|
const tableDemo7 = () => import('../views/Table_Demo7.vue')
|
||
|
const tableDemo8 = () => import('../views/Table_Demo8.vue')
|
||
|
const tableDemo9 = () => import('../views/Table_Demo9.vue')
|
||
|
const tableDemo10 = () => import('../views/Table_Demo10.vue')
|
||
|
const tableDemo11 = () => import('../views/Table_Demo11.vue')
|
||
|
const tableDemo12 = () => import('../views/Table_Demo12.vue')
|
||
|
const tableDemo13 = () => import('../views/Table_Demo13.vue')
|
||
|
const tableDemo14 = () => import('../views/Table_Demo14.vue')
|
||
|
const tableDemo15 = () => import('../views/Table_Demo15.vue')
|
||
|
const tableDemo16 = () => import('../views/Table_Demo16.vue')
|
||
|
|
||
|
// 引入组件
|
||
|
|
||
|
|
||
|
// 创建路由
|
||
|
const routes = [
|
||
|
// {
|
||
|
// path: "/",
|
||
|
// name: 'root',
|
||
|
// component: root
|
||
|
// },
|
||
|
{
|
||
|
path: '/table1',
|
||
|
name: 'table1',
|
||
|
component: tableDemo1
|
||
|
},
|
||
|
{
|
||
|
path: '/table2',
|
||
|
name: 'table2',
|
||
|
component: tableDemo2
|
||
|
},
|
||
|
{
|
||
|
path: '/table3',
|
||
|
name: 'table3',
|
||
|
component: tableDemo3
|
||
|
},
|
||
|
{
|
||
|
path: '/table4',
|
||
|
name: 'table4',
|
||
|
component: tableDemo4
|
||
|
},
|
||
|
{
|
||
|
path: '/table5',
|
||
|
name: 'table5',
|
||
|
component: tableDemo5
|
||
|
},
|
||
|
{
|
||
|
path: '/table6',
|
||
|
name: 'table6',
|
||
|
component: tableDemo6
|
||
|
},
|
||
|
{
|
||
|
path: '/table7',
|
||
|
name: 'table7',
|
||
|
component: tableDemo7
|
||
|
},
|
||
|
{
|
||
|
path: '/table8',
|
||
|
name: 'table8',
|
||
|
component: tableDemo8
|
||
|
},
|
||
|
{
|
||
|
path: '/table9',
|
||
|
name: 'table9',
|
||
|
component: tableDemo9
|
||
|
},
|
||
|
{
|
||
|
path: '/table10',
|
||
|
name: 'table10',
|
||
|
component: tableDemo10
|
||
|
},
|
||
|
{
|
||
|
path: '/table11',
|
||
|
name: 'table11',
|
||
|
component: tableDemo11
|
||
|
},
|
||
|
{
|
||
|
path: '/table12',
|
||
|
name: 'table12',
|
||
|
component: tableDemo12
|
||
|
},
|
||
|
{
|
||
|
path: '/table13',
|
||
|
name: 'table13',
|
||
|
component: tableDemo13
|
||
|
},
|
||
|
{
|
||
|
path: '/table14',
|
||
|
name: 'table14',
|
||
|
component: tableDemo14
|
||
|
},
|
||
|
{
|
||
|
path: '/table15',
|
||
|
name: 'table15',
|
||
|
component: tableDemo15
|
||
|
},
|
||
|
{
|
||
|
path: '/table16',
|
||
|
name: 'table16',
|
||
|
component: tableDemo16
|
||
|
},
|
||
|
]
|
||
|
|
||
|
// 创建路由器,使用createRouter方法,传入history(路由类型)和 创建好的路由routes
|
||
|
// 路由类型分为hash型和html5型,分别为createWebHashHistory和createWebHistory
|
||
|
const router = createRouter({
|
||
|
history: createWebHistory(),
|
||
|
routes
|
||
|
})
|
||
|
|
||
|
// 导出路由
|
||
|
export default router
|