hookehuyr

新增路由管理

This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
1 /* 1 /*
2 * @Date: 2021-08-18 12:47:05 2 * @Date: 2021-08-18 12:47:05
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-02-29 14:30:47 4 + * @LastEditTime: 2024-06-21 16:19:04
5 * @FilePath: /vue-flow-editor/doc/main.ts 5 * @FilePath: /vue-flow-editor/doc/main.ts
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -13,6 +13,7 @@ import VueFlowEditor from '../src/index' ...@@ -13,6 +13,7 @@ import VueFlowEditor from '../src/index'
13 import element from 'element-plus' 13 import element from 'element-plus'
14 import 'element-plus/dist/index.css' 14 import 'element-plus/dist/index.css'
15 import * as ElementPlusIconsVue from '@element-plus/icons-vue' 15 import * as ElementPlusIconsVue from '@element-plus/icons-vue'
16 +import router from './router'
16 17
17 import 'default-passive-events' 18 import 'default-passive-events'
18 19
...@@ -24,7 +25,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) { ...@@ -24,7 +25,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
24 // 屏蔽警告信息 25 // 屏蔽警告信息
25 app.config.warnHandler = () => null; 26 app.config.warnHandler = () => null;
26 27
27 -app.use(VueFlowEditor).use(element) 28 +app.use(VueFlowEditor).use(element).use(router)
28 // @ts-ignore 29 // @ts-ignore
29 //Vue.use(window.ELEMENT) 30 //Vue.use(window.ELEMENT)
30 //Vue.config.productionTip = false 31 //Vue.config.productionTip = false
......
1 +/*
2 + * @Date: 2022-07-18 10:22:22
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2024-06-21 16:28:50
5 + * @FilePath: /vue-flow-editor/doc/route.js
6 + * @Description: 文件描述
7 + */
8 +export default [{
9 + path: '/',
10 + component: () => import('./index.vue'),
11 + meta: {
12 + title: '首页',
13 + }
14 +}];
1 +/*
2 + * @Date: 2022-05-26 13:57:28
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-06-29 21:36:59
5 + * @FilePath: /tswj/src/router.js
6 + * @Description: 文件描述
7 + */
8 +import { createRouter, createWebHashHistory } from 'vue-router';
9 +import RootRoute from './route.js';
10 +
11 +// 创建路由实例并传递 `routes` 配置
12 +const router = createRouter({
13 + history: createWebHashHistory('/index.html'),
14 + routes: [...RootRoute]
15 +});
16 +
17 +// router.beforeEach((to, from, next) => {
18 + // next()
19 +// })
20 +
21 +// router.afterEach(() => {
22 + // console.warn(to);
23 + // console.warn(wx);
24 + // share(to)
25 +// })
26 +
27 +export default router;