king-design-analyzer 2.2.0 → 2.2.2
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/components/actions.json +8 -0
- package/components/advancedset.json +1 -0
- package/components/affix.json +1 -0
- package/components/anchor.json +220 -0
- package/components/anchorlink.json +111 -0
- package/components/badge.json +1 -0
- package/components/breadcrumb.json +2 -1
- package/components/button.json +1 -0
- package/components/buttonlink.json +1 -0
- package/components/card.json +6 -3
- package/components/cardcontent.json +5 -0
- package/components/cascader.json +56 -0
- package/components/collapse.json +335 -348
- package/components/configprovider.json +96 -0
- package/components/copyrow.json +1 -0
- package/components/descriptions.json +10 -3
- package/components/diagram.json +295 -0
- package/components/dialog.json +4 -0
- package/components/divider.json +1 -0
- package/components/drawer.json +32 -0
- package/components/dropdown.json +13 -4
- package/components/flex.json +1 -0
- package/components/form.json +12 -3
- package/components/header.json +4 -0
- package/components/input.json +8 -4
- package/components/layoutcontent.json +9 -0
- package/components/layoutlistcontent.json +9 -0
- package/components/layoutpermissioncontent.json +1 -0
- package/components/layoutstandardlist.json +1 -0
- package/components/lazymount.json +1 -0
- package/components/lazyteleport.json +1 -0
- package/components/menu.json +4 -3
- package/components/notification.json +351 -0
- package/components/popover.json +23 -0
- package/components/protable.json +2 -0
- package/components/rate.json +1 -0
- package/components/scrollselect.json +140 -0
- package/components/select.json +72 -0
- package/components/skeleton.json +1 -0
- package/components/slider.json +12 -2
- package/components/spin.json +2 -1
- package/components/spinner.json +422 -428
- package/components/split.json +3 -0
- package/components/switch.json +4 -2
- package/components/table.json +6 -1
- package/components/tabs.json +2 -2
- package/components/tag.json +8 -5
- package/components/timeline.json +3 -1
- package/components/tip.json +20 -0
- package/components/tooltip.json +8 -0
- package/components/tour.json +16 -0
- package/components/transfer.json +52 -5
- package/components/tree.json +22 -1
- package/components/treeselect.json +56 -0
- package/components/upload.json +16 -0
- package/components/vdialog.json +1 -0
- package/components/vdrawer.json +4 -0
- package/components/virtuallist.json +9 -0
- package/dist/ast/index.d.mts +30 -1
- package/dist/ast/index.d.ts +30 -1
- package/dist/ast/index.js +3 -3
- package/dist/ast/index.mjs +1 -1
- package/dist/{chunk-BI5TIQID.mjs → chunk-4OTQAQ6J.mjs} +13 -2
- package/dist/chunk-6HOIRUQB.mjs +409 -0
- package/dist/{chunk-XGPHQHLR.mjs → chunk-BSCASJTV.mjs} +27 -4
- package/dist/{chunk-CR3GC4H3.js → chunk-DHLWNT53.js} +13 -2
- package/dist/{chunk-CJGGFVQJ.js → chunk-HARQRI4F.js} +31 -8
- package/dist/{chunk-TA3SV4SP.js → chunk-JJ6AB4ZH.js} +2 -2
- package/dist/{chunk-3LYQ5XFM.mjs → chunk-NZL6T22V.mjs} +1 -1
- package/dist/chunk-V5N65MRP.js +411 -0
- package/dist/{chunk-SZYVGYKK.js → chunk-XPHDD6XR.js} +113 -35
- package/dist/{chunk-KMIDURUR.mjs → chunk-YRGYDK2I.mjs} +113 -35
- package/dist/full/index.d.mts +2 -0
- package/dist/full/index.d.ts +2 -0
- package/dist/full/index.js +6 -6
- package/dist/full/index.mjs +4 -4
- package/dist/index.js +13 -13
- package/dist/index.mjs +5 -5
- package/dist/metadata/index.d.mts +17 -2
- package/dist/metadata/index.d.ts +17 -2
- package/dist/runtime/index.d.mts +2 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +4 -4
- package/dist/runtime/index.mjs +2 -2
- package/dist/static/index.js +5 -5
- package/dist/static/index.mjs +2 -2
- package/docs_for_llm/actions.doc.md +11 -1
- package/docs_for_llm/advancedset.doc.md +10 -1
- package/docs_for_llm/affix.doc.md +5 -0
- package/docs_for_llm/anchor.doc.md +155 -0
- package/docs_for_llm/anchorlink.doc.md +75 -0
- package/docs_for_llm/badge.doc.md +5 -0
- package/docs_for_llm/breadcrumb.doc.md +74 -1
- package/docs_for_llm/button.doc.md +57 -0
- package/docs_for_llm/buttonlink.doc.md +10 -1
- package/docs_for_llm/card.doc.md +50 -3
- package/docs_for_llm/cardcontent.doc.md +21 -0
- package/docs_for_llm/carousel.doc.md +71 -0
- package/docs_for_llm/cascader.doc.md +62 -0
- package/docs_for_llm/collapse.doc.md +138 -8
- package/docs_for_llm/configprovider.doc.md +77 -0
- package/docs_for_llm/copyrow.doc.md +10 -1
- package/docs_for_llm/datepicker.doc.md +19 -0
- package/docs_for_llm/descriptions.doc.md +113 -4
- package/docs_for_llm/diagram.doc.md +343 -0
- package/docs_for_llm/dialog.doc.md +49 -0
- package/docs_for_llm/divider.doc.md +5 -0
- package/docs_for_llm/drawer.doc.md +86 -0
- package/docs_for_llm/dropdown.doc.md +257 -3
- package/docs_for_llm/flex.doc.md +10 -1
- package/docs_for_llm/form.doc.md +163 -4
- package/docs_for_llm/formitemspinner.doc.md +1 -1
- package/docs_for_llm/grid.doc.md +71 -0
- package/docs_for_llm/header.doc.md +33 -4
- package/docs_for_llm/input.doc.md +109 -2
- package/docs_for_llm/layoutcontent.doc.md +37 -0
- package/docs_for_llm/layoutlistcontent.doc.md +82 -9
- package/docs_for_llm/layoutpermissioncontent.doc.md +10 -1
- package/docs_for_llm/layoutstandardlist.doc.md +10 -1
- package/docs_for_llm/lazymount.doc.md +10 -1
- package/docs_for_llm/lazyteleport.doc.md +10 -1
- package/docs_for_llm/menu.doc.md +125 -3
- package/docs_for_llm/message.doc.md +45 -0
- package/docs_for_llm/notification.doc.md +214 -0
- package/docs_for_llm/popover.doc.md +34 -0
- package/docs_for_llm/protable.doc.md +9 -0
- package/docs_for_llm/rate.doc.md +5 -0
- package/docs_for_llm/scrollselect.doc.md +90 -0
- package/docs_for_llm/select.doc.md +189 -0
- package/docs_for_llm/skeleton.doc.md +35 -0
- package/docs_for_llm/slider.doc.md +11 -1
- package/docs_for_llm/spin.doc.md +10 -1
- package/docs_for_llm/spinner.doc.md +1 -1
- package/docs_for_llm/split.doc.md +13 -0
- package/docs_for_llm/steps.doc.md +71 -0
- package/docs_for_llm/switch.doc.md +15 -2
- package/docs_for_llm/table.doc.md +199 -4
- package/docs_for_llm/tabs.doc.md +98 -2
- package/docs_for_llm/tag.doc.md +148 -5
- package/docs_for_llm/timeline.doc.md +80 -2
- package/docs_for_llm/timepicker.doc.md +19 -0
- package/docs_for_llm/tip.doc.md +30 -0
- package/docs_for_llm/tooltip.doc.md +46 -0
- package/docs_for_llm/tour.doc.md +102 -0
- package/docs_for_llm/transfer.doc.md +59 -4
- package/docs_for_llm/tree.doc.md +64 -1
- package/docs_for_llm/treeselect.doc.md +68 -0
- package/docs_for_llm/upload.doc.md +28 -0
- package/docs_for_llm/vdialog.doc.md +26 -1
- package/docs_for_llm/vdrawer.doc.md +33 -4
- package/docs_for_llm/virtuallist.doc.md +165 -0
- package/package.json +3 -3
- package/dist/chunk-D2SXGGTX.mjs +0 -162
- package/dist/chunk-EYKZY2F3.js +0 -164
package/components/input.json
CHANGED
|
@@ -479,24 +479,28 @@
|
|
|
479
479
|
{
|
|
480
480
|
"name": "prepend",
|
|
481
481
|
"description": "输入框前置内容,展示在输入框外部左侧",
|
|
482
|
+
"bindingType": "none",
|
|
482
483
|
"vueTemplate": "#prepend",
|
|
483
484
|
"usageExample": "<Input v-model=\"url\">\n <template #prepend>http://</template>\n</Input>"
|
|
484
485
|
},
|
|
485
486
|
{
|
|
486
487
|
"name": "append",
|
|
487
488
|
"description": "输入框后置内容,展示在输入框外部右侧",
|
|
489
|
+
"bindingType": "none",
|
|
488
490
|
"vueTemplate": "#append",
|
|
489
491
|
"usageExample": "<Input v-model=\"email\">\n <template #append>.com</template>\n</Input>"
|
|
490
492
|
},
|
|
491
493
|
{
|
|
492
494
|
"name": "prefix",
|
|
493
495
|
"description": "输入框前缀图标或内容,展示在输入框内部左侧",
|
|
496
|
+
"bindingType": "none",
|
|
494
497
|
"vueTemplate": "#prefix",
|
|
495
498
|
"usageExample": "<Input v-model=\"user\">\n <template #prefix><Icon class=\"k-icon-user\" /></template>\n</Input>"
|
|
496
499
|
},
|
|
497
500
|
{
|
|
498
501
|
"name": "suffix",
|
|
499
502
|
"description": "输入框后缀图标或内容,展示在输入框内部右侧",
|
|
503
|
+
"bindingType": "none",
|
|
500
504
|
"vueTemplate": "#suffix",
|
|
501
505
|
"usageExample": "<Input v-model=\"search\">\n <template #suffix><Icon class=\"k-icon-search\" /></template>\n</Input>"
|
|
502
506
|
}
|
|
@@ -745,8 +749,8 @@
|
|
|
745
749
|
"description": "当前搜索关键字"
|
|
746
750
|
}
|
|
747
751
|
],
|
|
748
|
-
"usageExample": "<Search @submit=\"
|
|
749
|
-
"handlerExample": "const
|
|
752
|
+
"usageExample": "<Search @submit=\"handleKeywordSearch\" />",
|
|
753
|
+
"handlerExample": "const searchHistory = ref<string[]>([]);\n\nconst handleKeywordSearch = (keywords: string) => {\n const normalized = keywords.trim();\n if (!normalized) return;\n searchHistory.value = [normalized, ...searchHistory.value.filter((item) => item !== normalized)].slice(0, 5);\n};"
|
|
750
754
|
}
|
|
751
755
|
],
|
|
752
756
|
"methods": [
|
|
@@ -755,14 +759,14 @@
|
|
|
755
759
|
"description": "使搜索框获得焦点",
|
|
756
760
|
"params": [],
|
|
757
761
|
"returnType": "void",
|
|
758
|
-
"usageExample": "const searchRef = ref<InstanceType<typeof Search>>();\
|
|
762
|
+
"usageExample": "const searchRef = ref<InstanceType<typeof Search>>();\n\nconst openSearchBar = () => {\n searchRef.value?.focus();\n};"
|
|
759
763
|
},
|
|
760
764
|
{
|
|
761
765
|
"name": "blur",
|
|
762
766
|
"description": "使搜索框失去焦点",
|
|
763
767
|
"params": [],
|
|
764
768
|
"returnType": "void",
|
|
765
|
-
"usageExample": "searchRef.value?.blur();"
|
|
769
|
+
"usageExample": "const closeSearchBar = () => {\n searchRef.value?.blur();\n};"
|
|
766
770
|
}
|
|
767
771
|
]
|
|
768
772
|
}
|
|
@@ -141,54 +141,63 @@
|
|
|
141
141
|
{
|
|
142
142
|
"name": "default",
|
|
143
143
|
"description": "扩展主体内容",
|
|
144
|
+
"bindingType": "none",
|
|
144
145
|
"vueTemplate": "<LayoutContent>Content</LayoutContent>",
|
|
145
146
|
"usageExample": "<LayoutContent>...</LayoutContent>"
|
|
146
147
|
},
|
|
147
148
|
{
|
|
148
149
|
"name": "headerTitle",
|
|
149
150
|
"description": "扩展顶部栏左侧标题处内容",
|
|
151
|
+
"bindingType": "none",
|
|
150
152
|
"vueTemplate": "<template #headerTitle>...</template>",
|
|
151
153
|
"usageExample": "<LayoutContent><template #headerTitle>自定义标题</template></LayoutContent>"
|
|
152
154
|
},
|
|
153
155
|
{
|
|
154
156
|
"name": "headerTitleAppend",
|
|
155
157
|
"description": "扩展顶部栏左侧标题后面追加内容",
|
|
158
|
+
"bindingType": "none",
|
|
156
159
|
"vueTemplate": "<template #headerTitleAppend>...</template>",
|
|
157
160
|
"usageExample": "<LayoutContent><template #headerTitleAppend><Tag>标签</Tag></template></LayoutContent>"
|
|
158
161
|
},
|
|
159
162
|
{
|
|
160
163
|
"name": "headerDocPrepend",
|
|
161
164
|
"description": "扩展顶部栏右侧文档前面追加内容",
|
|
165
|
+
"bindingType": "none",
|
|
162
166
|
"vueTemplate": "<template #headerDocPrepend>...</template>",
|
|
163
167
|
"usageExample": "<LayoutContent><template #headerDocPrepend><Button>操作</Button></template></LayoutContent>"
|
|
164
168
|
},
|
|
165
169
|
{
|
|
166
170
|
"name": "headerDoc",
|
|
167
171
|
"description": "扩展顶部栏右侧文档处内容",
|
|
172
|
+
"bindingType": "none",
|
|
168
173
|
"vueTemplate": "<template #headerDoc>...</template>",
|
|
169
174
|
"usageExample": "<LayoutContent><template #headerDoc><Link>文档链接</Link></template></LayoutContent>"
|
|
170
175
|
},
|
|
171
176
|
{
|
|
172
177
|
"name": "tab",
|
|
173
178
|
"description": "扩展选项卡处内容",
|
|
179
|
+
"bindingType": "none",
|
|
174
180
|
"vueTemplate": "<template #tab>...</template>",
|
|
175
181
|
"usageExample": "<LayoutContent><template #tab><Tabs>...</Tabs></template></LayoutContent>"
|
|
176
182
|
},
|
|
177
183
|
{
|
|
178
184
|
"name": "footerLeft",
|
|
179
185
|
"description": "扩展底部栏左侧处内容",
|
|
186
|
+
"bindingType": "none",
|
|
180
187
|
"vueTemplate": "<template #footerLeft>...</template>",
|
|
181
188
|
"usageExample": "<LayoutContent><template #footerLeft><span>提示信息</span></template></LayoutContent>"
|
|
182
189
|
},
|
|
183
190
|
{
|
|
184
191
|
"name": "footerRight",
|
|
185
192
|
"description": "扩展底部栏右侧处内容",
|
|
193
|
+
"bindingType": "none",
|
|
186
194
|
"vueTemplate": "<template #footerRight>...</template>",
|
|
187
195
|
"usageExample": "<LayoutContent><template #footerRight><Button>提交</Button></template></LayoutContent>"
|
|
188
196
|
},
|
|
189
197
|
{
|
|
190
198
|
"name": "footer",
|
|
191
199
|
"description": "扩展底部栏处的整体内容,底部栏没有左右之分的时候可使用此扩展",
|
|
200
|
+
"bindingType": "none",
|
|
192
201
|
"vueTemplate": "<template #footer>...</template>",
|
|
193
202
|
"usageExample": "<LayoutContent><template #footer><Button>保存</Button><Button>取消</Button></template></LayoutContent>"
|
|
194
203
|
}
|
|
@@ -42,46 +42,55 @@
|
|
|
42
42
|
{
|
|
43
43
|
"name": "default",
|
|
44
44
|
"description": "页面主体内容区域",
|
|
45
|
+
"bindingType": "none",
|
|
45
46
|
"vueTemplate": "<LayoutListContent>...</LayoutListContent>"
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
"name": "headerTitle",
|
|
49
50
|
"description": "扩展顶部栏左侧标题处内容",
|
|
51
|
+
"bindingType": "none",
|
|
50
52
|
"vueTemplate": "<template #headerTitle>...</template>"
|
|
51
53
|
},
|
|
52
54
|
{
|
|
53
55
|
"name": "headerTitleAppend",
|
|
54
56
|
"description": "扩展顶部栏左侧标题后的追加内容",
|
|
57
|
+
"bindingType": "none",
|
|
55
58
|
"vueTemplate": "<template #headerTitleAppend>...</template>"
|
|
56
59
|
},
|
|
57
60
|
{
|
|
58
61
|
"name": "headerDocPrepend",
|
|
59
62
|
"description": "扩展顶部栏右侧文档前置内容",
|
|
63
|
+
"bindingType": "none",
|
|
60
64
|
"vueTemplate": "<template #headerDocPrepend>...</template>"
|
|
61
65
|
},
|
|
62
66
|
{
|
|
63
67
|
"name": "headerDoc",
|
|
64
68
|
"description": "扩展顶部栏右侧文档内容",
|
|
69
|
+
"bindingType": "none",
|
|
65
70
|
"vueTemplate": "<template #headerDoc>...</template>"
|
|
66
71
|
},
|
|
67
72
|
{
|
|
68
73
|
"name": "opLeft",
|
|
69
74
|
"description": "卡片操作栏左侧内容",
|
|
75
|
+
"bindingType": "none",
|
|
70
76
|
"vueTemplate": "<template #opLeft>...</template>"
|
|
71
77
|
},
|
|
72
78
|
{
|
|
73
79
|
"name": "opRight",
|
|
74
80
|
"description": "卡片操作栏右侧内容",
|
|
81
|
+
"bindingType": "none",
|
|
75
82
|
"vueTemplate": "<template #opRight>...</template>"
|
|
76
83
|
},
|
|
77
84
|
{
|
|
78
85
|
"name": "prepend",
|
|
79
86
|
"description": "卡片操作栏上方扩展内容",
|
|
87
|
+
"bindingType": "none",
|
|
80
88
|
"vueTemplate": "<template #prepend>...</template>"
|
|
81
89
|
},
|
|
82
90
|
{
|
|
83
91
|
"name": "extra",
|
|
84
92
|
"description": "头部附加区域",
|
|
93
|
+
"bindingType": "none",
|
|
85
94
|
"vueTemplate": "<template #extra>...</template>"
|
|
86
95
|
}
|
|
87
96
|
],
|
package/components/menu.json
CHANGED
|
@@ -160,7 +160,8 @@
|
|
|
160
160
|
"slots": [
|
|
161
161
|
{
|
|
162
162
|
"name": "header",
|
|
163
|
-
"description": "扩展菜单头部"
|
|
163
|
+
"description": "扩展菜单头部",
|
|
164
|
+
"bindingType": "none"
|
|
164
165
|
}
|
|
165
166
|
],
|
|
166
167
|
"methods": [],
|
|
@@ -230,8 +231,8 @@
|
|
|
230
231
|
"description": "原生鼠标事件"
|
|
231
232
|
}
|
|
232
233
|
],
|
|
233
|
-
"usageExample": "<MenuItem @select=\"
|
|
234
|
-
"handlerExample": "const
|
|
234
|
+
"usageExample": "<MenuItem @select=\"handleMenuSelect\"></MenuItem>",
|
|
235
|
+
"handlerExample": "const activeSection = ref('');\n\nconst handleMenuSelect = (menuItem, e: MouseEvent) => {\n activeSection.value = String(menuItem.key);\n};"
|
|
235
236
|
}
|
|
236
237
|
]
|
|
237
238
|
}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "notification",
|
|
3
|
+
"name": "Notification",
|
|
4
|
+
"displayName": "通知提醒",
|
|
5
|
+
"category": "feedback",
|
|
6
|
+
"description": "全局通知组件,用于展示可停留、可关闭的系统级通知信息。支持不同语义类型、展示位置、自定义图标和点击回调,适合成功反馈、系统公告和后台异步任务提醒。",
|
|
7
|
+
"importStatement": "import { Notification } from '@king-design/vue';",
|
|
8
|
+
"props": [
|
|
9
|
+
{
|
|
10
|
+
"name": "title",
|
|
11
|
+
"description": "通知标题内容",
|
|
12
|
+
"type": {
|
|
13
|
+
"raw": "Children",
|
|
14
|
+
"kind": "custom"
|
|
15
|
+
},
|
|
16
|
+
"required": false,
|
|
17
|
+
"default": "undefined",
|
|
18
|
+
"usageExample": "Notification.notice({ title: '部署完成' })"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "content",
|
|
22
|
+
"description": "通知正文内容",
|
|
23
|
+
"type": {
|
|
24
|
+
"raw": "Children",
|
|
25
|
+
"kind": "custom"
|
|
26
|
+
},
|
|
27
|
+
"required": false,
|
|
28
|
+
"default": "undefined",
|
|
29
|
+
"usageExample": "Notification.notice({ content: '实例已经创建成功' })"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "duration",
|
|
33
|
+
"description": "通知自动关闭时间,单位 ms;传入 0 表示不自动关闭",
|
|
34
|
+
"type": {
|
|
35
|
+
"raw": "number",
|
|
36
|
+
"kind": "number"
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"default": "5000",
|
|
40
|
+
"usageExample": "Notification.info({ title: '处理中', duration: 0 })"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "type",
|
|
44
|
+
"description": "通知类型",
|
|
45
|
+
"type": {
|
|
46
|
+
"raw": "\"info\" | \"error\" | \"success\" | \"warning\" | \"\"",
|
|
47
|
+
"kind": "union",
|
|
48
|
+
"unionTypes": [
|
|
49
|
+
"info",
|
|
50
|
+
"error",
|
|
51
|
+
"success",
|
|
52
|
+
"warning",
|
|
53
|
+
""
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"default": "\"info\"",
|
|
58
|
+
"allowedValues": [
|
|
59
|
+
{
|
|
60
|
+
"value": "info",
|
|
61
|
+
"label": "普通提示",
|
|
62
|
+
"isDefault": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"value": "success",
|
|
66
|
+
"label": "成功通知"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"value": "warning",
|
|
70
|
+
"label": "警告通知"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"value": "error",
|
|
74
|
+
"label": "错误通知"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"value": "",
|
|
78
|
+
"label": "无类型样式"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"usageExample": "Notification.success({ title: '发布成功' })"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "closable",
|
|
85
|
+
"description": "是否显示关闭按钮",
|
|
86
|
+
"type": {
|
|
87
|
+
"raw": "boolean",
|
|
88
|
+
"kind": "boolean"
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"default": "true",
|
|
92
|
+
"usageExample": "Notification.notice({ title: '系统公告', closable: false })"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "icon",
|
|
96
|
+
"description": "自定义通知图标",
|
|
97
|
+
"type": {
|
|
98
|
+
"raw": "string | VNode",
|
|
99
|
+
"kind": "union"
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"default": "undefined",
|
|
103
|
+
"usageExample": "Notification.notice({ title: '自定义图标', icon: 'k-icon-info' })"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "position",
|
|
107
|
+
"description": "通知展示位置",
|
|
108
|
+
"type": {
|
|
109
|
+
"raw": "\"topRight\" | \"topLeft\" | \"bottomRight\" | \"bottomLeft\" | \"top\" | \"bottom\"",
|
|
110
|
+
"kind": "union",
|
|
111
|
+
"unionTypes": [
|
|
112
|
+
"topRight",
|
|
113
|
+
"topLeft",
|
|
114
|
+
"bottomRight",
|
|
115
|
+
"bottomLeft",
|
|
116
|
+
"top",
|
|
117
|
+
"bottom"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"default": "\"topRight\"",
|
|
122
|
+
"allowedValues": [
|
|
123
|
+
{
|
|
124
|
+
"value": "topRight",
|
|
125
|
+
"label": "右上角",
|
|
126
|
+
"isDefault": true
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"value": "topLeft",
|
|
130
|
+
"label": "左上角"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"value": "bottomRight",
|
|
134
|
+
"label": "右下角"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"value": "bottomLeft",
|
|
138
|
+
"label": "左下角"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"value": "top",
|
|
142
|
+
"label": "顶部居中"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"value": "bottom",
|
|
146
|
+
"label": "底部居中"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"usageExample": "Notification.info({ title: '左下角通知', position: 'bottomLeft' })"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "className",
|
|
153
|
+
"description": "自定义通知根节点类名",
|
|
154
|
+
"type": {
|
|
155
|
+
"raw": "string",
|
|
156
|
+
"kind": "string"
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"default": "undefined",
|
|
160
|
+
"usageExample": "Notification.notice({ title: '自定义样式', className: 'my-notification' })"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "onClick",
|
|
164
|
+
"description": "点击通知主体时触发的回调",
|
|
165
|
+
"type": {
|
|
166
|
+
"raw": "(e: MouseEvent) => void",
|
|
167
|
+
"kind": "function"
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"default": "undefined",
|
|
171
|
+
"usageExample": "Notification.notice({ title: '查看详情', onClick: () => console.log('clicked') })"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "onClose",
|
|
175
|
+
"description": "通知关闭后触发的回调",
|
|
176
|
+
"type": {
|
|
177
|
+
"raw": "() => void",
|
|
178
|
+
"kind": "function"
|
|
179
|
+
},
|
|
180
|
+
"required": false,
|
|
181
|
+
"default": "undefined",
|
|
182
|
+
"usageExample": "Notification.notice({ title: '关闭回调', onClose: () => console.log('closed') })"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"events": [],
|
|
186
|
+
"slots": [],
|
|
187
|
+
"methods": [
|
|
188
|
+
{
|
|
189
|
+
"name": "notice",
|
|
190
|
+
"description": "展示一条通知并返回唯一 ID",
|
|
191
|
+
"params": [
|
|
192
|
+
{
|
|
193
|
+
"name": "props",
|
|
194
|
+
"type": "Partial<NotificationProps>",
|
|
195
|
+
"description": "通知配置对象"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"returnType": "number",
|
|
199
|
+
"usageExample": "const id = Notification.notice({ title: '部署完成', content: '实例已创建完成' });"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "close",
|
|
203
|
+
"description": "关闭指定 ID 的通知",
|
|
204
|
+
"params": [
|
|
205
|
+
{
|
|
206
|
+
"name": "id",
|
|
207
|
+
"type": "number",
|
|
208
|
+
"description": "由 notice 返回的通知 ID"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"returnType": "void",
|
|
212
|
+
"usageExample": "Notification.close(id);"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "info",
|
|
216
|
+
"description": "展示普通类型通知",
|
|
217
|
+
"params": [
|
|
218
|
+
{
|
|
219
|
+
"name": "props",
|
|
220
|
+
"type": "Partial<NotificationProps>",
|
|
221
|
+
"description": "通知配置对象"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"returnType": "number",
|
|
225
|
+
"usageExample": "Notification.info({ title: '普通提醒', content: '这是一条信息通知' });"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "success",
|
|
229
|
+
"description": "展示成功类型通知",
|
|
230
|
+
"params": [
|
|
231
|
+
{
|
|
232
|
+
"name": "props",
|
|
233
|
+
"type": "Partial<NotificationProps>",
|
|
234
|
+
"description": "通知配置对象"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"returnType": "number",
|
|
238
|
+
"usageExample": "Notification.success({ title: '保存成功', content: '配置已更新' });"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "warning",
|
|
242
|
+
"description": "展示警告类型通知",
|
|
243
|
+
"params": [
|
|
244
|
+
{
|
|
245
|
+
"name": "props",
|
|
246
|
+
"type": "Partial<NotificationProps>",
|
|
247
|
+
"description": "通知配置对象"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"returnType": "number",
|
|
251
|
+
"usageExample": "Notification.warning({ title: '余额不足', content: '请尽快续费' });"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "error",
|
|
255
|
+
"description": "展示错误类型通知",
|
|
256
|
+
"params": [
|
|
257
|
+
{
|
|
258
|
+
"name": "props",
|
|
259
|
+
"type": "Partial<NotificationProps>",
|
|
260
|
+
"description": "通知配置对象"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"returnType": "number",
|
|
264
|
+
"usageExample": "Notification.error({ title: '提交失败', content: '请稍后重试' });"
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"examples": [
|
|
268
|
+
{
|
|
269
|
+
"id": "notification_basic",
|
|
270
|
+
"title": "基础通知",
|
|
271
|
+
"description": "点击按钮展示基础通知。",
|
|
272
|
+
"difficulty": "easy",
|
|
273
|
+
"code": "<script setup lang=\"ts\">\nimport { Button, Notification } from '@king-design/vue';\n\nconst openNotification = () => {\n Notification.notice({\n title: 'Hello, King Design',\n content: '这是一条基础通知',\n });\n};\n</script>\n<template>\n <Button @click=\"openNotification\">打开通知</Button>\n</template>",
|
|
274
|
+
"tags": [
|
|
275
|
+
"basic",
|
|
276
|
+
"notice"
|
|
277
|
+
],
|
|
278
|
+
"usedProps": [],
|
|
279
|
+
"usedEvents": [],
|
|
280
|
+
"usedMethods": [
|
|
281
|
+
"notice"
|
|
282
|
+
],
|
|
283
|
+
"scenario": "在页面操作完成后展示全局反馈。"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"id": "notification_types",
|
|
287
|
+
"title": "不同类型",
|
|
288
|
+
"description": "按语义展示不同类型的通知。",
|
|
289
|
+
"difficulty": "easy",
|
|
290
|
+
"code": "<script setup lang=\"ts\">\nimport { Button, Notification } from '@king-design/vue';\n</script>\n<template>\n <div style=\"display: flex; gap: 8px; flex-wrap: wrap;\">\n <Button @click=\"Notification.info({ title: '普通提醒', content: '这是一条信息通知' })\">Info</Button>\n <Button @click=\"Notification.success({ title: '发布成功', content: '版本已上线' })\">Success</Button>\n <Button @click=\"Notification.warning({ title: '容量不足', content: '请及时清理磁盘' })\">Warning</Button>\n <Button @click=\"Notification.error({ title: '同步失败', content: '网络连接异常' })\">Error</Button>\n </div>\n</template>",
|
|
291
|
+
"tags": [
|
|
292
|
+
"type",
|
|
293
|
+
"semantic"
|
|
294
|
+
],
|
|
295
|
+
"usedProps": [
|
|
296
|
+
"type"
|
|
297
|
+
],
|
|
298
|
+
"usedEvents": [],
|
|
299
|
+
"usedMethods": [
|
|
300
|
+
"info",
|
|
301
|
+
"success",
|
|
302
|
+
"warning",
|
|
303
|
+
"error"
|
|
304
|
+
],
|
|
305
|
+
"scenario": "根据业务结果展示不同语义反馈。"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"id": "notification_position",
|
|
309
|
+
"title": "位置与常驻",
|
|
310
|
+
"description": "控制通知位置并让通知常驻直到手动关闭。",
|
|
311
|
+
"difficulty": "medium",
|
|
312
|
+
"code": "<script setup lang=\"ts\">\nimport { Button, Notification } from '@king-design/vue';\n\nconst openPinned = () => {\n Notification.notice({\n title: '系统公告',\n content: '该通知位于底部且不会自动关闭',\n position: 'bottom',\n duration: 0,\n });\n};\n</script>\n<template>\n <Button @click=\"openPinned\">打开常驻通知</Button>\n</template>",
|
|
313
|
+
"tags": [
|
|
314
|
+
"position",
|
|
315
|
+
"duration"
|
|
316
|
+
],
|
|
317
|
+
"usedProps": [
|
|
318
|
+
"position",
|
|
319
|
+
"duration"
|
|
320
|
+
],
|
|
321
|
+
"usedEvents": [],
|
|
322
|
+
"usedMethods": [
|
|
323
|
+
"notice"
|
|
324
|
+
],
|
|
325
|
+
"scenario": "展示需要用户明确感知和手动关闭的通知。"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"searchKeywords": [
|
|
329
|
+
"notification",
|
|
330
|
+
"通知",
|
|
331
|
+
"提醒",
|
|
332
|
+
"全局通知",
|
|
333
|
+
"notice"
|
|
334
|
+
],
|
|
335
|
+
"useCases": [
|
|
336
|
+
"系统公告提醒",
|
|
337
|
+
"异步任务完成通知",
|
|
338
|
+
"操作成功或失败反馈"
|
|
339
|
+
],
|
|
340
|
+
"typeDefinitions": [
|
|
341
|
+
{
|
|
342
|
+
"name": "NotificationPosition",
|
|
343
|
+
"definition": "type NotificationPosition = 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'top' | 'bottom'",
|
|
344
|
+
"description": "通知可展示的位置。"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"relatedComponents": [
|
|
348
|
+
"Message",
|
|
349
|
+
"Dialog"
|
|
350
|
+
]
|
|
351
|
+
}
|
package/components/popover.json
CHANGED
|
@@ -274,6 +274,29 @@
|
|
|
274
274
|
"handlerExample": "const handleCancel = () => {\n console.log('已取消');\n};"
|
|
275
275
|
}
|
|
276
276
|
],
|
|
277
|
+
"slots": [
|
|
278
|
+
{
|
|
279
|
+
"name": "title",
|
|
280
|
+
"description": "自定义确认提示标题区域内容。",
|
|
281
|
+
"bindingType": "none",
|
|
282
|
+
"vueTemplate": "<template #title>...</template>",
|
|
283
|
+
"usageExample": "<Popover>\n <template #title>删除实例</template>\n <Button>删除</Button>\n</Popover>"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "content",
|
|
287
|
+
"description": "自定义确认提示主体内容。",
|
|
288
|
+
"bindingType": "none",
|
|
289
|
+
"vueTemplate": "<template #content>...</template>",
|
|
290
|
+
"usageExample": "<Popover>\n <template #content>\n 删除后将无法恢复,请确认操作。\n </template>\n <Button>删除</Button>\n</Popover>"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "footer",
|
|
294
|
+
"description": "自定义底部操作区内容,可覆盖默认的确认/取消按钮。",
|
|
295
|
+
"bindingType": "none",
|
|
296
|
+
"vueTemplate": "<template #footer>...</template>",
|
|
297
|
+
"usageExample": "<Popover>\n <template #footer>\n <Button size=\"small\">稍后处理</Button>\n <Button type=\"danger\" size=\"small\">立即删除</Button>\n </template>\n <Button>删除</Button>\n</Popover>"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
277
300
|
"methods": [],
|
|
278
301
|
"typeDefinitions": [
|
|
279
302
|
{
|
package/components/protable.json
CHANGED
|
@@ -172,12 +172,14 @@
|
|
|
172
172
|
{
|
|
173
173
|
"name": "actions",
|
|
174
174
|
"description": "表格的左上角操作区",
|
|
175
|
+
"bindingType": "none",
|
|
175
176
|
"vueTemplate": "<template #actions>...</template>",
|
|
176
177
|
"usageExample": "<ProTable><template #actions><Button type=\"primary\">新建</Button></template></ProTable>"
|
|
177
178
|
},
|
|
178
179
|
{
|
|
179
180
|
"name": "toolbar",
|
|
180
181
|
"description": "表格的右上角功能区",
|
|
182
|
+
"bindingType": "none",
|
|
181
183
|
"vueTemplate": "<template #toolbar>...</template>",
|
|
182
184
|
"usageExample": "<ProTable><template #toolbar><Button>自定义操作</Button></template></ProTable>"
|
|
183
185
|
}
|
package/components/rate.json
CHANGED
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
{
|
|
83
83
|
"name": "icon",
|
|
84
84
|
"description": "自定义每一项评分图标,默认使用星形图标。",
|
|
85
|
+
"bindingType": "none",
|
|
85
86
|
"vueTemplate": "<template #icon>...</template>",
|
|
86
87
|
"usageExample": "<Rate v-model=\"score\"><template #icon><Icon class=\"k-icon-favorite\" /></template></Rate>"
|
|
87
88
|
}
|