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.
Files changed (327) hide show
  1. package/components/actions.json +109 -0
  2. package/components/advancedset.json +128 -0
  3. package/components/affix.json +8 -0
  4. package/components/aksk.json +172 -0
  5. package/components/anchor.json +220 -0
  6. package/components/anchorlink.json +111 -0
  7. package/components/az.json +15 -2
  8. package/components/badge.json +8 -0
  9. package/components/billtypes.json +14 -2
  10. package/components/breadcrumb.json +9 -1
  11. package/components/button.json +192 -0
  12. package/components/buttonlink.json +74 -0
  13. package/components/card.json +14 -4
  14. package/components/cardcol.json +142 -0
  15. package/components/cardcols.json +121 -0
  16. package/components/cardcontent.json +20 -3
  17. package/components/cardtabs.json +172 -0
  18. package/components/carousel.json +7 -0
  19. package/components/cascader.json +576 -368
  20. package/components/checkbox.json +51 -4
  21. package/components/cidrinput.json +140 -0
  22. package/components/code.json +8 -1
  23. package/components/collapse.json +335 -341
  24. package/components/colorpicker.json +217 -0
  25. package/components/configprovider.json +96 -0
  26. package/components/copy.json +7 -0
  27. package/components/copyhover.json +111 -0
  28. package/components/copyrow.json +125 -0
  29. package/components/datepicker.json +656 -524
  30. package/components/description.json +98 -0
  31. package/components/descriptions.json +10 -3
  32. package/components/diagram.json +295 -0
  33. package/components/dialog.json +526 -455
  34. package/components/divider.json +9 -1
  35. package/components/drawer.json +603 -558
  36. package/components/dropdown.json +464 -384
  37. package/components/duration.json +125 -0
  38. package/components/editable.json +66 -0
  39. package/components/ellipsis.json +34 -1
  40. package/components/filtertablefieldsdialog.json +128 -0
  41. package/components/flex.json +152 -0
  42. package/components/form.json +143 -3
  43. package/components/formiteminput.json +214 -0
  44. package/components/formitemspinner.json +213 -0
  45. package/components/formitemswitch.json +185 -0
  46. package/components/formitemtableconfigs.json +210 -0
  47. package/components/grid.json +7 -0
  48. package/components/header.json +165 -0
  49. package/components/icon.json +13 -1
  50. package/components/icontooltip.json +19 -1
  51. package/components/input.json +196 -8
  52. package/components/instancelist.json +194 -0
  53. package/components/instancenum.json +196 -0
  54. package/components/ipinput.json +117 -0
  55. package/components/kspstatus.json +205 -0
  56. package/components/kvcode.json +120 -0
  57. package/components/layoutcontent.json +24 -3
  58. package/components/layoutlistcontent.json +157 -0
  59. package/components/layoutpermissioncontent.json +156 -0
  60. package/components/layoutstandardlist.json +276 -0
  61. package/components/layouttabs.json +168 -0
  62. package/components/lazymount.json +87 -0
  63. package/components/lazyteleport.json +119 -0
  64. package/components/menu.json +11 -3
  65. package/components/notification.json +351 -0
  66. package/components/pagination.json +12 -0
  67. package/components/paginationplus.json +30 -3
  68. package/components/password.json +121 -0
  69. package/components/popover.json +457 -437
  70. package/components/projects.json +129 -0
  71. package/components/protable.json +99 -8
  72. package/components/queuevisualrange.json +110 -0
  73. package/components/radio.json +82 -2
  74. package/components/rate.json +200 -0
  75. package/components/region.json +14 -2
  76. package/components/scrollselect.json +140 -0
  77. package/components/search.json +221 -0
  78. package/components/searchinput.json +132 -0
  79. package/components/searchitems.json +215 -0
  80. package/components/searchselect.json +195 -0
  81. package/components/select.json +749 -666
  82. package/components/sidebar.json +198 -0
  83. package/components/skeleton.json +234 -0
  84. package/components/slider.json +12 -2
  85. package/components/spin.json +10 -2
  86. package/components/spinner.json +419 -429
  87. package/components/split.json +263 -0
  88. package/components/sshkeys.json +138 -0
  89. package/components/status.json +60 -3
  90. package/components/steps.json +7 -0
  91. package/components/switch.json +12 -3
  92. package/components/table.json +24 -2
  93. package/components/tablecolumnid.json +14 -2
  94. package/components/tabs.json +14 -2
  95. package/components/tag.json +8 -5
  96. package/components/timeline.json +215 -0
  97. package/components/timepicker.json +147 -3
  98. package/components/timerange.json +262 -0
  99. package/components/tip.json +27 -0
  100. package/components/tooltip.json +492 -395
  101. package/components/tour.json +418 -372
  102. package/components/transfer.json +79 -8
  103. package/components/tree.json +28 -5
  104. package/components/treeselect.json +612 -475
  105. package/components/upload.json +474 -473
  106. package/components/vdialog.json +309 -0
  107. package/components/vdrawer.json +335 -0
  108. package/components/virtuallist.json +7 -0
  109. package/dist/ast/index.d.mts +65 -2
  110. package/dist/ast/index.d.ts +65 -2
  111. package/dist/ast/index.js +4 -3
  112. package/dist/ast/index.mjs +2 -1
  113. package/dist/chunk-4OTQAQ6J.mjs +341 -0
  114. package/dist/{chunk-F26GUCGG.js → chunk-4WXOYU2N.js} +32 -9
  115. package/dist/chunk-6HOIRUQB.mjs +409 -0
  116. package/dist/chunk-DHLWNT53.js +364 -0
  117. package/dist/{chunk-H2ET6MMM.mjs → chunk-IPJJMPOO.mjs} +155 -66
  118. package/dist/{chunk-WYSRJVX4.js → chunk-JJ6AB4ZH.js} +2 -2
  119. package/dist/{chunk-2W6OCG2S.js → chunk-JNRGUR3O.js} +155 -67
  120. package/dist/chunk-KF5YBEM5.js +143 -0
  121. package/dist/{chunk-OJOHB64C.mjs → chunk-LRTDTFFQ.mjs} +28 -5
  122. package/dist/{chunk-DSWKLUIX.mjs → chunk-NZL6T22V.mjs} +1 -1
  123. package/dist/chunk-QC6VTSA3.mjs +117 -0
  124. package/dist/chunk-V5N65MRP.js +411 -0
  125. package/dist/full/index.d.mts +2 -0
  126. package/dist/full/index.d.ts +2 -0
  127. package/dist/full/index.js +7 -6
  128. package/dist/full/index.mjs +5 -4
  129. package/dist/index.d.mts +1 -0
  130. package/dist/index.d.ts +1 -0
  131. package/dist/index.js +14 -13
  132. package/dist/index.mjs +6 -5
  133. package/dist/metadata/index.d.mts +38 -3
  134. package/dist/metadata/index.d.ts +38 -3
  135. package/dist/metadata/index.js +26 -16
  136. package/dist/metadata/index.mjs +26 -15
  137. package/dist/resolve-BsLBxlBi.d.mts +24 -0
  138. package/dist/resolve-BsLBxlBi.d.ts +24 -0
  139. package/dist/runtime/index.d.mts +2 -0
  140. package/dist/runtime/index.d.ts +2 -0
  141. package/dist/runtime/index.js +4 -4
  142. package/dist/runtime/index.mjs +2 -2
  143. package/dist/shared/index.d.mts +10 -0
  144. package/dist/shared/index.d.ts +10 -0
  145. package/dist/shared/index.js +23 -0
  146. package/dist/shared/index.mjs +2 -0
  147. package/dist/static/index.js +5 -5
  148. package/dist/static/index.mjs +2 -2
  149. package/docs_for_llm/actions.doc.md +87 -0
  150. package/docs_for_llm/advancedset.doc.md +98 -0
  151. package/docs_for_llm/affix.doc.md +20 -7
  152. package/docs_for_llm/aksk.doc.md +111 -0
  153. package/docs_for_llm/anchor.doc.md +155 -0
  154. package/docs_for_llm/anchorlink.doc.md +75 -0
  155. package/docs_for_llm/az.doc.md +17 -11
  156. package/docs_for_llm/badge.doc.md +11 -5
  157. package/docs_for_llm/billtypes.doc.md +17 -11
  158. package/docs_for_llm/breadcrumb.doc.md +80 -4
  159. package/docs_for_llm/button.doc.md +91 -18
  160. package/docs_for_llm/buttonlink.doc.md +64 -0
  161. package/docs_for_llm/card.doc.md +58 -8
  162. package/docs_for_llm/cardcol.doc.md +78 -0
  163. package/docs_for_llm/cardcols.doc.md +84 -0
  164. package/docs_for_llm/cardcontent.doc.md +31 -10
  165. package/docs_for_llm/cardtabs.doc.md +106 -0
  166. package/docs_for_llm/carousel.doc.md +79 -7
  167. package/docs_for_llm/cascader.doc.md +106 -23
  168. package/docs_for_llm/checkbox.doc.md +25 -13
  169. package/docs_for_llm/cidrinput.doc.md +83 -0
  170. package/docs_for_llm/code.doc.md +22 -11
  171. package/docs_for_llm/collapse.doc.md +147 -14
  172. package/docs_for_llm/colorpicker.doc.md +104 -0
  173. package/docs_for_llm/configprovider.doc.md +77 -0
  174. package/docs_for_llm/copy.doc.md +15 -13
  175. package/docs_for_llm/copyhover.doc.md +59 -0
  176. package/docs_for_llm/copyrow.doc.md +80 -0
  177. package/docs_for_llm/datepicker.doc.md +66 -35
  178. package/docs_for_llm/description.doc.md +75 -0
  179. package/docs_for_llm/descriptions.doc.md +122 -10
  180. package/docs_for_llm/diagram.doc.md +343 -0
  181. package/docs_for_llm/dialog.doc.md +97 -77
  182. package/docs_for_llm/divider.doc.md +14 -7
  183. package/docs_for_llm/drawer.doc.md +114 -69
  184. package/docs_for_llm/dropdown.doc.md +290 -22
  185. package/docs_for_llm/duration.doc.md +76 -0
  186. package/docs_for_llm/editable.doc.md +36 -14
  187. package/docs_for_llm/ellipsis.doc.md +10 -5
  188. package/docs_for_llm/filtertablefieldsdialog.doc.md +99 -0
  189. package/docs_for_llm/flex.doc.md +83 -0
  190. package/docs_for_llm/form.doc.md +196 -18
  191. package/docs_for_llm/formiteminput.doc.md +128 -0
  192. package/docs_for_llm/formitemspinner.doc.md +105 -0
  193. package/docs_for_llm/formitemswitch.doc.md +113 -0
  194. package/docs_for_llm/formitemtableconfigs.doc.md +95 -0
  195. package/docs_for_llm/grid.doc.md +78 -5
  196. package/docs_for_llm/header.doc.md +114 -0
  197. package/docs_for_llm/icon.doc.md +12 -8
  198. package/docs_for_llm/icontooltip.doc.md +121 -0
  199. package/docs_for_llm/input.doc.md +199 -41
  200. package/docs_for_llm/instancelist.doc.md +113 -0
  201. package/docs_for_llm/instancenum.doc.md +95 -0
  202. package/docs_for_llm/ipinput.doc.md +77 -0
  203. package/docs_for_llm/kspstatus.doc.md +82 -0
  204. package/docs_for_llm/kvcode.doc.md +76 -0
  205. package/docs_for_llm/layoutcontent.doc.md +54 -17
  206. package/docs_for_llm/layoutlistcontent.doc.md +168 -0
  207. package/docs_for_llm/layoutpermissioncontent.doc.md +93 -0
  208. package/docs_for_llm/layoutstandardlist.doc.md +129 -0
  209. package/docs_for_llm/layouttabs.doc.md +101 -0
  210. package/docs_for_llm/lazymount.doc.md +82 -0
  211. package/docs_for_llm/lazyteleport.doc.md +85 -0
  212. package/docs_for_llm/menu.doc.md +139 -14
  213. package/docs_for_llm/message.doc.md +93 -10
  214. package/docs_for_llm/notification.doc.md +214 -0
  215. package/docs_for_llm/pagination.doc.md +30 -17
  216. package/docs_for_llm/paginationplus.doc.md +31 -10
  217. package/docs_for_llm/password.doc.md +86 -0
  218. package/docs_for_llm/popover.doc.md +24 -55
  219. package/docs_for_llm/progress.doc.md +13 -10
  220. package/docs_for_llm/projects.doc.md +91 -0
  221. package/docs_for_llm/protable.doc.md +98 -15
  222. package/docs_for_llm/queuevisualrange.doc.md +78 -0
  223. package/docs_for_llm/radio.doc.md +23 -8
  224. package/docs_for_llm/rate.doc.md +127 -0
  225. package/docs_for_llm/region.doc.md +25 -13
  226. package/docs_for_llm/scrollselect.doc.md +90 -0
  227. package/docs_for_llm/search.doc.md +120 -0
  228. package/docs_for_llm/searchinput.doc.md +111 -0
  229. package/docs_for_llm/searchitems.doc.md +116 -0
  230. package/docs_for_llm/searchselect.doc.md +126 -0
  231. package/docs_for_llm/select.doc.md +208 -49
  232. package/docs_for_llm/sidebar.doc.md +133 -0
  233. package/docs_for_llm/skeleton.doc.md +152 -0
  234. package/docs_for_llm/slider.doc.md +42 -22
  235. package/docs_for_llm/spin.doc.md +18 -6
  236. package/docs_for_llm/spinner.doc.md +28 -18
  237. package/docs_for_llm/split.doc.md +170 -0
  238. package/docs_for_llm/sshkeys.doc.md +88 -0
  239. package/docs_for_llm/status.doc.md +14 -9
  240. package/docs_for_llm/steps.doc.md +81 -7
  241. package/docs_for_llm/switch.doc.md +32 -16
  242. package/docs_for_llm/table.doc.md +317 -55
  243. package/docs_for_llm/tablecolumnid.doc.md +36 -16
  244. package/docs_for_llm/tabs.doc.md +117 -12
  245. package/docs_for_llm/tag.doc.md +167 -15
  246. package/docs_for_llm/timeline.doc.md +187 -0
  247. package/docs_for_llm/timepicker.doc.md +74 -36
  248. package/docs_for_llm/timerange.doc.md +157 -0
  249. package/docs_for_llm/tip.doc.md +50 -11
  250. package/docs_for_llm/tooltip.doc.md +99 -27
  251. package/docs_for_llm/tour.doc.md +125 -28
  252. package/docs_for_llm/transfer.doc.md +99 -33
  253. package/docs_for_llm/tree.doc.md +129 -24
  254. package/docs_for_llm/treeselect.doc.md +101 -44
  255. package/docs_for_llm/upload.doc.md +63 -32
  256. package/docs_for_llm/useCRUD.doc.md +49 -0
  257. package/docs_for_llm/useCountdown.doc.md +43 -0
  258. package/docs_for_llm/useDetail.doc.md +48 -0
  259. package/docs_for_llm/useDialog.doc.md +46 -0
  260. package/docs_for_llm/useEntity.doc.md +45 -0
  261. package/docs_for_llm/useEventListener.doc.md +44 -0
  262. package/docs_for_llm/useFalseUntilTruthy.doc.md +41 -0
  263. package/docs_for_llm/useGetCopyAuthText.doc.md +35 -0
  264. package/docs_for_llm/useGetUserPermission.doc.md +43 -0
  265. package/docs_for_llm/useGroup.doc.md +48 -0
  266. package/docs_for_llm/useIdEntities.doc.md +48 -0
  267. package/docs_for_llm/useIdEntity.doc.md +103 -0
  268. package/docs_for_llm/useInterval.doc.md +43 -0
  269. package/docs_for_llm/useLayoutStandardList.doc.md +38 -0
  270. package/docs_for_llm/useMessage.doc.md +46 -0
  271. package/docs_for_llm/useModifyCache.doc.md +37 -0
  272. package/docs_for_llm/useOpenDialog.doc.md +41 -0
  273. package/docs_for_llm/usePagination.doc.md +60 -0
  274. package/docs_for_llm/usePersist.doc.md +54 -0
  275. package/docs_for_llm/usePoll.doc.md +41 -0
  276. package/docs_for_llm/useRoutePlus.doc.md +34 -0
  277. package/docs_for_llm/useRouterPlus.doc.md +34 -0
  278. package/docs_for_llm/useSearch.doc.md +68 -0
  279. package/docs_for_llm/useShell.doc.md +43 -0
  280. package/docs_for_llm/useSkip.doc.md +41 -0
  281. package/docs_for_llm/useStorageIdEntity.doc.md +46 -0
  282. package/docs_for_llm/useStore.doc.md +34 -0
  283. package/docs_for_llm/useTable.doc.md +57 -0
  284. package/docs_for_llm/useTableGroup.doc.md +47 -0
  285. package/docs_for_llm/useTableSort.doc.md +40 -0
  286. package/docs_for_llm/useToState.doc.md +112 -0
  287. package/docs_for_llm/useUser.doc.md +38 -0
  288. package/docs_for_llm/useValidForm.doc.md +41 -0
  289. package/docs_for_llm/vdialog.doc.md +154 -0
  290. package/docs_for_llm/vdrawer.doc.md +148 -0
  291. package/docs_for_llm/virtuallist.doc.md +157 -3
  292. package/hooks/useCRUD.json +61 -0
  293. package/hooks/useCountdown.json +49 -0
  294. package/hooks/useDetail.json +67 -0
  295. package/hooks/useDialog.json +49 -0
  296. package/hooks/useEntity.json +61 -0
  297. package/hooks/useEventListener.json +61 -0
  298. package/hooks/useFalseUntilTruthy.json +43 -0
  299. package/hooks/useGetCopyAuthText.json +36 -0
  300. package/hooks/useGetUserPermission.json +55 -0
  301. package/hooks/useGroup.json +49 -0
  302. package/hooks/useIdEntities.json +61 -0
  303. package/hooks/useInterval.json +55 -0
  304. package/hooks/useLayoutStandardList.json +36 -0
  305. package/hooks/useMessage.json +73 -0
  306. package/hooks/useModifyCache.json +36 -0
  307. package/hooks/useOpenDialog.json +43 -0
  308. package/hooks/usePagination.json +49 -0
  309. package/hooks/usePersist.json +61 -0
  310. package/hooks/usePoll.json +43 -0
  311. package/hooks/useRoutePlus.json +36 -0
  312. package/hooks/useRouterPlus.json +36 -0
  313. package/hooks/useSearch.json +56 -0
  314. package/hooks/useShell.json +49 -0
  315. package/hooks/useSkip.json +43 -0
  316. package/hooks/useStorageIdEntity.json +67 -0
  317. package/hooks/useStore.json +36 -0
  318. package/hooks/useTable.json +49 -0
  319. package/hooks/useTableGroup.json +43 -0
  320. package/hooks/useTableSort.json +43 -0
  321. package/hooks/useUser.json +36 -0
  322. package/hooks/useValidForm.json +43 -0
  323. package/package.json +14 -8
  324. package/dist/chunk-D3Y6FGWA.js +0 -153
  325. package/dist/chunk-HPAUCD5I.js +0 -156
  326. package/dist/chunk-L4DS3EXI.mjs +0 -133
  327. package/dist/chunk-NZ6TLWMD.mjs +0 -151
