king-design-analyzer 2.1.9 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/actions.json +109 -0
- package/components/advancedset.json +128 -0
- package/components/affix.json +8 -0
- package/components/aksk.json +172 -0
- package/components/anchor.json +220 -0
- package/components/anchorlink.json +111 -0
- package/components/az.json +15 -2
- package/components/badge.json +8 -0
- package/components/billtypes.json +14 -2
- package/components/breadcrumb.json +9 -1
- package/components/button.json +192 -0
- package/components/buttonlink.json +74 -0
- package/components/card.json +14 -4
- package/components/cardcol.json +142 -0
- package/components/cardcols.json +121 -0
- package/components/cardcontent.json +20 -3
- package/components/cardtabs.json +172 -0
- package/components/carousel.json +7 -0
- package/components/cascader.json +576 -368
- package/components/checkbox.json +51 -4
- package/components/cidrinput.json +140 -0
- package/components/code.json +8 -1
- package/components/collapse.json +335 -341
- package/components/colorpicker.json +217 -0
- package/components/configprovider.json +96 -0
- package/components/copy.json +7 -0
- package/components/copyhover.json +111 -0
- package/components/copyrow.json +125 -0
- package/components/datepicker.json +656 -524
- package/components/description.json +98 -0
- package/components/descriptions.json +10 -3
- package/components/diagram.json +295 -0
- package/components/dialog.json +526 -455
- package/components/divider.json +9 -1
- package/components/drawer.json +603 -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 +152 -0
- package/components/form.json +143 -3
- 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 +165 -0
- package/components/icon.json +13 -1
- package/components/icontooltip.json +19 -1
- package/components/input.json +196 -8
- 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 +24 -3
- package/components/layoutlistcontent.json +157 -0
- package/components/layoutpermissioncontent.json +156 -0
- package/components/layoutstandardlist.json +276 -0
- package/components/layouttabs.json +168 -0
- package/components/lazymount.json +87 -0
- package/components/lazyteleport.json +119 -0
- package/components/menu.json +11 -3
- package/components/notification.json +351 -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 +99 -8
- package/components/queuevisualrange.json +110 -0
- package/components/radio.json +82 -2
- package/components/rate.json +200 -0
- package/components/region.json +14 -2
- package/components/scrollselect.json +140 -0
- 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 +749 -666
- package/components/sidebar.json +198 -0
- package/components/skeleton.json +234 -0
- package/components/slider.json +12 -2
- package/components/spin.json +10 -2
- package/components/spinner.json +419 -429
- package/components/split.json +263 -0
- package/components/sshkeys.json +138 -0
- package/components/status.json +60 -3
- package/components/steps.json +7 -0
- package/components/switch.json +12 -3
- package/components/table.json +24 -2
- package/components/tablecolumnid.json +14 -2
- package/components/tabs.json +14 -2
- package/components/tag.json +8 -5
- package/components/timeline.json +215 -0
- package/components/timepicker.json +147 -3
- package/components/timerange.json +262 -0
- package/components/tip.json +27 -0
- package/components/tooltip.json +492 -395
- package/components/tour.json +418 -372
- package/components/transfer.json +79 -8
- package/components/tree.json +28 -5
- package/components/treeselect.json +612 -475
- package/components/upload.json +474 -473
- package/components/vdialog.json +309 -0
- package/components/vdrawer.json +335 -0
- package/components/virtuallist.json +7 -0
- package/dist/ast/index.d.mts +65 -2
- package/dist/ast/index.d.ts +65 -2
- package/dist/ast/index.js +4 -3
- package/dist/ast/index.mjs +2 -1
- package/dist/chunk-4OTQAQ6J.mjs +341 -0
- package/dist/{chunk-F26GUCGG.js → chunk-4WXOYU2N.js} +32 -9
- package/dist/chunk-6HOIRUQB.mjs +409 -0
- package/dist/chunk-DHLWNT53.js +364 -0
- package/dist/{chunk-H2ET6MMM.mjs → chunk-IPJJMPOO.mjs} +155 -66
- package/dist/{chunk-WYSRJVX4.js → chunk-JJ6AB4ZH.js} +2 -2
- package/dist/{chunk-2W6OCG2S.js → chunk-JNRGUR3O.js} +155 -67
- package/dist/chunk-KF5YBEM5.js +143 -0
- package/dist/{chunk-OJOHB64C.mjs → chunk-LRTDTFFQ.mjs} +28 -5
- package/dist/{chunk-DSWKLUIX.mjs → chunk-NZL6T22V.mjs} +1 -1
- package/dist/chunk-QC6VTSA3.mjs +117 -0
- package/dist/chunk-V5N65MRP.js +411 -0
- package/dist/full/index.d.mts +2 -0
- package/dist/full/index.d.ts +2 -0
- 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 +38 -3
- package/dist/metadata/index.d.ts +38 -3
- 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.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/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 +87 -0
- package/docs_for_llm/advancedset.doc.md +98 -0
- package/docs_for_llm/affix.doc.md +20 -7
- package/docs_for_llm/aksk.doc.md +111 -0
- package/docs_for_llm/anchor.doc.md +155 -0
- package/docs_for_llm/anchorlink.doc.md +75 -0
- package/docs_for_llm/az.doc.md +17 -11
- package/docs_for_llm/badge.doc.md +11 -5
- package/docs_for_llm/billtypes.doc.md +17 -11
- package/docs_for_llm/breadcrumb.doc.md +80 -4
- package/docs_for_llm/button.doc.md +91 -18
- package/docs_for_llm/buttonlink.doc.md +64 -0
- package/docs_for_llm/card.doc.md +58 -8
- 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 +31 -10
- package/docs_for_llm/cardtabs.doc.md +106 -0
- package/docs_for_llm/carousel.doc.md +79 -7
- package/docs_for_llm/cascader.doc.md +106 -23
- 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 +147 -14
- package/docs_for_llm/colorpicker.doc.md +104 -0
- package/docs_for_llm/configprovider.doc.md +77 -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 +80 -0
- package/docs_for_llm/datepicker.doc.md +66 -35
- package/docs_for_llm/description.doc.md +75 -0
- package/docs_for_llm/descriptions.doc.md +122 -10
- package/docs_for_llm/diagram.doc.md +343 -0
- package/docs_for_llm/dialog.doc.md +97 -77
- package/docs_for_llm/divider.doc.md +14 -7
- package/docs_for_llm/drawer.doc.md +114 -69
- package/docs_for_llm/dropdown.doc.md +290 -22
- 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 +83 -0
- package/docs_for_llm/form.doc.md +196 -18
- 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 +78 -5
- package/docs_for_llm/header.doc.md +114 -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 +199 -41
- 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 +54 -17
- package/docs_for_llm/layoutlistcontent.doc.md +168 -0
- package/docs_for_llm/layoutpermissioncontent.doc.md +93 -0
- package/docs_for_llm/layoutstandardlist.doc.md +129 -0
- package/docs_for_llm/layouttabs.doc.md +101 -0
- package/docs_for_llm/lazymount.doc.md +82 -0
- package/docs_for_llm/lazyteleport.doc.md +85 -0
- package/docs_for_llm/menu.doc.md +139 -14
- package/docs_for_llm/message.doc.md +93 -10
- package/docs_for_llm/notification.doc.md +214 -0
- 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 +98 -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 +127 -0
- package/docs_for_llm/region.doc.md +25 -13
- package/docs_for_llm/scrollselect.doc.md +90 -0
- 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 +208 -49
- package/docs_for_llm/sidebar.doc.md +133 -0
- package/docs_for_llm/skeleton.doc.md +152 -0
- package/docs_for_llm/slider.doc.md +42 -22
- package/docs_for_llm/spin.doc.md +18 -6
- package/docs_for_llm/spinner.doc.md +28 -18
- package/docs_for_llm/split.doc.md +170 -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 +81 -7
- package/docs_for_llm/switch.doc.md +32 -16
- package/docs_for_llm/table.doc.md +317 -55
- package/docs_for_llm/tablecolumnid.doc.md +36 -16
- package/docs_for_llm/tabs.doc.md +117 -12
- package/docs_for_llm/tag.doc.md +167 -15
- package/docs_for_llm/timeline.doc.md +187 -0
- package/docs_for_llm/timepicker.doc.md +74 -36
- package/docs_for_llm/timerange.doc.md +157 -0
- package/docs_for_llm/tip.doc.md +50 -11
- package/docs_for_llm/tooltip.doc.md +99 -27
- package/docs_for_llm/tour.doc.md +125 -28
- package/docs_for_llm/transfer.doc.md +99 -33
- package/docs_for_llm/tree.doc.md +129 -24
- package/docs_for_llm/treeselect.doc.md +101 -44
- package/docs_for_llm/upload.doc.md +63 -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 +154 -0
- package/docs_for_llm/vdrawer.doc.md +148 -0
- package/docs_for_llm/virtuallist.doc.md +157 -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 +14 -8
- package/dist/chunk-D3Y6FGWA.js +0 -153
- package/dist/chunk-HPAUCD5I.js +0 -156
- package/dist/chunk-L4DS3EXI.mjs +0 -133
- package/dist/chunk-NZ6TLWMD.mjs +0 -151
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "description",
|
|
3
|
+
"name": "Description",
|
|
4
|
+
"displayName": "描述输入",
|
|
5
|
+
"category": "form",
|
|
6
|
+
"description": "面向资源描述、备注和说明信息的简化输入组件,适合需要统一长度和校验规则的描述类字段。",
|
|
7
|
+
"importStatement": "import { Description } from '@ksyun-internal/versatile';",
|
|
8
|
+
"props": [
|
|
9
|
+
{
|
|
10
|
+
"name": "modelValue",
|
|
11
|
+
"description": "描述内容",
|
|
12
|
+
"type": {
|
|
13
|
+
"raw": "string | null",
|
|
14
|
+
"kind": "union"
|
|
15
|
+
},
|
|
16
|
+
"required": false
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"events": [
|
|
20
|
+
{
|
|
21
|
+
"name": "update:modelValue",
|
|
22
|
+
"vueEventName": "@update:modelValue",
|
|
23
|
+
"description": "描述内容变化时触发,可直接同步备注或说明字段。",
|
|
24
|
+
"params": [
|
|
25
|
+
{
|
|
26
|
+
"name": "value",
|
|
27
|
+
"type": "string | null",
|
|
28
|
+
"description": "当前备注或描述文本。",
|
|
29
|
+
"optional": true
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"slots": [],
|
|
35
|
+
"methods": [],
|
|
36
|
+
"examples": [
|
|
37
|
+
{
|
|
38
|
+
"id": "description_instance_remark",
|
|
39
|
+
"title": "实例备注录入",
|
|
40
|
+
"description": "使用 Description 统一承载资源备注或用途说明。",
|
|
41
|
+
"difficulty": "easy",
|
|
42
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Description } from '@ksyun-internal/versatile';\n\nconst remark = ref('用于支付链路的核心应用实例');\n</script>\n\n<template>\n <Description v-model=\"remark\" />\n</template>",
|
|
43
|
+
"tags": [
|
|
44
|
+
"description",
|
|
45
|
+
"remark"
|
|
46
|
+
],
|
|
47
|
+
"usedProps": [
|
|
48
|
+
"modelValue"
|
|
49
|
+
],
|
|
50
|
+
"usedEvents": [
|
|
51
|
+
"update:modelValue"
|
|
52
|
+
],
|
|
53
|
+
"usedMethods": [],
|
|
54
|
+
"scenario": "在创建或编辑资源时填写用途说明和备注信息。"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "description_edit_remark",
|
|
58
|
+
"title": "编辑资源备注",
|
|
59
|
+
"description": "在编辑表单中回填已有备注并持续同步到父级状态。",
|
|
60
|
+
"difficulty": "medium",
|
|
61
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Description } from '@ksyun-internal/versatile';\n\nconst remark = ref('部署于金融业务生产环境');\n</script>\n\n<template>\n <Description v-model=\"remark\" />\n <div>预览:{{ remark }}</div>\n</template>",
|
|
62
|
+
"tags": [
|
|
63
|
+
"description",
|
|
64
|
+
"edit"
|
|
65
|
+
],
|
|
66
|
+
"usedProps": [
|
|
67
|
+
"modelValue"
|
|
68
|
+
],
|
|
69
|
+
"usedEvents": [
|
|
70
|
+
"update:modelValue"
|
|
71
|
+
],
|
|
72
|
+
"usedMethods": [],
|
|
73
|
+
"scenario": "在编辑资源信息时实时预览备注字段内容。"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"searchKeywords": [
|
|
77
|
+
"description",
|
|
78
|
+
"remark input",
|
|
79
|
+
"描述输入",
|
|
80
|
+
"备注填写",
|
|
81
|
+
"说明文本"
|
|
82
|
+
],
|
|
83
|
+
"useCases": [
|
|
84
|
+
"资源描述录入",
|
|
85
|
+
"备注信息填写",
|
|
86
|
+
"编辑页备注预览"
|
|
87
|
+
],
|
|
88
|
+
"typeDefinitions": [
|
|
89
|
+
{
|
|
90
|
+
"name": "DescriptionValue",
|
|
91
|
+
"definition": "type DescriptionValue = string",
|
|
92
|
+
"description": "描述或备注字段的文本值类型。"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"relatedComponents": [
|
|
96
|
+
"FormItemInput"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
"slots": [
|
|
56
56
|
{
|
|
57
57
|
"name": "title",
|
|
58
|
-
"description": "自定义title"
|
|
58
|
+
"description": "自定义title",
|
|
59
|
+
"bindingType": "none"
|
|
59
60
|
}
|
|
60
61
|
],
|
|
61
62
|
"methods": [],
|
|
@@ -101,11 +102,17 @@
|
|
|
101
102
|
"slots": [
|
|
102
103
|
{
|
|
103
104
|
"name": "append",
|
|
104
|
-
"description": "用于超长省略后的操作区自定义内容"
|
|
105
|
+
"description": "用于超长省略后的操作区自定义内容",
|
|
106
|
+
"bindingType": "none",
|
|
107
|
+
"vueTemplate": "#append",
|
|
108
|
+
"usageExample": "<DescriptionItem label=\"手机号\">\n 138****8000\n <template #append>\n 修改\n </template>\n</DescriptionItem>"
|
|
105
109
|
},
|
|
106
110
|
{
|
|
107
111
|
"name": "label",
|
|
108
|
-
"description": "自定义label"
|
|
112
|
+
"description": "自定义label",
|
|
113
|
+
"bindingType": "none",
|
|
114
|
+
"vueTemplate": "#label",
|
|
115
|
+
"usageExample": "<DescriptionItem>\n <template #label>\n 联系方式\n </template>\n 138****8000\n</DescriptionItem>"
|
|
109
116
|
}
|
|
110
117
|
]
|
|
111
118
|
}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "diagram",
|
|
3
|
+
"name": "Diagram",
|
|
4
|
+
"displayName": "流程图",
|
|
5
|
+
"category": "data",
|
|
6
|
+
"description": "流程图组件,用于在画布中组织图形、连线和布局。支持节点选中、标签编辑以及多种布局方式,适合流程建模、拓扑展示和审批链路可视化场景。",
|
|
7
|
+
"importStatement": "import { Diagram, DRectangle, DCircle, DLine, DTreeLayout } from '@king-design/vue/components/diagram';",
|
|
8
|
+
"props": [],
|
|
9
|
+
"events": [
|
|
10
|
+
{
|
|
11
|
+
"name": "labelChanged",
|
|
12
|
+
"vueEventName": "@labelChanged",
|
|
13
|
+
"description": "节点标签修改后触发",
|
|
14
|
+
"payload": [
|
|
15
|
+
{
|
|
16
|
+
"name": "cell",
|
|
17
|
+
"type": "any",
|
|
18
|
+
"description": "发生变化的图元实例"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "newLabel",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "修改后的标签内容"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "oldLabel",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "修改前的标签内容"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"usageExample": "<Diagram @labelChanged=\"handleLabelChanged\"></Diagram>",
|
|
32
|
+
"handlerExample": "const handleLabelChanged = (cell: any, newLabel: string, oldLabel: string) => {\n console.log('label changed', oldLabel, '=>', newLabel);\n};"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "selectionChanged",
|
|
36
|
+
"vueEventName": "@selectionChanged",
|
|
37
|
+
"description": "画布选中元素变化时触发",
|
|
38
|
+
"payload": [
|
|
39
|
+
{
|
|
40
|
+
"name": "cells",
|
|
41
|
+
"type": "any[]",
|
|
42
|
+
"description": "当前选中的图元列表"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"usageExample": "<Diagram @selectionChanged=\"handleSelectionChanged\"></Diagram>",
|
|
46
|
+
"handlerExample": "const handleSelectionChanged = (cells: any[]) => {\n console.log('selected cells', cells.length);\n};"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"slots": [
|
|
50
|
+
{
|
|
51
|
+
"name": "default",
|
|
52
|
+
"description": "流程图内容,通常放置布局组件、图形组件和连线组件",
|
|
53
|
+
"bindingType": "none",
|
|
54
|
+
"vueTemplate": "#default",
|
|
55
|
+
"usageExample": "<Diagram>\n <DTreeLayout>\n <DRectangle key=\"1\" />\n <DCircle key=\"2\" />\n <DLine from=\"1\" to=\"2\" />\n </DTreeLayout>\n</Diagram>"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"methods": [],
|
|
59
|
+
"subComponents": [
|
|
60
|
+
{
|
|
61
|
+
"name": "DRectangle",
|
|
62
|
+
"description": "矩形节点,支持圆角、拖拽、选中和自定义内容。",
|
|
63
|
+
"props": [
|
|
64
|
+
{
|
|
65
|
+
"name": "key",
|
|
66
|
+
"description": "节点唯一标识,供连线引用",
|
|
67
|
+
"type": {
|
|
68
|
+
"raw": "string | number",
|
|
69
|
+
"kind": "union"
|
|
70
|
+
},
|
|
71
|
+
"required": true,
|
|
72
|
+
"default": "undefined",
|
|
73
|
+
"usageExample": "<DRectangle key=\"1\" />"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "label",
|
|
77
|
+
"description": "节点标签",
|
|
78
|
+
"type": {
|
|
79
|
+
"raw": "string | number",
|
|
80
|
+
"kind": "union"
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"default": "undefined",
|
|
84
|
+
"usageExample": "<DRectangle key=\"1\" label=\"开始\" />"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "rounded",
|
|
88
|
+
"description": "圆角大小",
|
|
89
|
+
"type": {
|
|
90
|
+
"raw": "number | string",
|
|
91
|
+
"kind": "union"
|
|
92
|
+
},
|
|
93
|
+
"required": false,
|
|
94
|
+
"default": "0",
|
|
95
|
+
"usageExample": "<DRectangle key=\"1\" :rounded=\"8\" />"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "DCircle",
|
|
101
|
+
"description": "圆形节点,适合展示起止节点或状态节点。",
|
|
102
|
+
"props": [
|
|
103
|
+
{
|
|
104
|
+
"name": "key",
|
|
105
|
+
"description": "节点唯一标识",
|
|
106
|
+
"type": {
|
|
107
|
+
"raw": "string | number",
|
|
108
|
+
"kind": "union"
|
|
109
|
+
},
|
|
110
|
+
"required": true,
|
|
111
|
+
"default": "undefined",
|
|
112
|
+
"usageExample": "<DCircle key=\"2\" />"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "label",
|
|
116
|
+
"description": "节点标签",
|
|
117
|
+
"type": {
|
|
118
|
+
"raw": "string | number",
|
|
119
|
+
"kind": "union"
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"default": "undefined",
|
|
123
|
+
"usageExample": "<DCircle key=\"2\" label=\"结束\" />"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "DLine",
|
|
129
|
+
"description": "节点之间的连线。",
|
|
130
|
+
"props": [
|
|
131
|
+
{
|
|
132
|
+
"name": "from",
|
|
133
|
+
"description": "起始节点 key",
|
|
134
|
+
"type": {
|
|
135
|
+
"raw": "string | number",
|
|
136
|
+
"kind": "union"
|
|
137
|
+
},
|
|
138
|
+
"required": true,
|
|
139
|
+
"default": "undefined",
|
|
140
|
+
"usageExample": "<DLine from=\"1\" to=\"2\" />"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "to",
|
|
144
|
+
"description": "目标节点 key",
|
|
145
|
+
"type": {
|
|
146
|
+
"raw": "string | number",
|
|
147
|
+
"kind": "union"
|
|
148
|
+
},
|
|
149
|
+
"required": true,
|
|
150
|
+
"default": "undefined",
|
|
151
|
+
"usageExample": "<DLine from=\"1\" to=\"2\" />"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "label",
|
|
155
|
+
"description": "连线标签",
|
|
156
|
+
"type": {
|
|
157
|
+
"raw": "string",
|
|
158
|
+
"kind": "string"
|
|
159
|
+
},
|
|
160
|
+
"required": false,
|
|
161
|
+
"default": "undefined",
|
|
162
|
+
"usageExample": "<DLine from=\"1\" to=\"2\" label=\"通过\" />"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "DTreeLayout",
|
|
168
|
+
"description": "树形布局,适合组织审批流或层级关系图。",
|
|
169
|
+
"props": [
|
|
170
|
+
{
|
|
171
|
+
"name": "type",
|
|
172
|
+
"description": "布局方向",
|
|
173
|
+
"type": {
|
|
174
|
+
"raw": "\"horizontal\" | \"vertical\"",
|
|
175
|
+
"kind": "union",
|
|
176
|
+
"unionTypes": [
|
|
177
|
+
"horizontal",
|
|
178
|
+
"vertical"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"default": "\"vertical\"",
|
|
183
|
+
"usageExample": "<DTreeLayout type=\"horizontal\"></DTreeLayout>"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "levelDistance",
|
|
187
|
+
"description": "层级之间的距离",
|
|
188
|
+
"type": {
|
|
189
|
+
"raw": "number | string",
|
|
190
|
+
"kind": "union"
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"default": "undefined",
|
|
194
|
+
"usageExample": "<DTreeLayout :levelDistance=\"80\"></DTreeLayout>"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "DFlowLayout",
|
|
200
|
+
"description": "流式布局,适合横向或纵向流程图编排。",
|
|
201
|
+
"props": [
|
|
202
|
+
{
|
|
203
|
+
"name": "type",
|
|
204
|
+
"description": "布局方向",
|
|
205
|
+
"type": {
|
|
206
|
+
"raw": "\"horizontal\" | \"vertical\"",
|
|
207
|
+
"kind": "union",
|
|
208
|
+
"unionTypes": [
|
|
209
|
+
"horizontal",
|
|
210
|
+
"vertical"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"required": false,
|
|
214
|
+
"default": "\"vertical\"",
|
|
215
|
+
"usageExample": "<DFlowLayout type=\"horizontal\"></DFlowLayout>"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "intraCellSpacing",
|
|
219
|
+
"description": "同层节点间距",
|
|
220
|
+
"type": {
|
|
221
|
+
"raw": "number | string",
|
|
222
|
+
"kind": "union"
|
|
223
|
+
},
|
|
224
|
+
"required": false,
|
|
225
|
+
"default": "undefined",
|
|
226
|
+
"usageExample": "<DFlowLayout :intraCellSpacing=\"40\"></DFlowLayout>"
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"examples": [
|
|
232
|
+
{
|
|
233
|
+
"id": "diagram_basic",
|
|
234
|
+
"title": "基础树形流程图",
|
|
235
|
+
"description": "使用树形布局组织节点和连线。",
|
|
236
|
+
"difficulty": "medium",
|
|
237
|
+
"code": "<script setup lang=\"ts\">\nimport { Diagram, DRectangle, DCircle, DLine, DTreeLayout } from '@king-design/vue/components/diagram';\n</script>\n<template>\n <Diagram>\n <DTreeLayout>\n <DRectangle key=\"1\" label=\"开始\" />\n <DCircle key=\"2\" label=\"审核\" />\n <DCircle key=\"3\" label=\"结束\" />\n <DLine from=\"1\" to=\"2\" />\n <DLine from=\"2\" to=\"3\" />\n </DTreeLayout>\n </Diagram>\n</template>",
|
|
238
|
+
"tags": [
|
|
239
|
+
"tree",
|
|
240
|
+
"basic"
|
|
241
|
+
],
|
|
242
|
+
"usedProps": [],
|
|
243
|
+
"usedEvents": [],
|
|
244
|
+
"usedSlots": [
|
|
245
|
+
"default"
|
|
246
|
+
],
|
|
247
|
+
"usedMethods": [],
|
|
248
|
+
"scenario": "快速搭建审批流或状态流转图。"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "diagram_selectable",
|
|
252
|
+
"title": "可选中节点",
|
|
253
|
+
"description": "监听选中变化,处理画布交互。",
|
|
254
|
+
"difficulty": "medium",
|
|
255
|
+
"code": "<script setup lang=\"ts\">\nimport { Diagram, DRectangle, DLine, DFlowLayout } from '@king-design/vue/components/diagram';\n\nconst handleSelectionChanged = (cells: any[]) => {\n console.log('当前选中数量', cells.length);\n};\n</script>\n<template>\n <Diagram @selectionChanged=\"handleSelectionChanged\">\n <DFlowLayout type=\"horizontal\">\n <DRectangle key=\"1\" label=\"节点 A\" selectable />\n <DRectangle key=\"2\" label=\"节点 B\" selectable />\n <DLine from=\"1\" to=\"2\" label=\"流转\" />\n </DFlowLayout>\n </Diagram>\n</template>",
|
|
256
|
+
"tags": [
|
|
257
|
+
"selection",
|
|
258
|
+
"interaction"
|
|
259
|
+
],
|
|
260
|
+
"usedProps": [],
|
|
261
|
+
"usedEvents": [
|
|
262
|
+
"selectionChanged"
|
|
263
|
+
],
|
|
264
|
+
"usedSlots": [
|
|
265
|
+
"default"
|
|
266
|
+
],
|
|
267
|
+
"usedMethods": [],
|
|
268
|
+
"scenario": "在画布中选中节点并联动侧边配置面板。"
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"searchKeywords": [
|
|
272
|
+
"diagram",
|
|
273
|
+
"流程图",
|
|
274
|
+
"拓扑图",
|
|
275
|
+
"graph",
|
|
276
|
+
"DTreeLayout",
|
|
277
|
+
"DFlowLayout"
|
|
278
|
+
],
|
|
279
|
+
"useCases": [
|
|
280
|
+
"审批流建模",
|
|
281
|
+
"拓扑结构展示",
|
|
282
|
+
"流程状态可视化"
|
|
283
|
+
],
|
|
284
|
+
"typeDefinitions": [
|
|
285
|
+
{
|
|
286
|
+
"name": "DiagramImportPath",
|
|
287
|
+
"definition": "import { Diagram, DRectangle, DLine } from '@king-design/vue/components/diagram'",
|
|
288
|
+
"description": "Diagram 当前推荐使用的导入方式。"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"relatedComponents": [
|
|
292
|
+
"Anchor",
|
|
293
|
+
"Card"
|
|
294
|
+
]
|
|
295
|
+
}
|