king-design-analyzer 2.1.9 → 2.2.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/components/actions.json +101 -0
- package/components/advancedset.json +127 -0
- package/components/affix.json +7 -0
- package/components/aksk.json +172 -0
- package/components/az.json +15 -2
- package/components/badge.json +7 -0
- package/components/billtypes.json +14 -2
- package/components/breadcrumb.json +7 -0
- package/components/button.json +191 -0
- package/components/buttonlink.json +73 -0
- package/components/card.json +8 -1
- package/components/cardcol.json +142 -0
- package/components/cardcols.json +121 -0
- package/components/cardcontent.json +15 -3
- package/components/cardtabs.json +172 -0
- package/components/carousel.json +7 -0
- package/components/cascader.json +520 -368
- package/components/checkbox.json +51 -4
- package/components/cidrinput.json +140 -0
- package/components/code.json +8 -1
- package/components/collapse.json +7 -0
- package/components/colorpicker.json +217 -0
- package/components/copy.json +7 -0
- package/components/copyhover.json +111 -0
- package/components/copyrow.json +124 -0
- package/components/datepicker.json +656 -524
- package/components/description.json +98 -0
- package/components/dialog.json +522 -455
- package/components/divider.json +8 -1
- package/components/drawer.json +571 -558
- package/components/dropdown.json +464 -384
- package/components/duration.json +125 -0
- package/components/editable.json +66 -0
- package/components/ellipsis.json +34 -1
- package/components/filtertablefieldsdialog.json +128 -0
- package/components/flex.json +151 -0
- package/components/form.json +131 -0
- package/components/formiteminput.json +214 -0
- package/components/formitemspinner.json +213 -0
- package/components/formitemswitch.json +185 -0
- package/components/formitemtableconfigs.json +210 -0
- package/components/grid.json +7 -0
- package/components/header.json +161 -0
- package/components/icon.json +13 -1
- package/components/icontooltip.json +19 -1
- package/components/input.json +188 -4
- package/components/instancelist.json +194 -0
- package/components/instancenum.json +196 -0
- package/components/ipinput.json +117 -0
- package/components/kspstatus.json +205 -0
- package/components/kvcode.json +120 -0
- package/components/layoutcontent.json +15 -3
- package/components/layoutlistcontent.json +148 -0
- package/components/layoutpermissioncontent.json +155 -0
- package/components/layoutstandardlist.json +275 -0
- package/components/layouttabs.json +168 -0
- package/components/lazymount.json +86 -0
- package/components/lazyteleport.json +118 -0
- package/components/menu.json +7 -0
- package/components/pagination.json +12 -0
- package/components/paginationplus.json +30 -3
- package/components/password.json +121 -0
- package/components/popover.json +457 -437
- package/components/projects.json +129 -0
- package/components/protable.json +97 -8
- package/components/queuevisualrange.json +110 -0
- package/components/radio.json +82 -2
- package/components/rate.json +199 -0
- package/components/region.json +14 -2
- package/components/search.json +221 -0
- package/components/searchinput.json +132 -0
- package/components/searchitems.json +215 -0
- package/components/searchselect.json +195 -0
- package/components/select.json +686 -666
- package/components/sidebar.json +198 -0
- package/components/skeleton.json +233 -0
- package/components/spin.json +8 -1
- package/components/split.json +260 -0
- package/components/sshkeys.json +138 -0
- package/components/status.json +60 -3
- package/components/steps.json +7 -0
- package/components/switch.json +8 -1
- package/components/table.json +18 -1
- package/components/tablecolumnid.json +14 -2
- package/components/tabs.json +12 -0
- package/components/timeline.json +213 -0
- package/components/timepicker.json +147 -3
- package/components/timerange.json +262 -0
- package/components/tip.json +7 -0
- package/components/tooltip.json +484 -395
- package/components/tour.json +418 -372
- package/components/transfer.json +27 -3
- package/components/tree.json +6 -4
- package/components/treeselect.json +556 -475
- package/components/upload.json +474 -473
- package/components/vdialog.json +308 -0
- package/components/vdrawer.json +331 -0
- package/components/virtuallist.json +7 -0
- package/dist/ast/index.d.mts +35 -1
- package/dist/ast/index.d.ts +35 -1
- package/dist/ast/index.js +4 -3
- package/dist/ast/index.mjs +2 -1
- package/dist/{chunk-DSWKLUIX.mjs → chunk-3LYQ5XFM.mjs} +1 -1
- package/dist/chunk-BI5TIQID.mjs +330 -0
- package/dist/{chunk-F26GUCGG.js → chunk-CJGGFVQJ.js} +8 -8
- package/dist/chunk-CR3GC4H3.js +353 -0
- package/dist/{chunk-NZ6TLWMD.mjs → chunk-D2SXGGTX.mjs} +28 -17
- package/dist/{chunk-D3Y6FGWA.js → chunk-EYKZY2F3.js} +29 -18
- package/dist/chunk-KF5YBEM5.js +143 -0
- package/dist/{chunk-H2ET6MMM.mjs → chunk-KMIDURUR.mjs} +42 -47
- package/dist/chunk-QC6VTSA3.mjs +117 -0
- package/dist/{chunk-2W6OCG2S.js → chunk-SZYVGYKK.js} +42 -48
- package/dist/{chunk-WYSRJVX4.js → chunk-TA3SV4SP.js} +2 -2
- package/dist/{chunk-OJOHB64C.mjs → chunk-XGPHQHLR.mjs} +4 -4
- package/dist/full/index.js +7 -6
- package/dist/full/index.mjs +5 -4
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -13
- package/dist/index.mjs +6 -5
- package/dist/metadata/index.d.mts +22 -2
- package/dist/metadata/index.d.ts +22 -2
- package/dist/metadata/index.js +26 -16
- package/dist/metadata/index.mjs +26 -15
- package/dist/resolve-BsLBxlBi.d.mts +24 -0
- package/dist/resolve-BsLBxlBi.d.ts +24 -0
- package/dist/runtime/index.js +4 -4
- package/dist/runtime/index.mjs +2 -2
- package/dist/shared/index.d.mts +10 -0
- package/dist/shared/index.d.ts +10 -0
- package/dist/shared/index.js +23 -0
- package/dist/shared/index.mjs +2 -0
- package/dist/static/index.js +5 -5
- package/dist/static/index.mjs +2 -2
- package/docs_for_llm/actions.doc.md +77 -0
- package/docs_for_llm/advancedset.doc.md +89 -0
- package/docs_for_llm/affix.doc.md +15 -7
- package/docs_for_llm/aksk.doc.md +111 -0
- package/docs_for_llm/az.doc.md +17 -11
- package/docs_for_llm/badge.doc.md +6 -5
- package/docs_for_llm/billtypes.doc.md +17 -11
- package/docs_for_llm/breadcrumb.doc.md +6 -3
- package/docs_for_llm/button.doc.md +34 -18
- package/docs_for_llm/buttonlink.doc.md +55 -0
- package/docs_for_llm/card.doc.md +8 -5
- package/docs_for_llm/cardcol.doc.md +78 -0
- package/docs_for_llm/cardcols.doc.md +84 -0
- package/docs_for_llm/cardcontent.doc.md +10 -10
- package/docs_for_llm/cardtabs.doc.md +106 -0
- package/docs_for_llm/carousel.doc.md +8 -7
- package/docs_for_llm/cascader.doc.md +46 -25
- package/docs_for_llm/checkbox.doc.md +25 -13
- package/docs_for_llm/cidrinput.doc.md +83 -0
- package/docs_for_llm/code.doc.md +22 -11
- package/docs_for_llm/collapse.doc.md +9 -6
- package/docs_for_llm/colorpicker.doc.md +104 -0
- package/docs_for_llm/copy.doc.md +15 -13
- package/docs_for_llm/copyhover.doc.md +59 -0
- package/docs_for_llm/copyrow.doc.md +71 -0
- package/docs_for_llm/datepicker.doc.md +51 -39
- package/docs_for_llm/description.doc.md +75 -0
- package/docs_for_llm/descriptions.doc.md +9 -6
- package/docs_for_llm/dialog.doc.md +48 -77
- package/docs_for_llm/divider.doc.md +9 -7
- package/docs_for_llm/drawer.doc.md +43 -84
- package/docs_for_llm/dropdown.doc.md +52 -21
- package/docs_for_llm/duration.doc.md +76 -0
- package/docs_for_llm/editable.doc.md +36 -14
- package/docs_for_llm/ellipsis.doc.md +10 -5
- package/docs_for_llm/filtertablefieldsdialog.doc.md +99 -0
- package/docs_for_llm/flex.doc.md +74 -0
- package/docs_for_llm/form.doc.md +33 -14
- package/docs_for_llm/formiteminput.doc.md +128 -0
- package/docs_for_llm/formitemspinner.doc.md +105 -0
- package/docs_for_llm/formitemswitch.doc.md +113 -0
- package/docs_for_llm/formitemtableconfigs.doc.md +95 -0
- package/docs_for_llm/grid.doc.md +7 -5
- package/docs_for_llm/header.doc.md +85 -0
- package/docs_for_llm/icon.doc.md +12 -8
- package/docs_for_llm/icontooltip.doc.md +121 -0
- package/docs_for_llm/input.doc.md +90 -39
- package/docs_for_llm/instancelist.doc.md +113 -0
- package/docs_for_llm/instancenum.doc.md +95 -0
- package/docs_for_llm/ipinput.doc.md +77 -0
- package/docs_for_llm/kspstatus.doc.md +82 -0
- package/docs_for_llm/kvcode.doc.md +76 -0
- package/docs_for_llm/layoutcontent.doc.md +17 -17
- package/docs_for_llm/layoutlistcontent.doc.md +95 -0
- package/docs_for_llm/layoutpermissioncontent.doc.md +84 -0
- package/docs_for_llm/layoutstandardlist.doc.md +120 -0
- package/docs_for_llm/layouttabs.doc.md +101 -0
- package/docs_for_llm/lazymount.doc.md +73 -0
- package/docs_for_llm/lazyteleport.doc.md +76 -0
- package/docs_for_llm/menu.doc.md +14 -11
- package/docs_for_llm/message.doc.md +48 -10
- package/docs_for_llm/pagination.doc.md +30 -17
- package/docs_for_llm/paginationplus.doc.md +31 -10
- package/docs_for_llm/password.doc.md +86 -0
- package/docs_for_llm/popover.doc.md +24 -55
- package/docs_for_llm/progress.doc.md +13 -10
- package/docs_for_llm/projects.doc.md +91 -0
- package/docs_for_llm/protable.doc.md +89 -15
- package/docs_for_llm/queuevisualrange.doc.md +78 -0
- package/docs_for_llm/radio.doc.md +23 -8
- package/docs_for_llm/rate.doc.md +122 -0
- package/docs_for_llm/region.doc.md +25 -13
- package/docs_for_llm/search.doc.md +120 -0
- package/docs_for_llm/searchinput.doc.md +111 -0
- package/docs_for_llm/searchitems.doc.md +116 -0
- package/docs_for_llm/searchselect.doc.md +126 -0
- package/docs_for_llm/select.doc.md +40 -55
- package/docs_for_llm/sidebar.doc.md +133 -0
- package/docs_for_llm/skeleton.doc.md +117 -0
- package/docs_for_llm/slider.doc.md +31 -21
- package/docs_for_llm/spin.doc.md +8 -5
- package/docs_for_llm/spinner.doc.md +28 -18
- package/docs_for_llm/split.doc.md +157 -0
- package/docs_for_llm/sshkeys.doc.md +88 -0
- package/docs_for_llm/status.doc.md +14 -9
- package/docs_for_llm/steps.doc.md +10 -7
- package/docs_for_llm/switch.doc.md +17 -14
- package/docs_for_llm/table.doc.md +118 -51
- package/docs_for_llm/tablecolumnid.doc.md +36 -16
- package/docs_for_llm/tabs.doc.md +19 -10
- package/docs_for_llm/tag.doc.md +19 -10
- package/docs_for_llm/timeline.doc.md +109 -0
- package/docs_for_llm/timepicker.doc.md +57 -38
- package/docs_for_llm/timerange.doc.md +157 -0
- package/docs_for_llm/tip.doc.md +20 -11
- package/docs_for_llm/tooltip.doc.md +55 -29
- package/docs_for_llm/tour.doc.md +48 -29
- package/docs_for_llm/transfer.doc.md +40 -29
- package/docs_for_llm/tree.doc.md +65 -23
- package/docs_for_llm/treeselect.doc.md +37 -48
- package/docs_for_llm/upload.doc.md +56 -32
- package/docs_for_llm/useCRUD.doc.md +49 -0
- package/docs_for_llm/useCountdown.doc.md +43 -0
- package/docs_for_llm/useDetail.doc.md +48 -0
- package/docs_for_llm/useDialog.doc.md +46 -0
- package/docs_for_llm/useEntity.doc.md +45 -0
- package/docs_for_llm/useEventListener.doc.md +44 -0
- package/docs_for_llm/useFalseUntilTruthy.doc.md +41 -0
- package/docs_for_llm/useGetCopyAuthText.doc.md +35 -0
- package/docs_for_llm/useGetUserPermission.doc.md +43 -0
- package/docs_for_llm/useGroup.doc.md +48 -0
- package/docs_for_llm/useIdEntities.doc.md +48 -0
- package/docs_for_llm/useIdEntity.doc.md +103 -0
- package/docs_for_llm/useInterval.doc.md +43 -0
- package/docs_for_llm/useLayoutStandardList.doc.md +38 -0
- package/docs_for_llm/useMessage.doc.md +46 -0
- package/docs_for_llm/useModifyCache.doc.md +37 -0
- package/docs_for_llm/useOpenDialog.doc.md +41 -0
- package/docs_for_llm/usePagination.doc.md +60 -0
- package/docs_for_llm/usePersist.doc.md +54 -0
- package/docs_for_llm/usePoll.doc.md +41 -0
- package/docs_for_llm/useRoutePlus.doc.md +34 -0
- package/docs_for_llm/useRouterPlus.doc.md +34 -0
- package/docs_for_llm/useSearch.doc.md +68 -0
- package/docs_for_llm/useShell.doc.md +43 -0
- package/docs_for_llm/useSkip.doc.md +41 -0
- package/docs_for_llm/useStorageIdEntity.doc.md +46 -0
- package/docs_for_llm/useStore.doc.md +34 -0
- package/docs_for_llm/useTable.doc.md +57 -0
- package/docs_for_llm/useTableGroup.doc.md +47 -0
- package/docs_for_llm/useTableSort.doc.md +40 -0
- package/docs_for_llm/useToState.doc.md +112 -0
- package/docs_for_llm/useUser.doc.md +38 -0
- package/docs_for_llm/useValidForm.doc.md +41 -0
- package/docs_for_llm/vdialog.doc.md +129 -0
- package/docs_for_llm/vdrawer.doc.md +119 -0
- package/docs_for_llm/virtuallist.doc.md +6 -3
- package/hooks/useCRUD.json +61 -0
- package/hooks/useCountdown.json +49 -0
- package/hooks/useDetail.json +67 -0
- package/hooks/useDialog.json +49 -0
- package/hooks/useEntity.json +61 -0
- package/hooks/useEventListener.json +61 -0
- package/hooks/useFalseUntilTruthy.json +43 -0
- package/hooks/useGetCopyAuthText.json +36 -0
- package/hooks/useGetUserPermission.json +55 -0
- package/hooks/useGroup.json +49 -0
- package/hooks/useIdEntities.json +61 -0
- package/hooks/useInterval.json +55 -0
- package/hooks/useLayoutStandardList.json +36 -0
- package/hooks/useMessage.json +73 -0
- package/hooks/useModifyCache.json +36 -0
- package/hooks/useOpenDialog.json +43 -0
- package/hooks/usePagination.json +49 -0
- package/hooks/usePersist.json +61 -0
- package/hooks/usePoll.json +43 -0
- package/hooks/useRoutePlus.json +36 -0
- package/hooks/useRouterPlus.json +36 -0
- package/hooks/useSearch.json +56 -0
- package/hooks/useShell.json +49 -0
- package/hooks/useSkip.json +43 -0
- package/hooks/useStorageIdEntity.json +67 -0
- package/hooks/useStore.json +36 -0
- package/hooks/useTable.json +49 -0
- package/hooks/useTableGroup.json +43 -0
- package/hooks/useTableSort.json +43 -0
- package/hooks/useUser.json +36 -0
- package/hooks/useValidForm.json +43 -0
- package/package.json +12 -6
- package/dist/chunk-HPAUCD5I.js +0 -156
- package/dist/chunk-L4DS3EXI.mjs +0 -133
package/components/checkbox.json
CHANGED
|
@@ -70,7 +70,10 @@
|
|
|
70
70
|
},
|
|
71
71
|
"required": false,
|
|
72
72
|
"default": "undefined",
|
|
73
|
-
"usageExample": "<Checkbox name=\"agreement\"></Checkbox>"
|
|
73
|
+
"usageExample": "<Checkbox name=\"agreement\"></Checkbox>",
|
|
74
|
+
"tags": [
|
|
75
|
+
"native"
|
|
76
|
+
]
|
|
74
77
|
},
|
|
75
78
|
{
|
|
76
79
|
"name": "required",
|
|
@@ -81,7 +84,10 @@
|
|
|
81
84
|
},
|
|
82
85
|
"required": false,
|
|
83
86
|
"default": "undefined",
|
|
84
|
-
"usageExample": "<Checkbox required></Checkbox>"
|
|
87
|
+
"usageExample": "<Checkbox required></Checkbox>",
|
|
88
|
+
"tags": [
|
|
89
|
+
"native"
|
|
90
|
+
]
|
|
85
91
|
},
|
|
86
92
|
{
|
|
87
93
|
"name": "form",
|
|
@@ -92,7 +98,10 @@
|
|
|
92
98
|
},
|
|
93
99
|
"required": false,
|
|
94
100
|
"default": "undefined",
|
|
95
|
-
"usageExample": "<Checkbox form=\"myForm\"></Checkbox>"
|
|
101
|
+
"usageExample": "<Checkbox form=\"myForm\"></Checkbox>",
|
|
102
|
+
"tags": [
|
|
103
|
+
"native"
|
|
104
|
+
]
|
|
96
105
|
},
|
|
97
106
|
{
|
|
98
107
|
"name": "autofocus",
|
|
@@ -103,7 +112,38 @@
|
|
|
103
112
|
},
|
|
104
113
|
"required": false,
|
|
105
114
|
"default": "undefined",
|
|
106
|
-
"usageExample": "<Checkbox autofocus></Checkbox>"
|
|
115
|
+
"usageExample": "<Checkbox autofocus></Checkbox>",
|
|
116
|
+
"tags": [
|
|
117
|
+
"native"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "autocomplete",
|
|
122
|
+
"description": "原生 autocomplete 属性,指定浏览器自动补全行为",
|
|
123
|
+
"type": {
|
|
124
|
+
"raw": "string",
|
|
125
|
+
"kind": "string"
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"default": "undefined",
|
|
129
|
+
"usageExample": "<Checkbox autocomplete=\"off\"></Checkbox>",
|
|
130
|
+
"tags": [
|
|
131
|
+
"native"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "maxlength",
|
|
136
|
+
"description": "原生 maxlength 属性,组件透传到内部 input 元素",
|
|
137
|
+
"type": {
|
|
138
|
+
"raw": "number | string",
|
|
139
|
+
"kind": "union"
|
|
140
|
+
},
|
|
141
|
+
"required": false,
|
|
142
|
+
"default": "undefined",
|
|
143
|
+
"usageExample": "<Checkbox :maxlength=\"1\"></Checkbox>",
|
|
144
|
+
"tags": [
|
|
145
|
+
"native"
|
|
146
|
+
]
|
|
107
147
|
}
|
|
108
148
|
],
|
|
109
149
|
"events": [
|
|
@@ -291,6 +331,13 @@
|
|
|
291
331
|
"批量选择",
|
|
292
332
|
"权限勾选"
|
|
293
333
|
],
|
|
334
|
+
"typeDefinitions": [
|
|
335
|
+
{
|
|
336
|
+
"name": "CheckboxValue",
|
|
337
|
+
"definition": "type CheckboxValue = boolean | string | number",
|
|
338
|
+
"description": "复选框绑定值类型,可使用布尔值或自定义 trueValue / falseValue。"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
294
341
|
"relatedComponents": [
|
|
295
342
|
"Radio",
|
|
296
343
|
"Switch"
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "cidrinput",
|
|
3
|
+
"name": "CidrInput",
|
|
4
|
+
"displayName": "CIDR 输入框",
|
|
5
|
+
"category": "form",
|
|
6
|
+
"description": "用于录入网段 CIDR 的业务输入组件,把 IP 地址与掩码选择组合在一起,常用于 VPC、子网和安全策略配置。",
|
|
7
|
+
"importStatement": "import { CidrInput } from '@ksyun-internal/versatile';",
|
|
8
|
+
"props": [
|
|
9
|
+
{
|
|
10
|
+
"name": "modelValue",
|
|
11
|
+
"description": "CIDR 值,如 192.168.0.0/24",
|
|
12
|
+
"type": {
|
|
13
|
+
"raw": "string",
|
|
14
|
+
"kind": "string"
|
|
15
|
+
},
|
|
16
|
+
"required": false
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "vpcCidr",
|
|
20
|
+
"description": "所属 VPC 的 CIDR,用于约束和提示",
|
|
21
|
+
"type": {
|
|
22
|
+
"raw": "string",
|
|
23
|
+
"kind": "string"
|
|
24
|
+
},
|
|
25
|
+
"required": false
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "disabled",
|
|
29
|
+
"description": "禁用状态或禁用分段配置",
|
|
30
|
+
"type": {
|
|
31
|
+
"raw": "boolean | any[]",
|
|
32
|
+
"kind": "union"
|
|
33
|
+
},
|
|
34
|
+
"required": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "tooltip",
|
|
38
|
+
"description": "各分段 tooltip 配置",
|
|
39
|
+
"type": {
|
|
40
|
+
"raw": "any[]",
|
|
41
|
+
"kind": "array"
|
|
42
|
+
},
|
|
43
|
+
"required": false
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "maskRange",
|
|
47
|
+
"description": "可选掩码范围",
|
|
48
|
+
"type": {
|
|
49
|
+
"raw": "number[]",
|
|
50
|
+
"kind": "array"
|
|
51
|
+
},
|
|
52
|
+
"required": false,
|
|
53
|
+
"default": "[0, 32]"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"events": [
|
|
57
|
+
{
|
|
58
|
+
"name": "update:modelValue",
|
|
59
|
+
"vueEventName": "@update:modelValue",
|
|
60
|
+
"description": "CIDR 字符串变化时触发,可直接同步到网络配置表单。",
|
|
61
|
+
"params": [
|
|
62
|
+
{
|
|
63
|
+
"name": "value",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "当前输入的 CIDR 字符串。",
|
|
66
|
+
"optional": true
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"slots": [],
|
|
72
|
+
"methods": [],
|
|
73
|
+
"examples": [
|
|
74
|
+
{
|
|
75
|
+
"id": "cidrinput_subnet",
|
|
76
|
+
"title": "子网网段录入",
|
|
77
|
+
"description": "限制掩码范围,并结合 VPC 网段给出约束。",
|
|
78
|
+
"difficulty": "easy",
|
|
79
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { CidrInput } from '@ksyun-internal/versatile';\n\nconst cidr = ref('192.168.1.0/24');\n</script>\n\n<template>\n <CidrInput\n v-model=\"cidr\"\n vpc-cidr=\"192.168.0.0/16\"\n :mask-range=\"[16, 28]\"\n />\n</template>",
|
|
80
|
+
"tags": [
|
|
81
|
+
"network",
|
|
82
|
+
"cidr"
|
|
83
|
+
],
|
|
84
|
+
"usedProps": [
|
|
85
|
+
"modelValue",
|
|
86
|
+
"vpcCidr",
|
|
87
|
+
"maskRange"
|
|
88
|
+
],
|
|
89
|
+
"usedEvents": [
|
|
90
|
+
"update:modelValue"
|
|
91
|
+
],
|
|
92
|
+
"usedMethods": [],
|
|
93
|
+
"scenario": "创建子网时录入并校验目标网段。"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "cidrinput_with_tooltips",
|
|
97
|
+
"title": "为分段输入补充提示",
|
|
98
|
+
"description": "给 CIDR 各段提供 tooltip,帮助用户理解输入规则。",
|
|
99
|
+
"difficulty": "medium",
|
|
100
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { CidrInput } from '@ksyun-internal/versatile';\n\nconst cidr = ref('10.0.0.0/24');\nconst tooltip = ['网络段', '子网段', '主机段', '预留', '掩码长度'];\n</script>\n\n<template>\n <CidrInput v-model=\"cidr\" :tooltip=\"tooltip\" :mask-range=\"[24, 28]\" />\n</template>",
|
|
101
|
+
"tags": [
|
|
102
|
+
"network",
|
|
103
|
+
"tooltip"
|
|
104
|
+
],
|
|
105
|
+
"usedProps": [
|
|
106
|
+
"modelValue",
|
|
107
|
+
"tooltip",
|
|
108
|
+
"maskRange"
|
|
109
|
+
],
|
|
110
|
+
"usedEvents": [
|
|
111
|
+
"update:modelValue"
|
|
112
|
+
],
|
|
113
|
+
"usedMethods": [],
|
|
114
|
+
"scenario": "在网络配置页中用提示文案降低 CIDR 输入门槛。"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"searchKeywords": [
|
|
118
|
+
"cidr",
|
|
119
|
+
"cidr input",
|
|
120
|
+
"网段输入",
|
|
121
|
+
"子网配置",
|
|
122
|
+
"network cidr",
|
|
123
|
+
"掩码选择"
|
|
124
|
+
],
|
|
125
|
+
"useCases": [
|
|
126
|
+
"网络配置",
|
|
127
|
+
"子网和路由录入",
|
|
128
|
+
"CIDR 分段输入与校验"
|
|
129
|
+
],
|
|
130
|
+
"typeDefinitions": [
|
|
131
|
+
{
|
|
132
|
+
"name": "CidrValue",
|
|
133
|
+
"definition": "type CidrValue = string",
|
|
134
|
+
"description": "CIDR 字符串类型,例如 `192.168.0.0/24`。"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"relatedComponents": [
|
|
138
|
+
"IPInput"
|
|
139
|
+
]
|
|
140
|
+
}
|
package/components/code.json
CHANGED
|
@@ -314,5 +314,12 @@
|
|
|
314
314
|
"配置文件编辑",
|
|
315
315
|
"JSON 编辑器"
|
|
316
316
|
],
|
|
317
|
+
"typeDefinitions": [
|
|
318
|
+
{
|
|
319
|
+
"name": "CodeLanguage",
|
|
320
|
+
"definition": "type CodeLanguage = string",
|
|
321
|
+
"description": "代码编辑器语言标识,通常使用 javascript、typescript、json 等 Monaco 语言名。"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
317
324
|
"relatedComponents": []
|
|
318
|
-
}
|
|
325
|
+
}
|
package/components/collapse.json
CHANGED
|
@@ -350,6 +350,13 @@
|
|
|
350
350
|
"侧边栏菜单",
|
|
351
351
|
"配置项分类"
|
|
352
352
|
],
|
|
353
|
+
"typeDefinitions": [
|
|
354
|
+
{
|
|
355
|
+
"name": "CollapseArrow",
|
|
356
|
+
"definition": "type CollapseArrow = 'left' | 'right'",
|
|
357
|
+
"description": "折叠面板箭头方向枚举,控制箭头在标题左侧还是右侧。"
|
|
358
|
+
}
|
|
359
|
+
],
|
|
353
360
|
"relatedComponents": [
|
|
354
361
|
"CollapseItem",
|
|
355
362
|
"Card",
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "colorpicker",
|
|
3
|
+
"name": "Colorpicker",
|
|
4
|
+
"displayName": "颜色选择器",
|
|
5
|
+
"category": "form",
|
|
6
|
+
"description": "颜色选择器组件,用于选择纯色或带透明度的颜色值。点击触发器后会弹出调色面板,支持预设颜色、自定义弹出容器和弹层定位。",
|
|
7
|
+
"importStatement": "import { Colorpicker } from '@king-design/vue';",
|
|
8
|
+
"props": [
|
|
9
|
+
{
|
|
10
|
+
"name": "value",
|
|
11
|
+
"description": "当前颜色值,必填。支持十六进制颜色或 rgba 字符串,可用 v-model 双向绑定。",
|
|
12
|
+
"type": {
|
|
13
|
+
"raw": "string",
|
|
14
|
+
"kind": "string"
|
|
15
|
+
},
|
|
16
|
+
"required": true,
|
|
17
|
+
"usageExample": "<Colorpicker v-model=\"color\" />"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "presets",
|
|
21
|
+
"description": "预设颜色列表,展示在面板底部,便于快速选择常用颜色。",
|
|
22
|
+
"type": {
|
|
23
|
+
"raw": "string[]",
|
|
24
|
+
"kind": "array"
|
|
25
|
+
},
|
|
26
|
+
"required": false,
|
|
27
|
+
"default": "[\"#D0021B\", \"#F5A623\", \"#F8E71C\", \"#8B572A\", \"#7ED321\", \"#417505\", \"#BD10E0\", \"#9013FE\", \"#4A90E2\", \"#50E3C2\", \"#B8E986\", \"#000000\", \"#4A4A4A\", \"#9B9B9B\", \"#FFFFFF\"]",
|
|
28
|
+
"usageExample": "<Colorpicker v-model=\"color\" :presets=\"['#1677ff', '#52c41a', '#faad14']\" />"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "size",
|
|
32
|
+
"description": "尺寸。",
|
|
33
|
+
"type": {
|
|
34
|
+
"raw": "\"large\" | \"default\" | \"small\" | \"mini\"",
|
|
35
|
+
"kind": "union",
|
|
36
|
+
"unionTypes": [
|
|
37
|
+
"large",
|
|
38
|
+
"default",
|
|
39
|
+
"small",
|
|
40
|
+
"mini"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"required": false,
|
|
44
|
+
"default": "\"default\"",
|
|
45
|
+
"allowedValues": [
|
|
46
|
+
{
|
|
47
|
+
"value": "large",
|
|
48
|
+
"label": "大尺寸"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"value": "default",
|
|
52
|
+
"label": "默认尺寸",
|
|
53
|
+
"isDefault": true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": "small",
|
|
57
|
+
"label": "小尺寸"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"value": "mini",
|
|
61
|
+
"label": "迷你尺寸"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"usageExample": "<Colorpicker v-model=\"color\" size=\"small\" />"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "disabled",
|
|
68
|
+
"description": "是否禁用,禁用后无法打开面板和修改颜色。",
|
|
69
|
+
"type": {
|
|
70
|
+
"raw": "boolean",
|
|
71
|
+
"kind": "boolean"
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"default": "false",
|
|
75
|
+
"usageExample": "<Colorpicker v-model=\"color\" disabled />"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "container",
|
|
79
|
+
"description": "指定弹出层挂载位置。通常在 Dialog、Drawer 等容器中需要显式指定,避免层级或定位异常。",
|
|
80
|
+
"type": {
|
|
81
|
+
"raw": "string | ((parentDom: Element, anchor: Node | null) => Element)",
|
|
82
|
+
"kind": "union"
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"default": "undefined",
|
|
86
|
+
"usageExample": "<Colorpicker v-model=\"color\" :container=\"() => document.body\" />"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "show",
|
|
90
|
+
"description": "是否展示颜色面板,可用于受控显示。",
|
|
91
|
+
"type": {
|
|
92
|
+
"raw": "boolean",
|
|
93
|
+
"kind": "boolean"
|
|
94
|
+
},
|
|
95
|
+
"required": false,
|
|
96
|
+
"default": "undefined",
|
|
97
|
+
"usageExample": "<Colorpicker v-model=\"color\" :show=\"visible\" />"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "position",
|
|
101
|
+
"description": "下拉面板定位配置,继承 Dropdown 的 position 能力。",
|
|
102
|
+
"type": {
|
|
103
|
+
"raw": "DropdownProps['position']",
|
|
104
|
+
"kind": "object"
|
|
105
|
+
},
|
|
106
|
+
"required": false,
|
|
107
|
+
"default": "{ collision: 'fit' }",
|
|
108
|
+
"usageExample": "<Colorpicker v-model=\"color\" :position=\"{ placement: 'bottom-start', collision: 'fit' }\" />"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"events": [],
|
|
112
|
+
"methods": [],
|
|
113
|
+
"examples": [
|
|
114
|
+
{
|
|
115
|
+
"id": "colorpicker_basic",
|
|
116
|
+
"title": "基础用法",
|
|
117
|
+
"description": "选择主题色并实时预览。",
|
|
118
|
+
"difficulty": "easy",
|
|
119
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Colorpicker } from '@king-design/vue';\n\nconst color = ref('#1677ff');\n</script>\n<template>\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <Colorpicker v-model=\"color\" />\n <span>当前颜色:{{ color }}</span>\n </div>\n</template>",
|
|
120
|
+
"tags": [
|
|
121
|
+
"basic",
|
|
122
|
+
"v-model"
|
|
123
|
+
],
|
|
124
|
+
"usedProps": [
|
|
125
|
+
"value"
|
|
126
|
+
],
|
|
127
|
+
"usedEvents": [],
|
|
128
|
+
"usedMethods": [],
|
|
129
|
+
"scenario": "选择品牌主色或主题色"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "colorpicker_presets",
|
|
133
|
+
"title": "预设颜色",
|
|
134
|
+
"description": "通过 presets 提供常用颜色快捷选择。",
|
|
135
|
+
"difficulty": "easy",
|
|
136
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Colorpicker } from '@king-design/vue';\n\nconst color = ref('#52c41a');\nconst presets = ['#1677ff', '#52c41a', '#faad14', '#f5222d', '#722ed1'];\n</script>\n<template>\n <Colorpicker v-model=\"color\" :presets=\"presets\" />\n</template>",
|
|
137
|
+
"tags": [
|
|
138
|
+
"preset",
|
|
139
|
+
"theme"
|
|
140
|
+
],
|
|
141
|
+
"usedProps": [
|
|
142
|
+
"value",
|
|
143
|
+
"presets"
|
|
144
|
+
],
|
|
145
|
+
"usedEvents": [],
|
|
146
|
+
"usedMethods": [],
|
|
147
|
+
"scenario": "为运营后台提供固定品牌色"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "colorpicker_in_dialog",
|
|
151
|
+
"title": "弹窗内使用",
|
|
152
|
+
"description": "在弹窗中显式指定挂载容器,避免弹层错位。",
|
|
153
|
+
"difficulty": "medium",
|
|
154
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Button, Colorpicker, Dialog } from '@king-design/vue';\n\nconst visible = ref(false);\nconst color = ref('rgba(22, 119, 255, 0.8)');\n</script>\n<template>\n <Button @click=\"visible = true\">编辑颜色</Button>\n <Dialog v-model=\"visible\" title=\"颜色设置\">\n <Colorpicker v-model=\"color\" :container=\"() => document.body\" />\n </Dialog>\n</template>",
|
|
155
|
+
"tags": [
|
|
156
|
+
"dialog",
|
|
157
|
+
"container"
|
|
158
|
+
],
|
|
159
|
+
"usedProps": [
|
|
160
|
+
"value",
|
|
161
|
+
"container"
|
|
162
|
+
],
|
|
163
|
+
"usedEvents": [],
|
|
164
|
+
"usedMethods": [],
|
|
165
|
+
"scenario": "在弹窗中配置颜色字段"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"commonMistakes": [
|
|
169
|
+
{
|
|
170
|
+
"id": "colorpicker_missing_value",
|
|
171
|
+
"description": "未传入有效颜色字符串",
|
|
172
|
+
"wrongCode": "<Colorpicker :value=\"undefined\" />",
|
|
173
|
+
"correctCode": "<Colorpicker v-model=\"color\" />",
|
|
174
|
+
"explanation": "Colorpicker 的 value 是必填项,应提供合法的颜色字符串并通过 v-model 维护状态。",
|
|
175
|
+
"relatedProps": [
|
|
176
|
+
"value"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "colorpicker_no_container_in_popup",
|
|
181
|
+
"description": "在弹层容器内使用时未指定 container",
|
|
182
|
+
"wrongCode": "<Dialog v-model=\"visible\"><Colorpicker v-model=\"color\" /></Dialog>",
|
|
183
|
+
"correctCode": "<Dialog v-model=\"visible\"><Colorpicker v-model=\"color\" :container=\"() => document.body\" /></Dialog>",
|
|
184
|
+
"explanation": "Colorpicker 内部会渲染下拉面板,在 Dialog、Drawer 等场景中建议显式设置挂载容器,避免遮挡和定位问题。",
|
|
185
|
+
"relatedProps": [
|
|
186
|
+
"container"
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"searchKeywords": [
|
|
191
|
+
"colorpicker",
|
|
192
|
+
"颜色选择器",
|
|
193
|
+
"颜色",
|
|
194
|
+
"主题色",
|
|
195
|
+
"rgba",
|
|
196
|
+
"hex",
|
|
197
|
+
"预设颜色"
|
|
198
|
+
],
|
|
199
|
+
"useCases": [
|
|
200
|
+
"主题颜色配置",
|
|
201
|
+
"图表颜色设置",
|
|
202
|
+
"标签颜色自定义",
|
|
203
|
+
"运营后台品牌色选择"
|
|
204
|
+
],
|
|
205
|
+
"typeDefinitions": [
|
|
206
|
+
{
|
|
207
|
+
"name": "ColorValue",
|
|
208
|
+
"definition": "type ColorValue = string",
|
|
209
|
+
"description": "颜色值类型,通常支持 hex、rgb(a) 等字符串格式。"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"relatedComponents": [
|
|
213
|
+
"Input",
|
|
214
|
+
"Dropdown",
|
|
215
|
+
"Dialog"
|
|
216
|
+
]
|
|
217
|
+
}
|
package/components/copy.json
CHANGED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "copyhover",
|
|
3
|
+
"name": "CopyHover",
|
|
4
|
+
"displayName": "悬浮复制",
|
|
5
|
+
"category": "feedback",
|
|
6
|
+
"description": "在文本悬停时才露出复制图标的轻量组件,适合详情字段、表格单元格等需要降低视觉噪音的复制场景。",
|
|
7
|
+
"importStatement": "import { CopyHover } from '@ksyun-internal/versatile';",
|
|
8
|
+
"inherits": [
|
|
9
|
+
{
|
|
10
|
+
"component": "Copy",
|
|
11
|
+
"include": [
|
|
12
|
+
"props"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"props": [
|
|
17
|
+
{
|
|
18
|
+
"name": "text",
|
|
19
|
+
"description": "待复制文本",
|
|
20
|
+
"type": {
|
|
21
|
+
"raw": "string",
|
|
22
|
+
"kind": "string"
|
|
23
|
+
},
|
|
24
|
+
"required": false,
|
|
25
|
+
"default": "\"\""
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "tooltipText",
|
|
29
|
+
"description": "复制按钮提示文案",
|
|
30
|
+
"type": {
|
|
31
|
+
"raw": "string",
|
|
32
|
+
"kind": "string"
|
|
33
|
+
},
|
|
34
|
+
"required": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "disabled",
|
|
38
|
+
"description": "是否禁用复制",
|
|
39
|
+
"type": {
|
|
40
|
+
"raw": "boolean",
|
|
41
|
+
"kind": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"required": false
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"events": [],
|
|
47
|
+
"slots": [],
|
|
48
|
+
"methods": [],
|
|
49
|
+
"examples": [
|
|
50
|
+
{
|
|
51
|
+
"id": "copyhover_instance_id",
|
|
52
|
+
"title": "详情字段悬浮复制",
|
|
53
|
+
"description": "只在悬停时显示复制图标,适合长 ID、Token 等字段。",
|
|
54
|
+
"difficulty": "easy",
|
|
55
|
+
"code": "<script setup lang=\"ts\">\nimport { CopyHover } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <CopyHover text=\"i-2ze7x5a4a92b\" tooltip-text=\"复制实例 ID\" />\n</template>",
|
|
56
|
+
"tags": [
|
|
57
|
+
"copy",
|
|
58
|
+
"hover"
|
|
59
|
+
],
|
|
60
|
+
"usedProps": [
|
|
61
|
+
"text",
|
|
62
|
+
"tooltipText"
|
|
63
|
+
],
|
|
64
|
+
"usedEvents": [],
|
|
65
|
+
"usedMethods": [],
|
|
66
|
+
"scenario": "在详情页展示实例 ID,同时保持界面简洁。"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "copyhover_disabled_secret",
|
|
70
|
+
"title": "敏感字段禁止复制",
|
|
71
|
+
"description": "对脱敏后的内容保留展示但关闭复制。",
|
|
72
|
+
"difficulty": "medium",
|
|
73
|
+
"code": "<script setup lang=\"ts\">\nimport { CopyHover } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <CopyHover text=\"sk-******\" tooltip-text=\"敏感信息不可复制\" :disabled=\"true\" />\n</template>",
|
|
74
|
+
"tags": [
|
|
75
|
+
"copy",
|
|
76
|
+
"security"
|
|
77
|
+
],
|
|
78
|
+
"usedProps": [
|
|
79
|
+
"text",
|
|
80
|
+
"tooltipText",
|
|
81
|
+
"disabled"
|
|
82
|
+
],
|
|
83
|
+
"usedEvents": [],
|
|
84
|
+
"usedMethods": [],
|
|
85
|
+
"scenario": "在脱敏展示 SecretKey 等敏感内容时显式禁用复制。"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"searchKeywords": [
|
|
89
|
+
"copy hover",
|
|
90
|
+
"hover copy",
|
|
91
|
+
"复制悬浮",
|
|
92
|
+
"悬停复制",
|
|
93
|
+
"轻量复制按钮"
|
|
94
|
+
],
|
|
95
|
+
"useCases": [
|
|
96
|
+
"详情字段快速复制",
|
|
97
|
+
"列表项悬浮复制",
|
|
98
|
+
"敏感信息禁用复制"
|
|
99
|
+
],
|
|
100
|
+
"typeDefinitions": [
|
|
101
|
+
{
|
|
102
|
+
"name": "CopyHoverText",
|
|
103
|
+
"definition": "type CopyHoverText = string",
|
|
104
|
+
"description": "悬浮复制组件展示和复制的文本内容类型。"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"relatedComponents": [
|
|
108
|
+
"Copy",
|
|
109
|
+
"CopyRow"
|
|
110
|
+
]
|
|
111
|
+
}
|