@@ -12,46 +12,46 @@ import { Table, TableColumn } from '@king-design/vue';
12
12
  ```
13
13
 
14
14
  ## 属性 (Props)
15
- | 属性名 | 类型 | 默认值 | 必填 | 说明 | 示例 |
16
- | --- | --- | --- | --- | --- | --- |
17
- | data | `T[]` | `undefined` | 否 | 表格数据数组 | `<Table :data="tableData"></Table>` |
18
- | fixHeader | `boolean | number | string` | `false` | 否 | 表头固定,给定需要固定高度的具体数值,当超出该值时,展示滚动条 | `<Table :data="data" :fixHeader="300"></Table>` |
19
- | stickHeader | `boolean | number | string` | `false` | 否 | 表头吸顶,给定需要吸顶的高度,当表头在页面滚动滚动时,距离视窗顶部的距离等于该高度时,将表头固定在此高度处 | - |
20
- | stickScrollbar | `boolean | number | string` | `false` | 否 | 当出现横向滚动条时,设置是否当表格底部没有滚动到视窗中时,将横向滚动条固定在页面底部;取值为number类型时,用来指定距离视窗底部的距离 | - |
21
- | checkType | `"checkbox" | "radio" | "none"` | `"checkbox"` | 否 | 当行可选择时,定义选择的类型: 单选 "radio" , 复选 "checkbox", 不可选 "none" | - |
22
- | checkedKeys | `TableRowKey[]` | `[]` | 否 | 通过key数组来指定哪些行被选中,可用v-model:checkedKeys双向绑定 | - |
23
- | rowKey | `(value: T, index: number) => TableRowKey` | `(value, index) => index` | 否 | 设置每行的key | `<Table :data="tableData" :rowKey="(value, index) => index"></Table>` |
24
- | rowCheckable | `boolean` | `true` | 否 | 当行可选时,是否点击该行任意区域都可选中 | - |
25
- | disableRow | `(value: T, index: number, key: TableRowKey) => boolean` | `undefined` | 否 | 定义行禁用可选的逻辑,返回true,则该行被禁用选择 | - |
26
- | type | `"default" | "border" | "grid"` | `"default"` | 否 | 表格类型,默认左右无边框,"border"类型会添加边框, "grid"类型会展示栅格边框 | - |
27
- | stripe | `boolean` | `false` | 否 | 相邻行是否展示不同的背景色 | - |
28
- | rowClassName | `(value: T, index: number, key: TableRowKey) => string | undefined` | `undefined` | 否 | 通过一个函数定义行的className,该函数会传入该行数据,索引和key当做参数,返回的字符串将被设为该行的className | - |
29
- | group | `TableGroupValue` | `undefined` | 否 | 分组配置 | - |
30
- | sort | `TableSortValue` | `undefined` | 否 | 排序配置,可用v-model:sort双向绑定 | - |
31
- | loading | `boolean` | `false` | 否 | 是否展示加载状态 | - |
32
- | merge | `TableMerge` | `undefined` | 否 | 指定表格单元格合并逻辑 | - |
33
- | expandedKeys | `TableRowKey[]` | `undefined` | 否 | 通过key来指定哪些行展开,可用v-model:expandedKeys绑定 | - |
34
- | rowExpandable | `boolean` | `true` | 否 | 是否点击该行任意区域即展开 | - |
35
- | selectedKeys | `TableRowKey[]` | `undefined` | 否 | 当rowSelectable取值为非false时,指定哪些行高亮 | - |
36
- | rowSelectable | `boolean | "single" | "multiple"` | `false` | 否 | 是否点击行时高亮该行,取值为multiple时,可以同时高亮多行 | - |
37
- | childrenKey | `string` | `"children"` | 否 | 树形表格指定子元素键名 | - |
38
- | indent | `number` | `32` | 否 | 树形表格指定子元素缩进宽度 | - |
39
- | spreadKeys | `TableRowKey[]` | `undefined` | 否 | 树形表格指定展开的行,可用v-model:spreadKeys绑定 | - |
40
- | tooltipPosition | `"left" | "bottom" | "right" | "top" | Position` | `"top"` | 否 | 行提示的位置 | - |
41
- | tooltipContainer | `Container` | `undefined` | 否 | 指定行提示弹层追加的位置,支持函数或 CSS 选择器 | - |
42
- | keepStatus | `boolean` | `false` | 否 | 是否在行销毁的时候,保持该行在checkedKeys | selectedKeys | spreadKeys | expandedKeys中的key值 | - |
43
- | showIndeterminate | `boolean` | `true` | 否 | 表头的Checkbox是否支持展示半选中状态 | - |
44
- | resizable | `boolean` | `false` | 否 | 是否可以表头拖动调整列宽 | - |
45
- | minColWidth | `number` | `40` | 否 | 指定所有列拖动时的最小宽度 | - |
46
- | widthStoreKey | `string` | `undefined` | 否 | 如果要保存表格拖动后的列宽信息,可以通过该属性设置保存到localStorage中的key | - |
47
- | draggable | `boolean` | `false` | 否 | 表格行是否可拖动排序 | - |
48
- | animation | `boolean | [boolean, boolean]` | `true` | 否 | 是否开启动效,可以通过数组单独设置行和列的动效 | - |
49
- | hideHeader | `boolean` | `false` | 否 | 是否隐藏表头 | - |
50
- | pagination | `boolean | PaginationProps` | `false` | 否 | 是否支持分页,可传入对象配置分页参数 | - |
51
- | fixFooter | `boolean` | `false` | 否 | table给定需要固定高度时,自定义footer固定 | - |
52
- | load | `(node: any) => Promise<any[]> | void` | `undefined` | 否 | 指定异步加载节点数据的函数,该函数通过Promise返回数组来添加子节点数据 | - |
53
- | spreadArrowIndex | `number` | `0` | 否 | 指定树形表格展开Icon的所在列,默认在第一列 | - |
54
- | virtual | `boolean` | `false` | 否 | 是否开启虚拟滚动,适用于大数据量场景 | - |
15
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 | 标签 | 示例 |
16
+ | --- | --- | --- | --- | --- | --- | --- |
17
+ | data | `T[]` | `undefined` | 否 | 表格数据数组 | - | `<Table :data="tableData"></Table>` |
18
+ | fixHeader | `boolean | number | string` | `false` | 否 | 表头固定,给定需要固定高度的具体数值,当超出该值时,展示滚动条 | - | `<Table :data="data" :fixHeader="300"></Table>` |
19
+ | stickHeader | `boolean | number | string` | `false` | 否 | 表头吸顶,给定需要吸顶的高度,当表头在页面滚动滚动时,距离视窗顶部的距离等于该高度时,将表头固定在此高度处 | - | - |
20
+ | stickScrollbar | `boolean | number | string` | `false` | 否 | 当出现横向滚动条时,设置是否当表格底部没有滚动到视窗中时,将横向滚动条固定在页面底部;取值为number类型时,用来指定距离视窗底部的距离 | - | - |
21
+ | checkType | `"checkbox" | "radio" | "none"` | `"checkbox"` | 否 | 当行可选择时,定义选择的类型: 单选 "radio" , 复选 "checkbox", 不可选 "none" | - | - |
22
+ | checkedKeys | `TableRowKey[]` | `[]` | 否 | 通过key数组来指定哪些行被选中,可用v-model:checkedKeys双向绑定 | - | - |
23
+ | rowKey | `(value: T, index: number) => TableRowKey` | `(value, index) => index` | 否 | 设置每行的key | - | `<Table :data="tableData" :rowKey="(value, index) => index"></Table>` |
24
+ | rowCheckable | `boolean` | `true` | 否 | 当行可选时,是否点击该行任意区域都可选中 | - | - |
25
+ | disableRow | `(value: T, index: number, key: TableRowKey) => boolean` | `undefined` | 否 | 定义行禁用可选的逻辑,返回true,则该行被禁用选择 | - | - |
26
+ | type | `"default" | "border" | "grid"` | `"default"` | 否 | 表格类型,默认左右无边框,"border"类型会添加边框, "grid"类型会展示栅格边框 | - | - |
27
+ | stripe | `boolean` | `false` | 否 | 相邻行是否展示不同的背景色 | - | - |
28
+ | rowClassName | `(value: T, index: number, key: TableRowKey) => string | undefined` | `undefined` | 否 | 通过一个函数定义行的className,该函数会传入该行数据,索引和key当做参数,返回的字符串将被设为该行的className | - | - |
29
+ | group | `TableGroupValue` | `undefined` | 否 | 分组配置 | - | - |
30
+ | sort | `TableSortValue` | `undefined` | 否 | 排序配置,可用v-model:sort双向绑定 | - | - |
31
+ | loading | `boolean` | `false` | 否 | 是否展示加载状态 | - | - |
32
+ | merge | `TableMerge` | `undefined` | 否 | 指定表格单元格合并逻辑 | - | - |
33
+ | expandedKeys | `TableRowKey[]` | `undefined` | 否 | 通过key来指定哪些行展开,可用v-model:expandedKeys绑定 | - | - |
34
+ | rowExpandable | `boolean` | `true` | 否 | 是否点击该行任意区域即展开 | - | - |
35
+ | selectedKeys | `TableRowKey[]` | `undefined` | 否 | 当rowSelectable取值为非false时,指定哪些行高亮 | - | - |
36
+ | rowSelectable | `boolean | "single" | "multiple"` | `false` | 否 | 是否点击行时高亮该行,取值为multiple时,可以同时高亮多行 | - | - |
37
+ | childrenKey | `string` | `"children"` | 否 | 树形表格指定子元素键名 | - | - |
38
+ | indent | `number` | `32` | 否 | 树形表格指定子元素缩进宽度 | - | - |
39
+ | spreadKeys | `TableRowKey[]` | `undefined` | 否 | 树形表格指定展开的行,可用v-model:spreadKeys绑定 | - | - |
40
+ | tooltipPosition | `"left" | "bottom" | "right" | "top" | Position` | `"top"` | 否 | 行提示的位置 | - | - |
41
+ | tooltipContainer | `Container` | `undefined` | 否 | 指定行提示弹层追加的位置,支持函数或 CSS 选择器 | - | - |
42
+ | keepStatus | `boolean` | `false` | 否 | 是否在行销毁的时候,保持该行在checkedKeys | selectedKeys | spreadKeys | expandedKeys中的key值 | - | - |
43
+ | showIndeterminate | `boolean` | `true` | 否 | 表头的Checkbox是否支持展示半选中状态 | - | - |
44
+ | resizable | `boolean` | `false` | 否 | 是否可以表头拖动调整列宽 | - | - |
45
+ | minColWidth | `number` | `40` | 否 | 指定所有列拖动时的最小宽度 | - | - |
46
+ | widthStoreKey | `string` | `undefined` | 否 | 如果要保存表格拖动后的列宽信息,可以通过该属性设置保存到localStorage中的key | - | - |
47
+ | draggable | `boolean` | `false` | 否 | 表格行是否可拖动排序 | - | - |
48
+ | animation | `boolean | [boolean, boolean]` | `true` | 否 | 是否开启动效,可以通过数组单独设置行和列的动效 | - | - |
49
+ | hideHeader | `boolean` | `false` | 否 | 是否隐藏表头 | - | - |
50
+ | pagination | `boolean | PaginationProps` | `false` | 否 | 是否支持分页,可传入对象配置分页参数 | - | - |
51
+ | fixFooter | `boolean` | `false` | 否 | table给定需要固定高度时,自定义footer固定 | - | - |
52
+ | load | `(node: any) => Promise<any[]> | void` | `undefined` | 否 | 指定异步加载节点数据的函数,该函数通过Promise返回数组来添加子节点数据 | - | - |
53
+ | spreadArrowIndex | `number` | `0` | 否 | 指定树形表格展开Icon的所在列,默认在第一列 | - | - |
54
+ | virtual | `boolean` | `false` | 否 | 是否开启虚拟滚动,适用于大数据量场景 | - | - |
55
55
 
56
56
  ## 事件 (Events)
57
57
  | 事件名 | Vue事件名 | 说明 | 回调参数 | 示例 |
@@ -65,15 +65,35 @@ import { Table, TableColumn } from '@king-design/vue';
65
65
  | uncheckAll | `@uncheck-all` | 手动取消全选触发 | `-` | `<Table @uncheck-all="handleUncheckAll" />` |
66
66
  | page | `@page` | 当内置翻页改变页码或每页数量时触发 | `data: {value: number, limit: number}` | `<Table :data="data" :pagination="true" @page="handlePage"></Table>` |
67
67
 
68
- ### 事件处理函数示例
69
- **clickRow**:
68
+ ### 事件参数说明
69
+ **clickRow**
70
+
71
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
72
+ | --- | --- | --- | --- | --- |
73
+ | data | `T` | 是 | - | 行数据 |
74
+ | index | `number` | 是 | - | 行索引 |
75
+ | key | `TableRowKey` | 是 | - | 行key |
76
+
77
+ 事件处理示例:
70
78
  ```typescript
