Showing
3 changed files
with
118 additions
and
98 deletions
@@ -7,12 +7,16 @@ export default defineConfig({ | @@ -7,12 +7,16 @@ export default defineConfig({ | ||
7 | base: '/', | 7 | base: '/', |
8 | publicPath: `/${pkg.name}/`, | 8 | publicPath: `/${pkg.name}/`, |
9 | mountElementId: pkg.name, | 9 | mountElementId: pkg.name, |
10 | + dva: {}, | ||
10 | webpack5: { | 11 | webpack5: { |
11 | lazyCompilation: {}, | 12 | lazyCompilation: {}, |
12 | }, | 13 | }, |
13 | nodeModulesTransform: { | 14 | nodeModulesTransform: { |
14 | type: 'none', | 15 | type: 'none', |
15 | }, | 16 | }, |
17 | + history: { | ||
18 | + type: 'hash' | ||
19 | + }, | ||
16 | routes, | 20 | routes, |
17 | alias: { | 21 | alias: { |
18 | '@/src': 'src', | 22 | '@/src': 'src', |
@@ -38,5 +42,5 @@ export default defineConfig({ | @@ -38,5 +42,5 @@ export default defineConfig({ | ||
38 | 'process.env.wf.appCode': 'wf', | 42 | 'process.env.wf.appCode': 'wf', |
39 | 'process.env.wf.funCode': 'ew57e', | 43 | 'process.env.wf.funCode': 'ew57e', |
40 | 'process.env.openUrl': '/open', | 44 | 'process.env.openUrl': '/open', |
41 | - }, | 45 | + } |
42 | }); | 46 | }); |
src/layouts/index.tsx
0 → 100644
1 | export default [ | 1 | export default [ |
2 | { | 2 | { |
3 | - name: 'app-list', | ||
4 | - icon: 'smile', | ||
5 | - exact: true, | ||
6 | - path: '/sys/:appCode/:funCode/list', | ||
7 | - component: '@/src/pages/list-view', | ||
8 | - }, | ||
9 | - { | ||
10 | - name: 'app-list', | ||
11 | - icon: 'smile', | ||
12 | - exact: true, | ||
13 | - path: '/sys/:appCode/:funCode/:viewCode/list', | ||
14 | - component: '@/src/pages/list-view', | ||
15 | - }, | ||
16 | - { | ||
17 | - name: 'app-dataset', | ||
18 | - icon: 'smile', | ||
19 | - exact: true, | ||
20 | - path: '/sys/:appCode/:funCode/dataset', | ||
21 | - component: '@/src/pages/list-view', | ||
22 | - }, | ||
23 | - { | ||
24 | - name: 'chart', | ||
25 | - icon: 'smile', | ||
26 | - exact: true, | ||
27 | - path: '/sys/:appCode/:reportCode/chart', | ||
28 | - component: '@/src/pages/chart', | ||
29 | - }, | ||
30 | - { | ||
31 | - name: 'app-detail', | ||
32 | - icon: 'smile', | ||
33 | - exact: true, | ||
34 | - path: '/sys/:appCode/:funCode/detail', | ||
35 | - component: '@/src/pages/detail', | ||
36 | - }, | ||
37 | - { | ||
38 | - name: 'app-form', | ||
39 | - icon: 'smile', | ||
40 | - layout: true, | ||
41 | - path: '/sys/:appCode/:funCode/form/:type', | ||
42 | - component: '@/src/pages/form', | ||
43 | - }, | ||
44 | - { | ||
45 | - name: 'test', | ||
46 | - icon: 'smile', | ||
47 | - layout: true, | ||
48 | - path: '/test', | ||
49 | - component: '@/src/pages/test', | ||
50 | - }, | ||
51 | - // { | ||
52 | - // name: 'custom', | ||
53 | - // icon: 'smile', | ||
54 | - // exact: true, | ||
55 | - // path: '/sys/:appCode/:customCode/custom', | ||
56 | - // component: '@/src/pages/custom-view', | ||
57 | - // }, | ||
58 | - // { | ||
59 | - // path: '/sys/menu', | ||
60 | - // name: 'menu', | ||
61 | - // icon: 'smile', | ||
62 | - // exact: true, | ||
63 | - // component: './system/menu', | ||
64 | - // }, | ||
65 | - // { | ||
66 | - // path: '/sys/role', | ||
67 | - // name: 'menu', | ||
68 | - // icon: 'smile', | ||
69 | - // exact: true, | ||
70 | - // component: './system/role', | ||
71 | - // }, | ||
72 | - // { | ||
73 | - // name: 'app-manage', | ||
74 | - // icon: 'smile', | ||
75 | - // path: '/sys/apps/list', | ||
76 | - // exact: true, | ||
77 | - // component: './apps/list', | ||
78 | - // }, | ||
79 | - // { | ||
80 | - // name: 'add', | ||
81 | - // icon: 'smile', | ||
82 | - // path: '/sys/apps/form/add', | ||
83 | - // exact: true, | ||
84 | - // component: './apps/form', | ||
85 | - // }, | ||
86 | - // { | ||
87 | - // name: 'view', | ||
88 | - // icon: 'smile', | ||
89 | - // path: '/sys/apps/form/view', | ||
90 | - // exact: true, | ||
91 | - // component: './apps/form', | ||
92 | - // }, | ||
93 | - // { | ||
94 | - // name: 'edit', | ||
95 | - // icon: 'smile', | ||
96 | - // path: '/sys/apps/form/edit', | ||
97 | - // exact: true, | ||
98 | - // component: './apps/form', | ||
99 | - // }, | 3 | + path: '/', |
4 | + component: '@/src/layouts', | ||
5 | + routes: [ | ||
6 | + { | ||
7 | + name: 'app-list', | ||
8 | + icon: 'smile', | ||
9 | + exact: true, | ||
10 | + path: '/sys/:appCode/:funCode/list', | ||
11 | + component: '@/src/pages/list-view', | ||
12 | + }, | ||
13 | + { | ||
14 | + name: 'app-list', | ||
15 | + icon: 'smile', | ||
16 | + exact: true, | ||
17 | + path: '/sys/:appCode/:funCode/:viewCode/list', | ||
18 | + component: '@/src/pages/list-view', | ||
19 | + }, | ||
20 | + { | ||
21 | + name: 'app-dataset', | ||
22 | + icon: 'smile', | ||
23 | + exact: true, | ||
24 | + path: '/sys/:appCode/:funCode/dataset', | ||
25 | + component: '@/src/pages/list-view', | ||
26 | + }, | ||
27 | + { | ||
28 | + name: 'chart', | ||
29 | + icon: 'smile', | ||
30 | + exact: true, | ||
31 | + path: '/sys/:appCode/:reportCode/chart', | ||
32 | + component: '@/src/pages/chart', | ||
33 | + }, | ||
34 | + { | ||
35 | + name: 'app-detail', | ||
36 | + icon: 'smile', | ||
37 | + exact: true, | ||
38 | + path: '/sys/:appCode/:funCode/detail', | ||
39 | + component: '@/src/pages/detail', | ||
40 | + }, | ||
41 | + { | ||
42 | + name: 'app-form', | ||
43 | + icon: 'smile', | ||
44 | + layout: true, | ||
45 | + path: '/sys/:appCode/:funCode/form/:type', | ||
46 | + component: '@/src/pages/form', | ||
47 | + }, | ||
48 | + { | ||
49 | + name: 'test', | ||
50 | + icon: 'smile', | ||
51 | + layout: true, | ||
52 | + path: '/test', | ||
53 | + component: '@/src/pages/test', | ||
54 | + }, | ||
55 | + // { | ||
56 | + // name: 'custom', | ||
57 | + // icon: 'smile', | ||
58 | + // exact: true, | ||
59 | + // path: '/sys/:appCode/:customCode/custom', | ||
60 | + // component: '@/src/pages/custom-view', | ||
61 | + // }, | ||
62 | + // { | ||
63 | + // path: '/sys/menu', | ||
64 | + // name: 'menu', | ||
65 | + // icon: 'smile', | ||
66 | + // exact: true, | ||
67 | + // component: './system/menu', | ||
68 | + // }, | ||
69 | + // { | ||
70 | + // path: '/sys/role', | ||
71 | + // name: 'menu', | ||
72 | + // icon: 'smile', | ||
73 | + // exact: true, | ||
74 | + // component: './system/role', | ||
75 | + // }, | ||
76 | + // { | ||
77 | + // name: 'app-manage', | ||
78 | + // icon: 'smile', | ||
79 | + // path: '/sys/apps/list', | ||
80 | + // exact: true, | ||
81 | + // component: './apps/list', | ||
82 | + // }, | ||
83 | + // { | ||
84 | + // name: 'add', | ||
85 | + // icon: 'smile', | ||
86 | + // path: '/sys/apps/form/add', | ||
87 | + // exact: true, | ||
88 | + // component: './apps/form', | ||
89 | + // }, | ||
90 | + // { | ||
91 | + // name: 'view', | ||
92 | + // icon: 'smile', | ||
93 | + // path: '/sys/apps/form/view', | ||
94 | + // exact: true, | ||
95 | + // component: './apps/form', | ||
96 | + // }, | ||
97 | + // { | ||
98 | + // name: 'edit', | ||
99 | + // icon: 'smile', | ||
100 | + // path: '/sys/apps/form/edit', | ||
101 | + // exact: true, | ||
102 | + // component: './apps/form', | ||
103 | + // }, | ||
104 | + ] | ||
105 | + } | ||
100 | ]; | 106 | ]; |