File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { RouteRecordRaw } from "vue-router" ;
2- import { LayoutDefault } from "/@/layout " ;
2+ import dashboard from "./dashboard/dashboard.vue " ;
33
44const AppRouting : RouteRecordRaw [ ] = [
55 {
66 path : '/app' ,
7- component : LayoutDefault ,
7+ name : 'app' ,
8+ component : ( ) => import ( './app.vue' ) ,
89 redirect : '/app/dashboard' ,
910 children : [
1011 {
1112 path : 'dashboard' ,
1213 name : 'dashboard' ,
13- component : import ( './dashboard/dashboard.vue' )
14+ component : ( ) => import ( './dashboard/dashboard.vue' )
1415 }
1516 ]
17+ } ,
18+ {
19+ path : '/dashboard' ,
20+ name : 'dashboard' ,
21+ component : dashboard
1622 }
1723]
1824
Original file line number Diff line number Diff line change 1+ <template >
2+ <layout-default ></layout-default >
3+ </template >
4+
5+ <script lang="ts">
6+ import { defineComponent } from ' vue' ;
7+ import { LayoutDefault } from ' ../layout' ;
8+ export default defineComponent ({
9+ components: {
10+ LayoutDefault
11+ },
12+ mounted() {
13+ debugger
14+ }
15+ })
16+ </script >
Original file line number Diff line number Diff line change 11<template >
22 <div >
3- <h1 >layout-default</h1 >
4- <router-view />
3+ <h1 >dashboard</h1 >
54 </div >
65</template >
76
87<script lang="ts">
98import { defineComponent } from ' vue' ;
109export default defineComponent ({
1110 name: ' dashboard' ,
11+ mounted() {
12+ debugger
13+ }
1214})
1315 </script >
1416
Original file line number Diff line number Diff line change 88<script lang="ts">
99import { defineComponent } from ' vue' ;
1010export default defineComponent ({
11- name: ' layout-default' ,
11+ // name: 'layout-default',
12+ mounted() {
13+ debugger
14+ }
1215})
1316 </script >
1417
Original file line number Diff line number Diff line change @@ -40,11 +40,13 @@ async function bootstrap() {
4040 await setupI18n ( app ) ;
4141
4242 // Configure routing
43+ const aaa = AppRootRouting ;
44+ debugger
4345 app . use ( AppRootRouting ) ;
4446 // setupRouter(app);
4547
4648 // router-guard
47- setupRouterGuard ( router ) ;
49+ // setupRouterGuard(router);
4850
4951 // Register global directive
5052 setupGlobDirectives ( app ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { AppRouting } from './app';
33
44
55const AppRootRouting = createRouter ( {
6- history : createWebHistory ( import . meta. env . VITE_PUBLIC_PATH ) ,
6+ history : createWebHashHistory ( import . meta. env . VITE_PUBLIC_PATH ) ,
77 routes : [
88 ...AppRouting
99 ] ,
Original file line number Diff line number Diff line change 11<template >
2+ <div >{{ title }}</div >
23 <config-provider :locale =" getAntdLocale" >
34 <app-provider >
4- <router-view />
5+ <!-- <router-view /> -->
6+ <RouterView />
57 </app-provider >
68 </config-provider >
79</template >
You can’t perform that action at this time.
0 commit comments