123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { createRouter, RouteRecordRaw, createWebHistory } from 'vue-router';
- // 扩展路由配置 额外参数
- export type AppRouteRecordRaw = RouteRecordRaw & {
- hidden?: boolean
- }
- export const routes: AppRouteRecordRaw[] = [
- {
- path: '/',
- redirect:'/chartshow'
- // component: () => import('@/views/home/index.vue'),
- // name: '首页',
- // hidden: false,
- },
- {
- path: '/chartshow',
- component: () => import('@/views/chartShow/index.vue'),
- name: '图表详情',
- },
- {
- path: '/chart/preview',
- component: () => import('@/views/chartShow/preview.vue'),
- name: '图表预览',
- },
- {
- path: '/sheetshow',
- component: () => import('@/views/sheetShow/index.vue'),
- name: '表格详情',
- },
- ];
- const router = createRouter({
- history: createWebHistory(), //路由模式
- routes,
- });
- router.beforeEach((to,from,next) => {
- next();
- })
- export default router;
|