lcap-frontend-library 0.0.1
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/README.md +271 -0
- package/bin/lcap-frontend-library.mjs +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +27 -0
- package/dist/init.d.ts +6 -0
- package/dist/init.js +79 -0
- package/dist/sync.d.ts +4 -0
- package/dist/sync.js +70 -0
- package/dist/utils.d.ts +19 -0
- package/dist/utils.js +101 -0
- package/package.json +34 -0
- package/packages/lcap-frontend-library/LEARNINGS.md +11 -0
- package/packages/lcap-frontend-library/SKILL.md +86 -0
- package/packages/lcap-frontend-library/commands/migrate.check.md +287 -0
- package/packages/lcap-frontend-library/commands/migrate.green.md +190 -0
- package/packages/lcap-frontend-library/commands/migrate.plan.md +169 -0
- package/packages/lcap-frontend-library/commands/migrate.red.md +160 -0
- package/packages/lcap-frontend-library/commands/migrate.scan.md +151 -0
- package/packages/lcap-frontend-library/commands/migrate.spec.md +144 -0
- package/packages/lcap-frontend-library/commands/migrate.tasks.md +179 -0
- package/packages/lcap-frontend-library/commands/speckit.create.md +201 -0
- package/packages/lcap-frontend-library/commands/speckit.implement.md +88 -0
- package/packages/lcap-frontend-library/commands/speckit.plan.md +79 -0
- package/packages/lcap-frontend-library/commands/speckit.self-check.md +177 -0
- package/packages/lcap-frontend-library/commands/speckit.specify.md +91 -0
- package/packages/lcap-frontend-library/commands/speckit.tasks.md +61 -0
- package/packages/lcap-frontend-library/references/frontend-design/LICENSE.txt +177 -0
- package/packages/lcap-frontend-library/references/frontend-design/SKILL.md +42 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/SKILL.md +360 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/api.md +331 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/block.md +160 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/i18n.md +95 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/icon.md +27 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/ide/container.md +728 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/ide/element.md +312 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/ide/expression.md +154 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/ide/index.md +113 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/ide/modal.md +189 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/ide/popover.md +171 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/ide.md +799 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/implementation-rules.md +242 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/index.md +27 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/nasl-view-component.md +895 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/accessibility.md +185 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/child.md +82 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/data-source.md +261 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/event.md +171 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/form.md +266 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/function.md +80 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/link.md +137 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/slot.md +128 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-ant-design.md +1470 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-cloud-ui.md +259 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-element-plus.md +580 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-element-ui.md +1007 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-mobile-ui.md +85 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/theme.md +234 -0
- package/packages/lcap-frontend-library/references/lcap-extension-component/workflow-guardrails.md +328 -0
- package/packages/lcap-frontend-library/references/nasl-logic-authoring/SKILL.md +201 -0
- package/packages/lcap-frontend-library/scripts/bash/create-component-files.sh +95 -0
- package/packages/lcap-frontend-library/scripts/bash/create-extension-project.sh +109 -0
- package/packages/lcap-frontend-library/scripts/bash/create-logic-files.sh +149 -0
- package/packages/lcap-frontend-library/scripts/bash/create-spec.sh +109 -0
- package/packages/lcap-frontend-library/scripts/bash/get-available-port.sh +35 -0
- package/packages/lcap-frontend-library/scripts/bash/list-specs.sh +19 -0
- package/packages/lcap-frontend-library/scripts/node/setup-extension-project.mjs +166 -0
- package/packages/lcap-frontend-library/templates/component-self-check.md +31 -0
- package/packages/lcap-frontend-library/templates/component-template.md +96 -0
- package/packages/lcap-frontend-library/templates/library-report-template.md +52 -0
- package/packages/lcap-frontend-library/templates/logic-template.md +44 -0
- package/packages/lcap-frontend-library/templates/migration-manifest-template.md +84 -0
- package/packages/lcap-frontend-library/templates/migration-plan-template.md +138 -0
- package/packages/lcap-frontend-library/templates/migration-report-template.md +227 -0
- package/packages/lcap-frontend-library/templates/migration-spec-template.md +135 -0
- package/packages/lcap-frontend-library/templates/migration-tasks-template.md +129 -0
- package/packages/lcap-frontend-library/templates/plan-template.md +299 -0
- package/packages/lcap-frontend-library/templates/self-check-report-template.md +148 -0
- package/packages/lcap-frontend-library/templates/tasks-template.md +81 -0
- package/packages/lcap-frontend-library/workflows/create/flow.md +199 -0
- package/packages/lcap-frontend-library/workflows/evolve/flow.md +249 -0
- package/packages/lcap-frontend-library/workflows/generate/flow.md +10 -0
- package/packages/lcap-frontend-library/workflows/harness/flow.md +82 -0
- package/packages/lcap-frontend-library/workflows/migrate/flow.md +302 -0
- package/packages/lcap-frontend-library/workflows/migrate/knowledge-base.md +564 -0
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
# 使用 Element Plus 全局主题变量
|
|
2
|
+
|
|
3
|
+
## 复制变量文件
|
|
4
|
+
|
|
5
|
+
创建文件 `.storybook/vars.css`, 内容如下:
|
|
6
|
+
|
|
7
|
+
```css
|
|
8
|
+
:root {
|
|
9
|
+
--el-color-white: #ffffff;
|
|
10
|
+
--el-color-black: #000000;
|
|
11
|
+
/**
|
|
12
|
+
* @title 主色
|
|
13
|
+
* @type color
|
|
14
|
+
*/
|
|
15
|
+
--el-color-primary: #409eff;
|
|
16
|
+
/**
|
|
17
|
+
* @title 主色-悬浮
|
|
18
|
+
* @type color
|
|
19
|
+
*/
|
|
20
|
+
--el-color-primary-light-3: rgb(121.3, 187.1, 255);
|
|
21
|
+
/**
|
|
22
|
+
* @title 主色-禁用背景
|
|
23
|
+
* @type color
|
|
24
|
+
*/
|
|
25
|
+
--el-color-primary-light-5: rgb(159.5, 206.5, 255);
|
|
26
|
+
/**
|
|
27
|
+
* @title 主色-边框悬浮
|
|
28
|
+
* @type color
|
|
29
|
+
*/
|
|
30
|
+
--el-color-primary-light-7: rgb(197.7, 225.9, 255);
|
|
31
|
+
/**
|
|
32
|
+
* @title 主色-边框背景
|
|
33
|
+
* @type color
|
|
34
|
+
*/
|
|
35
|
+
--el-color-primary-light-8: rgb(216.8, 235.6, 255);
|
|
36
|
+
/**
|
|
37
|
+
* @title 主色-背景填充
|
|
38
|
+
* @type color
|
|
39
|
+
*/
|
|
40
|
+
--el-color-primary-light-9: rgb(235.9, 245.3, 255);
|
|
41
|
+
/**
|
|
42
|
+
* @title 主色-深色
|
|
43
|
+
* @type color
|
|
44
|
+
*/
|
|
45
|
+
--el-color-primary-dark-2: rgb(51.2, 126.4, 204);
|
|
46
|
+
/**
|
|
47
|
+
* @title 成功色
|
|
48
|
+
* @type color
|
|
49
|
+
*/
|
|
50
|
+
--el-color-success: #67c23a;
|
|
51
|
+
/**
|
|
52
|
+
* @title 成功色-悬浮
|
|
53
|
+
* @type color
|
|
54
|
+
*/
|
|
55
|
+
--el-color-success-light-3: rgb(148.6, 212.3, 117.1);
|
|
56
|
+
/**
|
|
57
|
+
* @title 成功色-禁用背景
|
|
58
|
+
* @type color
|
|
59
|
+
*/
|
|
60
|
+
--el-color-success-light-5: rgb(179, 224.5, 156.5);
|
|
61
|
+
/**
|
|
62
|
+
* @title 成功色-边框悬浮
|
|
63
|
+
* @type color
|
|
64
|
+
*/
|
|
65
|
+
--el-color-success-light-7: rgb(209.4, 236.7, 195.9);
|
|
66
|
+
/**
|
|
67
|
+
* @title 成功色-边框背景
|
|
68
|
+
* @type color
|
|
69
|
+
*/
|
|
70
|
+
--el-color-success-light-8: rgb(224.6, 242.8, 215.6);
|
|
71
|
+
/**
|
|
72
|
+
* @title 成功色-背景填充
|
|
73
|
+
* @type color
|
|
74
|
+
*/
|
|
75
|
+
--el-color-success-light-9: rgb(239.8, 248.9, 235.3);
|
|
76
|
+
/**
|
|
77
|
+
* @title 成功色-深色
|
|
78
|
+
* @type color
|
|
79
|
+
*/
|
|
80
|
+
--el-color-success-dark-2: rgb(82.4, 155.2, 46.4);
|
|
81
|
+
/**
|
|
82
|
+
* @title 警示色
|
|
83
|
+
* @type color
|
|
84
|
+
*/
|
|
85
|
+
--el-color-warning: #e6a23c;
|
|
86
|
+
/**
|
|
87
|
+
* @title 警示色-悬浮
|
|
88
|
+
* @type color
|
|
89
|
+
*/
|
|
90
|
+
--el-color-warning-light-3: rgb(237.5, 189.9, 118.5);
|
|
91
|
+
/**
|
|
92
|
+
* @title 警示色-禁用背景
|
|
93
|
+
* @type color
|
|
94
|
+
*/
|
|
95
|
+
--el-color-warning-light-5: rgb(242.5, 208.5, 157.5);
|
|
96
|
+
/**
|
|
97
|
+
* @title 警示色-边框悬浮
|
|
98
|
+
* @type color
|
|
99
|
+
*/
|
|
100
|
+
--el-color-warning-light-7: rgb(247.5, 227.1, 196.5);
|
|
101
|
+
/**
|
|
102
|
+
* @title 警示色-边框背景
|
|
103
|
+
* @type color
|
|
104
|
+
*/
|
|
105
|
+
--el-color-warning-light-8: rgb(250, 236.4, 216);
|
|
106
|
+
/**
|
|
107
|
+
* @title 警示色-背景填充
|
|
108
|
+
* @type color
|
|
109
|
+
*/
|
|
110
|
+
--el-color-warning-light-9: rgb(252.5, 245.7, 235.5);
|
|
111
|
+
/**
|
|
112
|
+
* @title 警示色-深色
|
|
113
|
+
* @type color
|
|
114
|
+
*/
|
|
115
|
+
--el-color-warning-dark-2: rgb(184, 129.6, 48);
|
|
116
|
+
/**
|
|
117
|
+
* @title 危险色
|
|
118
|
+
* @type color
|
|
119
|
+
*/
|
|
120
|
+
--el-color-danger: #f56c6c;
|
|
121
|
+
/**
|
|
122
|
+
* @title 危险色-悬浮
|
|
123
|
+
* @type color
|
|
124
|
+
*/
|
|
125
|
+
--el-color-danger-light-3: rgb(248, 152.1, 152.1);
|
|
126
|
+
/**
|
|
127
|
+
* @title 危险色-禁用背景
|
|
128
|
+
* @type color
|
|
129
|
+
*/
|
|
130
|
+
--el-color-danger-light-5: rgb(250, 181.5, 181.5);
|
|
131
|
+
/**
|
|
132
|
+
* @title 危险色-边框悬浮
|
|
133
|
+
* @type color
|
|
134
|
+
*/
|
|
135
|
+
--el-color-danger-light-7: rgb(252, 210.9, 210.9);
|
|
136
|
+
/**
|
|
137
|
+
* @title 危险色-边框背景
|
|
138
|
+
* @type color
|
|
139
|
+
*/
|
|
140
|
+
--el-color-danger-light-8: rgb(253, 225.6, 225.6);
|
|
141
|
+
/**
|
|
142
|
+
* @title 危险色-背景填充
|
|
143
|
+
* @type color
|
|
144
|
+
*/
|
|
145
|
+
--el-color-danger-light-9: rgb(254, 240.3, 240.3);
|
|
146
|
+
/**
|
|
147
|
+
* @title 危险色-深色
|
|
148
|
+
* @type color
|
|
149
|
+
*/
|
|
150
|
+
--el-color-danger-dark-2: rgb(196, 86.4, 86.4);
|
|
151
|
+
/**
|
|
152
|
+
* @title 错误色
|
|
153
|
+
* @type color
|
|
154
|
+
*/
|
|
155
|
+
--el-color-error: #f56c6c;
|
|
156
|
+
/**
|
|
157
|
+
* @title 错误色-悬浮
|
|
158
|
+
* @type color
|
|
159
|
+
*/
|
|
160
|
+
--el-color-error-light-3: rgb(248, 152.1, 152.1);
|
|
161
|
+
/**
|
|
162
|
+
* @title 错误色-禁用背景
|
|
163
|
+
* @type color
|
|
164
|
+
*/
|
|
165
|
+
--el-color-error-light-5: rgb(250, 181.5, 181.5);
|
|
166
|
+
/**
|
|
167
|
+
* @title 错误色-边框悬浮
|
|
168
|
+
* @type color
|
|
169
|
+
*/
|
|
170
|
+
--el-color-error-light-7: rgb(252, 210.9, 210.9);
|
|
171
|
+
/**
|
|
172
|
+
* @title 错误色-边框背景
|
|
173
|
+
* @type color
|
|
174
|
+
*/
|
|
175
|
+
--el-color-error-light-8: rgb(253, 225.6, 225.6);
|
|
176
|
+
/**
|
|
177
|
+
* @title 错误色-背景填充
|
|
178
|
+
* @type color
|
|
179
|
+
*/
|
|
180
|
+
--el-color-error-light-9: rgb(254, 240.3, 240.3);
|
|
181
|
+
/**
|
|
182
|
+
* @title 错误色-深色
|
|
183
|
+
* @type color
|
|
184
|
+
*/
|
|
185
|
+
--el-color-error-dark-2: rgb(196, 86.4, 86.4);
|
|
186
|
+
/**
|
|
187
|
+
* @title 信息色
|
|
188
|
+
* @type color
|
|
189
|
+
*/
|
|
190
|
+
--el-color-info: #909399;
|
|
191
|
+
/**
|
|
192
|
+
* @title 信息色-悬浮
|
|
193
|
+
* @type color
|
|
194
|
+
*/
|
|
195
|
+
--el-color-info-light-3: rgb(177.3, 179.4, 183.6);
|
|
196
|
+
/**
|
|
197
|
+
* @title 信息色-禁用背景
|
|
198
|
+
* @type color
|
|
199
|
+
*/
|
|
200
|
+
--el-color-info-light-5: rgb(199.5, 201, 204);
|
|
201
|
+
/**
|
|
202
|
+
* @title 信息色-边框悬浮
|
|
203
|
+
* @type color
|
|
204
|
+
*/
|
|
205
|
+
--el-color-info-light-7: rgb(221.7, 222.6, 224.4);
|
|
206
|
+
/**
|
|
207
|
+
* @title 信息色-边框背景
|
|
208
|
+
* @type color
|
|
209
|
+
*/
|
|
210
|
+
--el-color-info-light-8: rgb(232.8, 233.4, 234.6);
|
|
211
|
+
/**
|
|
212
|
+
* @title 信息色-背景填充
|
|
213
|
+
* @type color
|
|
214
|
+
*/
|
|
215
|
+
--el-color-info-light-9: rgb(243.9, 244.2, 244.8);
|
|
216
|
+
/**
|
|
217
|
+
* @title 信息色-深色
|
|
218
|
+
* @type color
|
|
219
|
+
*/
|
|
220
|
+
--el-color-info-dark-2: rgb(115.2, 117.6, 122.4);
|
|
221
|
+
/**
|
|
222
|
+
* @title 背景色
|
|
223
|
+
* @type color
|
|
224
|
+
*/
|
|
225
|
+
--el-bg-color: #ffffff;
|
|
226
|
+
/**
|
|
227
|
+
* @title 背景色-页面
|
|
228
|
+
* @type color
|
|
229
|
+
*/
|
|
230
|
+
--el-bg-color-page: #f2f3f5;
|
|
231
|
+
/**
|
|
232
|
+
* @title 背景色-弹出层
|
|
233
|
+
* @type color
|
|
234
|
+
*/
|
|
235
|
+
--el-bg-color-overlay: #ffffff;
|
|
236
|
+
/**
|
|
237
|
+
* @title 强调/正文标题
|
|
238
|
+
* @type color
|
|
239
|
+
*/
|
|
240
|
+
--el-text-color-primary: #303133;
|
|
241
|
+
/**
|
|
242
|
+
* @title 次强调/正文标题
|
|
243
|
+
* @type color
|
|
244
|
+
*/
|
|
245
|
+
--el-text-color-regular: #606266;
|
|
246
|
+
/**
|
|
247
|
+
* @title 次要信息
|
|
248
|
+
* @type color
|
|
249
|
+
*/
|
|
250
|
+
--el-text-color-secondary: #909399;
|
|
251
|
+
/**
|
|
252
|
+
* @title 置灰信息
|
|
253
|
+
* @type color
|
|
254
|
+
*/
|
|
255
|
+
--el-text-color-placeholder: #a8abb2;
|
|
256
|
+
/**
|
|
257
|
+
* @title 禁用
|
|
258
|
+
* @type color
|
|
259
|
+
*/
|
|
260
|
+
--el-text-color-disabled: #c0c4cc;
|
|
261
|
+
/**
|
|
262
|
+
* @title 边框色
|
|
263
|
+
* @type color
|
|
264
|
+
*/
|
|
265
|
+
--el-border-color: #dcdfe6;
|
|
266
|
+
/**
|
|
267
|
+
* @title 边框色-浅色
|
|
268
|
+
* @type color
|
|
269
|
+
*/
|
|
270
|
+
--el-border-color-light: #e4e7ed;
|
|
271
|
+
/**
|
|
272
|
+
* @title 边框色-浅色
|
|
273
|
+
* @type color
|
|
274
|
+
*/
|
|
275
|
+
--el-border-color-lighter: #ebeef5;
|
|
276
|
+
/**
|
|
277
|
+
* @title 边框色-浅色
|
|
278
|
+
* @type color
|
|
279
|
+
*/
|
|
280
|
+
--el-border-color-extra-light: #f2f6fc;
|
|
281
|
+
/**
|
|
282
|
+
* @title 边框色-深色
|
|
283
|
+
* @type color
|
|
284
|
+
*/
|
|
285
|
+
--el-border-color-dark: #d4d7de;
|
|
286
|
+
/**
|
|
287
|
+
* @title 边框色-深色
|
|
288
|
+
* @type color
|
|
289
|
+
*/
|
|
290
|
+
--el-border-color-darker: #cdd0d6;
|
|
291
|
+
/**
|
|
292
|
+
* @title 边框颜色-悬浮
|
|
293
|
+
* @type color
|
|
294
|
+
*/
|
|
295
|
+
--el-border-color-hover: var(--el-text-color-disabled);
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @title 填充色
|
|
299
|
+
* @type color
|
|
300
|
+
*/
|
|
301
|
+
--el-fill-color: #f0f2f5;
|
|
302
|
+
/**
|
|
303
|
+
* @title 填充色-浅色
|
|
304
|
+
* @type color
|
|
305
|
+
*/
|
|
306
|
+
--el-fill-color-light: #f5f7fa;
|
|
307
|
+
/**
|
|
308
|
+
* @title 填充色-浅色
|
|
309
|
+
* @type color
|
|
310
|
+
*/
|
|
311
|
+
--el-fill-color-lighter: #fafafa;
|
|
312
|
+
/**
|
|
313
|
+
* @title 填充色-浅色
|
|
314
|
+
* @type color
|
|
315
|
+
*/
|
|
316
|
+
--el-fill-color-extra-light: #fafcff;
|
|
317
|
+
/**
|
|
318
|
+
* @title 填充色-深色
|
|
319
|
+
* @type color
|
|
320
|
+
*/
|
|
321
|
+
--el-fill-color-dark: #ebedf0;
|
|
322
|
+
/**
|
|
323
|
+
* @title 填充色-深色
|
|
324
|
+
* @type color
|
|
325
|
+
*/
|
|
326
|
+
--el-fill-color-darker: #e6e8eb;
|
|
327
|
+
/**
|
|
328
|
+
* @title 填充色-空白
|
|
329
|
+
* @type color
|
|
330
|
+
*/
|
|
331
|
+
--el-fill-color-blank: #ffffff;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* @title 禁用背景色
|
|
335
|
+
* @type color
|
|
336
|
+
*/
|
|
337
|
+
--el-disabled-bg-color: var(--el-fill-color-light);
|
|
338
|
+
/**
|
|
339
|
+
* @title 禁用文本色
|
|
340
|
+
* @type color
|
|
341
|
+
*/
|
|
342
|
+
--el-disabled-text-color: var(--el-text-color-placeholder);
|
|
343
|
+
/**
|
|
344
|
+
* @title 禁用边框色
|
|
345
|
+
* @type color
|
|
346
|
+
*/
|
|
347
|
+
--el-disabled-border-color: var(--el-border-color-light);
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* @title 遮罩色
|
|
351
|
+
* @type color
|
|
352
|
+
*/
|
|
353
|
+
--el-overlay-color: rgba(0, 0, 0, 0.8);
|
|
354
|
+
/**
|
|
355
|
+
* @title 遮罩色-浅色
|
|
356
|
+
* @type color
|
|
357
|
+
*/
|
|
358
|
+
--el-overlay-color-light: rgba(0, 0, 0, 0.7);
|
|
359
|
+
/**
|
|
360
|
+
* @title 遮罩色-浅色
|
|
361
|
+
* @type color
|
|
362
|
+
*/
|
|
363
|
+
--el-overlay-color-lighter: rgba(0, 0, 0, 0.5);
|
|
364
|
+
/**
|
|
365
|
+
* @title 遮罩色-加载
|
|
366
|
+
* @type color
|
|
367
|
+
*/
|
|
368
|
+
--el-mask-color: rgba(255, 255, 255, 0.9);
|
|
369
|
+
/**
|
|
370
|
+
* @title 遮罩色-加载浅色
|
|
371
|
+
* @type color
|
|
372
|
+
*/
|
|
373
|
+
--el-mask-color-extra-light: rgba(255, 255, 255, 0.3);
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* @title 字体大小-超大
|
|
377
|
+
* @type size
|
|
378
|
+
*/
|
|
379
|
+
--el-font-size-extra-large: 20px;
|
|
380
|
+
/**
|
|
381
|
+
* @title 字体大小-大
|
|
382
|
+
* @type size
|
|
383
|
+
*/
|
|
384
|
+
--el-font-size-large: 18px;
|
|
385
|
+
/**
|
|
386
|
+
* @title 字体大小-中
|
|
387
|
+
* @type size
|
|
388
|
+
*/
|
|
389
|
+
--el-font-size-medium: 16px;
|
|
390
|
+
/**
|
|
391
|
+
* @title 字体大小-常规
|
|
392
|
+
* @type size
|
|
393
|
+
*/
|
|
394
|
+
--el-font-size-base: 14px;
|
|
395
|
+
/**
|
|
396
|
+
* @title 字体大小-小
|
|
397
|
+
* @type size
|
|
398
|
+
*/
|
|
399
|
+
--el-font-size-small: 13px;
|
|
400
|
+
/**
|
|
401
|
+
* @title 字体大小-超小
|
|
402
|
+
* @type size
|
|
403
|
+
*/
|
|
404
|
+
--el-font-size-extra-small: 12px;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @title 圆角
|
|
408
|
+
* @type size
|
|
409
|
+
*/
|
|
410
|
+
--el-border-radius-base: 4px;
|
|
411
|
+
/**
|
|
412
|
+
* @title 圆角-小
|
|
413
|
+
* @type size
|
|
414
|
+
*/
|
|
415
|
+
--el-border-radius-small: 2px;
|
|
416
|
+
/**
|
|
417
|
+
* @title 圆角-圆
|
|
418
|
+
* @type size
|
|
419
|
+
*/
|
|
420
|
+
--el-border-radius-round: 20px;
|
|
421
|
+
/**
|
|
422
|
+
* @title 圆角-圆
|
|
423
|
+
* @type input
|
|
424
|
+
*/
|
|
425
|
+
--el-border-radius-circle: 100%;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* @title 组件尺寸-大
|
|
429
|
+
* @type size
|
|
430
|
+
*/
|
|
431
|
+
--el-component-size-large: 40px;
|
|
432
|
+
/**
|
|
433
|
+
* @title 组件尺寸-中
|
|
434
|
+
* @type size
|
|
435
|
+
*/
|
|
436
|
+
--el-component-size: 32px;
|
|
437
|
+
/**
|
|
438
|
+
* @title 组件尺寸-小
|
|
439
|
+
* @type size
|
|
440
|
+
*/
|
|
441
|
+
--el-component-size-small: 24px;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* @title 字体
|
|
445
|
+
* @type input
|
|
446
|
+
*/
|
|
447
|
+
--el-font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
|
|
448
|
+
/**
|
|
449
|
+
* @title 字体权重
|
|
450
|
+
* @type input
|
|
451
|
+
*/
|
|
452
|
+
--el-font-weight-primary: 500;
|
|
453
|
+
/**
|
|
454
|
+
* @title 正文行高
|
|
455
|
+
* @type size
|
|
456
|
+
*/
|
|
457
|
+
--el-font-line-height-primary: 24px;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* @title 层级
|
|
461
|
+
* @type size
|
|
462
|
+
*/
|
|
463
|
+
--el-index-normal: 1;
|
|
464
|
+
/**
|
|
465
|
+
* @title 层级-顶部
|
|
466
|
+
* @type size
|
|
467
|
+
*/
|
|
468
|
+
--el-index-top: 1000;
|
|
469
|
+
/**
|
|
470
|
+
* @title 层级-弹窗
|
|
471
|
+
* @type size
|
|
472
|
+
*/
|
|
473
|
+
--el-index-popper: 2000;
|
|
474
|
+
/**
|
|
475
|
+
* @title 过渡动画时长
|
|
476
|
+
* @type size
|
|
477
|
+
*/
|
|
478
|
+
--el-transition-duration: 0.3s;
|
|
479
|
+
/**
|
|
480
|
+
* @title 过渡动画时长-快
|
|
481
|
+
* @type size
|
|
482
|
+
*/
|
|
483
|
+
--el-transition-duration-fast: 0.2s;
|
|
484
|
+
/**
|
|
485
|
+
* @title 过渡动画函数-缓入缓出
|
|
486
|
+
* @type input
|
|
487
|
+
*/
|
|
488
|
+
--el-transition-function-ease-in-out-bezier: cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
489
|
+
/**
|
|
490
|
+
* @title 过渡动画函数-快
|
|
491
|
+
* @type input
|
|
492
|
+
*/
|
|
493
|
+
--el-transition-function-fast-bezier: cubic-bezier(0.23, 1, 0.32, 1);
|
|
494
|
+
/**
|
|
495
|
+
* @title 过渡动画
|
|
496
|
+
* @type input
|
|
497
|
+
*/
|
|
498
|
+
--el-transition-all: all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);
|
|
499
|
+
/**
|
|
500
|
+
* @title 过渡动画-淡入淡出
|
|
501
|
+
* @type input
|
|
502
|
+
*/
|
|
503
|
+
--el-transition-fade: opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);
|
|
504
|
+
/**
|
|
505
|
+
* @title 过渡动画-淡入淡出(中)
|
|
506
|
+
* @type input
|
|
507
|
+
*/
|
|
508
|
+
--el-transition-md-fade: transform var(--el-transition-duration) var(--el-transition-function-fast-bezier), opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);
|
|
509
|
+
/**
|
|
510
|
+
* @title 过渡动画-淡入淡出(线性)
|
|
511
|
+
* @type input
|
|
512
|
+
*/
|
|
513
|
+
--el-transition-fade-linear: opacity var(--el-transition-duration-fast) linear;
|
|
514
|
+
/**
|
|
515
|
+
* @title 过渡动画-边框
|
|
516
|
+
* @type input
|
|
517
|
+
*/
|
|
518
|
+
--el-transition-border: border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);
|
|
519
|
+
/**
|
|
520
|
+
* @title 过渡动画-阴影
|
|
521
|
+
* @type input
|
|
522
|
+
*/
|
|
523
|
+
--el-transition-box-shadow: box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);
|
|
524
|
+
/**
|
|
525
|
+
* @title 过渡动画-颜色
|
|
526
|
+
* @type input
|
|
527
|
+
*/
|
|
528
|
+
--el-transition-color: color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);
|
|
529
|
+
/**
|
|
530
|
+
* @title 阴影
|
|
531
|
+
* @type input
|
|
532
|
+
*/
|
|
533
|
+
--el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.04), 0px 8px 20px rgba(0, 0, 0, 0.08);
|
|
534
|
+
/**
|
|
535
|
+
* @title 阴影-浅色
|
|
536
|
+
* @type input
|
|
537
|
+
*/
|
|
538
|
+
--el-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, 0.12);
|
|
539
|
+
/**
|
|
540
|
+
* @title 阴影-浅色
|
|
541
|
+
* @type input
|
|
542
|
+
*/
|
|
543
|
+
--el-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, 0.12);
|
|
544
|
+
/**
|
|
545
|
+
* @title 阴影-深色
|
|
546
|
+
* @type input
|
|
547
|
+
*/
|
|
548
|
+
--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.08), 0px 12px 32px rgba(0, 0, 0, 0.12), 0px 8px 16px -8px rgba(0, 0, 0, 0.16);
|
|
549
|
+
/**
|
|
550
|
+
* @title 边框宽度
|
|
551
|
+
* @type size
|
|
552
|
+
*/
|
|
553
|
+
--el-border-width: 1px;
|
|
554
|
+
/**
|
|
555
|
+
* @title 边框样式
|
|
556
|
+
* @type input
|
|
557
|
+
*/
|
|
558
|
+
--el-border-style: solid;
|
|
559
|
+
/**
|
|
560
|
+
* @title 边框
|
|
561
|
+
* @type input
|
|
562
|
+
*/
|
|
563
|
+
--el-border: var(--el-border-width) var(--el-border-style) var(--el-border-color);
|
|
564
|
+
/**
|
|
565
|
+
* @title 边框颜色-灰色
|
|
566
|
+
* @type color
|
|
567
|
+
*/
|
|
568
|
+
--el-svg-monochrome-grey: var(--el-border-color);
|
|
569
|
+
}
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
## 在 `.storybook/preview.ts` 文件中导入全局变量
|
|
573
|
+
|
|
574
|
+
```js
|
|
575
|
+
import './vars.css';
|
|
576
|
+
|
|
577
|
+
// ......
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
完成后就可以在组件中使用以上的全局 css 变量
|