-
Notifications
You must be signed in to change notification settings - Fork 1
/
.umirc.ts
241 lines (240 loc) · 5.46 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
import { defineConfig } from 'dumi';
export default defineConfig({
title: 'Aunt Design',
favicon: 'https://p0.meituan.net/travelcube/808204ae1b37659839c254d9682937ff17783.png',
logo: 'https://p0.meituan.net/travelcube/808204ae1b37659839c254d9682937ff17783.png',
outputPath: 'docs-dist',
mode: 'site',
locales: [
['zh', '中文'],
// ['en', 'English'],
],
resolve: {
includes: ['docs', 'src'],
passivePreview: true,
},
alias: {
'aunt/es': process.cwd() + '/src',
'demos': process.cwd() + '/src/demos/index.ts',
},
hash: true,
styles: [
`
html {
touch-action: manipulation;
}
#root .__dumi-default-mobile-demo-layout {
padding: 0;
}
html {
min-height: 100vh;
}
#root .__dumi-default-navbar-tool .__dumi-default-locale-select{
}
`,
],
metas: [
{
name: 'keywords',
content: 'rant,react,移动端,组件库,ui',
},
{
name: 'description',
content: '基于React的移动web端组件库。',
},
{
name: 'viewport',
content:
'width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover',
},
],
menus: {
// 需要自定义侧边菜单的路径,没有配置的路径还是会使用自动生成的配置
'/': [
{
title: '首页',
path: 'index',
},
],
'/guide': [
{
title: '介绍',
path: '/guide/introduce',
},
{
title: '快速开始',
path: '/guide/quick-start',
},
{
title: '项目实战',
path: '/guide/projects',
},
{
title: '设计变量',
path: '/guide/token',
},
{
title: '定制主题',
path: '/guide/theme',
},
{
title: '贡献指南',
path: '/guide/contribution',
},
{
title: '更新记录',
path: '/guide/changelog',
},
{
title: '国际化',
path: '/guide/i18n',
},
{
title: '常见问题',
path: '/guide/question',
},
],
'/hooks': [
{
title: 'Hooks ',
children: [
'/hooks/use-in-viewport',
'./hooks/use-count-down',
'./hooks/use-namespace',
'./hooks/use-merged-state',
'./hooks/use-event-listener',
'./hooks/use-rect',
],
},
],
'/blog': [
{
title: '构建文档',
children: ['blog/structure/site'],
},
{
title: '组件开发',
children: ['blog/components/button', 'blog/components/icon'],
},
],
'/components': [
{
title: '布局组件',
children: ['components/flex', 'components/grid', 'components/space'],
},
{
title: '基础组件',
children: [
'components/button',
'components/icon',
'components/typography',
'components/image',
],
},
{
title: '表单组件',
children: [
'components/switch',
'components/checkbox',
'components/radio',
'components/rate',
'components/selector',
],
},
{
title: '反馈组件',
children: [
'components/loading',
'components/overlay',
'components/back-top',
'components/notify',
'components/toast',
'components/dialog',
],
},
{
title: '展示组件',
children: [
'components/badge',
'components/avatar',
'components/divider',
'components/count-down',
'components/empty',
'components/tag',
'components/card',
'components/progress',
'components/circle-progress',
'components/steps',
'components/lazy-load',
'components/skeleton',
'components/segmented',
'components/water-mark',
'components/notice-bar',
],
},
{
title: '导航组件',
children: ['components/nav-bar', 'components/tabbar', 'components/pagination'],
},
{
title: '其他组件',
children: ['components/config-provider', 'components/transition'],
},
{
title: '业务组件',
children: [],
},
],
},
themeConfig: {
hd: {
// umi-hd 的 750 高清方案(默认值)
// 根据不同的设备屏幕宽度断点切换高清方案
rules: [
{ maxWidth: 375, mode: 'vw', options: [100, 750] },
{ minWidth: 376, maxWidth: 750, mode: 'vw', options: [100, 1500] },
],
// 更多 rule 配置访问 https://github.com/umijs/dumi/blob/master/packages/theme-mobile/src/typings/config.d.ts#L7
},
carrier: 'Aunt',
time: '10:12',
},
navs: {
zh: [
{
title: '指南',
path: '/guide',
},
{
title: '组件',
path: '/components',
},
{
title: 'Hooks',
path: '/hooks',
},
{
title: '开发日记',
path: '/blog',
},
{
title: 'Github',
path: 'https://github.com/79E/aunt',
},
],
en: [
{
title: 'Guide',
path: '/en/guide',
},
{
title: 'Components',
path: '/en/components',
},
{
title: 'Github',
path: 'https://github.com/79E/aunt',
},
],
},
});