king-design-analyzer 1.0.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/README.md +151 -0
- package/components/affix.json +178 -0
- package/components/az.json +86 -0
- package/components/badge.json +162 -0
- package/components/billtypes.json +90 -0
- package/components/breadcrumb.json +220 -0
- package/components/button.json +511 -0
- package/components/card.json +334 -0
- package/components/cardcontent.json +144 -0
- package/components/carousel.json +207 -0
- package/components/cascader.json +373 -0
- package/components/checkbox.json +298 -0
- package/components/code.json +318 -0
- package/components/collapse.json +358 -0
- package/components/copy.json +220 -0
- package/components/datepicker.json +529 -0
- package/components/descriptions.json +309 -0
- package/components/dialog.json +460 -0
- package/components/divider.json +287 -0
- package/components/drawer.json +563 -0
- package/components/dropdown.json +407 -0
- package/components/editable.json +331 -0
- package/components/ellipsis.json +218 -0
- package/components/form.json +638 -0
- package/components/grid.json +377 -0
- package/components/icon.json +442 -0
- package/components/input.json +821 -0
- package/components/layoutcontent.json +210 -0
- package/components/menu.json +482 -0
- package/components/message.json +345 -0
- package/components/pagination.json +444 -0
- package/components/paginationplus.json +74 -0
- package/components/popover.json +456 -0
- package/components/progress.json +354 -0
- package/components/protable.json +132 -0
- package/components/radio.json +246 -0
- package/components/region.json +115 -0
- package/components/select.json +676 -0
- package/components/slider.json +422 -0
- package/components/spin.json +232 -0
- package/components/spinner.json +441 -0
- package/components/status.json +75 -0
- package/components/steps.json +292 -0
- package/components/switch.json +357 -0
- package/components/table.json +1057 -0
- package/components/tablecolumnid.json +217 -0
- package/components/tabs.json +363 -0
- package/components/tag.json +504 -0
- package/components/timepicker.json +447 -0
- package/components/tip.json +322 -0
- package/components/tooltip.json +416 -0
- package/components/tour.json +395 -0
- package/components/transfer.json +414 -0
- package/components/tree.json +480 -0
- package/components/treeselect.json +478 -0
- package/components/upload.json +499 -0
- package/components/virtuallist.json +178 -0
- package/dist/ast/index.d.mts +71 -0
- package/dist/ast/index.d.ts +71 -0
- package/dist/ast/index.js +15 -0
- package/dist/ast/index.mjs +2 -0
- package/dist/chunk-4BUGNH4F.mjs +62 -0
- package/dist/chunk-5H7N2A5X.mjs +1 -0
- package/dist/chunk-5IF32MBB.js +603 -0
- package/dist/chunk-ARWRNWDW.js +219 -0
- package/dist/chunk-C3L4IXJC.mjs +577 -0
- package/dist/chunk-GNVCC37B.js +102 -0
- package/dist/chunk-N4UIA6DN.js +68 -0
- package/dist/chunk-RAMIBZAU.mjs +216 -0
- package/dist/chunk-RNQHI7YG.js +64 -0
- package/dist/chunk-TB6BF5TJ.mjs +99 -0
- package/dist/chunk-UX7KGX45.mjs +66 -0
- package/dist/chunk-YTEYDSDW.js +2 -0
- package/dist/full/index.d.mts +29 -0
- package/dist/full/index.d.ts +29 -0
- package/dist/full/index.js +16 -0
- package/dist/full/index.mjs +3 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +43 -0
- package/dist/index.mjs +6 -0
- package/dist/runtime/index.d.mts +14 -0
- package/dist/runtime/index.d.ts +14 -0
- package/dist/runtime/index.js +15 -0
- package/dist/runtime/index.mjs +2 -0
- package/dist/sfcCompiler-m51JOfWs.d.mts +22 -0
- package/dist/sfcCompiler-m51JOfWs.d.ts +22 -0
- package/dist/static/index.d.mts +14 -0
- package/dist/static/index.d.ts +14 -0
- package/dist/static/index.js +19 -0
- package/dist/static/index.mjs +2 -0
- package/package.json +88 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "grid",
|
|
3
|
+
"name": "Row",
|
|
4
|
+
"displayName": "栅格",
|
|
5
|
+
"category": "layout",
|
|
6
|
+
"description": "栅格系统,基于 24 栅格布局,由 Row(行)和 Col(列)组成。支持 Flex 布局和响应式设计。",
|
|
7
|
+
"importStatement": "import { Row, Col } from '@king-design/vue';",
|
|
8
|
+
"props": [
|
|
9
|
+
{
|
|
10
|
+
"name": "gutter",
|
|
11
|
+
"description": "栅格间距,单位 px。也可以传入对象设置响应式间距。",
|
|
12
|
+
"type": {
|
|
13
|
+
"raw": "string | number | object",
|
|
14
|
+
"kind": "custom"
|
|
15
|
+
},
|
|
16
|
+
"required": false,
|
|
17
|
+
"default": "undefined",
|
|
18
|
+
"usageExample": "<Row :gutter=\"16\">"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "justify",
|
|
22
|
+
"description": "flex 布局下的水平排列方式",
|
|
23
|
+
"type": {
|
|
24
|
+
"raw": "\"start\" | \"end\" | \"center\" | \"between\" | \"around\" | \"evenly\"",
|
|
25
|
+
"kind": "union",
|
|
26
|
+
"unionTypes": [
|
|
27
|
+
"start",
|
|
28
|
+
"end",
|
|
29
|
+
"center",
|
|
30
|
+
"between",
|
|
31
|
+
"around",
|
|
32
|
+
"evenly"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"required": false,
|
|
36
|
+
"default": "undefined",
|
|
37
|
+
"allowedValues": [
|
|
38
|
+
{
|
|
39
|
+
"value": "start",
|
|
40
|
+
"label": "左对齐"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"value": "end",
|
|
44
|
+
"label": "右对齐"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"value": "center",
|
|
48
|
+
"label": "居中对齐"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"value": "between",
|
|
52
|
+
"label": "两端对齐"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"value": "around",
|
|
56
|
+
"label": "环绕对齐"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"value": "evenly",
|
|
60
|
+
"label": "均匀分布"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"usageExample": "<Row justify=\"center\">"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "align",
|
|
67
|
+
"description": "flex 布局下的垂直对齐方式",
|
|
68
|
+
"type": {
|
|
69
|
+
"raw": "\"top\" | \"bottom\" | \"middle\" | \"stretch\" | \"baseline\"",
|
|
70
|
+
"kind": "union",
|
|
71
|
+
"unionTypes": [
|
|
72
|
+
"top",
|
|
73
|
+
"bottom",
|
|
74
|
+
"middle",
|
|
75
|
+
"stretch",
|
|
76
|
+
"baseline"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"default": "undefined",
|
|
81
|
+
"allowedValues": [
|
|
82
|
+
{
|
|
83
|
+
"value": "top",
|
|
84
|
+
"label": "顶部对齐"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"value": "bottom",
|
|
88
|
+
"label": "底部对齐"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"value": "middle",
|
|
92
|
+
"label": "垂直居中"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"value": "stretch",
|
|
96
|
+
"label": "拉伸"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"value": "baseline",
|
|
100
|
+
"label": "基线对齐"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"usageExample": "<Row align=\"middle\">"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"events": [],
|
|
107
|
+
"methods": [],
|
|
108
|
+
"subComponents": [
|
|
109
|
+
{
|
|
110
|
+
"name": "Col",
|
|
111
|
+
"description": "栅格列组件",
|
|
112
|
+
"props": [
|
|
113
|
+
{
|
|
114
|
+
"name": "span",
|
|
115
|
+
"description": "栅格占位格数,为 0 时相当于 display: none",
|
|
116
|
+
"type": {
|
|
117
|
+
"raw": "number | string",
|
|
118
|
+
"kind": "union"
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"default": "24",
|
|
122
|
+
"usageExample": "<Col :span=\"12\">"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "offset",
|
|
126
|
+
"description": "栅格左侧的间隔格数,间隔内不可以有栅格",
|
|
127
|
+
"type": {
|
|
128
|
+
"raw": "number | string",
|
|
129
|
+
"kind": "union"
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"default": "0",
|
|
133
|
+
"usageExample": "<Col :span=\"12\" :offset=\"6\">"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "order",
|
|
137
|
+
"description": "栅格顺序,会自动启用 flex 布局",
|
|
138
|
+
"type": {
|
|
139
|
+
"raw": "number | string",
|
|
140
|
+
"kind": "union"
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"default": "0",
|
|
144
|
+
"usageExample": "<Col :order=\"1\">"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "pull",
|
|
148
|
+
"description": "栅格向左移动格数",
|
|
149
|
+
"type": {
|
|
150
|
+
"raw": "number | string",
|
|
151
|
+
"kind": "union"
|
|
152
|
+
},
|
|
153
|
+
"required": false,
|
|
154
|
+
"default": "0",
|
|
155
|
+
"usageExample": "<Col :pull=\"4\">"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "push",
|
|
159
|
+
"description": "栅格向右移动格数",
|
|
160
|
+
"type": {
|
|
161
|
+
"raw": "number | string",
|
|
162
|
+
"kind": "union"
|
|
163
|
+
},
|
|
164
|
+
"required": false,
|
|
165
|
+
"default": "0",
|
|
166
|
+
"usageExample": "<Col :push=\"4\">"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "xs",
|
|
170
|
+
"description": "<576px 响应式栅格,可设为 number 类型表示 span,或 object 类型设置 {span, offset} 等",
|
|
171
|
+
"type": {
|
|
172
|
+
"raw": "number | string | object",
|
|
173
|
+
"kind": "union"
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"default": "undefined"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "sm",
|
|
180
|
+
"description": "≥576px 响应式栅格",
|
|
181
|
+
"type": {
|
|
182
|
+
"raw": "number | string | object",
|
|
183
|
+
"kind": "union"
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"default": "undefined"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "md",
|
|
190
|
+
"description": "≥768px 响应式栅格",
|
|
191
|
+
"type": {
|
|
192
|
+
"raw": "number | string | object",
|
|
193
|
+
"kind": "union"
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"default": "undefined"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "lg",
|
|
200
|
+
"description": "≥992px 响应式栅格",
|
|
201
|
+
"type": {
|
|
202
|
+
"raw": "number | string | object",
|
|
203
|
+
"kind": "union"
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"default": "undefined"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "xl",
|
|
210
|
+
"description": "≥1200px 响应式栅格",
|
|
211
|
+
"type": {
|
|
212
|
+
"raw": "number | string | object",
|
|
213
|
+
"kind": "union"
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"default": "undefined"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "xxl",
|
|
220
|
+
"description": "≥1600px 响应式栅格",
|
|
221
|
+
"type": {
|
|
222
|
+
"raw": "number | string | object",
|
|
223
|
+
"kind": "union"
|
|
224
|
+
},
|
|
225
|
+
"required": false,
|
|
226
|
+
"default": "undefined"
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"examples": [
|
|
232
|
+
{
|
|
233
|
+
"id": "grid_basic",
|
|
234
|
+
"title": "基础栅格",
|
|
235
|
+
"description": "简单的行列布局",
|
|
236
|
+
"difficulty": "easy",
|
|
237
|
+
"code": "<script setup lang=\"ts\">\nimport { Row, Col } from '@king-design/vue';\n</script>\n<template>\n <Row>\n <Col :span=\"12\"><div>50%</div></Col>\n <Col :span=\"12\"><div>50%</div></Col>\n </Row>\n <Row>\n <Col :span=\"8\"><div>33.3%</div></Col>\n <Col :span=\"8\"><div>33.3%</div></Col>\n <Col :span=\"8\"><div>33.3%</div></Col>\n </Row>\n</template>",
|
|
238
|
+
"tags": [
|
|
239
|
+
"basic",
|
|
240
|
+
"layout"
|
|
241
|
+
],
|
|
242
|
+
"usedProps": [
|
|
243
|
+
"span"
|
|
244
|
+
],
|
|
245
|
+
"usedEvents": [],
|
|
246
|
+
"usedSlots": [],
|
|
247
|
+
"usedMethods": [],
|
|
248
|
+
"scenario": "基本的等分列布局"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "grid_gutter",
|
|
252
|
+
"title": "区块间隔",
|
|
253
|
+
"description": "使用 gutter 属性推荐使用 (16+8n)px 作为栅格间隔",
|
|
254
|
+
"difficulty": "easy",
|
|
255
|
+
"code": "<script setup lang=\"ts\">\nimport { Row, Col } from '@king-design/vue';\n</script>\n<template>\n <Row :gutter=\"16\">\n <Col :span=\"6\"><div>col-6</div></Col>\n <Col :span=\"6\"><div>col-6</div></Col>\n <Col :span=\"6\"><div>col-6</div></Col>\n <Col :span=\"6\"><div>col-6</div></Col>\n </Row>\n</template>",
|
|
256
|
+
"tags": [
|
|
257
|
+
"gutter",
|
|
258
|
+
"layout"
|
|
259
|
+
],
|
|
260
|
+
"usedProps": [
|
|
261
|
+
"gutter",
|
|
262
|
+
"span"
|
|
263
|
+
],
|
|
264
|
+
"usedEvents": [],
|
|
265
|
+
"usedSlots": [],
|
|
266
|
+
"usedMethods": [],
|
|
267
|
+
"scenario": "带间隔的栅格布局"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"id": "grid_offset",
|
|
271
|
+
"title": "左右偏移",
|
|
272
|
+
"description": "使用 offset 属性将列向右侧偏移",
|
|
273
|
+
"difficulty": "medium",
|
|
274
|
+
"code": "<script setup lang=\"ts\">\nimport { Row, Col } from '@king-design/vue';\n</script>\n<template>\n <Row>\n <Col :span=\"8\"><div>col-8</div></Col>\n <Col :span=\"8\" :offset=\"8\"><div>col-8 offset-8</div></Col>\n </Row>\n</template>",
|
|
275
|
+
"tags": [
|
|
276
|
+
"offset",
|
|
277
|
+
"layout"
|
|
278
|
+
],
|
|
279
|
+
"usedProps": [
|
|
280
|
+
"span",
|
|
281
|
+
"offset"
|
|
282
|
+
],
|
|
283
|
+
"usedEvents": [],
|
|
284
|
+
"usedSlots": [],
|
|
285
|
+
"usedMethods": [],
|
|
286
|
+
"scenario": "创建中间有空隙的布局"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"id": "grid_justify",
|
|
290
|
+
"title": "flex 布局",
|
|
291
|
+
"description": "通过 justify 和 align 属性实现灵活对齐",
|
|
292
|
+
"difficulty": "medium",
|
|
293
|
+
"code": "<script setup lang=\"ts\">\nimport { Row, Col } from '@king-design/vue';\n</script>\n<template>\n <Row justify=\"center\" align=\"middle\">\n <Col :span=\"4\"><div>center</div></Col>\n </Row>\n <Row justify=\"end\">\n <Col :span=\"4\"><div>end</div></Col>\n </Row>\n <Row justify=\"space-between\">\n <Col :span=\"4\"><div>left</div></Col>\n <Col :span=\"4\"><div>right</div></Col>\n </Row>\n</template>",
|
|
294
|
+
"tags": [
|
|
295
|
+
"flex",
|
|
296
|
+
"justify",
|
|
297
|
+
"align"
|
|
298
|
+
],
|
|
299
|
+
"usedProps": [
|
|
300
|
+
"justify",
|
|
301
|
+
"align",
|
|
302
|
+
"span"
|
|
303
|
+
],
|
|
304
|
+
"usedEvents": [],
|
|
305
|
+
"usedSlots": [],
|
|
306
|
+
"usedMethods": [],
|
|
307
|
+
"scenario": "需要居中或两侧对齐的布局"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"id": "grid_responsive",
|
|
311
|
+
"title": "响应式布局",
|
|
312
|
+
"description": "预设六个响应尺寸:xs sm md lg xl xxl",
|
|
313
|
+
"difficulty": "medium",
|
|
314
|
+
"code": "<script setup lang=\"ts\">\nimport { Row, Col } from '@king-design/vue';\n</script>\n<template>\n <Row :gutter=\"10\">\n <Col :xs=\"24\" :sm=\"12\" :md=\"8\" :lg=\"6\" :xl=\"4\">\n <div>Responsive</div>\n </Col>\n <Col :xs=\"24\" :sm=\"12\" :md=\"8\" :lg=\"6\" :xl=\"4\">\n <div>Responsive</div>\n </Col>\n <Col :xs=\"24\" :sm=\"12\" :md=\"8\" :lg=\"6\" :xl=\"4\">\n <div>Responsive</div>\n </Col>\n </Row>\n</template>",
|
|
315
|
+
"tags": [
|
|
316
|
+
"responsive",
|
|
317
|
+
"layout"
|
|
318
|
+
],
|
|
319
|
+
"usedProps": [
|
|
320
|
+
"xs",
|
|
321
|
+
"sm",
|
|
322
|
+
"md",
|
|
323
|
+
"lg",
|
|
324
|
+
"xl",
|
|
325
|
+
"span"
|
|
326
|
+
],
|
|
327
|
+
"usedEvents": [],
|
|
328
|
+
"usedSlots": [],
|
|
329
|
+
"usedMethods": [],
|
|
330
|
+
"scenario": "适配不同屏幕尺寸的布局"
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"commonMistakes": [
|
|
334
|
+
{
|
|
335
|
+
"id": "grid_span_sum",
|
|
336
|
+
"description": "span 总和超过 24",
|
|
337
|
+
"wrongCode": "<Row>\n <Col :span=\"12\">col-12</Col>\n <Col :span=\"13\">col-13</Col>\n</Row>",
|
|
338
|
+
"correctCode": "<Row>\n <Col :span=\"12\">col-12</Col>\n <Col :span=\"12\">col-12</Col>\n</Row>",
|
|
339
|
+
"explanation": "Grid 系统基于 24 栅格,一行中的 span 总和(加上 offset)不应超过 24,否则会换行。",
|
|
340
|
+
"relatedProps": [
|
|
341
|
+
"span"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"id": "grid_gutter_overflow",
|
|
346
|
+
"description": "gutter 导致的内容溢出",
|
|
347
|
+
"wrongCode": "<div style=\"width: 100%; overflow: hidden;\">\n <Row :gutter=\"20\">...</Row>\n</div>",
|
|
348
|
+
"correctCode": "<div style=\"width: 100%; overflow-x: hidden;\">\n <Row :gutter=\"20\">...</Row>\n</div>",
|
|
349
|
+
"explanation": "Row 通过负 margin 来实现 gutter,这可能会导致水平方向出现滚动条。建议在 Row 的父元素上设置 overflow-x: hidden。",
|
|
350
|
+
"relatedProps": [
|
|
351
|
+
"gutter"
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"searchKeywords": [
|
|
356
|
+
"栅格",
|
|
357
|
+
"grid",
|
|
358
|
+
"row",
|
|
359
|
+
"col",
|
|
360
|
+
"layout",
|
|
361
|
+
"布局",
|
|
362
|
+
"flex",
|
|
363
|
+
"column",
|
|
364
|
+
"列",
|
|
365
|
+
"行"
|
|
366
|
+
],
|
|
367
|
+
"useCases": [
|
|
368
|
+
"页面整体布局",
|
|
369
|
+
"表单排版",
|
|
370
|
+
"列表网格排列",
|
|
371
|
+
"响应式内容展示"
|
|
372
|
+
],
|
|
373
|
+
"relatedComponents": [
|
|
374
|
+
"Space",
|
|
375
|
+
"Divider"
|
|
376
|
+
]
|
|
377
|
+
}
|