@yyp92-cli/template-react-pc 1.5.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/template/README.md +6 -0
- package/template/package.json +2 -3
- package/template/pnpm-lock.yaml +719 -732
- package/template/src/antdTheme/darkTheme.ts +285 -1
- package/template/src/antdTheme/lightTheme.ts +272 -54
- package/template/src/components/layout/footer/index.tsx +1 -1
- package/template/src/components/layout/header/index.tsx +3 -0
- package/template/src/components/layout/index.tsx +8 -20
- package/template/src/components/layout/side/index.tsx +1 -1
- package/template/src/components/layout-horizontal/header/index.tsx +3 -0
- package/template/src/components/layout-horizontal/index.tsx +6 -17
- package/template/src/components/layout-horizontal/side/index.tsx +1 -1
- package/template/src/components/login/index.tsx +2 -2
- package/template/src/global/constants.ts +1 -0
- package/template/src/store/antdToken.ts +35 -0
|
@@ -1 +1,285 @@
|
|
|
1
|
-
|
|
1
|
+
const activeColor = '#3591F4'
|
|
2
|
+
const activeColor1 = 'rgba(53, 145, 244, 0.5)'
|
|
3
|
+
const activeColor2 = 'rgba(53, 145, 244, 0.8)'
|
|
4
|
+
const activeColor3 = 'rgba(53, 145, 244, 0.1)'
|
|
5
|
+
const successColor = '#0CAA43'
|
|
6
|
+
const successColor1 = 'rgba(12, 170, 67, 0.5)'
|
|
7
|
+
const successColor2 = 'rgba(12, 170, 67, 0.2)'
|
|
8
|
+
const warnColor = '#FFA00A'
|
|
9
|
+
const warnColor1 = 'rgba(255, 160, 10, 0.5)'
|
|
10
|
+
const warnColor2 = 'rgba(255, 160, 10, 0.2)'
|
|
11
|
+
const errorColor = '#F43835'
|
|
12
|
+
const errorColor1 = 'rgba(244, 56, 53, 0.5)'
|
|
13
|
+
const errorColor2 = 'rgba(244, 56, 53, 0.8)'
|
|
14
|
+
|
|
15
|
+
const bgColor = '#1C1C1C'
|
|
16
|
+
const bgGreyColor = '#161616'
|
|
17
|
+
const textColor = '#FFFFFF'
|
|
18
|
+
const textColor1 = '#898d97'
|
|
19
|
+
const textColor2 = '#FFFFFF'
|
|
20
|
+
const iconColor = '#898d97'
|
|
21
|
+
const borderColor = '#2A2A2D'
|
|
22
|
+
const fontSize12 = 12
|
|
23
|
+
const lineHeight12 = 1.5
|
|
24
|
+
const fontSize14 = 14
|
|
25
|
+
const lineHeight14 = 1.4286
|
|
26
|
+
const height = 36
|
|
27
|
+
|
|
28
|
+
export const darkToken = {
|
|
29
|
+
token: {
|
|
30
|
+
colorBgContainer: bgColor,
|
|
31
|
+
colorBgContainerDisabled: bgGreyColor,
|
|
32
|
+
colorBorder: borderColor,
|
|
33
|
+
colorSplit: borderColor,
|
|
34
|
+
colorText: textColor,
|
|
35
|
+
colorTextDescription: textColor1,
|
|
36
|
+
colorTextDisabled: textColor1,
|
|
37
|
+
colorTextLightSolid: textColor2,
|
|
38
|
+
colorTextPlaceholder: textColor1,
|
|
39
|
+
colorIcon: iconColor,
|
|
40
|
+
colorBgSolidHover: activeColor2,
|
|
41
|
+
colorTextQuaternary: iconColor,
|
|
42
|
+
|
|
43
|
+
colorPrimary: activeColor,
|
|
44
|
+
colorPrimaryActive: activeColor,
|
|
45
|
+
colorPrimaryHover: activeColor,
|
|
46
|
+
colorPrimaryText: activeColor,
|
|
47
|
+
colorPrimaryTextActive: activeColor,
|
|
48
|
+
colorPrimaryTextHover: activeColor,
|
|
49
|
+
|
|
50
|
+
colorLink: activeColor,
|
|
51
|
+
colorLinkActive: activeColor,
|
|
52
|
+
colorLinkHover: activeColor,
|
|
53
|
+
|
|
54
|
+
colorError: errorColor,
|
|
55
|
+
colorErrorActive: errorColor,
|
|
56
|
+
colorErrorHover: errorColor,
|
|
57
|
+
|
|
58
|
+
borderRadius: 4,
|
|
59
|
+
fontSize: fontSize14,
|
|
60
|
+
lineHeight: lineHeight14,
|
|
61
|
+
controlHeight: 32,
|
|
62
|
+
|
|
63
|
+
controlItemBgHover: bgGreyColor,
|
|
64
|
+
controlItemBgActiveHover: activeColor3,
|
|
65
|
+
controlItemBgActive: activeColor3,
|
|
66
|
+
},
|
|
67
|
+
components: {
|
|
68
|
+
Button: {
|
|
69
|
+
borderColorDisabled: borderColor,
|
|
70
|
+
contentFontSize: fontSize14,
|
|
71
|
+
contentLineHeight: lineHeight14,
|
|
72
|
+
dangerColor: bgColor,
|
|
73
|
+
dangerShadow: 'none',
|
|
74
|
+
defaultActiveBg: bgColor,
|
|
75
|
+
defaultActiveBorderColor: activeColor,
|
|
76
|
+
defaultActiveColor: activeColor,
|
|
77
|
+
defaultBg: bgColor,
|
|
78
|
+
defaultBorderColor: borderColor,
|
|
79
|
+
defaultColor: textColor,
|
|
80
|
+
defaultGhostBorderColor: bgColor,
|
|
81
|
+
defaultGhostColor: bgColor,
|
|
82
|
+
defaultHoverBg: bgColor,
|
|
83
|
+
defaultHoverBorderColor: activeColor,
|
|
84
|
+
defaultHoverColor: activeColor,
|
|
85
|
+
defaultShadow: 'none',
|
|
86
|
+
paddingBlock: 5,
|
|
87
|
+
paddingInline: 10,
|
|
88
|
+
primaryColor: textColor2,
|
|
89
|
+
primaryShadow: 'none',
|
|
90
|
+
textTextActiveColor: textColor,
|
|
91
|
+
textTextColor: textColor,
|
|
92
|
+
textTextHoverColor: textColor,
|
|
93
|
+
},
|
|
94
|
+
Dropdown: {
|
|
95
|
+
paddingBlock: 7,
|
|
96
|
+
padding: 0,
|
|
97
|
+
paddingXS: 0,
|
|
98
|
+
paddingXXS: 0,
|
|
99
|
+
controlPaddingHorizontal: 10
|
|
100
|
+
},
|
|
101
|
+
Menu: {
|
|
102
|
+
itemHeight: 40,
|
|
103
|
+
itemBg: bgColor,
|
|
104
|
+
itemColor: textColor,
|
|
105
|
+
itemHoverBg: bgGreyColor,
|
|
106
|
+
itemHoverColor: textColor,
|
|
107
|
+
itemSelectedColor: activeColor,
|
|
108
|
+
itemSelectedBg: activeColor3,
|
|
109
|
+
popupBg: bgColor,
|
|
110
|
+
horizontalItemHoverColor: activeColor,
|
|
111
|
+
horizontalItemSelectedBg: activeColor3,
|
|
112
|
+
horizontalItemSelectedColor: activeColor,
|
|
113
|
+
itemActiveBg: activeColor3,
|
|
114
|
+
itemMarginBlock: 4,
|
|
115
|
+
itemMarginInline: 0,
|
|
116
|
+
itemBorderRadius: 0,
|
|
117
|
+
itemPaddingInline: 16,
|
|
118
|
+
iconSize: 20,
|
|
119
|
+
iconMarginInlineEnd: 8,
|
|
120
|
+
dropdownWidth: 200
|
|
121
|
+
},
|
|
122
|
+
Form: {
|
|
123
|
+
labelColor: textColor,
|
|
124
|
+
labelFontSize: fontSize14,
|
|
125
|
+
labelHeight: height,
|
|
126
|
+
labelRequiredMarkColor: errorColor,
|
|
127
|
+
verticalLabelPadding: '0 0 8px',
|
|
128
|
+
itemMarginBottom: 12,
|
|
129
|
+
colorBorder: borderColor,
|
|
130
|
+
colorError: errorColor,
|
|
131
|
+
colorPrimary: activeColor,
|
|
132
|
+
colorSuccess: successColor,
|
|
133
|
+
colorWarning: warnColor,
|
|
134
|
+
colorText: textColor,
|
|
135
|
+
colorTextDescription: textColor1,
|
|
136
|
+
controlHeight: height,
|
|
137
|
+
fontSize: fontSize14,
|
|
138
|
+
lineHeight: lineHeight14,
|
|
139
|
+
},
|
|
140
|
+
Input: {
|
|
141
|
+
activeBg: bgColor,
|
|
142
|
+
activeBorderColor: activeColor,
|
|
143
|
+
activeShadow: 'none',
|
|
144
|
+
hoverBg: bgColor,
|
|
145
|
+
hoverBorderColor: activeColor,
|
|
146
|
+
inputFontSize: fontSize14,
|
|
147
|
+
paddingBlock: 6,
|
|
148
|
+
paddingInline: 10,
|
|
149
|
+
controlHeight: height,
|
|
150
|
+
},
|
|
151
|
+
InputNumber: {
|
|
152
|
+
activeBg: bgColor,
|
|
153
|
+
activeBorderColor: activeColor,
|
|
154
|
+
activeShadow: 'none',
|
|
155
|
+
handleBorderColor: borderColor,
|
|
156
|
+
handleHoverColor: activeColor,
|
|
157
|
+
hoverBg: bgColor,
|
|
158
|
+
hoverBorderColor: activeColor,
|
|
159
|
+
inputFontSize: 14,
|
|
160
|
+
paddingBlock: 7,
|
|
161
|
+
paddingInline: 10,
|
|
162
|
+
controlHeight: height,
|
|
163
|
+
addonBg: bgColor,
|
|
164
|
+
},
|
|
165
|
+
Radio: {
|
|
166
|
+
buttonBg: bgColor,
|
|
167
|
+
buttonCheckedBg: bgColor,
|
|
168
|
+
buttonCheckedBgDisabled: bgGreyColor,
|
|
169
|
+
buttonCheckedColorDisabled: textColor1,
|
|
170
|
+
buttonColor: textColor,
|
|
171
|
+
radioSize: 18,
|
|
172
|
+
dotSize: 8,
|
|
173
|
+
buttonSolidCheckedActiveBg: activeColor,
|
|
174
|
+
buttonSolidCheckedBg: activeColor,
|
|
175
|
+
buttonSolidCheckedColor: textColor2,
|
|
176
|
+
buttonSolidCheckedHoverBg: activeColor,
|
|
177
|
+
dotColorDisabled: iconColor,
|
|
178
|
+
},
|
|
179
|
+
Switch: {
|
|
180
|
+
handleBg: bgColor,
|
|
181
|
+
handleShadow: 'unset',
|
|
182
|
+
handleSize: 18,
|
|
183
|
+
trackMinWidth: 45,
|
|
184
|
+
trackHeight: 22,
|
|
185
|
+
colorTextQuaternary: iconColor,
|
|
186
|
+
colorTextTertiary: iconColor,
|
|
187
|
+
},
|
|
188
|
+
Select: {
|
|
189
|
+
activeBorderColor: activeColor,
|
|
190
|
+
activeOutlineColor: 'none',
|
|
191
|
+
clearBg: bgColor,
|
|
192
|
+
hoverBorderColor: activeColor,
|
|
193
|
+
multipleItemBg: bgGreyColor,
|
|
194
|
+
multipleItemBorderColor: 'transparent',
|
|
195
|
+
multipleItemBorderColorDisabled: 'transparent',
|
|
196
|
+
multipleItemHeight: 28,
|
|
197
|
+
multipleSelectorBgDisabled: bgGreyColor,
|
|
198
|
+
optionActiveBg: bgGreyColor,
|
|
199
|
+
optionFontSize: fontSize14,
|
|
200
|
+
optionHeight: 32,
|
|
201
|
+
optionLineHeight: lineHeight14,
|
|
202
|
+
optionPadding: '5px 12px',
|
|
203
|
+
optionSelectedBg: activeColor3,
|
|
204
|
+
optionSelectedColor: activeColor,
|
|
205
|
+
selectorBg: bgGreyColor,
|
|
206
|
+
showArrowPaddingInlineEnd: 10,
|
|
207
|
+
controlHeight: height,
|
|
208
|
+
paddingSM: 10,
|
|
209
|
+
},
|
|
210
|
+
DatePicker: {
|
|
211
|
+
colorBgElevated: bgColor,
|
|
212
|
+
activeBg: bgColor,
|
|
213
|
+
activeBorderColor: activeColor,
|
|
214
|
+
activeShadow: 'none',
|
|
215
|
+
cellActiveWithRangeBg: activeColor2,
|
|
216
|
+
cellBgDisabled: bgGreyColor,
|
|
217
|
+
cellHoverBg: bgGreyColor,
|
|
218
|
+
cellHoverWithRangeBg: activeColor2,
|
|
219
|
+
cellRangeBorderColor: activeColor,
|
|
220
|
+
hoverBg: bgColor,
|
|
221
|
+
hoverBorderColor: activeColor,
|
|
222
|
+
multipleItemColorDisabled: textColor1,
|
|
223
|
+
multipleSelectorBgDisabled: bgGreyColor,
|
|
224
|
+
controlHeight: height
|
|
225
|
+
},
|
|
226
|
+
Modal: {
|
|
227
|
+
contentBg: bgColor,
|
|
228
|
+
footerBg: 'transparent',
|
|
229
|
+
headerBg: bgColor,
|
|
230
|
+
titleColor: textColor,
|
|
231
|
+
titleFontSize: 16,
|
|
232
|
+
titleLineHeight: 1.5,
|
|
233
|
+
},
|
|
234
|
+
Drawer: {
|
|
235
|
+
colorBgElevated: bgColor
|
|
236
|
+
},
|
|
237
|
+
Progress: {
|
|
238
|
+
circleTextColor: textColor,
|
|
239
|
+
defaultColor: activeColor,
|
|
240
|
+
remainingColor: bgGreyColor,
|
|
241
|
+
},
|
|
242
|
+
TreeSelect: {
|
|
243
|
+
nodeHoverBg: bgGreyColor,
|
|
244
|
+
nodeHoverColor: textColor,
|
|
245
|
+
nodeSelectedBg: activeColor3,
|
|
246
|
+
nodeSelectedColor: activeColor,
|
|
247
|
+
titleHeight: 32,
|
|
248
|
+
},
|
|
249
|
+
Tabs: {
|
|
250
|
+
cardBg: bgColor,
|
|
251
|
+
cardGutter: 0,
|
|
252
|
+
cardHeight: 40,
|
|
253
|
+
cardPadding: '10px 16px',
|
|
254
|
+
horizontalItemGutter: 0,
|
|
255
|
+
inkBarColor: activeColor,
|
|
256
|
+
itemActiveColor: activeColor,
|
|
257
|
+
itemColor: textColor,
|
|
258
|
+
itemHoverColor: activeColor,
|
|
259
|
+
itemSelectedColor: activeColor,
|
|
260
|
+
colorBorderSecondary: borderColor,
|
|
261
|
+
},
|
|
262
|
+
Table: {
|
|
263
|
+
borderColor: borderColor,
|
|
264
|
+
headerBg: bgGreyColor,
|
|
265
|
+
headerBorderRadius: 4,
|
|
266
|
+
headerColor: textColor,
|
|
267
|
+
headerSplitColor: bgGreyColor,
|
|
268
|
+
rowHoverBg: bgGreyColor,
|
|
269
|
+
rowSelectedBg: activeColor3,
|
|
270
|
+
rowSelectedHoverBg: activeColor3,
|
|
271
|
+
cellPaddingBlock: 10,
|
|
272
|
+
},
|
|
273
|
+
Pagination: {
|
|
274
|
+
itemActiveBg: bgColor,
|
|
275
|
+
itemActiveBgDisabled: bgGreyColor,
|
|
276
|
+
itemActiveColorDisabled: textColor1,
|
|
277
|
+
itemBg: bgColor,
|
|
278
|
+
itemInputBg: bgColor,
|
|
279
|
+
itemLinkBg: bgColor,
|
|
280
|
+
},
|
|
281
|
+
Cascader: {
|
|
282
|
+
optionPadding: '5px 12px',
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
@@ -1,68 +1,286 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
1
|
+
const activeColor = '#3591F4'
|
|
2
|
+
const activeColor1 = 'rgba(53, 145, 244, 0.5)'
|
|
3
|
+
const activeColor2 = 'rgba(53, 145, 244, 0.8)'
|
|
4
|
+
const activeColor3 = 'rgba(53, 145, 244, 0.1)'
|
|
5
|
+
const successColor = '#0CAA43'
|
|
6
|
+
const successColor1 = 'rgba(12, 170, 67, 0.5)'
|
|
7
|
+
const successColor2 = 'rgba(12, 170, 67, 0.2)'
|
|
8
|
+
const warnColor = '#FFA00A'
|
|
9
|
+
const warnColor1 = 'rgba(255, 160, 10, 0.5)'
|
|
10
|
+
const warnColor2 = 'rgba(255, 160, 10, 0.2)'
|
|
11
|
+
const errorColor = '#F43835'
|
|
12
|
+
const errorColor1 = 'rgba(244, 56, 53, 0.5)'
|
|
13
|
+
const errorColor2 = 'rgba(244, 56, 53, 0.8)'
|
|
12
14
|
|
|
15
|
+
const bgColor = '#FFFFFF'
|
|
16
|
+
const bgGreyColor = '#F2F4F9'
|
|
17
|
+
const textColor = '#363A45'
|
|
18
|
+
const textColor1 = '#898d97'
|
|
19
|
+
const textColor2 = '#FFFFFF'
|
|
20
|
+
const iconColor = '#CCD6DD'
|
|
21
|
+
const borderColor = '#DDE6F0'
|
|
22
|
+
const fontSize12 = 12
|
|
23
|
+
const lineHeight12 = 1.5
|
|
24
|
+
const fontSize14 = 14
|
|
25
|
+
const lineHeight14 = 1.4286
|
|
26
|
+
const height = 36
|
|
13
27
|
|
|
14
28
|
export const lightToken = {
|
|
15
|
-
// 全局配置
|
|
16
29
|
token: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
colorBgContainer: bgColor,
|
|
31
|
+
colorBgContainerDisabled: bgGreyColor,
|
|
32
|
+
colorBorder: borderColor,
|
|
33
|
+
colorSplit: borderColor,
|
|
34
|
+
colorText: textColor,
|
|
35
|
+
colorTextDescription: textColor1,
|
|
36
|
+
colorTextDisabled: textColor1,
|
|
37
|
+
colorTextLightSolid: textColor2,
|
|
38
|
+
colorTextPlaceholder: textColor1,
|
|
39
|
+
colorIcon: iconColor,
|
|
40
|
+
colorBgSolidHover: activeColor2,
|
|
41
|
+
colorTextQuaternary: iconColor,
|
|
42
|
+
|
|
43
|
+
colorPrimary: activeColor,
|
|
44
|
+
colorPrimaryActive: activeColor,
|
|
45
|
+
colorPrimaryHover: activeColor,
|
|
46
|
+
colorPrimaryText: activeColor,
|
|
47
|
+
colorPrimaryTextActive: activeColor,
|
|
48
|
+
colorPrimaryTextHover: activeColor,
|
|
49
|
+
|
|
50
|
+
colorLink: activeColor,
|
|
51
|
+
colorLinkActive: activeColor,
|
|
52
|
+
colorLinkHover: activeColor,
|
|
40
53
|
|
|
41
|
-
|
|
54
|
+
colorError: errorColor,
|
|
55
|
+
colorErrorActive: errorColor,
|
|
56
|
+
colorErrorHover: errorColor,
|
|
57
|
+
|
|
58
|
+
borderRadius: 4,
|
|
59
|
+
fontSize: fontSize14,
|
|
60
|
+
lineHeight: lineHeight14,
|
|
61
|
+
controlHeight: 32,
|
|
62
|
+
|
|
63
|
+
controlItemBgHover: bgGreyColor,
|
|
64
|
+
controlItemBgActiveHover: activeColor3,
|
|
65
|
+
controlItemBgActive: activeColor3,
|
|
66
|
+
},
|
|
42
67
|
components: {
|
|
43
68
|
Button: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
69
|
+
borderColorDisabled: borderColor,
|
|
70
|
+
contentFontSize: fontSize14,
|
|
71
|
+
contentLineHeight: lineHeight14,
|
|
72
|
+
dangerColor: bgColor,
|
|
73
|
+
dangerShadow: 'none',
|
|
74
|
+
defaultActiveBg: bgColor,
|
|
75
|
+
defaultActiveBorderColor: activeColor,
|
|
76
|
+
defaultActiveColor: activeColor,
|
|
77
|
+
defaultBg: bgColor,
|
|
78
|
+
defaultBorderColor: borderColor,
|
|
79
|
+
defaultColor: textColor,
|
|
80
|
+
defaultGhostBorderColor: bgColor,
|
|
81
|
+
defaultGhostColor: bgColor,
|
|
82
|
+
defaultHoverBg: bgColor,
|
|
83
|
+
defaultHoverBorderColor: activeColor,
|
|
84
|
+
defaultHoverColor: activeColor,
|
|
49
85
|
defaultShadow: 'none',
|
|
86
|
+
paddingBlock: 5,
|
|
87
|
+
paddingInline: 10,
|
|
88
|
+
primaryColor: textColor2,
|
|
50
89
|
primaryShadow: 'none',
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
90
|
+
textTextActiveColor: textColor,
|
|
91
|
+
textTextColor: textColor,
|
|
92
|
+
textTextHoverColor: textColor,
|
|
93
|
+
},
|
|
94
|
+
Dropdown: {
|
|
95
|
+
paddingBlock: 7,
|
|
96
|
+
padding: 0,
|
|
97
|
+
paddingXS: 0,
|
|
98
|
+
paddingXXS: 0,
|
|
99
|
+
controlPaddingHorizontal: 10
|
|
100
|
+
},
|
|
101
|
+
Menu: {
|
|
102
|
+
itemHeight: 40,
|
|
103
|
+
itemBg: bgColor,
|
|
104
|
+
itemColor: textColor,
|
|
105
|
+
itemHoverBg: bgGreyColor,
|
|
106
|
+
itemHoverColor: textColor,
|
|
107
|
+
itemSelectedColor: activeColor,
|
|
108
|
+
itemSelectedBg: activeColor3,
|
|
109
|
+
popupBg: bgColor,
|
|
110
|
+
horizontalItemHoverBg: bgColor,
|
|
111
|
+
horizontalItemHoverColor: activeColor,
|
|
112
|
+
horizontalItemSelectedBg: activeColor3,
|
|
113
|
+
horizontalItemSelectedColor: activeColor,
|
|
114
|
+
itemActiveBg: activeColor3,
|
|
115
|
+
itemMarginBlock: 4,
|
|
116
|
+
itemMarginInline: 8,
|
|
117
|
+
itemBorderRadius: 4,
|
|
118
|
+
itemPaddingInline: 16,
|
|
119
|
+
iconSize: 20,
|
|
120
|
+
iconMarginInlineEnd: 8,
|
|
121
|
+
dropdownWidth: 200,
|
|
122
|
+
},
|
|
123
|
+
Form: {
|
|
124
|
+
labelColor: textColor,
|
|
125
|
+
labelFontSize: fontSize14,
|
|
126
|
+
labelHeight: height,
|
|
127
|
+
labelRequiredMarkColor: errorColor,
|
|
128
|
+
verticalLabelPadding: '0 0 8px',
|
|
129
|
+
itemMarginBottom: 12,
|
|
130
|
+
colorBorder: borderColor,
|
|
131
|
+
colorError: errorColor,
|
|
132
|
+
colorPrimary: activeColor,
|
|
133
|
+
colorSuccess: successColor,
|
|
134
|
+
colorWarning: warnColor,
|
|
135
|
+
colorText: textColor,
|
|
136
|
+
colorTextDescription: textColor1,
|
|
137
|
+
controlHeight: height,
|
|
138
|
+
fontSize: fontSize14,
|
|
139
|
+
lineHeight: lineHeight14,
|
|
140
|
+
},
|
|
141
|
+
Input: {
|
|
142
|
+
activeBg: bgColor,
|
|
143
|
+
activeBorderColor: activeColor,
|
|
144
|
+
activeShadow: 'none',
|
|
145
|
+
hoverBg: bgColor,
|
|
146
|
+
hoverBorderColor: activeColor,
|
|
147
|
+
inputFontSize: fontSize14,
|
|
148
|
+
paddingBlock: 6,
|
|
149
|
+
paddingInline: 10,
|
|
150
|
+
controlHeight: height,
|
|
151
|
+
},
|
|
152
|
+
InputNumber: {
|
|
153
|
+
activeBg: bgColor,
|
|
154
|
+
activeBorderColor: activeColor,
|
|
155
|
+
activeShadow: 'none',
|
|
156
|
+
handleBorderColor: borderColor,
|
|
157
|
+
handleHoverColor: activeColor,
|
|
158
|
+
hoverBg: bgColor,
|
|
159
|
+
hoverBorderColor: activeColor,
|
|
160
|
+
inputFontSize: 14,
|
|
161
|
+
paddingBlock: 7,
|
|
162
|
+
paddingInline: 10,
|
|
163
|
+
controlHeight: height,
|
|
164
|
+
addonBg: bgColor,
|
|
165
|
+
},
|
|
166
|
+
Radio: {
|
|
167
|
+
buttonBg: bgColor,
|
|
168
|
+
buttonCheckedBg: bgColor,
|
|
169
|
+
buttonCheckedBgDisabled: bgGreyColor,
|
|
170
|
+
buttonCheckedColorDisabled: textColor1,
|
|
171
|
+
buttonColor: textColor,
|
|
172
|
+
radioSize: 18,
|
|
173
|
+
dotSize: 8,
|
|
174
|
+
buttonSolidCheckedActiveBg: activeColor,
|
|
175
|
+
buttonSolidCheckedBg: activeColor,
|
|
176
|
+
buttonSolidCheckedColor: textColor2,
|
|
177
|
+
buttonSolidCheckedHoverBg: activeColor,
|
|
178
|
+
dotColorDisabled: iconColor,
|
|
179
|
+
},
|
|
180
|
+
Switch: {
|
|
181
|
+
handleBg: bgColor,
|
|
182
|
+
handleShadow: 'unset',
|
|
183
|
+
handleSize: 18,
|
|
184
|
+
trackMinWidth: 45,
|
|
185
|
+
trackHeight: 22,
|
|
186
|
+
colorTextQuaternary: iconColor,
|
|
187
|
+
colorTextTertiary: iconColor,
|
|
188
|
+
},
|
|
189
|
+
Select: {
|
|
190
|
+
activeBorderColor: activeColor,
|
|
191
|
+
activeOutlineColor: 'none',
|
|
192
|
+
clearBg: bgColor,
|
|
193
|
+
hoverBorderColor: activeColor,
|
|
194
|
+
multipleItemBg: bgGreyColor,
|
|
195
|
+
multipleItemBorderColor: 'transparent',
|
|
196
|
+
multipleItemBorderColorDisabled: 'transparent',
|
|
197
|
+
multipleItemHeight: 28,
|
|
198
|
+
multipleSelectorBgDisabled: bgGreyColor,
|
|
199
|
+
optionActiveBg: bgGreyColor,
|
|
200
|
+
optionFontSize: fontSize14,
|
|
201
|
+
optionHeight: 32,
|
|
202
|
+
optionLineHeight: lineHeight14,
|
|
203
|
+
optionPadding: '5px 12px',
|
|
204
|
+
optionSelectedBg: activeColor3,
|
|
205
|
+
optionSelectedColor: activeColor,
|
|
206
|
+
selectorBg: bgColor,
|
|
207
|
+
showArrowPaddingInlineEnd: 10,
|
|
208
|
+
controlHeight: height,
|
|
209
|
+
paddingSM: 10,
|
|
210
|
+
},
|
|
211
|
+
DatePicker: {
|
|
212
|
+
colorBgElevated: bgColor,
|
|
213
|
+
activeBg: bgColor,
|
|
214
|
+
activeBorderColor: activeColor,
|
|
215
|
+
activeShadow: 'none',
|
|
216
|
+
cellActiveWithRangeBg: activeColor2,
|
|
217
|
+
cellBgDisabled: bgGreyColor,
|
|
218
|
+
cellHoverBg: bgGreyColor,
|
|
219
|
+
cellHoverWithRangeBg: activeColor2,
|
|
220
|
+
cellRangeBorderColor: activeColor,
|
|
221
|
+
hoverBg: bgColor,
|
|
222
|
+
hoverBorderColor: activeColor,
|
|
223
|
+
multipleItemColorDisabled: textColor1,
|
|
224
|
+
multipleSelectorBgDisabled: bgGreyColor,
|
|
225
|
+
controlHeight: height
|
|
59
226
|
},
|
|
60
|
-
|
|
61
227
|
Modal: {
|
|
62
|
-
|
|
63
|
-
contentBg: colorBg,
|
|
228
|
+
contentBg: bgColor,
|
|
64
229
|
footerBg: 'transparent',
|
|
65
|
-
|
|
230
|
+
headerBg: bgColor,
|
|
231
|
+
titleColor: textColor,
|
|
232
|
+
titleFontSize: 16,
|
|
233
|
+
titleLineHeight: 1.5,
|
|
234
|
+
},
|
|
235
|
+
Drawer: {
|
|
236
|
+
colorBgElevated: bgColor
|
|
237
|
+
},
|
|
238
|
+
Progress: {
|
|
239
|
+
circleTextColor: textColor,
|
|
240
|
+
defaultColor: activeColor,
|
|
241
|
+
remainingColor: bgGreyColor,
|
|
242
|
+
},
|
|
243
|
+
TreeSelect: {
|
|
244
|
+
nodeHoverBg: bgGreyColor,
|
|
245
|
+
nodeHoverColor: textColor,
|
|
246
|
+
nodeSelectedBg: activeColor3,
|
|
247
|
+
nodeSelectedColor: activeColor,
|
|
248
|
+
titleHeight: 32,
|
|
249
|
+
},
|
|
250
|
+
Tabs: {
|
|
251
|
+
cardBg: bgColor,
|
|
252
|
+
cardGutter: 0,
|
|
253
|
+
cardHeight: 40,
|
|
254
|
+
cardPadding: '10px 16px',
|
|
255
|
+
horizontalItemGutter: 0,
|
|
256
|
+
inkBarColor: activeColor,
|
|
257
|
+
itemActiveColor: activeColor,
|
|
258
|
+
itemColor: textColor,
|
|
259
|
+
itemHoverColor: activeColor,
|
|
260
|
+
itemSelectedColor: activeColor,
|
|
261
|
+
colorBorderSecondary: borderColor,
|
|
262
|
+
},
|
|
263
|
+
Table: {
|
|
264
|
+
borderColor: borderColor,
|
|
265
|
+
headerBg: bgGreyColor,
|
|
266
|
+
headerBorderRadius: 4,
|
|
267
|
+
headerColor: textColor,
|
|
268
|
+
headerSplitColor: bgGreyColor,
|
|
269
|
+
rowHoverBg: bgGreyColor,
|
|
270
|
+
rowSelectedBg: activeColor3,
|
|
271
|
+
rowSelectedHoverBg: activeColor3,
|
|
272
|
+
cellPaddingBlock: 10,
|
|
273
|
+
},
|
|
274
|
+
Pagination: {
|
|
275
|
+
itemActiveBg: bgColor,
|
|
276
|
+
itemActiveBgDisabled: bgGreyColor,
|
|
277
|
+
itemActiveColorDisabled: textColor1,
|
|
278
|
+
itemBg: bgColor,
|
|
279
|
+
itemInputBg: bgColor,
|
|
280
|
+
itemLinkBg: bgColor,
|
|
281
|
+
},
|
|
282
|
+
Cascader: {
|
|
283
|
+
optionPadding: '5px 12px',
|
|
66
284
|
}
|
|
67
285
|
}
|
|
68
|
-
}
|
|
286
|
+
}
|
|
@@ -8,6 +8,7 @@ import { userInfoStore } from '@/store/login'
|
|
|
8
8
|
import { tokenStore } from '@/store/token'
|
|
9
9
|
import { menusStore } from '@/store/menus'
|
|
10
10
|
import { permissionStore } from '@/store/permission'
|
|
11
|
+
import { antdTokenStore } from '@/store/antdToken'
|
|
11
12
|
|
|
12
13
|
import styles from './index.module.scss'
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ interface HeaderProps {
|
|
|
18
19
|
export const Header: React.FC<HeaderProps> = ({ }) => {
|
|
19
20
|
const navigate = useNavigate()
|
|
20
21
|
const {clearUserInfo} = userInfoStore()
|
|
22
|
+
const {setAntdToken} = antdTokenStore()
|
|
21
23
|
const {clearToken} = tokenStore()
|
|
22
24
|
const {clearMenus} = menusStore()
|
|
23
25
|
const {clearPermissions} = permissionStore()
|
|
@@ -51,6 +53,7 @@ export const Header: React.FC<HeaderProps> = ({ }) => {
|
|
|
51
53
|
|
|
52
54
|
const handleChangeTheme = (checked: boolean) => {
|
|
53
55
|
getDarkTheme(checked)
|
|
56
|
+
setAntdToken(checked)
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
|