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,322 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "tip",
|
|
3
|
+
"name": "Tip",
|
|
4
|
+
"displayName": "警告提示",
|
|
5
|
+
"category": "feedback",
|
|
6
|
+
"description": "警告提示组件,用于展示重要的提示信息。支持多种类型、可关闭、显示图标等功能。Tip 组件继承自 Tag 组件。",
|
|
7
|
+
"importStatement": "import { Tip } from '@king-design/vue';",
|
|
8
|
+
"props": [
|
|
9
|
+
{
|
|
10
|
+
"name": "type",
|
|
11
|
+
"description": "提示类型",
|
|
12
|
+
"type": {
|
|
13
|
+
"raw": "\"default\" | \"primary\" | \"success\" | \"warning\" | \"danger\"",
|
|
14
|
+
"kind": "union",
|
|
15
|
+
"unionTypes": [
|
|
16
|
+
"default",
|
|
17
|
+
"primary",
|
|
18
|
+
"success",
|
|
19
|
+
"warning",
|
|
20
|
+
"danger"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"required": false,
|
|
24
|
+
"default": "\"default\"",
|
|
25
|
+
"allowedValues": [
|
|
26
|
+
{
|
|
27
|
+
"value": "default",
|
|
28
|
+
"label": "默认",
|
|
29
|
+
"isDefault": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"value": "primary",
|
|
33
|
+
"label": "主要(蓝色)"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"value": "success",
|
|
37
|
+
"label": "成功(绿色)"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"value": "warning",
|
|
41
|
+
"label": "警告(橙色)"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"value": "danger",
|
|
45
|
+
"label": "危险(红色)"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"usageExample": "<Tip type=\"warning\">警告内容</Tip>"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "closable",
|
|
52
|
+
"description": "是否可关闭",
|
|
53
|
+
"type": {
|
|
54
|
+
"raw": "boolean",
|
|
55
|
+
"kind": "boolean"
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"default": "false",
|
|
59
|
+
"usageExample": "<Tip closable>可关闭的提示</Tip>"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "closed",
|
|
63
|
+
"description": "是否已关闭,可用 v-model:closed 双向绑定",
|
|
64
|
+
"type": {
|
|
65
|
+
"raw": "boolean",
|
|
66
|
+
"kind": "boolean"
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"default": "false",
|
|
70
|
+
"usageExample": "<Tip :closed=\"isClosed\">提示</Tip>"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "showIcon",
|
|
74
|
+
"description": "是否展示图标",
|
|
75
|
+
"type": {
|
|
76
|
+
"raw": "boolean",
|
|
77
|
+
"kind": "boolean"
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"default": "false",
|
|
81
|
+
"usageExample": "<Tip type=\"success\" showIcon>成功</Tip>"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "disabled",
|
|
85
|
+
"description": "是否展示禁用状态",
|
|
86
|
+
"type": {
|
|
87
|
+
"raw": "boolean",
|
|
88
|
+
"kind": "boolean"
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"default": "false",
|
|
92
|
+
"usageExample": "<Tip disabled>禁用状态</Tip>"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "size",
|
|
96
|
+
"description": "组件尺寸",
|
|
97
|
+
"type": {
|
|
98
|
+
"raw": "\"large\" | \"default\" | \"small\" | \"mini\"",
|
|
99
|
+
"kind": "union",
|
|
100
|
+
"unionTypes": [
|
|
101
|
+
"large",
|
|
102
|
+
"default",
|
|
103
|
+
"small",
|
|
104
|
+
"mini"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"default": "\"default\"",
|
|
109
|
+
"allowedValues": [
|
|
110
|
+
{
|
|
111
|
+
"value": "large",
|
|
112
|
+
"label": "大尺寸"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"value": "default",
|
|
116
|
+
"label": "默认尺寸",
|
|
117
|
+
"isDefault": true
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"value": "small",
|
|
121
|
+
"label": "小尺寸"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"value": "mini",
|
|
125
|
+
"label": "迷你尺寸"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"usageExample": "<Tip size=\"small\">小尺寸提示</Tip>"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "border",
|
|
132
|
+
"description": "边框样式",
|
|
133
|
+
"type": {
|
|
134
|
+
"raw": "\"solid\" | \"dashed\" | \"none\"",
|
|
135
|
+
"kind": "union",
|
|
136
|
+
"unionTypes": [
|
|
137
|
+
"solid",
|
|
138
|
+
"dashed",
|
|
139
|
+
"none"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"default": "\"solid\"",
|
|
144
|
+
"allowedValues": [
|
|
145
|
+
{
|
|
146
|
+
"value": "solid",
|
|
147
|
+
"label": "实线边框",
|
|
148
|
+
"isDefault": true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"value": "dashed",
|
|
152
|
+
"label": "虚线边框"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"value": "none",
|
|
156
|
+
"label": "无边框"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"usageExample": "<Tip border=\"dashed\">虚线边框</Tip>"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"events": [
|
|
163
|
+
{
|
|
164
|
+
"name": "close",
|
|
165
|
+
"vueEventName": "@close",
|
|
166
|
+
"description": "关闭时触发",
|
|
167
|
+
"payload": [
|
|
168
|
+
{
|
|
169
|
+
"name": "e",
|
|
170
|
+
"type": "MouseEvent",
|
|
171
|
+
"description": "原生鼠标事件"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"usageExample": "<Tip closable @close=\"handleClose\">",
|
|
175
|
+
"handlerExample": "const handleClose = (e: MouseEvent) => {\n console.log('提示已关闭');\n};"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"methods": [],
|
|
179
|
+
"examples": [
|
|
180
|
+
{
|
|
181
|
+
"id": "tip_basic",
|
|
182
|
+
"title": "基础用法",
|
|
183
|
+
"description": "不同类型的提示",
|
|
184
|
+
"difficulty": "easy",
|
|
185
|
+
"code": "<script setup lang=\"ts\">\nimport { Tip } from '@king-design/vue';\n</script>\n<template>\n <Tip>这是一条默认提示</Tip>\n <Tip type=\"primary\">这是一条主要提示</Tip>\n <Tip type=\"success\">这是一条成功提示</Tip>\n <Tip type=\"warning\">这是一条警告提示</Tip>\n <Tip type=\"danger\">这是一条危险提示</Tip>\n</template>",
|
|
186
|
+
"tags": [
|
|
187
|
+
"basic",
|
|
188
|
+
"type"
|
|
189
|
+
],
|
|
190
|
+
"usedProps": [
|
|
191
|
+
"type"
|
|
192
|
+
],
|
|
193
|
+
"usedEvents": [],
|
|
194
|
+
"usedMethods": [],
|
|
195
|
+
"scenario": "展示不同类型的提示信息"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"id": "tip_icon",
|
|
199
|
+
"title": "带图标",
|
|
200
|
+
"description": "显示图标的提示",
|
|
201
|
+
"difficulty": "easy",
|
|
202
|
+
"code": "<script setup lang=\"ts\">\nimport { Tip } from '@king-design/vue';\n</script>\n<template>\n <Tip type=\"success\" showIcon>操作成功</Tip>\n <Tip type=\"warning\" showIcon>请注意</Tip>\n <Tip type=\"danger\" showIcon>操作失败</Tip>\n</template>",
|
|
203
|
+
"tags": [
|
|
204
|
+
"icon",
|
|
205
|
+
"showIcon"
|
|
206
|
+
],
|
|
207
|
+
"usedProps": [
|
|
208
|
+
"type",
|
|
209
|
+
"showIcon"
|
|
210
|
+
],
|
|
211
|
+
"usedEvents": [],
|
|
212
|
+
"usedMethods": [],
|
|
213
|
+
"scenario": "显示带图标的提示信息"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "tip_closable",
|
|
217
|
+
"title": "可关闭",
|
|
218
|
+
"description": "可关闭的提示",
|
|
219
|
+
"difficulty": "medium",
|
|
220
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Tip } from '@king-design/vue';\n\nconst closed = ref(false);\n\nconst handleClose = () => {\n closed.value = true;\n};\n</script>\n<template>\n <Tip closable :closed=\"closed\" @close=\"handleClose\">\n 可关闭的提示\n </Tip>\n</template>",
|
|
221
|
+
"tags": [
|
|
222
|
+
"closable",
|
|
223
|
+
"close"
|
|
224
|
+
],
|
|
225
|
+
"usedProps": [
|
|
226
|
+
"closable",
|
|
227
|
+
"closed"
|
|
228
|
+
],
|
|
229
|
+
"usedEvents": [
|
|
230
|
+
"close"
|
|
231
|
+
],
|
|
232
|
+
"usedMethods": [],
|
|
233
|
+
"scenario": "创建可关闭的提示"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"id": "tip_border",
|
|
237
|
+
"title": "边框样式",
|
|
238
|
+
"description": "不同边框样式的提示",
|
|
239
|
+
"difficulty": "easy",
|
|
240
|
+
"code": "<script setup lang=\"ts\">\nimport { Tip } from '@king-design/vue';\n</script>\n<template>\n <Tip border=\"solid\">实线边框</Tip>\n <Tip border=\"dashed\">虚线边框</Tip>\n <Tip border=\"none\">无边框</Tip>\n</template>",
|
|
241
|
+
"tags": [
|
|
242
|
+
"border"
|
|
243
|
+
],
|
|
244
|
+
"usedProps": [
|
|
245
|
+
"border"
|
|
246
|
+
],
|
|
247
|
+
"usedEvents": [],
|
|
248
|
+
"usedMethods": [],
|
|
249
|
+
"scenario": "设置不同的边框样式"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "tip_form_hint",
|
|
253
|
+
"title": "表单提示",
|
|
254
|
+
"description": "在表单中使用提示",
|
|
255
|
+
"difficulty": "easy",
|
|
256
|
+
"code": "<script setup lang=\"ts\">\nimport { Tip, Form, FormItem, Input } from '@king-design/vue';\n</script>\n<template>\n <Tip type=\"warning\" showIcon style=\"margin-bottom: 16px;\">\n 请填写真实信息,提交后不可修改\n </Tip>\n <Form>\n <FormItem label=\"姓名\">\n <Input />\n </FormItem>\n </Form>\n</template>",
|
|
257
|
+
"tags": [
|
|
258
|
+
"form",
|
|
259
|
+
"hint"
|
|
260
|
+
],
|
|
261
|
+
"usedProps": [
|
|
262
|
+
"type",
|
|
263
|
+
"showIcon"
|
|
264
|
+
],
|
|
265
|
+
"usedEvents": [],
|
|
266
|
+
"usedMethods": [],
|
|
267
|
+
"scenario": "在表单上方显示重要提示"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"commonMistakes": [
|
|
271
|
+
{
|
|
272
|
+
"id": "tip_closable_no_handler",
|
|
273
|
+
"description": "使用 closable 但未处理关闭逻辑",
|
|
274
|
+
"wrongCode": "<Tip closable>提示</Tip> <!-- 点击关闭按钮不会隐藏 -->",
|
|
275
|
+
"correctCode": "<Tip closable :closed=\"closed\" @close=\"handleClose\">提示</Tip>",
|
|
276
|
+
"explanation": "closable 只显示关闭按钮,需要监听 close 事件并设置 closed 来隐藏",
|
|
277
|
+
"relatedProps": [
|
|
278
|
+
"closable",
|
|
279
|
+
"closed"
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "tip_type_typo",
|
|
284
|
+
"description": "type 值拼写错误",
|
|
285
|
+
"wrongCode": "<Tip type=\"error\">错误</Tip>",
|
|
286
|
+
"correctCode": "<Tip type=\"danger\">错误</Tip>",
|
|
287
|
+
"explanation": "错误类型应使用 danger 而非 error",
|
|
288
|
+
"relatedProps": [
|
|
289
|
+
"type"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "tip_showicon_case",
|
|
294
|
+
"description": "showIcon 大小写错误",
|
|
295
|
+
"wrongCode": "<Tip showicon>提示</Tip>",
|
|
296
|
+
"correctCode": "<Tip showIcon>提示</Tip>",
|
|
297
|
+
"explanation": "属性名是 showIcon(驼峰命名)",
|
|
298
|
+
"relatedProps": [
|
|
299
|
+
"showIcon"
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"searchKeywords": [
|
|
304
|
+
"警告",
|
|
305
|
+
"tip",
|
|
306
|
+
"提示",
|
|
307
|
+
"alert",
|
|
308
|
+
"通知",
|
|
309
|
+
"信息提示"
|
|
310
|
+
],
|
|
311
|
+
"useCases": [
|
|
312
|
+
"表单提示说明",
|
|
313
|
+
"操作提醒",
|
|
314
|
+
"状态展示",
|
|
315
|
+
"重要信息提示",
|
|
316
|
+
"页面公告"
|
|
317
|
+
],
|
|
318
|
+
"relatedComponents": [
|
|
319
|
+
"Tag",
|
|
320
|
+
"Message"
|
|
321
|
+
]
|
|
322
|
+
}
|