-
Notifications
You must be signed in to change notification settings - Fork 2
/
.umirc.ts
129 lines (128 loc) · 3.34 KB
/
.umirc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import { defineConfig } from 'umi';
export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
mock: false,
/*dynamicImport: {//按需加载
loading: '@/components/Loading',
},
chainWebpack(config) {
config.optimization.splitChunks({
cacheGroups: {
styles: {
name: 'styles',//把css打包成一个加载,不然按需加载会把某些css漏掉
test: /\.(css|less)$/,
chunks: 'async',
minChunks: 1,
minSize: 0,
}
},
});
},*/
// hash:true,
history: { type: 'hash' },
routes: [
{ exact: true, path: '/', redirect: '/home' },
{
path: '/home',
component: '@/pages/Index',
routes: [
// 子路由页面通过props.children传递
{
path: '/home/',
redirect: '/home/activity',
},
{
path: '/home/activity',
title: '活动页',
component: '@/pages/Reader/Activity/Activity',
exact: true,
},
{
path: '/home/listact',
title: '活动列表',
component: '@/pages/Reader/Activity/ActivityList',
exact: false,
},
{
path: '/home/adminAct',
title: '活动管理',
component: '@/pages/Admin/AdminAct',
exact: false,
routes: [
{
path: '/home/adminAct/createact',
exact: false,
title: '创建活动',
component: '@/pages/Admin/CreateAct',
},
{
path: '/home/adminAct/listact',
exact: false,
title: '活动列表',
component: '@/pages/Admin/ListAct',
},
{
path: '/home/adminAct/actParticipants/:id',
exact: true,
title: '参与用户列表',
component: '@/pages/Admin/Actmanage/ActParticipants',
},
],
},
{
path: '/home/adminUser',
title: '用户管理',
component: '@/pages/Admin/AdminUser',
exact: false,
routes: [
{
path: '/home/adminUser/user',
exact: false,
title: '用户管理',
component: '@/pages/Admin/User',
},
{
path: '/home/adminUser/usernotices/:id',
exact: true,
title: '用户联系方式',
component: '@/pages/Admin/AdminNotice',
},
{
path: '/home/adminUser/userdetails/:id',
exact: true,
title: '用户详情',
component: '@/pages/Admin/AUserSetting',
},
],
},
{
path: '/home/user',
title: '用户中心',
component: '@/pages/User/User',
},
],
},
{
path: '/login',
component: '@/pages/Login/SignIn',
},
{
path: '/Signup',
component: '@/pages/Login/SignUp',
},
{
component: '@/pages/PageNotFound',
},
],
"theme": {
"primary-color": "#1DA57A",
'body-background': '#fff',
'popover-background':'#',
'font-size-base': '14px',
'font-size-lg': 'font-size-base + 2px',
'font-size-sm': '12px',
'heading-1-size': 'ceil(@font-size-base * 2.71)'
},
});