Skip to content

Commit f99ba56

Browse files
committed
vue ui
1 parent 1d80b1b commit f99ba56

7 files changed

Lines changed: 40 additions & 9 deletions

File tree

ui/vue-ui/src/app/app.routing.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
import { RouteRecordRaw } from "vue-router";
2-
import { LayoutDefault } from "/@/layout";
2+
import dashboard from "./dashboard/dashboard.vue";
33

44
const 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

ui/vue-ui/src/app/app.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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>

ui/vue-ui/src/app/dashboard/dashboard.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
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">
98
import { defineComponent } from 'vue';
109
export default defineComponent({
1110
name: 'dashboard',
11+
mounted() {
12+
debugger
13+
}
1214
})
1315
</script>
1416

ui/vue-ui/src/layout/default/layout-default.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
<script lang="ts">
99
import { defineComponent } from 'vue';
1010
export default defineComponent({
11-
name: 'layout-default',
11+
// name: 'layout-default',
12+
mounted() {
13+
debugger
14+
}
1215
})
1316
</script>
1417

ui/vue-ui/src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

ui/vue-ui/src/root.routing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AppRouting } from './app';
33

44

55
const 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
],

ui/vue-ui/src/root.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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>

0 commit comments

Comments
 (0)