71
79
  const handleClickRow = (data: any, index: number, key: string | number) => {
72
80
  console.log('点击行:', data);
73
81
  };
74
82
  ```
75
83
 
76
- **dragend**:
84
+ **dragstart**
85
+
86
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
87
+ | --- | --- | --- | --- | --- |
88
+ | data | `{key: TableRowKey, from: number}` | 是 | - | 拖动开始信息 |
89
+
90
+ **dragend**
91
+
92
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
93
+ | --- | --- | --- | --- | --- |
94
+ | data | `{key: TableRowKey, from: number, to: number}` | 是 | - | 拖动结束信息 |
95
+
96
+ 事件处理示例:
77
97
  ```typescript
78
98
  const handleDragEnd = (info: {key: number, from: number, to: number}) => {
79
99
  const item = data.value.splice(info.from, 1)[0];
@@ -81,21 +101,43 @@ const handleDragEnd = (info: {key: number, from: number, to: number}) => {
81
101
  };
82
102
  ```
83
103
 
84
- **checkRow**:
104
+ **checkRow**
105
+
106
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
107
+ | --- | --- | --- | --- | --- |
108
+ | data | `T` | 是 | - | 选中行数据 |
109
+ | index | `number` | 是 | - | 行索引 |
110
+ | key | `TableRowKey` | 是 | - | 行key |
111
+
112
+ 事件处理示例:
85
113
  ```typescript
86
114
  const handleCheckRow = (data: any, index: number, key: string | number) => {
87
115
  console.log('选中行:', data);
88
116
  };
89
117
  ```
90
118
 
91
- **uncheckRow**:
119
+ **uncheckRow**
120
+
121
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
122
+ | --- | --- | --- | --- | --- |
123
+ | data | `T` | 是 | - | 取消选中行数据 |
124
+ | index | `number` | 是 | - | 行索引 |
125
+ | key | `TableRowKey` | 是 | - | 行key |
126
+
127
+ 事件处理示例:
92
128
  ```typescript
93
129
  const handleUncheckRow = (data: any, index: number, key: string | number) => {
94
130
  console.log('取消选中:', data);
95
131
  };
96
132
  ```
97
133
 
98
- **page**:
134
+ **page**
135
+
136
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
137
+ | --- | --- | --- | --- | --- |
138
+ | data | `{value: number, limit: number}` | 是 | - | 分页信息 |
139
+
140
+ 事件处理示例:
99
141
  ```typescript
100
142
  const handlePage = (pageInfo: {value: number, limit: number}) => {
101
143
  console.log('当前页:', pageInfo.value, '每页:', pageInfo.limit);
@@ -126,21 +168,120 @@ const handlePage = (pageInfo: {value: number, limit: number}) => {
126
168
  </template>
127
169
  </Table>` |
128
170
 
171
+ ### 插槽参数说明
172
+ **empty**
173
+
174
+ - 参数结构: 无参数
175
+
176
+ **expand**
177
+
178
+ - 参数结构: #expand="[row, index]"
179
+ - 参数列表: `row: T`、`index: number`
180
+
181
+ **footer**
182
+
183
+ - 参数结构: 无参数
184
+
185
+ **tooltip**
186
+
187
+ - 参数结构: #tooltip="[data, index]"
188
+ - 参数列表: `data: T`、`index: number`
189
+
129
190
  ## 方法 (Methods)
130
191
  | 方法名 | 说明 | 参数 | 返回值 |
131
192
  | --- | --- | --- | --- |
132
- | getCheckedData | 获取选中数据信息 | `` | `T[]` |
133
- | getSelectedData | 获取高亮行数据信息 | `` | `T[]` |
134
- | checkAll | 全部选中 | `` | `void` |
135
- | uncheckAll | 全不选中 | `` | `void` |
193
+ | getCheckedData | 获取选中数据信息 | `-` | `T[]` |
194
+ | getSelectedData | 获取高亮行数据信息 | `-` | `T[]` |
195
+ | checkAll | 全部选中 | `-` | `void` |
196
+ | uncheckAll | 全不选中 | `-` | `void` |
136
197
  | scrollToRowByIndex | 通过索引指定滚动的行 | `index: number` | `Promise<void>` |
137
198
  | scrollToRowByKey | 通过key指定滚动的行 | `key: TableRowKey` | `Promise<void>` |
138
- | exportTable | 导出表格 | `data: T[], filename: string` | `Promise<string>` |
199
+ | exportTable | 导出表格 | `data?: T[], filename?: string` | `Promise<string>` |
200
+
201
+ ### 方法参数说明
202
+ **scrollToRowByIndex**
203
+
204
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
205
+ | --- | --- | --- | --- | --- |
206
+ | index | `number` | 是 | - | 行索引 |
207
+
208
+ 调用示例:
209
+ ```typescript
210
+ await tableRef.value?.scrollToRowByIndex(10);
211
+ ```
212
+
213
+ **scrollToRowByKey**
214
+
215
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
216
+ | --- | --- | --- | --- | --- |
217
+ | key | `TableRowKey` | 是 | - | 行key |
218
+
219
+ 调用示例:
220
+ ```typescript
221
+ await tableRef.value?.scrollToRowByKey('row-id-123');
222
+ ```
223
+
224
+ **exportTable**
225
+
226
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
227
+ | --- | --- | --- | --- | --- |
228
+ | data | `T[]` | 否 | `this.data` | 要导出的数据 |
229
+ | filename | `string` | 否 | `"table"` | 导出文件名 |
230
+
231
+ 调用示例:
232
+ ```typescript
233
+ const content = await tableRef.value?.exportTable(data.value, 'users');
234
+ ```
235
+
236
+ ### 方法调用示例
237
+ **getCheckedData**
238
+
239
+ ```typescript
240
+ const tableRef = ref<InstanceType<typeof Table>>();
241
+ const checkedData = tableRef.value?.getCheckedData();</InstanceType>
242
+ ```
243
+
244
+ **getSelectedData**
245
+
246
+ ```typescript
247
+ const selectedData = tableRef.value?.getSelectedData();
248
+ ```
249
+
250
+ **checkAll**
251
+
252
+ ```typescript
253
+ tableRef.value?.checkAll();
254
+ ```
255
+
256
+ **uncheckAll**
257
+
258
+ ```typescript
259
+ tableRef.value?.uncheckAll();
260
+ ```
261
+
262
+ **scrollToRowByIndex**
263
+
264
+ ```typescript
265
+ await tableRef.value?.scrollToRowByIndex(10);
266
+ ```
267
+
268
+ **scrollToRowByKey**
269
+
270
+ ```typescript
271
+ await tableRef.value?.scrollToRowByKey('row-id-123');
272
+ ```
273
+
274
+ **exportTable**
275
+
276
+ ```typescript
277
+ const content = await tableRef.value?.exportTable(data.value, 'users');
278
+ ```
139
279
 
140
280
  ## 子组件 (Sub-Components)
141
281
  ### TableColumn
142
282
  表格列定义
143
283
 
284
+ #### 属性 (Props)
144
285
  | 属性名 | 类型 | 说明 | 示例 |
145
286
  | --- | --- | --- | --- |
146
287
  | key | `string` | 指定当前列的key,必须指定 | `<TableColumn key="name" title="姓名" />` |
@@ -160,28 +301,149 @@ const handlePage = (pageInfo: {value: number, limit: number}) => {
160
301
  | hidden | `boolean` | 是否隐藏当前列,仅为不可见,不影响exportTable导出表格 | - |
161
302
  | ellipsis | `boolean` | 是否开启超长省略 | `<TableColumn key="desc" title="描述" ellipsis />` |
162
303
 
163
- **插槽**:
164
- - `#title`: 自定义复杂表头内容
165
- - `#template="[data, index]"`: 自定义单元格内容
166
- - `#default="[data, index]"`: 与template扩展点等价,为了方便vue中使用的别名
304
+ #### 插槽 (Slots)
305
+ | 插槽名 | 说明 | 模板写法 | 示例 |
306
+ | --- | --- | --- | --- |
307
+ | title | 自定义复杂表头内容 | `#title` | `<TableColumn key="custom">
308
+ <template #title>自定义表头</template>
309
+ </TableColumn>` |
310
+ | template | 自定义单元格内容 | `#template="[data, index]"` | `<TableColumn key="action" title="操作">
311
+ <template #template="[data]">
312
+ <Button @click="handleEdit(data)">编辑</Button>
313
+ </template>
314
+ </TableColumn>` |
315
+ | default | 与template扩展点等价,为了方便vue中使用的别名 | `#default="[data, index]"` | `<TableColumn key="action" title="操作">
316
+ <template #default="[data]">
317
+ <Button @click="handleEdit(data)">编辑</Button>
318
+ </template>
319
+ </TableColumn>` |
320
+
321
+ ##### 插槽参数说明
322
+ **title**
323
+
324
+ - 参数结构: 无参数
325
+
326
+ **template**
327
+
328
+ - 参数结构: #template="[data, index]"
329
+ - 参数列表: `data: T`、`index: number`
330
+
331
+ **default**
332
+
333
+ - 参数结构: #default="[data, index]"
334
+ - 参数列表: `data: T`、`index: number`
335
+
336
+ #### 组合示例
337
+ ##### 自定义单元格
338
+ **场景**: 创建带有状态标签和操作按钮的表格
339
+
340
+ 使用插槽自定义单元格内容
341
+
342
+ **命中的子组件 API**: 属性: key, title | 插槽: default
343
+
344
+ ```vue
345
+ <script setup lang="ts">
346
+ import { ref } from 'vue';
347
+ import { Table, TableColumn, Button, Tag } from '@king-design/vue';
348
+
349
+ const data = ref([
350
+ { name: '张三', status: 'active' },
351
+ { name: '李四', status: 'inactive' }
352
+ ]);
353
+ </script>
354
+ <template>
355
+ <Table :data="data">
356
+ <TableColumn key="name" title="姓名" />
357
+ <TableColumn key="status" title="状态">
358
+ <template #default="[row]">
359
+ <Tag :type="row.status === 'active' ? 'success' : 'warning'">
360
+ {{ row.status === 'active' ? '激活' : '未激活' }}
361
+ </Tag>
362
+ </template>
363
+ </TableColumn>
364
+ <TableColumn key="action" title="操作">
365
+ <template #default="[row]">
366
+ <Button type="primary" size="small">编辑</Button>
367
+ </template>
368
+ </TableColumn>
369
+ </Table>
370
+ </template>
371
+ ```
372
+
373
+ ##### 基础表格
374
+ **场景**: 创建一个简单的表格展示用户信息
375
+
376
+ 展示基本的表格用法
377
+
378
+ **命中的子组件 API**: 属性: key, title
379
+
380
+ ```vue
381
+ <script setup lang="ts">
382
+ import { ref } from 'vue';
383
+ import { Table, TableColumn } from '@king-design/vue';
384
+
385
+ const data = ref([
386
+ { name: '张三', age: 25, address: '北京' },
387
+ { name: '李四', age: 30, address: '上海' }
388
+ ]);
389
+ </script>
390
+ <template>
391
+ <Table :data="data">
392
+ <TableColumn key="name" title="姓名" />
393
+ <TableColumn key="age" title="年龄" />
394
+ <TableColumn key="address" title="地址" />
395
+ </Table>
396
+ </template>
397
+ ```
398
+
399
+ ##### 可选择表格
400
+ **场景**: 创建一个可多选的表格,支持获取选中行
401
+
402
+ 支持行选择的表格
403
+
404
+ **命中的子组件 API**: 属性: key, title
405
+
406
+ ```vue
407
+ <script setup lang="ts">
408
+ import { ref } from 'vue';
409
+ import { Table, TableColumn } from '@king-design/vue';
410
+
411
+ const data = ref([
412
+ { id: 1, name: '张三' },
413
+ { id: 2, name: '李四' }
414
+ ]);
415
+ const checkedKeys = ref<number[]>([]);
416
+ </script>
417
+ <template>
418
+ <Table :data="data" checkType="checkbox" v-model:checkedKeys="checkedKeys" :rowKey="row => row.id">
419
+ <TableColumn key="name" title="姓名" />
420
+ </Table>
421
+ <p>选中: {{ checkedKeys }}</p>
422
+ </template>
423
+ ```
167
424
 
168
425
  ## 常见错误与正确用法 (Anti-Hallucination)
426
+ ### TableColumn 作用域插槽参数解构方式错误
169
427
  > **错误用法**: `<template #default="{ row }">`
170
428
  > **正确写法**: `<template #default="[row]">`
171
429
  > **说明**: KPC 组件库使用数组形式传递作用域插槽参数,而非对象解构。正确写法是 [row] 或 [row, index],不是 { row } 或 { row, index }
172
430
 
431
+ ### TableColumn 未设置 key 属性
173
432
  > **错误用法**: `<TableColumn title="姓名" />`
174
433
  > **正确写法**: `<TableColumn key="name" title="姓名" />`
175
434
  > **说明**: TableColumn 的 key 属性是必须的,用于标识列和数据映射
176
435
 
436
+ ### 使用选择功能时未设置 rowKey
177
437
  > **错误用法**: `<Table :data="data" checkType="checkbox" v-model:checkedKeys="keys">`
178
438
  > **正确写法**: `<Table :data="data" checkType="checkbox" v-model:checkedKeys="keys" :rowKey="row => row.id">`
179
439
  > **说明**: 使用 checkType 进行行选择时,应该设置 rowKey 来唯一标识每行,否则默认使用数组索引,数据变化时可能导致选中状态错乱
180
440
 
441
+ ### TableColumn 错误使用 prop 属性
181
442
  > **错误用法**: `<TableColumn prop="name" />`
182
443
  > **正确写法**: `<TableColumn key="name" />`
183
444
  > **说明**: KPC TableColumn 使用 `key` 属性来指定数据字段,而不是 `prop`。
184
445
 
446
+ ### TableColumn 错误使用 label 属性
185
447
  > **错误用法**: `<TableColumn label="姓名" />`
186
448
  > **正确写法**: `<TableColumn title="姓名" />`
187
449
  > **说明**: KPC TableColumn 使用 `title` 属性来指定列标题,而不是 `label`。
@@ -2,9 +2,9 @@
2
2
 
3
3
  用于表格中的ID列展示,支持复制功能和禁用状态。
4
4
 
5
- **关键词**: id, column, table, 表格列
5
+ **关键词**: id, column, table, 表格列, ID列, 名称ID列, 资源标识列
6
6
 
7
- **使用场景**: 资源列表ID列展示
7
+ **使用场景**: 资源列表ID列展示、支持复制的名称和 ID 展示、表格中可点击资源名称列
8
8
 
9
9
  ## 导入语句
10
10
  ```typescript
@@ -12,20 +12,20 @@ import { TableColumnId } from '@ksyun-internal/versatile';
12
12
  ```
13
13
 
14
14
  ## 属性 (Props)
15
- | 属性名 | 类型 | 默认值 | 必填 | 说明 | 示例 |
16
- | --- | --- | --- | --- | --- | --- |
17
- | name | `string` | `""` | 否 | 显示的名称 | - |
18
- | id | `string` | `""` | 否 | 显示的 id | - |
19
- | disabled | `boolean` | `false` | 否 | 是否禁止复制功能 | - |
20
- | disabledClickName | `boolean` | `false` | 否 | 是否置灰名称 | - |
21
- | disabledEditable | `boolean` | `false` | 否 | 是否置灰编辑按钮 | - |
22
- | type | `"link" | "none"` | `"link"` | 否 | 样式模式 | - |
23
- | editable | `boolean` | `false` | 否 | 名称是否支持编辑 | - |
24
- | editableTip | `string` | `"编辑"` | 否 | 编辑图标的 tooltip 提示,默认编辑 | - |
25
- | editableProps | `Record<string, any>` | `undefined` | 否 | Editable 组件支持的属性 | - |
26
- | to | `string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric` | `undefined` | 否 | 链接跳转路径,当 type 为 'link' 时生效,同 router-link 的 to 属性一致;当使用 to 属性进行跳转时,右键菜单栏才会出现 '在新标签页中打开' | - |
27
- | target | `'_blank' | '_self' | '_parent' | '_top'` | `'_self'` | 否 | 链接跳转目标,当 type 为 'link' 且使用 to 时生效,同 a 标签的 target 属性一致 | - |
28
- | maxLines | `number` | `1` | 否 | 名称/ID 展示的最大行数,超出部分会被省略号代替 | - |
15
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 | 标签 | 示例 |
16
+ | --- | --- | --- | --- | --- | --- | --- |
17
+ | name | `string` | `""` | 否 | 显示的名称 | - | - |
18
+ | id | `string` | `""` | 否 | 显示的 id | - | - |
19
+ | disabled | `boolean` | `false` | 否 | 是否禁止复制功能 | - | - |
20
+ | disabledClickName | `boolean` | `false` | 否 | 是否置灰名称 | - | - |
21
+ | disabledEditable | `boolean` | `false` | 否 | 是否置灰编辑按钮 | - | - |
22
+ | type | `"link" | "none"` | `"link"` | 否 | 样式模式 | - | - |
23
+ | editable | `boolean` | `false` | 否 | 名称是否支持编辑 | - | - |
24
+ | editableTip | `string` | `"编辑"` | 否 | 编辑图标的 tooltip 提示,默认编辑 | - | - |
25
+ | editableProps | `Record<string, any>` | `undefined` | 否 | Editable 组件支持的属性 | - | - |
26
+ | to | `string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric` | `undefined` | 否 | 链接跳转路径,当 type 为 'link' 时生效,同 router-link 的 to 属性一致;当使用 to 属性进行跳转时,右键菜单栏才会出现 '在新标签页中打开' | - | - |
27
+ | target | `'_blank' | '_self' | '_parent' | '_top'` | `'_self'` | 否 | 链接跳转目标,当 type 为 'link' 且使用 to 时生效,同 a 标签的 target 属性一致 | - | - |
28
+ | maxLines | `number` | `1` | 否 | 名称/ID 展示的最大行数,超出部分会被省略号代替 | - | - |
29
29
 
30
30
  ## 事件 (Events)
31
31
  | 事件名 | Vue事件名 | 说明 | 回调参数 | 示例 |
@@ -34,3 +34,23 @@ import { TableColumnId } from '@ksyun-internal/versatile';
34
34
  | click:id | `@click:id` | 当点击 id 时触发 | `value: string` | `<TableColumnId @click:id="handleClickId" />` |
35
35
  | change:name | `@change:name` | 当编辑名称,名称内容改变时触发 | `newValue: string, oldValue: string` | `<TableColumnId @change:name="(newVal, oldVal) => handleNameChange(newVal, oldVal)" /></TableColumnId>` |
36
36
 
37
+ ### 事件参数说明
38
+ **click:name**
39
+
40
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
41
+ | --- | --- | --- | --- | --- |
42
+ | value | `string` | 是 | - | 名称的值 |
43
+
44
+ **click:id**
45
+
46
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
47
+ | --- | --- | --- | --- | --- |
48
+ | value | `string` | 是 | - | id 的值 |
49
+
50
+ **change:name**
51
+
52
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
53
+ | --- | --- | --- | --- | --- |
54
+ | newValue | `string` | 是 | - | 新的名称值 |
55
+ | oldValue | `string` | 是 | - | 旧的名称值 |
56
+