kui-vue 6.2.2 → 6.3.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.
Files changed (132) hide show
  1. package/ai/kui-components.json +1011 -452
  2. package/dist/index.js +2 -2
  3. package/es/index.js +6207 -4904
  4. package/es/locale/de.js +6 -2
  5. package/es/locale/el.js +6 -2
  6. package/es/locale/en.js +6 -2
  7. package/es/locale/fr.js +6 -2
  8. package/es/locale/it.js +6 -2
  9. package/es/locale/ja.js +6 -2
  10. package/es/locale/ko.js +6 -2
  11. package/es/locale/ru.js +6 -2
  12. package/es/locale/th.js +6 -2
  13. package/es/locale/uk.js +6 -2
  14. package/es/locale/vi.js +6 -2
  15. package/es/locale/zh-CN.js +6 -2
  16. package/es/locale/zh-TW.js +6 -2
  17. package/lib/index.cjs +2 -2
  18. package/lib/locale/de.cjs +2 -2
  19. package/lib/locale/el.cjs +2 -2
  20. package/lib/locale/en.cjs +2 -2
  21. package/lib/locale/fr.cjs +2 -2
  22. package/lib/locale/it.cjs +2 -2
  23. package/lib/locale/ja.cjs +2 -2
  24. package/lib/locale/ko.cjs +2 -2
  25. package/lib/locale/ru.cjs +2 -2
  26. package/lib/locale/th.cjs +2 -2
  27. package/lib/locale/uk.cjs +2 -2
  28. package/lib/locale/vi.cjs +2 -2
  29. package/lib/locale/zh-CN.cjs +2 -2
  30. package/lib/locale/zh-TW.cjs +2 -2
  31. package/package.json +4 -3
  32. package/style/base.css +2 -2
  33. package/style/components.css +2 -2
  34. package/style/index.css +2 -2
  35. package/style/motion.css +1 -1
  36. package/style/theme.css +2 -2
  37. package/types/alert/index.d.ts +5 -5
  38. package/types/auto-complete/index.d.ts +52 -0
  39. package/types/badge/index.d.ts +7 -17
  40. package/types/button/button.d.ts +3 -4
  41. package/types/card/index.d.ts +5 -5
  42. package/types/cascader/index.d.ts +9 -0
  43. package/types/cascader/types.d.ts +5 -0
  44. package/types/check-card/check-card-group.d.ts +5 -9
  45. package/types/check-card/check-card.d.ts +5 -9
  46. package/types/check-card/context.d.ts +3 -3
  47. package/types/check-card/index.d.ts +1 -1
  48. package/types/check-card/types.d.ts +2 -3
  49. package/types/checkbox/checkbox-group.d.ts +5 -5
  50. package/types/checkbox/checkbox.d.ts +2 -2
  51. package/types/collapse/collapse.d.ts +5 -5
  52. package/types/color-picker/index.d.ts +27 -0
  53. package/types/components.d.ts +2 -2
  54. package/types/config/context.d.ts +102 -1
  55. package/types/const/types.d.ts +11 -1
  56. package/types/const/var.d.ts +6 -1
  57. package/types/date-picker/index.d.ts +18 -0
  58. package/types/drawer/index.d.ts +21 -8
  59. package/types/dropdown/dropdown-button.d.ts +23 -4
  60. package/types/dropdown/dropdown-context.d.ts +5 -0
  61. package/types/dropdown/dropdown.d.ts +16 -0
  62. package/types/dropdown/trigger.d.ts +3 -3
  63. package/types/feature-card/index.d.ts +5 -5
  64. package/types/feedback-panel/feedback-panel.d.ts +5 -5
  65. package/types/flame-wrap/engine.d.ts +18 -0
  66. package/types/form/context.d.ts +2 -0
  67. package/types/global.d.ts +256 -0
  68. package/types/image/image.d.ts +5 -5
  69. package/types/input/input-group.d.ts +2 -6
  70. package/types/input-number/index.d.ts +37 -7
  71. package/types/kanban/index.d.ts +5 -4
  72. package/types/list-panel/index.d.ts +5 -5
  73. package/types/locale/de.d.cts +4 -0
  74. package/types/locale/de.d.ts +4 -0
  75. package/types/locale/el.d.cts +4 -0
  76. package/types/locale/el.d.ts +4 -0
  77. package/types/locale/en.d.cts +4 -0
  78. package/types/locale/en.d.ts +4 -0
  79. package/types/locale/fr.d.cts +4 -0
  80. package/types/locale/fr.d.ts +4 -0
  81. package/types/locale/it.d.cts +4 -0
  82. package/types/locale/it.d.ts +4 -0
  83. package/types/locale/ja.d.cts +4 -0
  84. package/types/locale/ja.d.ts +4 -0
  85. package/types/locale/ko.d.cts +4 -0
  86. package/types/locale/ko.d.ts +4 -0
  87. package/types/locale/ru.d.cts +4 -0
  88. package/types/locale/ru.d.ts +4 -0
  89. package/types/locale/th.d.cts +4 -0
  90. package/types/locale/th.d.ts +4 -0
  91. package/types/locale/uk.d.cts +4 -0
  92. package/types/locale/uk.d.ts +4 -0
  93. package/types/locale/vi.d.cts +4 -0
  94. package/types/locale/vi.d.ts +4 -0
  95. package/types/locale/zh-CN.d.cts +4 -0
  96. package/types/locale/zh-CN.d.ts +4 -0
  97. package/types/locale/zh-TW.d.cts +4 -0
  98. package/types/locale/zh-TW.d.ts +4 -0
  99. package/types/mentions/index.d.ts +16 -0
  100. package/types/menu/menu-keyboard.d.ts +23 -0
  101. package/types/modal/index.d.ts +8 -2
  102. package/types/modal/modal.d.ts +27 -4
  103. package/types/modal/toast.d.ts +5 -5
  104. package/types/page/index.d.ts +5 -5
  105. package/types/popconfirm/index.d.ts +16 -0
  106. package/types/poptip/index.d.ts +16 -0
  107. package/types/popup/layers.d.ts +2 -0
  108. package/types/qrcode/index.d.ts +5 -5
  109. package/types/radio/radio-button.d.ts +4 -4
  110. package/types/radio/radio-group.d.ts +2 -2
  111. package/types/radio/radio.d.ts +5 -5
  112. package/types/ripple/engine.d.ts +18 -0
  113. package/types/select/select.d.ts +5 -0
  114. package/types/stat-card/stat-card.d.ts +24 -6
  115. package/types/stat-card/utils/countup.d.ts +3 -3
  116. package/types/stat-card/utils/stat-item-key.d.ts +11 -0
  117. package/types/table/index.d.ts +21 -5
  118. package/types/table/types.d.ts +17 -1
  119. package/types/table/utils.d.ts +76 -0
  120. package/types/tag/index.d.ts +5 -5
  121. package/types/tooltip/index.d.ts +16 -0
  122. package/types/transfer/index.d.ts +5 -4
  123. package/types/tree/index.d.ts +2 -2
  124. package/types/tree-select/index.d.ts +5 -0
  125. package/types/utils/color.d.ts +13 -0
  126. package/types/utils/overlay-order.d.ts +6 -0
  127. package/types/utils/overlay-stack.d.ts +13 -0
  128. package/types/utils/promise.d.ts +5 -0
  129. package/types/utils/vnode.d.ts +25 -0
  130. package/vetur/attributes.json +529 -225
  131. package/vetur/tags.json +76 -28
  132. package/vetur/web-types.json +668 -284
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://k-ui.cn/schema/kui-components.schema.json",
3
3
  "library": "kui-vue",
4
- "version": "6.2.2",
4
+ "version": "6.3.0",
5
5
  "homepage": "https://k-ui.cn",
6
6
  "components": [
7
7
  {
@@ -604,7 +604,7 @@
604
604
  {
605
605
  "name": "type",
606
606
  "description": "Alert type, optional values are `success`, `info`, `warning`, `error` or not set",
607
- "descriptionZh": "按钮类型,可选值为 `success`、`info`、`warning`、`error` 或者不设置",
607
+ "descriptionZh": "警告类型,可选值为 `success`、`info`、`warning`、`error`,不设置时是 `warning`",
608
608
  "descriptionEn": "Alert type, optional values are `success`, `info`, `warning`, `error` or not set",
609
609
  "type": "\"info\" | \"success\" | \"warning\" | \"error\"",
610
610
  "boolean": false,
@@ -635,19 +635,17 @@
635
635
  },
636
636
  {
637
637
  "name": "theme",
638
- "description": "Appearance: `default`, `fill`, `outline`, or `plain`",
639
- "descriptionZh": "外观主题,可选 `default`、`fill`、`outline`、`plain`",
640
- "descriptionEn": "Appearance: `default`, `fill`, `outline`, or `plain`",
641
- "type": "ThemeType",
638
+ "description": "Surface theme",
639
+ "descriptionZh": "外观主题",
640
+ "descriptionEn": "Surface theme",
641
+ "type": "SurfaceThemeType",
642
642
  "boolean": false,
643
643
  "enumValues": [
644
- "default",
645
644
  "fill",
646
645
  "outline",
647
646
  "plain",
648
647
  "solid",
649
- "dashed",
650
- "underlined"
648
+ "dashed"
651
649
  ],
652
650
  "required": false,
653
651
  "defaultExpression": "\"fill\"",
@@ -786,6 +784,11 @@
786
784
  "title": "自定义图标",
787
785
  "file": "components/alert/demo/custom-icon.vue",
788
786
  "source": "<template>\n <Space vertical block>\n <Alert type=\"success\" showIcon :icon=\"LogoAlipay\">Success Text</Alert>\n <Alert type=\"info\" showIcon :icon=\"LogoWechat\">Info Text</Alert>\n <Alert type=\"warning\" showIcon :icon=\"LogoApple\">Warning Text</Alert>\n <Alert type=\"error\" showIcon :icon=\"LogoGoogle\">Error Text</Alert>\n\n <Alert\n type=\"success\"\n showIcon\n message=\"Success Tip\"\n :icon=\"LogoAlipay\"\n description=\"Congratulations, the operation is successful.\"\n />\n <Alert\n type=\"info\"\n showIcon\n :icon=\"LogoWechat\"\n message=\"Informational Notes\"\n description=\"Congratulations, the operation is successful.\"\n />\n <Alert\n type=\"warning\"\n showIcon\n :icon=\"LogoApple\"\n message=\"Warning\"\n description=\"Nuclear bomb launching base, please do not approach!\"\n />\n <Alert\n type=\"error\"\n showIcon\n :icon=\"LogoGoogle\"\n message=\"Error\"\n description=\"Encountered an error, please press any key to continue.\"\n />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoAlipay, LogoWechat, LogoApple, LogoGoogle } from \"kui-icons\";\n</script>"
787
+ },
788
+ {
789
+ "title": "外观",
790
+ "file": "components/alert/demo/appearance.vue",
791
+ "source": "<template>\n <Space vertical block>\n <Alert v-for=\"tier in tiers\" :key=\"tier\" type=\"info\" :theme=\"tier\">theme: {{ tier }}</Alert>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// The alert's colour comes from `type` and the tier only decides how much of it is shown, so the five rows\n// below keep one `type` and change nothing else: `fill` — the alert's own look — is that colour as a pale\n// plate, `solid` spreads the same colour over the whole bar and inverts its text, icon and close button,\n// `outline` and `plain` drop the plate and keep the border, `dashed` swaps that border for a dashed one.\n// An `error` alert stays red under `solid`; the primary is not involved.\nconst tiers: SurfaceThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\"];\n</script>"
789
792
  }
790
793
  ]
791
794
  },
@@ -824,15 +827,29 @@
824
827
  "required": false,
825
828
  "documented": true
826
829
  },
830
+ {
831
+ "name": "destroyOnClose",
832
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
833
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
834
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
835
+ "type": "boolean",
836
+ "boolean": true,
837
+ "enumValues": [
838
+ false,
839
+ true
840
+ ],
841
+ "required": false,
842
+ "defaultExpression": "true",
843
+ "documented": true
844
+ },
827
845
  {
828
846
  "name": "theme",
829
- "description": "Theme",
830
- "descriptionZh": "主题",
831
- "descriptionEn": "Theme",
847
+ "description": "Theme, painted on the inner input box; supports the same tiers as Input",
848
+ "descriptionZh": "主题,画在内部输入框上,可用档位与 Input 一致",
849
+ "descriptionEn": "Theme, painted on the inner input box; supports the same tiers as Input",
832
850
  "type": "ThemeType",
833
851
  "boolean": false,
834
852
  "enumValues": [
835
- "default",
836
853
  "fill",
837
854
  "outline",
838
855
  "plain",
@@ -994,6 +1011,46 @@
994
1011
  "required": false,
995
1012
  "documented": true
996
1013
  },
1014
+ {
1015
+ "name": "addonBefore",
1016
+ "description": "Addon before the input; complex content can use the named slot",
1017
+ "descriptionZh": "输入框外部前置附件,复杂内容可使用同名插槽",
1018
+ "descriptionEn": "Addon before the input; complex content can use the named slot",
1019
+ "type": "VNodeChild",
1020
+ "boolean": false,
1021
+ "required": false,
1022
+ "documented": true
1023
+ },
1024
+ {
1025
+ "name": "addonAfter",
1026
+ "description": "Addon after the input; complex content can use the named slot",
1027
+ "descriptionZh": "输入框外部后置附件,复杂内容可使用同名插槽",
1028
+ "descriptionEn": "Addon after the input; complex content can use the named slot",
1029
+ "type": "VNodeChild",
1030
+ "boolean": false,
1031
+ "required": false,
1032
+ "documented": true
1033
+ },
1034
+ {
1035
+ "name": "prefix",
1036
+ "description": "Inline prefix; complex content can use the named slot",
1037
+ "descriptionZh": "输入框内部前缀,复杂内容可使用同名插槽",
1038
+ "descriptionEn": "Inline prefix; complex content can use the named slot",
1039
+ "type": "VNodeChild",
1040
+ "boolean": false,
1041
+ "required": false,
1042
+ "documented": true
1043
+ },
1044
+ {
1045
+ "name": "suffix",
1046
+ "description": "Inline suffix; complex content can use the named slot",
1047
+ "descriptionZh": "输入框内部后缀,复杂内容可使用同名插槽",
1048
+ "descriptionEn": "Inline suffix; complex content can use the named slot",
1049
+ "type": "VNodeChild",
1050
+ "boolean": false,
1051
+ "required": false,
1052
+ "documented": true
1053
+ },
997
1054
  {
998
1055
  "name": "size",
999
1056
  "description": "Size",
@@ -1114,13 +1171,43 @@
1114
1171
  "descriptionEn": "Open state change"
1115
1172
  }
1116
1173
  ],
1117
- "slots": [],
1174
+ "slots": [
1175
+ {
1176
+ "name": "prefix",
1177
+ "description": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set.",
1178
+ "descriptionZh": "输入框内部前缀,与 `prefix` 属性等效;两者同时提供时以插槽为准。",
1179
+ "descriptionEn": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set."
1180
+ },
1181
+ {
1182
+ "name": "suffix",
1183
+ "description": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set.",
1184
+ "descriptionZh": "输入框内部后缀,与 `suffix` 属性等效;两者同时提供时以插槽为准。",
1185
+ "descriptionEn": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set."
1186
+ },
1187
+ {
1188
+ "name": "addonBefore",
1189
+ "description": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set.",
1190
+ "descriptionZh": "输入框外部前置附件,与 `addonBefore` 属性等效;两者同时提供时以插槽为准。",
1191
+ "descriptionEn": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set."
1192
+ },
1193
+ {
1194
+ "name": "addonAfter",
1195
+ "description": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set.",
1196
+ "descriptionZh": "输入框外部后置附件,与 `addonAfter` 属性等效;两者同时提供时以插槽为准。",
1197
+ "descriptionEn": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set."
1198
+ }
1199
+ ],
1118
1200
  "examples": [
1119
1201
  {
1120
1202
  "title": "基础用法",
1121
1203
  "file": "components/auto-complete/demo/basic.vue",
1122
1204
  "source": "<template>\n <AutoComplete\n v-model=\"value\"\n clearable\n placeholder=\"Please input\"\n :options=\"['Vue', 'React', 'Solid', 'Svelte']\"\n />\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst value = ref(\"\");\n</script>"
1123
1205
  },
1206
+ {
1207
+ "title": "附件与前后缀",
1208
+ "file": "components/auto-complete/demo/addon.vue",
1209
+ "source": "<template>\n <Space block vertical>\n <AutoComplete\n v-model=\"value\"\n addon-before=\"https://\"\n addon-after=\".com\"\n placeholder=\"Please input domain\"\n :options=\"['kui', 'kui-pro', 'kui-admin', 'kui-docs']\"\n />\n <AutoComplete\n prefix=\"@\"\n suffix=\".cn\"\n placeholder=\"Please input handle\"\n :options=\"['kui', 'kui-pro', 'kui-admin', 'kui-docs']\"\n />\n <AutoComplete placeholder=\"Please input handle\" :options=\"['kui', 'kui-pro', 'kui-admin']\">\n <template #addonAfter>\n <Button>Invite</Button>\n </template>\n </AutoComplete>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst value = ref(\"\");\n</script>"
1210
+ },
1124
1211
  {
1125
1212
  "title": "受控值",
1126
1213
  "file": "components/auto-complete/demo/controlled.vue",
@@ -1134,7 +1221,7 @@
1134
1221
  {
1135
1222
  "title": "尺寸、主题与形状",
1136
1223
  "file": "components/auto-complete/demo/appearance.vue",
1137
- "source": "<template>\n <Space vertical>\n <AutoComplete size=\"small\" theme=\"plain\" :options=\"options\" placeholder=\"small / plain\" />\n <AutoComplete\n shape=\"square\"\n theme=\"outline\"\n :options=\"options\"\n placeholder=\"square / outline\"\n />\n <AutoComplete size=\"large\" shape=\"circle\" :options=\"options\" placeholder=\"large / circle\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nconst options = [\"Vue\", \"Vite\", \"Vitest\"];\n</script>"
1224
+ "source": "<template>\n <Space vertical>\n <AutoComplete size=\"small\" theme=\"plain\" :options=\"options\" placeholder=\"small / plain\" />\n <AutoComplete theme=\"dashed\" :options=\"options\" placeholder=\"dashed\" />\n <AutoComplete\n shape=\"square\"\n theme=\"outline\"\n :options=\"options\"\n placeholder=\"square / outline\"\n />\n <AutoComplete size=\"large\" shape=\"circle\" :options=\"options\" placeholder=\"large / circle\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nconst options = [\"Vue\", \"Vite\", \"Vitest\"];\n</script>"
1138
1225
  },
1139
1226
  {
1140
1227
  "title": "空输入时展示",
@@ -1832,23 +1919,6 @@
1832
1919
  "defaultExpression": "99",
1833
1920
  "documented": true
1834
1921
  },
1835
- {
1836
- "name": "status",
1837
- "description": "Set Badge as a status dot",
1838
- "descriptionZh": "将徽章设置为状态点",
1839
- "descriptionEn": "Set Badge as a status dot",
1840
- "type": "BadgeStatusType",
1841
- "boolean": false,
1842
- "enumValues": [
1843
- "default",
1844
- "success",
1845
- "warning",
1846
- "error"
1847
- ],
1848
- "required": false,
1849
- "defaultExpression": "\"default\"",
1850
- "documented": true
1851
- },
1852
1922
  {
1853
1923
  "name": "count",
1854
1924
  "description": "The text to display",
@@ -1889,14 +1959,30 @@
1889
1959
  },
1890
1960
  {
1891
1961
  "name": "color",
1892
- "description": "Badge color",
1893
- "descriptionZh": "徽标颜色",
1894
- "descriptionEn": "Badge color",
1962
+ "description": "Badge color: a preset name (the same set `Tag` uses, e.g. `blue`) or any readable color value",
1963
+ "descriptionZh": "徽标颜色:预设色值名(与 `Tag` 同一套,如 `blue`)或任意可读色值",
1964
+ "descriptionEn": "Badge color: a preset name (the same set `Tag` uses, e.g. `blue`) or any readable color value",
1895
1965
  "type": "string | undefined",
1896
1966
  "boolean": false,
1897
1967
  "required": false,
1898
1968
  "documented": true
1899
1969
  },
1970
+ {
1971
+ "name": "status",
1972
+ "description": "Set Badge as a status dot",
1973
+ "descriptionZh": "将徽章设置为状态点",
1974
+ "descriptionEn": "Set Badge as a status dot",
1975
+ "type": "BadgeStatusType | undefined",
1976
+ "boolean": false,
1977
+ "enumValues": [
1978
+ "default",
1979
+ "success",
1980
+ "warning",
1981
+ "error"
1982
+ ],
1983
+ "required": false,
1984
+ "documented": true
1985
+ },
1900
1986
  {
1901
1987
  "name": "text",
1902
1988
  "description": "If status is set, text sets the display text of the status dot",
@@ -1958,7 +2044,7 @@
1958
2044
  {
1959
2045
  "title": "多彩徽标",
1960
2046
  "file": "components/badge/demo/color.vue",
1961
- "source": "<template>\n <Space vertical block>\n <Space>\n Active :\n <Switch v-model=\"active\" />\n </Space>\n <code>Presets</code>\n <Space wrap>\n <Badge :color=\"color\" :active=\"active\" :text=\"color\" v-for=\"color in colors\" :key=\"color\" />\n </Space>\n <br />\n <code>Custom</code>\n <div v-for=\"color in custom\" :key=\"color\">\n <Badge :color=\"color\" :text=\"color\" :active=\"active\" />\n </div>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\n\nconst active = ref(false);\nconst custom = [\"#c20\", \"#39f\", \"#e3f\", \"#6c0\"];\nconst colors = [\n \"pink\",\n \"red\",\n \"yellow\",\n \"orange\",\n \"cyan\",\n \"green\",\n \"blue\",\n \"purple\",\n \"magenta\",\n \"volcano\",\n \"gold\",\n \"lime\",\n];\n</script>"
2047
+ "source": "<template>\n <Space vertical block>\n <Space>\n Active :\n <Switch v-model=\"active\" />\n </Space>\n <code>Presets</code>\n <Space wrap>\n <Badge :color=\"color\" :active=\"active\" :text=\"color\" v-for=\"color in colors\" :key=\"color\" />\n </Space>\n <br />\n <code>Custom</code>\n <div v-for=\"color in custom\" :key=\"color\">\n <Badge :color=\"color\" :text=\"color\" :active=\"active\" />\n </div>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\n\nconst active = ref(false);\nconst custom = [\"#c20\", \"#39f\", \"#e3f\", \"#6c0\"];\nconst colors = [\n \"red\",\n \"orange\",\n \"yellow\",\n \"olive\",\n \"green\",\n \"teal\",\n \"blue\",\n \"volcano\",\n \"violet\",\n \"cyan\",\n \"gold\",\n \"lime\",\n \"magenta\",\n \"purple\",\n \"pink\",\n \"brown\",\n \"gray\",\n];\n</script>"
1962
2048
  }
1963
2049
  ]
1964
2050
  },
@@ -2082,19 +2168,17 @@
2082
2168
  },
2083
2169
  {
2084
2170
  "name": "theme",
2085
- "description": "Button theme",
2086
- "descriptionZh": "按钮主题",
2087
- "descriptionEn": "Button theme",
2088
- "type": "ThemeType | undefined",
2171
+ "description": "Button theme; `fill` / `outline` / `plain` / `solid` / `dashed` are drawn. Leaving `theme` unset keeps the button's own look, and `underlined` belongs to controls you type into, so a button never draws an underline",
2172
+ "descriptionZh": "按钮主题,可用 `fill` / `outline` / `plain` / `solid` / `dashed`;不写 `theme` 就是按钮自身的外观,`underlined` 是给可输入的控件用的,按钮不会画下划线",
2173
+ "descriptionEn": "Button theme; `fill` / `outline` / `plain` / `solid` / `dashed` are drawn. Leaving `theme` unset keeps the button's own look, and `underlined` belongs to controls you type into, so a button never draws an underline",
2174
+ "type": "SurfaceThemeType | undefined",
2089
2175
  "boolean": false,
2090
2176
  "enumValues": [
2091
- "default",
2092
2177
  "fill",
2093
2178
  "outline",
2094
2179
  "plain",
2095
2180
  "solid",
2096
- "dashed",
2097
- "underlined"
2181
+ "dashed"
2098
2182
  ],
2099
2183
  "required": false,
2100
2184
  "documented": true
@@ -2142,31 +2226,11 @@
2142
2226
  },
2143
2227
  {
2144
2228
  "name": "color",
2145
- "description": "Preset semantic color",
2146
- "descriptionZh": "预设语义颜色",
2147
- "descriptionEn": "Preset semantic color",
2148
- "type": "\"default\" | \"red\" | \"orange\" | \"yellow\" | \"olive\" | \"green\" | \"teal\" | \"blue\" | \"volcano\" | \"violet\" | \"cyan\" | \"gold\" | \"lime\" | \"magenta\" | \"purple\" | \"pink\" | \"brown\" | \"gray\" | undefined",
2229
+ "description": "Button color: a preset name (the same set `Tag` / `Badge` use, e.g. `blue`); with `theme` it paints that tier, without one it brings its own solid surface; a color outside this set does not change the button's look",
2230
+ "descriptionZh": "按钮颜色:预设色值名(与 `Tag` / `Badge` 同一套,如 `blue`);写了 `theme` 就在这一档上上色,没写时它自带一张实心面;这套名字之外的颜色不改变按钮外观",
2231
+ "descriptionEn": "Button color: a preset name (the same set `Tag` / `Badge` use, e.g. `blue`); with `theme` it paints that tier, without one it brings its own solid surface; a color outside this set does not change the button's look",
2232
+ "type": "string | undefined",
2149
2233
  "boolean": false,
2150
- "enumValues": [
2151
- "default",
2152
- "red",
2153
- "orange",
2154
- "yellow",
2155
- "olive",
2156
- "green",
2157
- "teal",
2158
- "blue",
2159
- "volcano",
2160
- "violet",
2161
- "cyan",
2162
- "gold",
2163
- "lime",
2164
- "magenta",
2165
- "purple",
2166
- "pink",
2167
- "brown",
2168
- "gray"
2169
- ],
2170
2234
  "required": false,
2171
2235
  "documented": true
2172
2236
  }
@@ -2187,7 +2251,7 @@
2187
2251
  {
2188
2252
  "title": "多彩",
2189
2253
  "file": "components/button/demo/color.vue",
2190
- "source": "<template>\n <Space size=\"small\" wrap>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"solid\">Solid</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"outline\">Outline</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"dashed\">Dashed</Button>\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"default\",\n \"red\",\n \"orange\",\n \"yellow\",\n \"olive\",\n \"green\",\n \"teal\",\n \"blue\",\n \"volcano\",\n \"violet\",\n \"cyan\",\n \"gold\",\n \"lime\",\n \"magenta\",\n \"purple\",\n \"pink\",\n \"brown\",\n] as const;\n</script>"
2254
+ "source": "<template>\n <Space size=\"small\" wrap>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\">No theme</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"solid\">Solid</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"fill\">Fill</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"outline\">Outline</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"dashed\">Dashed</Button>\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"red\",\n \"orange\",\n \"yellow\",\n \"olive\",\n \"green\",\n \"teal\",\n \"blue\",\n \"volcano\",\n \"violet\",\n \"cyan\",\n \"gold\",\n \"lime\",\n \"magenta\",\n \"purple\",\n \"pink\",\n \"brown\",\n \"gray\",\n] as const;\n</script>"
2191
2255
  },
2192
2256
  {
2193
2257
  "title": "带图标",
@@ -2286,7 +2350,7 @@
2286
2350
  {
2287
2351
  "title": "多彩",
2288
2352
  "file": "components/button/demo/color.vue",
2289
- "source": "<template>\n <Space size=\"small\" wrap>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"solid\">Solid</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"outline\">Outline</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"dashed\">Dashed</Button>\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"default\",\n \"red\",\n \"orange\",\n \"yellow\",\n \"olive\",\n \"green\",\n \"teal\",\n \"blue\",\n \"volcano\",\n \"violet\",\n \"cyan\",\n \"gold\",\n \"lime\",\n \"magenta\",\n \"purple\",\n \"pink\",\n \"brown\",\n] as const;\n</script>"
2353
+ "source": "<template>\n <Space size=\"small\" wrap>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\">No theme</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"solid\">Solid</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"fill\">Fill</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"outline\">Outline</Button>\n </Space>\n <Space size=\"small\" wrap>\n <Button v-for=\"color in colors\" :color=\"color\" :key=\"color\" theme=\"dashed\">Dashed</Button>\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"red\",\n \"orange\",\n \"yellow\",\n \"olive\",\n \"green\",\n \"teal\",\n \"blue\",\n \"volcano\",\n \"violet\",\n \"cyan\",\n \"gold\",\n \"lime\",\n \"magenta\",\n \"purple\",\n \"pink\",\n \"brown\",\n \"gray\",\n] as const;\n</script>"
2290
2354
  },
2291
2355
  {
2292
2356
  "title": "带图标",
@@ -2368,6 +2432,21 @@
2368
2432
  "defaultExpression": "\"bottom-left\"",
2369
2433
  "documented": true
2370
2434
  },
2435
+ {
2436
+ "name": "destroyOnClose",
2437
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
2438
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
2439
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
2440
+ "type": "boolean",
2441
+ "boolean": true,
2442
+ "enumValues": [
2443
+ false,
2444
+ true
2445
+ ],
2446
+ "required": false,
2447
+ "defaultExpression": "true",
2448
+ "documented": true
2449
+ },
2371
2450
  {
2372
2451
  "name": "bordered",
2373
2452
  "description": "Whether to display borders",
@@ -2391,7 +2470,6 @@
2391
2470
  "type": "ThemeType",
2392
2471
  "boolean": false,
2393
2472
  "enumValues": [
2394
- "default",
2395
2473
  "fill",
2396
2474
  "outline",
2397
2475
  "plain",
@@ -2631,6 +2709,11 @@
2631
2709
  "title": "尺寸/形态",
2632
2710
  "file": "components/cascader/demo/size.vue",
2633
2711
  "source": "<template>\n <Space vertical :size=\"12\">\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n shape=\"circle\"\n placeholder=\"Circle\"\n style=\"width: 240px\"\n />\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n :show-arrow=\"false\"\n placeholder=\"No Arrow\"\n style=\"width: 240px\"\n />\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n :arrowIcon=\"ArrowDown\"\n placeholder=\"Custom Arrow\"\n style=\"width: 240px\"\n />\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n :icon=\"Search\"\n placeholder=\"With Icon\"\n style=\"width: 240px\"\n />\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n placeholder=\"Solid\"\n theme=\"solid\"\n style=\"width: 240px\"\n />\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n placeholder=\"Plain\"\n theme=\"plain\"\n style=\"width: 240px\"\n />\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n size=\"large\"\n placeholder=\"Large Size (38px)\"\n style=\"width: 240px\"\n />\n\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n placeholder=\"Default Size (32px)\"\n style=\"width: 240px\"\n />\n\n <Cascader\n v-model=\"value\"\n :options=\"simpleOptions\"\n size=\"small\"\n placeholder=\"Small Size (24px)\"\n style=\"width: 240px\"\n />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { ArrowDown, Search } from \"kui-icons\";\nimport type { CascaderOption } from \"kui-vue\";\nimport { ref } from \"vue\";\n\nconst value = ref<(string | number)[]>([]);\n// const simpleOptions: CascaderOption[] = [];\n\nconst simpleOptions: CascaderOption[] = [\n {\n value: \"1\",\n label: \"选项一\",\n children: [\n { value: \"1-1\", label: \"子选项 A\" },\n { value: \"1-2\", label: \"子选项 B\" },\n ],\n },\n {\n value: \"2\",\n label: \"选项二\",\n children: [{ value: \"2-1\", label: \"子选项 C\" }],\n },\n];\n</script>"
2712
+ },
2713
+ {
2714
+ "title": "外观档位",
2715
+ "file": "components/cascader/demo/theme.vue",
2716
+ "source": "<template>\n <Space vertical block style=\"width: 260px; max-width: 100%\">\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <code>theme: {{ tier }}</code>\n <Cascader\n v-model=\"selected\"\n :options=\"areaOptions\"\n :theme=\"tier\"\n placeholder=\"请选择省市区\"\n style=\"width: 100%\"\n />\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CascaderOption, ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// A cascader is a text control with a tree behind it, so it paints the same six tiers an input does: `fill`\n// — its own look — plates the box, `outline` and `dashed` edge it, `plain` leaves it bare, `solid` plates it\n// on the primary and inverts the chosen path and the arrow, `underlined` keeps only the bottom rule. Only the\n// trigger box takes a tier; the popup it opens keeps the library's popup surface in every one of them.\nconst tiers: ThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\", \"underlined\"];\n\nconst selected = ref<(string | number)[]>([\"guangdong\", \"shenzhen\", \"nanshan\"]);\n\nconst areaOptions: CascaderOption[] = [\n {\n value: \"hubei\",\n label: \"湖北省\",\n children: [\n { value: \"wuhan\", label: \"武汉市\", children: [{ value: \"hongshan\", label: \"洪山区\" }] },\n { value: \"huanggang\", label: \"黄冈市\" },\n ],\n },\n {\n value: \"guangdong\",\n label: \"广东省\",\n children: [\n { value: \"shenzhen\", label: \"深圳市\", children: [{ value: \"nanshan\", label: \"南山区\" }] },\n { value: \"guangzhou\", label: \"广州市\" },\n ],\n },\n];\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 4px;\n justify-items: start;\n}\n</style>"
2634
2717
  }
2635
2718
  ]
2636
2719
  },
@@ -2671,16 +2754,14 @@
2671
2754
  "description": "Surface theme",
2672
2755
  "descriptionZh": "外观主题",
2673
2756
  "descriptionEn": "Surface theme",
2674
- "type": "ThemeType",
2757
+ "type": "SurfaceThemeType",
2675
2758
  "boolean": false,
2676
2759
  "enumValues": [
2677
- "default",
2678
2760
  "fill",
2679
2761
  "outline",
2680
2762
  "plain",
2681
2763
  "solid",
2682
- "dashed",
2683
- "underlined"
2764
+ "dashed"
2684
2765
  ],
2685
2766
  "required": false,
2686
2767
  "defaultExpression": "\"fill\"",
@@ -2779,7 +2860,7 @@
2779
2860
  {
2780
2861
  "title": "外观与形状",
2781
2862
  "file": "components/card/demo/appearance.vue",
2782
- "source": "<template>\n <Space vertical block>\n <Space>\n <Card v-for=\"shape in shapes\" :key=\"shape\" :shape=\"shape\" style=\"width: 180px\">\n shape: {{ shape }}\n </Card>\n </Space>\n <Space>\n <Card v-for=\"theme in themes\" :key=\"theme\" :theme=\"theme\" shape=\"square\" style=\"width: 180px\">\n theme: {{ theme }}\n </Card>\n </Space>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CardShape, ThemeType } from \"kui-vue\";\n\nconst shapes: CardShape[] = [\"round\", \"square\"];\nconst themes: ThemeType[] = [\"default\", \"fill\", \"outline\", \"plain\"];\n</script>"
2863
+ "source": "<template>\n <Space vertical block>\n <Space>\n <Card v-for=\"shape in shapes\" :key=\"shape\" :shape=\"shape\" style=\"width: 180px\">\n shape: {{ shape }}\n </Card>\n </Space>\n <Space>\n <Card v-for=\"theme in themes\" :key=\"theme\" :theme=\"theme\" shape=\"square\" style=\"width: 180px\">\n theme: {{ theme }}\n </Card>\n </Space>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CardShape, SurfaceThemeType } from \"kui-vue\";\n\nconst shapes: CardShape[] = [\"round\", \"square\"];\nconst themes: SurfaceThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\"];\n</script>"
2783
2864
  }
2784
2865
  ]
2785
2866
  },
@@ -2861,7 +2942,7 @@
2861
2942
  {
2862
2943
  "title": "外观与形状",
2863
2944
  "file": "components/card/demo/appearance.vue",
2864
- "source": "<template>\n <Space vertical block>\n <Space>\n <Card v-for=\"shape in shapes\" :key=\"shape\" :shape=\"shape\" style=\"width: 180px\">\n shape: {{ shape }}\n </Card>\n </Space>\n <Space>\n <Card v-for=\"theme in themes\" :key=\"theme\" :theme=\"theme\" shape=\"square\" style=\"width: 180px\">\n theme: {{ theme }}\n </Card>\n </Space>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CardShape, ThemeType } from \"kui-vue\";\n\nconst shapes: CardShape[] = [\"round\", \"square\"];\nconst themes: ThemeType[] = [\"default\", \"fill\", \"outline\", \"plain\"];\n</script>"
2945
+ "source": "<template>\n <Space vertical block>\n <Space>\n <Card v-for=\"shape in shapes\" :key=\"shape\" :shape=\"shape\" style=\"width: 180px\">\n shape: {{ shape }}\n </Card>\n </Space>\n <Space>\n <Card v-for=\"theme in themes\" :key=\"theme\" :theme=\"theme\" shape=\"square\" style=\"width: 180px\">\n theme: {{ theme }}\n </Card>\n </Space>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CardShape, SurfaceThemeType } from \"kui-vue\";\n\nconst shapes: CardShape[] = [\"round\", \"square\"];\nconst themes: SurfaceThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\"];\n</script>"
2865
2946
  }
2866
2947
  ]
2867
2948
  },
@@ -3098,16 +3179,14 @@
3098
3179
  "description": "Appearance theme",
3099
3180
  "descriptionZh": "外观主题",
3100
3181
  "descriptionEn": "Appearance theme",
3101
- "type": "ThemeType",
3182
+ "type": "SurfaceThemeType",
3102
3183
  "boolean": false,
3103
3184
  "enumValues": [
3104
- "default",
3105
3185
  "fill",
3106
3186
  "outline",
3107
3187
  "plain",
3108
3188
  "solid",
3109
- "dashed",
3110
- "underlined"
3189
+ "dashed"
3111
3190
  ],
3112
3191
  "required": false,
3113
3192
  "defaultExpression": "\"fill\"",
@@ -3229,9 +3308,9 @@
3229
3308
  },
3230
3309
  {
3231
3310
  "name": "iconBackground",
3232
- "description": "Icon container background; derived from `color` when omitted",
3233
- "descriptionZh": "图标容器背景;未设置时根据 `color` 自动生成",
3234
- "descriptionEn": "Icon container background; derived from `color` when omitted",
3311
+ "description": "Icon container background; a wash of `color`, or of the theme primary when `color` cannot be parsed (e.g. `currentColor`, a CSS variable)",
3312
+ "descriptionZh": "图标容器背景;未设置时由 `color` 淡化生成,`color` 无法解析(如 `currentColor`、CSS 变量)时改用主题主色淡化",
3313
+ "descriptionEn": "Icon container background; a wash of `color`, or of the theme primary when `color` cannot be parsed (e.g. `currentColor`, a CSS variable)",
3235
3314
  "type": "string | undefined",
3236
3315
  "boolean": false,
3237
3316
  "required": false,
@@ -3278,6 +3357,11 @@
3278
3357
  "title": "功能入口",
3279
3358
  "file": "components/feature-card/demo/interactive.vue",
3280
3359
  "source": "<template>\n <Grid :cols=\"{ xs: 2, md: 4 }\" :x-gap=\"12\" :y-gap=\"12\">\n <GridItem v-for=\"item in entries\" :key=\"item.title\">\n <FeatureCard\n :icon=\"item.icon\"\n :title=\"item.title\"\n :color=\"item.color\"\n size=\"small\"\n direction=\"vertical\"\n theme=\"outline\"\n clickable\n @click=\"message.info(item.title)\"\n />\n </GridItem>\n </Grid>\n</template>\n<script setup lang=\"ts\">\nimport { FolderKanban, ShoppingCart, Users, Wallet } from \"kui-icons\";\nimport { message } from \"kui-vue\";\nconst entries = [\n { title: \"项目管理\", icon: FolderKanban, color: \"#3a95ff\" },\n { title: \"订单管理\", icon: ShoppingCart, color: \"#7b61ff\" },\n { title: \"客户管理\", icon: Users, color: \"#22a06b\" },\n { title: \"财务报表\", icon: Wallet, color: \"#f59e0b\" },\n];\n</script>"
3360
+ },
3361
+ {
3362
+ "title": "外观",
3363
+ "file": "components/feature-card/demo/appearance.vue",
3364
+ "source": "<template>\n <div class=\"feature-demo\">\n <FeatureCard\n v-for=\"tier in tiers\"\n :key=\"tier\"\n :icon=\"Zap\"\n :title=\"`theme: ${tier}`\"\n direction=\"vertical\"\n size=\"small\"\n :theme=\"tier\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { Zap } from \"kui-icons\";\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// The feature card paints the same five tiers as the plain card and starts on `fill`; `solid` puts the icon\n// plate and the title on the primary, which is the one tier that moves the text, and `plain` drops the box\n// around the content entirely. Kept to `direction=\"vertical\"` and one line of copy so the five read as a row\n// of the same card rather than five different layouts.\nconst tiers: SurfaceThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\"];\n</script>\n\n<style scoped>\n.feature-demo {\n display: grid;\n grid-template-columns: repeat(5, minmax(0, 1fr));\n gap: 12px;\n}\n</style>"
3281
3365
  }
3282
3366
  ]
3283
3367
  },
@@ -3544,15 +3628,17 @@
3544
3628
  },
3545
3629
  {
3546
3630
  "name": "theme",
3547
- "description": "Panel theme",
3548
- "descriptionZh": "面板外观",
3549
- "descriptionEn": "Panel theme",
3550
- "type": "\"fill\" | \"outline\" | \"plain\"",
3631
+ "description": "Appearance theme",
3632
+ "descriptionZh": "外观主题",
3633
+ "descriptionEn": "Appearance theme",
3634
+ "type": "SurfaceThemeType",
3551
3635
  "boolean": false,
3552
3636
  "enumValues": [
3553
3637
  "fill",
3554
3638
  "outline",
3555
- "plain"
3639
+ "plain",
3640
+ "solid",
3641
+ "dashed"
3556
3642
  ],
3557
3643
  "required": false,
3558
3644
  "defaultExpression": "\"outline\"",
@@ -3633,6 +3719,11 @@
3633
3719
  "title": "批量操作",
3634
3720
  "file": "components/list-panel/demo/selection.vue",
3635
3721
  "source": "<template>\n <ListPanel :selected-count=\"selectedKeys.length\" summary=\"3 users\">\n <template #filters>\n <Input placeholder=\"Search users\" :icon=\"Search\" style=\"width: 200px\" />\n </template>\n <template #selection=\"{ count }\">\n <strong>{{ count }} selected</strong>\n <Button size=\"small\" type=\"danger\" theme=\"plain\">Disable</Button>\n <Button size=\"small\" theme=\"plain\" @click=\"selectedKeys = []\">Clear</Button>\n </template>\n <Table v-model:selected-keys=\"selectedKeys\" checkable :data=\"data\" :columns=\"columns\" />\n </ListPanel>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport type { Column, TableKey } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst selectedKeys = ref<TableKey[]>([]);\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Role\", key: \"role\" },\n];\nconst data = [\n { key: 1, name: \"Alex\", role: \"Admin\" },\n { key: 2, name: \"Mia\", role: \"Editor\" },\n { key: 3, name: \"Leo\", role: \"Viewer\" },\n];\n</script>"
3722
+ },
3723
+ {
3724
+ "title": "外观",
3725
+ "file": "components/list-panel/demo/appearance.vue",
3726
+ "source": "<template>\n <Space vertical block>\n <RadioGroup type=\"button\" :options=\"options\" v-model=\"tier\" />\n <ListPanel :theme=\"tier\" summary=\"3 users\" :selected-count=\"selectedKeys.length\">\n <template #selection=\"{ count }\">\n <strong>{{ count }} selected</strong>\n <Button size=\"small\" theme=\"plain\">Disable</Button>\n <Button size=\"small\" theme=\"plain\" @click=\"selectedKeys = []\">Clear</Button>\n </template>\n <template #filters>\n <Input :icon=\"Search\" placeholder=\"Search users\" style=\"width: 200px\" />\n </template>\n <Table :data=\"data\" :columns=\"columns\" checkable v-model:selected-keys=\"selectedKeys\" />\n </ListPanel>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport type { Column, SurfaceThemeType, TableKey } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// The panel does not plate itself: the tier it is given is painted on the card it renders under the header,\n// so the five options change the plate and frame of the whole panel rather than one part of it. `solid` is\n// the tier that moves content — the result summary turns to light-on-primary text and the bulk-action strip\n// swaps its grey plate for a pale one on the primary. Select a row to make that strip appear.\nconst tiers: SurfaceThemeType[] = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"];\nconst options = tiers.map((value) => ({ label: value, value }));\nconst tier = ref<SurfaceThemeType>(\"outline\");\nconst selectedKeys = ref<TableKey[]>([1]);\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Role\", key: \"role\" },\n];\nconst data = [\n { key: 1, name: \"Alex\", role: \"Admin\" },\n { key: 2, name: \"Mia\", role: \"Editor\" },\n { key: 3, name: \"Leo\", role: \"Viewer\" },\n];\n</script>"
3636
3727
  }
3637
3728
  ]
3638
3729
  },
@@ -3886,16 +3977,11 @@
3886
3977
  "description": "Component theme",
3887
3978
  "descriptionZh": "组件呈现主题",
3888
3979
  "descriptionEn": "Component theme",
3889
- "type": "ThemeType",
3980
+ "type": "MarkThemeType",
3890
3981
  "boolean": false,
3891
3982
  "enumValues": [
3892
- "default",
3893
3983
  "fill",
3894
- "outline",
3895
- "plain",
3896
- "solid",
3897
- "dashed",
3898
- "underlined"
3984
+ "outline"
3899
3985
  ],
3900
3986
  "required": false,
3901
3987
  "defaultExpression": "\"fill\"",
@@ -4100,6 +4186,11 @@
4100
4186
  "title": "全选",
4101
4187
  "file": "components/checkbox/demo/check-all.vue",
4102
4188
  "source": "<template>\n <Space vertical>\n <code>value: {{ cities }}</code>\n <Checkbox v-model=\"checkAll\" :indeterminate=\"indeterminate\" @change=\"handleCheckAll\">\n Check all\n </Checkbox>\n <CheckboxGroup :options=\"options\" v-model=\"cities\" @change=\"change\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { ChangeEvent, CheckboxValue } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst checkAll = ref(false);\nconst indeterminate = ref(false);\n\nconst options = [\n { label: \"Beijing\", value: \"beijing\" },\n { label: \"Shenzhen\", value: \"shenzhen\" },\n { label: \"Shanghai\", value: \"shanghai\" },\n { label: \"Guangzhou\", value: \"guangzhou\" },\n { label: \"Wuhan\", value: \"wuhan\" },\n];\nconst cities = ref<CheckboxValue[]>([]);\n\nconst handleCheckAll = ({ checked }: ChangeEvent) => {\n cities.value = checked ? options.map((v) => v.value) : [];\n indeterminate.value = !checked && !options.length;\n};\nconst change = () => {\n let length = cities.value.length;\n indeterminate.value = length > 0 && length < options.length;\n\n checkAll.value = length == options.length;\n};\n</script>"
4189
+ },
4190
+ {
4191
+ "title": "外观档位",
4192
+ "file": "components/checkbox/demo/theme.vue",
4193
+ "source": "<template>\n <Space vertical block>\n <Space v-for=\"tier in tiers\" :key=\"tier\" vertical>\n <code>theme: {{ tier }}</code>\n <CheckboxGroup :options=\"options\" v-model=\"grouped\" :theme=\"tier\" />\n <Space>\n <Checkbox v-model=\"single\" label=\"Checked\" :theme=\"tier\" />\n <Checkbox label=\"Disabled\" disabled :theme=\"tier\" />\n </Space>\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { CheckboxOption, CheckboxValue, MarkThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// A check box paints two tiers, and both land on the square rather than on the label: `fill` — what it does\n// when nobody writes a theme — gives the box a pale plate, `outline` puts a border on it instead. Whatever the\n// tier, a checked box is still primary and a disabled one still reads as disabled, and a group hands its own\n// tier to every item that did not write one.\nconst tiers: MarkThemeType[] = [\"fill\", \"outline\"];\nconst grouped = ref<CheckboxValue[]>([\"apple\", \"banana\"]);\nconst single = ref(true);\nconst options: CheckboxOption[] = [\"Apple\", \"Orange\", \"Banana\"].map((label) => ({\n label,\n value: label.toLowerCase(),\n}));\n</script>"
4103
4194
  }
4104
4195
  ]
4105
4196
  },
@@ -4131,16 +4222,11 @@
4131
4222
  "description": "Component theme",
4132
4223
  "descriptionZh": "组件呈现主题",
4133
4224
  "descriptionEn": "Component theme",
4134
- "type": "ThemeType",
4225
+ "type": "MarkThemeType",
4135
4226
  "boolean": false,
4136
4227
  "enumValues": [
4137
- "default",
4138
4228
  "fill",
4139
- "outline",
4140
- "plain",
4141
- "solid",
4142
- "dashed",
4143
- "underlined"
4229
+ "outline"
4144
4230
  ],
4145
4231
  "required": false,
4146
4232
  "defaultExpression": "\"fill\"",
@@ -4300,6 +4386,11 @@
4300
4386
  "title": "全选",
4301
4387
  "file": "components/checkbox/demo/check-all.vue",
4302
4388
  "source": "<template>\n <Space vertical>\n <code>value: {{ cities }}</code>\n <Checkbox v-model=\"checkAll\" :indeterminate=\"indeterminate\" @change=\"handleCheckAll\">\n Check all\n </Checkbox>\n <CheckboxGroup :options=\"options\" v-model=\"cities\" @change=\"change\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { ChangeEvent, CheckboxValue } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst checkAll = ref(false);\nconst indeterminate = ref(false);\n\nconst options = [\n { label: \"Beijing\", value: \"beijing\" },\n { label: \"Shenzhen\", value: \"shenzhen\" },\n { label: \"Shanghai\", value: \"shanghai\" },\n { label: \"Guangzhou\", value: \"guangzhou\" },\n { label: \"Wuhan\", value: \"wuhan\" },\n];\nconst cities = ref<CheckboxValue[]>([]);\n\nconst handleCheckAll = ({ checked }: ChangeEvent) => {\n cities.value = checked ? options.map((v) => v.value) : [];\n indeterminate.value = !checked && !options.length;\n};\nconst change = () => {\n let length = cities.value.length;\n indeterminate.value = length > 0 && length < options.length;\n\n checkAll.value = length == options.length;\n};\n</script>"
4389
+ },
4390
+ {
4391
+ "title": "外观档位",
4392
+ "file": "components/checkbox/demo/theme.vue",
4393
+ "source": "<template>\n <Space vertical block>\n <Space v-for=\"tier in tiers\" :key=\"tier\" vertical>\n <code>theme: {{ tier }}</code>\n <CheckboxGroup :options=\"options\" v-model=\"grouped\" :theme=\"tier\" />\n <Space>\n <Checkbox v-model=\"single\" label=\"Checked\" :theme=\"tier\" />\n <Checkbox label=\"Disabled\" disabled :theme=\"tier\" />\n </Space>\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { CheckboxOption, CheckboxValue, MarkThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// A check box paints two tiers, and both land on the square rather than on the label: `fill` — what it does\n// when nobody writes a theme — gives the box a pale plate, `outline` puts a border on it instead. Whatever the\n// tier, a checked box is still primary and a disabled one still reads as disabled, and a group hands its own\n// tier to every item that did not write one.\nconst tiers: MarkThemeType[] = [\"fill\", \"outline\"];\nconst grouped = ref<CheckboxValue[]>([\"apple\", \"banana\"]);\nconst single = ref(true);\nconst options: CheckboxOption[] = [\"Apple\", \"Orange\", \"Banana\"].map((label) => ({\n label,\n value: label.toLowerCase(),\n}));\n</script>"
4303
4394
  }
4304
4395
  ]
4305
4396
  },
@@ -4325,21 +4416,6 @@
4325
4416
  "children": [],
4326
4417
  "documentation": "https://k-ui.cn/components/check-card",
4327
4418
  "props": [
4328
- {
4329
- "name": "theme",
4330
- "description": "Appearance theme",
4331
- "descriptionZh": "外观主题",
4332
- "descriptionEn": "Appearance theme",
4333
- "type": "CheckCardTheme",
4334
- "boolean": false,
4335
- "enumValues": [
4336
- "fill",
4337
- "outline"
4338
- ],
4339
- "required": false,
4340
- "defaultExpression": "\"outline\"",
4341
- "documented": true
4342
- },
4343
4419
  {
4344
4420
  "name": "shape",
4345
4421
  "description": "Shape",
@@ -4447,6 +4523,23 @@
4447
4523
  "required": false,
4448
4524
  "documented": true
4449
4525
  },
4526
+ {
4527
+ "name": "theme",
4528
+ "description": "Appearance theme",
4529
+ "descriptionZh": "外观主题",
4530
+ "descriptionEn": "Appearance theme",
4531
+ "type": "SurfaceThemeType | undefined",
4532
+ "boolean": false,
4533
+ "enumValues": [
4534
+ "fill",
4535
+ "outline",
4536
+ "plain",
4537
+ "solid",
4538
+ "dashed"
4539
+ ],
4540
+ "required": false,
4541
+ "documented": true
4542
+ },
4450
4543
  {
4451
4544
  "name": "modelValue",
4452
4545
  "description": "Standalone state, supports `v-model`",
@@ -4553,7 +4646,7 @@
4553
4646
  {
4554
4647
  "title": "外观与禁用",
4555
4648
  "file": "components/check-card/demo/appearance.vue",
4556
- "source": "<template>\n <div class=\"demo-list\">\n <CheckCardGroup\n v-model=\"outline\"\n theme=\"outline\"\n shape=\"square\"\n size=\"small\"\n :options=\"items\"\n />\n <CheckCardGroup v-model=\"fill\" theme=\"fill\" shape=\"circle\" size=\"large\" :options=\"items\" />\n <CheckCardGroup v-model=\"disabled\" disabled :options=\"items\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { CheckCardValue } from \"kui-vue\";\n\nconst outline = ref<CheckCardValue>(\"basic\");\nconst fill = ref<CheckCardValue>(\"pro\");\nconst disabled = ref<CheckCardValue>(\"basic\");\nconst items = [\n { value: \"basic\", title: \"Basic\", description: \"Essential features\" },\n { value: \"pro\", title: \"Pro\", description: \"Advanced capabilities\" },\n];\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 24px;\n}\n</style>"
4649
+ "source": "<template>\n <div class=\"demo-list\">\n <CheckCardGroup\n v-for=\"(tier, index) in tiers\"\n :key=\"tier\"\n v-model=\"selected[index]\"\n :theme=\"tier\"\n shape=\"square\"\n size=\"small\"\n :options=\"items\"\n />\n <CheckCardGroup v-model=\"disabled\" theme=\"solid\" shape=\"square\" size=\"small\" :options=\"items\" disabled />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { CheckCardValue, SurfaceThemeType } from \"kui-vue\";\n\n// A check card paints all five surface tiers, and its own default is `outline` rather than the `fill` the\n// other cards start on — so the rows are listed from `outline` and shown side by side instead of behind a\n// switch. The last row is the disabled state: the tier still decides the shape of the box, but the plate and\n// the check mark both step back.\nconst tiers: SurfaceThemeType[] = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"];\nconst selected = ref<CheckCardValue[]>(tiers.map(() => \"basic\"));\nconst disabled = ref<CheckCardValue>(\"basic\");\nconst items = [\n { value: \"basic\", title: \"Basic\", description: \"Essential features\" },\n { value: \"pro\", title: \"Pro\", description: \"Advanced capabilities\" },\n];\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 24px;\n}\n</style>"
4557
4650
  }
4558
4651
  ]
4559
4652
  },
@@ -4580,21 +4673,6 @@
4580
4673
  ],
4581
4674
  "documentation": "https://k-ui.cn/components/check-card",
4582
4675
  "props": [
4583
- {
4584
- "name": "theme",
4585
- "description": "Card theme",
4586
- "descriptionZh": "卡片主题",
4587
- "descriptionEn": "Card theme",
4588
- "type": "CheckCardTheme",
4589
- "boolean": false,
4590
- "enumValues": [
4591
- "fill",
4592
- "outline"
4593
- ],
4594
- "required": false,
4595
- "defaultExpression": "\"outline\"",
4596
- "documented": true
4597
- },
4598
4676
  {
4599
4677
  "name": "shape",
4600
4678
  "description": "Card shape",
@@ -4658,6 +4736,23 @@
4658
4736
  "required": false,
4659
4737
  "documented": true
4660
4738
  },
4739
+ {
4740
+ "name": "theme",
4741
+ "description": "Card theme",
4742
+ "descriptionZh": "卡片主题",
4743
+ "descriptionEn": "Card theme",
4744
+ "type": "SurfaceThemeType | undefined",
4745
+ "boolean": false,
4746
+ "enumValues": [
4747
+ "fill",
4748
+ "outline",
4749
+ "plain",
4750
+ "solid",
4751
+ "dashed"
4752
+ ],
4753
+ "required": false,
4754
+ "documented": true
4755
+ },
4661
4756
  {
4662
4757
  "name": "modelValue",
4663
4758
  "description": "Selected value, supports `v-model`",
@@ -4759,7 +4854,7 @@
4759
4854
  {
4760
4855
  "title": "外观与禁用",
4761
4856
  "file": "components/check-card/demo/appearance.vue",
4762
- "source": "<template>\n <div class=\"demo-list\">\n <CheckCardGroup\n v-model=\"outline\"\n theme=\"outline\"\n shape=\"square\"\n size=\"small\"\n :options=\"items\"\n />\n <CheckCardGroup v-model=\"fill\" theme=\"fill\" shape=\"circle\" size=\"large\" :options=\"items\" />\n <CheckCardGroup v-model=\"disabled\" disabled :options=\"items\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { CheckCardValue } from \"kui-vue\";\n\nconst outline = ref<CheckCardValue>(\"basic\");\nconst fill = ref<CheckCardValue>(\"pro\");\nconst disabled = ref<CheckCardValue>(\"basic\");\nconst items = [\n { value: \"basic\", title: \"Basic\", description: \"Essential features\" },\n { value: \"pro\", title: \"Pro\", description: \"Advanced capabilities\" },\n];\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 24px;\n}\n</style>"
4857
+ "source": "<template>\n <div class=\"demo-list\">\n <CheckCardGroup\n v-for=\"(tier, index) in tiers\"\n :key=\"tier\"\n v-model=\"selected[index]\"\n :theme=\"tier\"\n shape=\"square\"\n size=\"small\"\n :options=\"items\"\n />\n <CheckCardGroup v-model=\"disabled\" theme=\"solid\" shape=\"square\" size=\"small\" :options=\"items\" disabled />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { CheckCardValue, SurfaceThemeType } from \"kui-vue\";\n\n// A check card paints all five surface tiers, and its own default is `outline` rather than the `fill` the\n// other cards start on — so the rows are listed from `outline` and shown side by side instead of behind a\n// switch. The last row is the disabled state: the tier still decides the shape of the box, but the plate and\n// the check mark both step back.\nconst tiers: SurfaceThemeType[] = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"];\nconst selected = ref<CheckCardValue[]>(tiers.map(() => \"basic\"));\nconst disabled = ref<CheckCardValue>(\"basic\");\nconst items = [\n { value: \"basic\", title: \"Basic\", description: \"Essential features\" },\n { value: \"pro\", title: \"Pro\", description: \"Advanced capabilities\" },\n];\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 24px;\n}\n</style>"
4763
4858
  }
4764
4859
  ]
4765
4860
  },
@@ -4791,16 +4886,14 @@
4791
4886
  "description": "Appearance theme",
4792
4887
  "descriptionZh": "外观主题",
4793
4888
  "descriptionEn": "Appearance theme",
4794
- "type": "ThemeType",
4889
+ "type": "SurfaceThemeType",
4795
4890
  "boolean": false,
4796
4891
  "enumValues": [
4797
- "default",
4798
4892
  "fill",
4799
4893
  "outline",
4800
4894
  "plain",
4801
4895
  "solid",
4802
- "dashed",
4803
- "underlined"
4896
+ "dashed"
4804
4897
  ],
4805
4898
  "required": false,
4806
4899
  "defaultExpression": "\"outline\"",
@@ -4923,6 +5016,11 @@
4923
5016
  "title": "简洁模式",
4924
5017
  "file": "components/collapse/demo/sample.vue",
4925
5018
  "source": "<template>\n <div class=\"demo-collapse\">\n <Collapse v-model:openKeys=\"openKeys\" sample>\n <CollapsePanel title=\"Panel title\" key=\"1\">\n <div>{{ text }}</div>\n </CollapsePanel>\n <CollapsePanel title=\"Panel title\" key=\"2\">\n <div>{{ text }}</div>\n </CollapsePanel>\n <CollapsePanel title=\"Panel title\" key=\"3\">\n <div>{{ text }}</div>\n </CollapsePanel>\n </Collapse>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst openKeys = ref<Array<string | number>>([\"1\"]);\nconst text = `A long time ago, In a beautiful kingdom, \n there lived a young king and queen, \n the people loved them so much; `;\n</script>"
5019
+ },
5020
+ {
5021
+ "title": "外观",
5022
+ "file": "components/collapse/demo/appearance.vue",
5023
+ "source": "<template>\n <div class=\"demo-list\">\n <Collapse v-for=\"tier in tiers\" :key=\"tier\" :theme=\"tier\" :openKeys=\"['1']\">\n <CollapsePanel key=\"1\" :title=\"`theme: ${tier}`\">\n <div>{{ text }}</div>\n </CollapsePanel>\n <CollapsePanel key=\"2\" title=\"第二段\">\n <div>{{ text }}</div>\n </CollapsePanel>\n </Collapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// A collapse paints all five tiers and starts on `outline` rather than the `fill` the cards start on. The tier\n// lands on the panel heads: `solid` plates the head on the primary and flips its title, `dashed` puts the head\n// row behind a dashed edge, and `plain` leaves the rows with no box at all. Only the first panel of each group\n// is opened, so the head — the part that changes — is what the row reads as.\nconst tiers: SurfaceThemeType[] = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"];\nconst text = \"面板内容跟着面板自己的外观走,档位只决定它露出多少。\";\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 16px;\n}\n</style>"
4926
5024
  }
4927
5025
  ]
4928
5026
  },
@@ -5012,6 +5110,11 @@
5012
5110
  "title": "简洁模式",
5013
5111
  "file": "components/collapse/demo/sample.vue",
5014
5112
  "source": "<template>\n <div class=\"demo-collapse\">\n <Collapse v-model:openKeys=\"openKeys\" sample>\n <CollapsePanel title=\"Panel title\" key=\"1\">\n <div>{{ text }}</div>\n </CollapsePanel>\n <CollapsePanel title=\"Panel title\" key=\"2\">\n <div>{{ text }}</div>\n </CollapsePanel>\n <CollapsePanel title=\"Panel title\" key=\"3\">\n <div>{{ text }}</div>\n </CollapsePanel>\n </Collapse>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst openKeys = ref<Array<string | number>>([\"1\"]);\nconst text = `A long time ago, In a beautiful kingdom, \n there lived a young king and queen, \n the people loved them so much; `;\n</script>"
5113
+ },
5114
+ {
5115
+ "title": "外观",
5116
+ "file": "components/collapse/demo/appearance.vue",
5117
+ "source": "<template>\n <div class=\"demo-list\">\n <Collapse v-for=\"tier in tiers\" :key=\"tier\" :theme=\"tier\" :openKeys=\"['1']\">\n <CollapsePanel key=\"1\" :title=\"`theme: ${tier}`\">\n <div>{{ text }}</div>\n </CollapsePanel>\n <CollapsePanel key=\"2\" title=\"第二段\">\n <div>{{ text }}</div>\n </CollapsePanel>\n </Collapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// A collapse paints all five tiers and starts on `outline` rather than the `fill` the cards start on. The tier\n// lands on the panel heads: `solid` plates the head on the primary and flips its title, `dashed` puts the head\n// row behind a dashed edge, and `plain` leaves the rows with no box at all. Only the first panel of each group\n// is opened, so the head — the part that changes — is what the row reads as.\nconst tiers: SurfaceThemeType[] = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"];\nconst text = \"面板内容跟着面板自己的外观走,档位只决定它露出多少。\";\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 16px;\n}\n</style>"
5015
5118
  }
5016
5119
  ]
5017
5120
  },
@@ -5097,6 +5200,21 @@
5097
5200
  "defaultExpression": "\"click\"",
5098
5201
  "documented": true
5099
5202
  },
5203
+ {
5204
+ "name": "destroyOnClose",
5205
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
5206
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
5207
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
5208
+ "type": "boolean",
5209
+ "boolean": true,
5210
+ "enumValues": [
5211
+ false,
5212
+ true
5213
+ ],
5214
+ "required": false,
5215
+ "defaultExpression": "true",
5216
+ "documented": true
5217
+ },
5100
5218
  {
5101
5219
  "name": "mode",
5102
5220
  "description": "Color display type, provides 3 modes (`hex` , `rgb` ,`hsl`)",
@@ -5115,13 +5233,12 @@
5115
5233
  },
5116
5234
  {
5117
5235
  "name": "theme",
5118
- "description": "Appearance theme: `outline`, `fill`, or `plain`; inherits from Form when available",
5119
- "descriptionZh": "外观主题,支持 `outline`、`fill`、`plain`,未设置时可继承 Form",
5120
- "descriptionEn": "Appearance theme: `outline`, `fill`, or `plain`; inherits from Form when available",
5236
+ "description": "Theme; inherits from Form or ConfigProvider when unset",
5237
+ "descriptionZh": "主题,未设置时可继承 Form 或 ConfigProvider",
5238
+ "descriptionEn": "Theme; inherits from Form or ConfigProvider when unset",
5121
5239
  "type": "ThemeType",
5122
5240
  "boolean": false,
5123
5241
  "enumValues": [
5124
- "default",
5125
5242
  "fill",
5126
5243
  "outline",
5127
5244
  "plain",
@@ -5421,6 +5538,11 @@
5421
5538
  "prop": "endDate",
5422
5539
  "event": "update:endDate",
5423
5540
  "directive": "v-model:endDate"
5541
+ },
5542
+ {
5543
+ "prop": "opened",
5544
+ "event": "update:opened",
5545
+ "directive": "v-model:opened"
5424
5546
  }
5425
5547
  ],
5426
5548
  "tags": [
@@ -5454,12 +5576,27 @@
5454
5576
  "documented": true
5455
5577
  },
5456
5578
  {
5457
- "name": "mode",
5458
- "description": "Use the `mode` property to customize the date display type. Options: `year`, `month`, `date`, `time`, `dateTime`, `dateRange`, `dateTimeRange`",
5459
- "descriptionZh": "使用 `mode` 属性,可以自定义日期显示类型,提供 `year`、`month`、`date`、`time`、`dateTime`、`dateRange`、`dateTimeRange`",
5460
- "descriptionEn": "Use the `mode` property to customize the date display type. Options: `year`, `month`, `date`, `time`, `dateTime`, `dateRange`, `dateTimeRange`",
5461
- "type": "DatePickerModeType",
5462
- "boolean": false,
5579
+ "name": "destroyOnClose",
5580
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
5581
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
5582
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
5583
+ "type": "boolean",
5584
+ "boolean": true,
5585
+ "enumValues": [
5586
+ false,
5587
+ true
5588
+ ],
5589
+ "required": false,
5590
+ "defaultExpression": "true",
5591
+ "documented": true
5592
+ },
5593
+ {
5594
+ "name": "mode",
5595
+ "description": "Use the `mode` property to customize the date display type. Options: `year`, `month`, `date`, `time`, `dateTime`, `dateRange`, `dateTimeRange`",
5596
+ "descriptionZh": "使用 `mode` 属性,可以自定义日期显示类型,提供 `year`、`month`、`date`、`time`、`dateTime`、`dateRange`、`dateTimeRange`",
5597
+ "descriptionEn": "Use the `mode` property to customize the date display type. Options: `year`, `month`, `date`, `time`, `dateTime`, `dateRange`, `dateTimeRange`",
5598
+ "type": "DatePickerModeType",
5599
+ "boolean": false,
5463
5600
  "enumValues": [
5464
5601
  "time",
5465
5602
  "date",
@@ -5490,13 +5627,12 @@
5490
5627
  },
5491
5628
  {
5492
5629
  "name": "theme",
5493
- "description": "When theme='fill', presents a fill theme",
5494
- "descriptionZh": "theme='fill' 时呈现浅色主题",
5495
- "descriptionEn": "When theme='fill', presents a fill theme",
5630
+ "description": "Theme",
5631
+ "descriptionZh": "主题",
5632
+ "descriptionEn": "Theme",
5496
5633
  "type": "ThemeType",
5497
5634
  "boolean": false,
5498
5635
  "enumValues": [
5499
- "default",
5500
5636
  "fill",
5501
5637
  "outline",
5502
5638
  "plain",
@@ -5601,9 +5737,9 @@
5601
5737
  },
5602
5738
  {
5603
5739
  "name": "format",
5604
- "description": "Set the date format. When an array, supports multiple format matches, displayed according to the first one. Configuration reference http://day.js.org/",
5605
- "descriptionZh": "设置日期格式,为数组时支持多格式匹配,展示以第一个为准。配置参考 [dayjs](http://day.js.org/)",
5606
- "descriptionEn": "Set the date format. When an array, supports multiple format matches, displayed according to the first one. Configuration reference http://day.js.org/",
5740
+ "description": "Set the date format. A single format only: it drives both parsing and display, array format matching is not supported. Configuration reference http://day.js.org/",
5741
+ "descriptionZh": "设置日期格式,只接受单个格式(解析和展示都用它),不支持数组多格式匹配。配置参考 [dayjs](http://day.js.org/)",
5742
+ "descriptionEn": "Set the date format. A single format only: it drives both parsing and display, array format matching is not supported. Configuration reference http://day.js.org/",
5607
5743
  "type": "string",
5608
5744
  "boolean": false,
5609
5745
  "required": false,
@@ -5718,9 +5854,9 @@
5718
5854
  },
5719
5855
  {
5720
5856
  "name": "opened",
5721
- "description": "Whether the dropdown box is displayed by default",
5722
- "descriptionZh": "默认是否展示下拉框",
5723
- "descriptionEn": "Whether the dropdown box is displayed by default",
5857
+ "description": "Whether the dropdown box is shown, supports `v-model:opened`",
5858
+ "descriptionZh": "下拉框是否展示,支持 `v-model:opened`",
5859
+ "descriptionEn": "Whether the dropdown box is shown, supports `v-model:opened`",
5724
5860
  "type": "boolean | undefined",
5725
5861
  "boolean": true,
5726
5862
  "enumValues": [
@@ -5800,6 +5936,16 @@
5800
5936
  "boolean": false,
5801
5937
  "documented": true
5802
5938
  },
5939
+ {
5940
+ "name": "onUpdate:opened",
5941
+ "description": "Requests a new opened value (Whether the dropdown box is shown, supports `v-model:opened`); the payload is the new value. With v-model:opened, Vue synchronizes the binding automatically; no additional update handler is needed.",
5942
+ "descriptionZh": "请求更新 opened(下拉框是否展示,支持 `v-model:opened`),参数为更新后的值。使用 v-model:opened 时由 Vue 自动同步绑定值,无需另写更新处理器。",
5943
+ "descriptionEn": "Requests a new opened value (Whether the dropdown box is shown, supports `v-model:opened`); the payload is the new value. With v-model:opened, Vue synchronizes the binding automatically; no additional update handler is needed.",
5944
+ "type": "(open: boolean) => void",
5945
+ "eventName": "update:opened",
5946
+ "boolean": false,
5947
+ "documented": false
5948
+ },
5803
5949
  {
5804
5950
  "name": "onClear",
5805
5951
  "description": "Triggered when the clear button is clicked",
@@ -5847,6 +5993,13 @@
5847
5993
  "descriptionZh": "下拉框展开或收起时触发",
5848
5994
  "descriptionEn": "Triggered when the dropdown box expands or collapses"
5849
5995
  },
5996
+ {
5997
+ "name": "update:opened",
5998
+ "type": "(open: boolean) => void",
5999
+ "description": "Requests a new opened value (Whether the dropdown box is shown, supports `v-model:opened`); the payload is the new value. With v-model:opened, Vue synchronizes the binding automatically; no additional update handler is needed.",
6000
+ "descriptionZh": "请求更新 opened(下拉框是否展示,支持 `v-model:opened`),参数为更新后的值。使用 v-model:opened 时由 Vue 自动同步绑定值,无需另写更新处理器。",
6001
+ "descriptionEn": "Requests a new opened value (Whether the dropdown box is shown, supports `v-model:opened`); the payload is the new value. With v-model:opened, Vue synchronizes the binding automatically; no additional update handler is needed."
6002
+ },
5850
6003
  {
5851
6004
  "name": "clear",
5852
6005
  "type": "() => void",
@@ -6159,10 +6312,10 @@
6159
6312
  "documented": true
6160
6313
  },
6161
6314
  {
6162
- "name": "footer",
6163
- "description": "Whether to show the footer; the slot with the same name customizes its content",
6164
- "descriptionZh": "是否显示页脚,也可通过同名插槽自定义页脚内容",
6165
- "descriptionEn": "Whether to show the footer; the slot with the same name customizes its content",
6315
+ "name": "destroyOnClose",
6316
+ "description": "Whether to destroy drawer content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened drawer",
6317
+ "descriptionZh": "关闭后是否销毁抽屉内容。默认销毁(重开时重新挂载);设为 false 可保留抽屉内已填写的表单状态,代价是打开过的抽屉留一份隐藏 DOM",
6318
+ "descriptionEn": "Whether to destroy drawer content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened drawer",
6166
6319
  "type": "boolean",
6167
6320
  "boolean": true,
6168
6321
  "enumValues": [
@@ -6174,14 +6327,18 @@
6174
6327
  "documented": true
6175
6328
  },
6176
6329
  {
6177
- "name": "title",
6178
- "description": "Drawer title",
6179
- "descriptionZh": "抽屉标题",
6180
- "descriptionEn": "Drawer title",
6181
- "type": "string",
6182
- "boolean": false,
6330
+ "name": "footer",
6331
+ "description": "Whether to show the footer; the slot with the same name customizes its content",
6332
+ "descriptionZh": "是否显示页脚,也可通过同名插槽自定义页脚内容",
6333
+ "descriptionEn": "Whether to show the footer; the slot with the same name customizes its content",
6334
+ "type": "boolean",
6335
+ "boolean": true,
6336
+ "enumValues": [
6337
+ false,
6338
+ true
6339
+ ],
6183
6340
  "required": false,
6184
- "defaultExpression": "\"Title\"",
6341
+ "defaultExpression": "true",
6185
6342
  "documented": true
6186
6343
  },
6187
6344
  {
@@ -6252,9 +6409,9 @@
6252
6409
  },
6253
6410
  {
6254
6411
  "name": "maskClosable",
6255
- "description": "Whether clicking the mask allows closing",
6256
- "descriptionZh": "点击蒙层是否允许关闭",
6257
- "descriptionEn": "Whether clicking the mask allows closing",
6412
+ "description": "Whether clicking the mask closes the drawer (mask only; Esc is gated by `escKey`)",
6413
+ "descriptionZh": "是否点击遮罩关闭抽屉(只管遮罩,Esc 由 `escKey` 控制)",
6414
+ "descriptionEn": "Whether clicking the mask closes the drawer (mask only; Esc is gated by `escKey`)",
6258
6415
  "type": "boolean",
6259
6416
  "boolean": true,
6260
6417
  "enumValues": [
@@ -6305,6 +6462,17 @@
6305
6462
  "required": false,
6306
6463
  "documented": true
6307
6464
  },
6465
+ {
6466
+ "name": "title",
6467
+ "description": "Drawer title; accepts a VNode as well as text, and rich content can go through the `title` slot. With no title text the header bar stays (the top-right close button lives in it); it is only dropped when `closable` is also off",
6468
+ "descriptionZh": "抽屉标题,字符串之外可给 VNode;富内容也可以走 `title` 插槽。没有标题文本时标题栏仍在(右上角关闭按钮住在里面),`closable: false` 且没有标题才整条不收",
6469
+ "descriptionEn": "Drawer title; accepts a VNode as well as text, and rich content can go through the `title` slot. With no title text the header bar stays (the top-right close button lives in it); it is only dropped when `closable` is also off",
6470
+ "type": "VNodeChild",
6471
+ "boolean": false,
6472
+ "required": false,
6473
+ "defaultExpression": "undefined",
6474
+ "documented": true
6475
+ },
6308
6476
  {
6309
6477
  "name": "modelValue",
6310
6478
  "description": "Whether the dialog is displayed, can use v-model for two-way binding.",
@@ -6352,9 +6520,9 @@
6352
6520
  },
6353
6521
  {
6354
6522
  "name": "onOpenChange",
6355
- "description": "Callback for opening or closing the drawer",
6356
- "descriptionZh": "打开或抽屉关闭的回调",
6357
- "descriptionEn": "Callback for opening or closing the drawer",
6523
+ "description": "Fires when the drawer closes; opening is your own `v-model`, so it is never echoed back",
6524
+ "descriptionZh": "抽屉关闭时的回调;打开由 `v-model` 决定,不会回写一次",
6525
+ "descriptionEn": "Fires when the drawer closes; opening is your own `v-model`, so it is never echoed back",
6358
6526
  "type": "(visible: boolean) => void",
6359
6527
  "eventName": "openChange",
6360
6528
  "boolean": false,
@@ -6402,9 +6570,9 @@
6402
6570
  {
6403
6571
  "name": "openChange",
6404
6572
  "type": "(visible: boolean) => void",
6405
- "description": "Callback for opening or closing the drawer",
6406
- "descriptionZh": "打开或抽屉关闭的回调",
6407
- "descriptionEn": "Callback for opening or closing the drawer"
6573
+ "description": "Fires when the drawer closes; opening is your own `v-model`, so it is never echoed back",
6574
+ "descriptionZh": "抽屉关闭时的回调;打开由 `v-model` 决定,不会回写一次",
6575
+ "descriptionEn": "Fires when the drawer closes; opening is your own `v-model`, so it is never echoed back"
6408
6576
  },
6409
6577
  {
6410
6578
  "name": "ok",
@@ -6525,6 +6693,21 @@
6525
6693
  "defaultExpression": "false",
6526
6694
  "documented": true
6527
6695
  },
6696
+ {
6697
+ "name": "destroyOnClose",
6698
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
6699
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
6700
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
6701
+ "type": "boolean",
6702
+ "boolean": true,
6703
+ "enumValues": [
6704
+ false,
6705
+ true
6706
+ ],
6707
+ "required": false,
6708
+ "defaultExpression": "true",
6709
+ "documented": true
6710
+ },
6528
6711
  {
6529
6712
  "name": "target",
6530
6713
  "description": "Ref of an external trigger element or component",
@@ -6673,6 +6856,21 @@
6673
6856
  "defaultExpression": "\"bottom-right\"",
6674
6857
  "documented": true
6675
6858
  },
6859
+ {
6860
+ "name": "destroyOnClose",
6861
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
6862
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
6863
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
6864
+ "type": "boolean",
6865
+ "boolean": true,
6866
+ "enumValues": [
6867
+ false,
6868
+ true
6869
+ ],
6870
+ "required": false,
6871
+ "defaultExpression": "true",
6872
+ "documented": true
6873
+ },
6676
6874
  {
6677
6875
  "name": "disabled",
6678
6876
  "description": "Whether the button is disabled",
@@ -6687,6 +6885,21 @@
6687
6885
  "required": false,
6688
6886
  "documented": true
6689
6887
  },
6888
+ {
6889
+ "name": "trigger",
6890
+ "description": "Trigger mode",
6891
+ "descriptionZh": "触发方式",
6892
+ "descriptionEn": "Trigger mode",
6893
+ "type": "TriggerType | undefined",
6894
+ "boolean": false,
6895
+ "enumValues": [
6896
+ "hover",
6897
+ "click",
6898
+ "contextmenu"
6899
+ ],
6900
+ "required": false,
6901
+ "documented": true
6902
+ },
6690
6903
  {
6691
6904
  "name": "arrow",
6692
6905
  "description": "Whether to display the dropdown arrow",
@@ -6713,19 +6926,17 @@
6713
6926
  },
6714
6927
  {
6715
6928
  "name": "theme",
6716
- "description": "Button theme",
6717
- "descriptionZh": "按钮主题",
6718
- "descriptionEn": "Button theme",
6719
- "type": "ThemeType | undefined",
6929
+ "description": "Button theme; `fill` / `outline` / `plain` / `solid` / `dashed` are drawn. Leaving `theme` unset keeps the button's own look, and `underlined` belongs to controls you type into, so a button never draws an underline",
6930
+ "descriptionZh": "按钮主题,可用 `fill` / `outline` / `plain` / `solid` / `dashed`;不写 `theme` 就是按钮自身的外观,`underlined` 是给可输入的控件用的,按钮不会画下划线",
6931
+ "descriptionEn": "Button theme; `fill` / `outline` / `plain` / `solid` / `dashed` are drawn. Leaving `theme` unset keeps the button's own look, and `underlined` belongs to controls you type into, so a button never draws an underline",
6932
+ "type": "SurfaceThemeType | undefined",
6720
6933
  "boolean": false,
6721
6934
  "enumValues": [
6722
- "default",
6723
6935
  "fill",
6724
6936
  "outline",
6725
6937
  "plain",
6726
6938
  "solid",
6727
- "dashed",
6728
- "underlined"
6939
+ "dashed"
6729
6940
  ],
6730
6941
  "required": false,
6731
6942
  "documented": true
@@ -7072,13 +7283,12 @@
7072
7283
  },
7073
7284
  {
7074
7285
  "name": "theme",
7075
- "description": "The component renders the theme",
7076
- "descriptionZh": "组件呈现主题",
7077
- "descriptionEn": "The component renders the theme",
7286
+ "description": "Child control theme",
7287
+ "descriptionZh": "子控件主题",
7288
+ "descriptionEn": "Child control theme",
7078
7289
  "type": "ThemeType | undefined",
7079
7290
  "boolean": false,
7080
7291
  "enumValues": [
7081
- "default",
7082
7292
  "fill",
7083
7293
  "outline",
7084
7294
  "plain",
@@ -7091,9 +7301,9 @@
7091
7301
  },
7092
7302
  {
7093
7303
  "name": "shape",
7094
- "description": "Child component shape",
7095
- "descriptionZh": "子组件的形状",
7096
- "descriptionEn": "Child component shape",
7304
+ "description": "Child control shape",
7305
+ "descriptionZh": "子控件形状",
7306
+ "descriptionEn": "Child control shape",
7097
7307
  "type": "ShapeType | undefined",
7098
7308
  "boolean": false,
7099
7309
  "enumValues": [
@@ -7121,9 +7331,9 @@
7121
7331
  },
7122
7332
  {
7123
7333
  "name": "size",
7124
- "description": "Sub component size",
7125
- "descriptionZh": "子组件的尺寸",
7126
- "descriptionEn": "Sub component size",
7334
+ "description": "Child control size",
7335
+ "descriptionZh": "子控件尺寸",
7336
+ "descriptionEn": "Child control size",
7127
7337
  "type": "SizeType | undefined",
7128
7338
  "boolean": false,
7129
7339
  "enumValues": [
@@ -7708,17 +7918,6 @@
7708
7918
  "defaultExpression": "1",
7709
7919
  "documented": true
7710
7920
  },
7711
- {
7712
- "name": "rowSpan",
7713
- "description": "Number of rows occupied",
7714
- "descriptionZh": "占据的行数。配合 `autoRows` 可实现非对称布局",
7715
- "descriptionEn": "Number of rows occupied",
7716
- "type": "GridResponsive<number> | undefined",
7717
- "boolean": false,
7718
- "required": false,
7719
- "defaultExpression": "1",
7720
- "documented": true
7721
- },
7722
7921
  {
7723
7922
  "name": "suffix",
7724
7923
  "description": "Place the item at the end of the explicit grid",
@@ -7734,6 +7933,17 @@
7734
7933
  "defaultExpression": "false",
7735
7934
  "documented": true
7736
7935
  },
7936
+ {
7937
+ "name": "rowSpan",
7938
+ "description": "Number of rows occupied",
7939
+ "descriptionZh": "占据的行数。配合 `autoRows` 可实现非对称布局",
7940
+ "descriptionEn": "Number of rows occupied",
7941
+ "type": "GridResponsive<number> | undefined",
7942
+ "boolean": false,
7943
+ "required": false,
7944
+ "defaultExpression": "1",
7945
+ "documented": true
7946
+ },
7737
7947
  {
7738
7948
  "name": "columnStart",
7739
7949
  "description": "Explicit starting column line",
@@ -7815,16 +8025,14 @@
7815
8025
  "description": "Appearance theme",
7816
8026
  "descriptionZh": "外观主题",
7817
8027
  "descriptionEn": "Appearance theme",
7818
- "type": "ThemeType",
8028
+ "type": "SurfaceThemeType",
7819
8029
  "boolean": false,
7820
8030
  "enumValues": [
7821
- "default",
7822
8031
  "fill",
7823
8032
  "outline",
7824
8033
  "plain",
7825
8034
  "solid",
7826
- "dashed",
7827
- "underlined"
8035
+ "dashed"
7828
8036
  ],
7829
8037
  "required": false,
7830
8038
  "defaultExpression": "\"plain\"",
@@ -8013,6 +8221,11 @@
8013
8221
  "title": "扩展",
8014
8222
  "file": "components/image/demo/extra.vue",
8015
8223
  "source": "<template>\n <Space vertical>\n <Image\n :width=\"120\"\n :height=\"120\"\n src=\"https://cdn.chuchur.com/upload/demo/test_300.jpg\"\n @close=\"close\"\n ref=\"imgRef\"\n >\n <template #tool>\n <Icon :type=\"Heart\" color=\"#3a95ff\" @click=\"togglePanel\" />\n <Icon :type=\"Star\" color=\"#3a95ff\" @click=\"togglePanel\" />\n </template>\n <template #panel>\n <div>Some thing here.</div>\n </template>\n </Image>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Star } from \"kui-icons\";\nimport { message } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst imgRef = ref();\n\nconst close = () => {\n message.info(\"close\");\n};\nconst togglePanel = () => {\n imgRef.value.togglePanel();\n};\n</script>"
8224
+ },
8225
+ {
8226
+ "title": "外观",
8227
+ "file": "components/image/demo/appearance.vue",
8228
+ "source": "<template>\n <Space wrap>\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <Image :width=\"104\" :height=\"104\" :theme=\"tier\" src=\"https://cdn.chuchur.com/upload/demo/test_300.jpg\" />\n <code>theme: {{ tier }}</code>\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// An image is a frame around a picture, so the tier lands on the frame: `fill` gives it a plate, `outline` and\n// `dashed` put a solid or dashed edge around it, `solid` plates the frame on the primary, and `plain` — the\n// image's own look — leaves the picture alone. Listed from `plain` because that is what an image does when\n// nobody writes a theme.\nconst tiers: SurfaceThemeType[] = [\"plain\", \"fill\", \"outline\", \"solid\", \"dashed\"];\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 8px;\n justify-items: center;\n}\n</style>"
8016
8229
  }
8017
8230
  ]
8018
8231
  },
@@ -8066,6 +8279,11 @@
8066
8279
  "title": "扩展",
8067
8280
  "file": "components/image/demo/extra.vue",
8068
8281
  "source": "<template>\n <Space vertical>\n <Image\n :width=\"120\"\n :height=\"120\"\n src=\"https://cdn.chuchur.com/upload/demo/test_300.jpg\"\n @close=\"close\"\n ref=\"imgRef\"\n >\n <template #tool>\n <Icon :type=\"Heart\" color=\"#3a95ff\" @click=\"togglePanel\" />\n <Icon :type=\"Star\" color=\"#3a95ff\" @click=\"togglePanel\" />\n </template>\n <template #panel>\n <div>Some thing here.</div>\n </template>\n </Image>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Star } from \"kui-icons\";\nimport { message } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst imgRef = ref();\n\nconst close = () => {\n message.info(\"close\");\n};\nconst togglePanel = () => {\n imgRef.value.togglePanel();\n};\n</script>"
8282
+ },
8283
+ {
8284
+ "title": "外观",
8285
+ "file": "components/image/demo/appearance.vue",
8286
+ "source": "<template>\n <Space wrap>\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <Image :width=\"104\" :height=\"104\" :theme=\"tier\" src=\"https://cdn.chuchur.com/upload/demo/test_300.jpg\" />\n <code>theme: {{ tier }}</code>\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// An image is a frame around a picture, so the tier lands on the frame: `fill` gives it a plate, `outline` and\n// `dashed` put a solid or dashed edge around it, `solid` plates the frame on the primary, and `plain` — the\n// image's own look — leaves the picture alone. Listed from `plain` because that is what an image does when\n// nobody writes a theme.\nconst tiers: SurfaceThemeType[] = [\"plain\", \"fill\", \"outline\", \"solid\", \"dashed\"];\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 8px;\n justify-items: center;\n}\n</style>"
8069
8287
  }
8070
8288
  ]
8071
8289
  },
@@ -8105,6 +8323,16 @@
8105
8323
  "required": false,
8106
8324
  "documented": true
8107
8325
  },
8326
+ {
8327
+ "name": "role",
8328
+ "description": "Accessibility role",
8329
+ "descriptionZh": "无障碍角色",
8330
+ "descriptionEn": "Accessibility role",
8331
+ "type": "string | undefined",
8332
+ "boolean": false,
8333
+ "required": false,
8334
+ "documented": true
8335
+ },
8108
8336
  {
8109
8337
  "name": "onKeydown",
8110
8338
  "description": "Called when a key is pressed",
@@ -8168,16 +8396,6 @@
8168
8396
  "required": false,
8169
8397
  "documented": true
8170
8398
  },
8171
- {
8172
- "name": "role",
8173
- "description": "Accessibility role",
8174
- "descriptionZh": "无障碍角色",
8175
- "descriptionEn": "Accessibility role",
8176
- "type": "string | undefined",
8177
- "boolean": false,
8178
- "required": false,
8179
- "documented": true
8180
- },
8181
8399
  {
8182
8400
  "name": "aria-label",
8183
8401
  "description": "Accessible label",
@@ -8307,13 +8525,12 @@
8307
8525
  },
8308
8526
  {
8309
8527
  "name": "theme",
8310
- "description": "The theme of Input",
8528
+ "description": "Theme",
8311
8529
  "descriptionZh": "主题",
8312
- "descriptionEn": "The theme of Input",
8530
+ "descriptionEn": "Theme",
8313
8531
  "type": "ThemeType | undefined",
8314
8532
  "boolean": false,
8315
8533
  "enumValues": [
8316
- "default",
8317
8534
  "fill",
8318
8535
  "outline",
8319
8536
  "plain",
@@ -8430,17 +8647,22 @@
8430
8647
  "documented": true
8431
8648
  },
8432
8649
  {
8433
- "name": "size",
8434
- "description": "Spacing of child components, optional values `small`, `large`, default not selected",
8435
- "descriptionZh": "子组件的间距,可选值 `small`、`large`,默认不选",
8436
- "descriptionEn": "Spacing of child components, optional values `small`, `large`, default not selected",
8437
- "type": "\"small\" | \"medium\" | \"large\" | undefined",
8650
+ "name": "addonBefore",
8651
+ "description": "Addon before the input; complex content can use the named slot",
8652
+ "descriptionZh": "输入框外部前置附件,复杂内容可使用同名插槽",
8653
+ "descriptionEn": "Addon before the input; complex content can use the named slot",
8654
+ "type": "VNodeChild",
8655
+ "boolean": false,
8656
+ "required": false,
8657
+ "documented": true
8658
+ },
8659
+ {
8660
+ "name": "addonAfter",
8661
+ "description": "Addon after the input; complex content can use the named slot",
8662
+ "descriptionZh": "输入框外部后置附件,复杂内容可使用同名插槽",
8663
+ "descriptionEn": "Addon after the input; complex content can use the named slot",
8664
+ "type": "VNodeChild",
8438
8665
  "boolean": false,
8439
- "enumValues": [
8440
- "small",
8441
- "medium",
8442
- "large"
8443
- ],
8444
8666
  "required": false,
8445
8667
  "documented": true
8446
8668
  },
@@ -8465,22 +8687,17 @@
8465
8687
  "documented": true
8466
8688
  },
8467
8689
  {
8468
- "name": "addonBefore",
8469
- "description": "Addon before the input; complex content can use the named slot",
8470
- "descriptionZh": "输入框外部前置附件,复杂内容可使用同名插槽",
8471
- "descriptionEn": "Addon before the input; complex content can use the named slot",
8472
- "type": "VNodeChild",
8473
- "boolean": false,
8474
- "required": false,
8475
- "documented": true
8476
- },
8477
- {
8478
- "name": "addonAfter",
8479
- "description": "Addon after the input; complex content can use the named slot",
8480
- "descriptionZh": "输入框外部后置附件,复杂内容可使用同名插槽",
8481
- "descriptionEn": "Addon after the input; complex content can use the named slot",
8482
- "type": "VNodeChild",
8690
+ "name": "size",
8691
+ "description": "Spacing of child components, optional values `small`, `large`, default not selected",
8692
+ "descriptionZh": "子组件的间距,可选值 `small`、`large`,默认不选",
8693
+ "descriptionEn": "Spacing of child components, optional values `small`, `large`, default not selected",
8694
+ "type": "\"small\" | \"medium\" | \"large\" | undefined",
8483
8695
  "boolean": false,
8696
+ "enumValues": [
8697
+ "small",
8698
+ "medium",
8699
+ "large"
8700
+ ],
8484
8701
  "required": false,
8485
8702
  "documented": true
8486
8703
  },
@@ -8613,7 +8830,32 @@
8613
8830
  "descriptionEn": "Emitted with the native FocusEvent when the input loses focus; the form context also processes blur validation."
8614
8831
  }
8615
8832
  ],
8616
- "slots": [],
8833
+ "slots": [
8834
+ {
8835
+ "name": "prefix",
8836
+ "description": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set.",
8837
+ "descriptionZh": "输入框内部前缀,与 `prefix` 属性等效;两者同时提供时以插槽为准。",
8838
+ "descriptionEn": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set."
8839
+ },
8840
+ {
8841
+ "name": "suffix",
8842
+ "description": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set.",
8843
+ "descriptionZh": "输入框内部后缀,与 `suffix` 属性等效;两者同时提供时以插槽为准。",
8844
+ "descriptionEn": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set."
8845
+ },
8846
+ {
8847
+ "name": "addonBefore",
8848
+ "description": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set.",
8849
+ "descriptionZh": "输入框外部前置附件,与 `addonBefore` 属性等效;两者同时提供时以插槽为准。",
8850
+ "descriptionEn": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set."
8851
+ },
8852
+ {
8853
+ "name": "addonAfter",
8854
+ "description": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set.",
8855
+ "descriptionZh": "输入框外部后置附件,与 `addonAfter` 属性等效;两者同时提供时以插槽为准。",
8856
+ "descriptionEn": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set."
8857
+ }
8858
+ ],
8617
8859
  "examples": [
8618
8860
  {
8619
8861
  "title": "基本用法",
@@ -8623,7 +8865,7 @@
8623
8865
  {
8624
8866
  "title": "主题",
8625
8867
  "file": "components/input/demo/theme.vue",
8626
- "source": "<template>\n <Space vertical block>\n <Checkbox label=\"Circle\" v-model=\"isCircle\" @change=\"setShape\" />\n <Input placeholder=\"Please input\" :shape=\"shape\" />\n <Input placeholder=\"Disabled\" disabled :shape=\"shape\" />\n <Input placeholder=\"Please input\" :icon=\"Search\" :shape=\"shape\" />\n <Input placeholder=\"theme='outline'\" theme=\"outline\" :shape=\"shape\" />\n <Input placeholder=\"theme='plain'\" theme=\"plain\" :shape=\"shape\" />\n <Input placeholder=\"Please input\" :clearable=\"false\" :shape=\"shape\" @search=\"onSearch\" />\n <TextArea placeholder=\"theme='plain'\" theme=\"plain\" :rows=\"3\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport { message, type ChangeEvent } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst isCircle = ref();\nconst shape = ref();\nconst setShape = ({ checked }: ChangeEvent) => {\n shape.value = checked ? \"circle\" : null;\n};\nconst onSearch = (value: string) => {\n message.info(`Search: ${value}`);\n};\n</script>"
8868
+ "source": "<template>\n <Space vertical block>\n <Checkbox label=\"Circle\" v-model=\"isCircle\" @change=\"setShape\" />\n <Input placeholder=\"Please input\" :shape=\"shape\" />\n <Input placeholder=\"Disabled\" disabled :shape=\"shape\" />\n <Input placeholder=\"Please input\" :icon=\"Search\" :shape=\"shape\" />\n <Input placeholder=\"Please input\" :clearable=\"false\" :shape=\"shape\" @search=\"onSearch\" />\n <br />\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <code>theme: {{ tier }}</code>\n <TextArea :theme=\"tier\" :rows=\"2\" placeholder=\"Please input\" />\n <Input :theme=\"tier\" prefix=\"https://\" placeholder=\"Please input\" />\n </div>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport { message, type ChangeEvent, type ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// An input paints all six tiers, and the tier lands on the box itself: `fill` — what it does when nobody\n// writes a theme — plates it, `outline` and `dashed` put a solid or dashed edge on it instead, `plain` leaves\n// it bare, `solid` plates it on the primary and inverts the typed text, the placeholder and the icons, and\n// `underlined` keeps only the bottom rule. A text area and an input with an addon are drawn from the same\n// arms, so they take the same tiers. The addon is the group's own surface: a group that is not `fill` borders\n// the addon it wraps, which is why the second row of each pair reads differently from the first.\nconst tiers: ThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\", \"underlined\"];\n\nconst isCircle = ref();\nconst shape = ref();\nconst setShape = ({ checked }: ChangeEvent) => {\n shape.value = checked ? \"circle\" : null;\n};\nconst onSearch = (value: string) => {\n message.info(`Search: ${value}`);\n};\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 4px;\n}\n</style>"
8627
8869
  },
8628
8870
  {
8629
8871
  "title": "带图标",
@@ -8672,26 +8914,6 @@
8672
8914
  "children": [],
8673
8915
  "documentation": "https://k-ui.cn/components/input",
8674
8916
  "props": [
8675
- {
8676
- "name": "theme",
8677
- "description": "Textarea theme",
8678
- "descriptionZh": "文本域主题",
8679
- "descriptionEn": "Textarea theme",
8680
- "type": "ThemeType",
8681
- "boolean": false,
8682
- "enumValues": [
8683
- "default",
8684
- "fill",
8685
- "outline",
8686
- "plain",
8687
- "solid",
8688
- "dashed",
8689
- "underlined"
8690
- ],
8691
- "required": false,
8692
- "defaultExpression": "\"fill\"",
8693
- "documented": true
8694
- },
8695
8917
  {
8696
8918
  "name": "block",
8697
8919
  "description": "Whether to inherit the parent width",
@@ -8722,6 +8944,24 @@
8722
8944
  "defaultExpression": "true",
8723
8945
  "documented": true
8724
8946
  },
8947
+ {
8948
+ "name": "theme",
8949
+ "description": "Textarea theme",
8950
+ "descriptionZh": "文本域主题",
8951
+ "descriptionEn": "Textarea theme",
8952
+ "type": "ThemeType | undefined",
8953
+ "boolean": false,
8954
+ "enumValues": [
8955
+ "fill",
8956
+ "outline",
8957
+ "plain",
8958
+ "solid",
8959
+ "dashed",
8960
+ "underlined"
8961
+ ],
8962
+ "required": false,
8963
+ "documented": true
8964
+ },
8725
8965
  {
8726
8966
  "name": "size",
8727
8967
  "description": "Spacing of child components, optional values `small`, `large`, default not selected",
@@ -8734,7 +8974,32 @@
8734
8974
  }
8735
8975
  ],
8736
8976
  "events": [],
8737
- "slots": [],
8977
+ "slots": [
8978
+ {
8979
+ "name": "prefix",
8980
+ "description": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set.",
8981
+ "descriptionZh": "输入框内部前缀,与 `prefix` 属性等效;两者同时提供时以插槽为准。",
8982
+ "descriptionEn": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set."
8983
+ },
8984
+ {
8985
+ "name": "suffix",
8986
+ "description": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set.",
8987
+ "descriptionZh": "输入框内部后缀,与 `suffix` 属性等效;两者同时提供时以插槽为准。",
8988
+ "descriptionEn": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set."
8989
+ },
8990
+ {
8991
+ "name": "addonBefore",
8992
+ "description": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set.",
8993
+ "descriptionZh": "输入框外部前置附件,与 `addonBefore` 属性等效;两者同时提供时以插槽为准。",
8994
+ "descriptionEn": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set."
8995
+ },
8996
+ {
8997
+ "name": "addonAfter",
8998
+ "description": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set.",
8999
+ "descriptionZh": "输入框外部后置附件,与 `addonAfter` 属性等效;两者同时提供时以插槽为准。",
9000
+ "descriptionEn": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set."
9001
+ }
9002
+ ],
8738
9003
  "examples": [
8739
9004
  {
8740
9005
  "title": "基本用法",
@@ -8744,7 +9009,7 @@
8744
9009
  {
8745
9010
  "title": "主题",
8746
9011
  "file": "components/input/demo/theme.vue",
8747
- "source": "<template>\n <Space vertical block>\n <Checkbox label=\"Circle\" v-model=\"isCircle\" @change=\"setShape\" />\n <Input placeholder=\"Please input\" :shape=\"shape\" />\n <Input placeholder=\"Disabled\" disabled :shape=\"shape\" />\n <Input placeholder=\"Please input\" :icon=\"Search\" :shape=\"shape\" />\n <Input placeholder=\"theme='outline'\" theme=\"outline\" :shape=\"shape\" />\n <Input placeholder=\"theme='plain'\" theme=\"plain\" :shape=\"shape\" />\n <Input placeholder=\"Please input\" :clearable=\"false\" :shape=\"shape\" @search=\"onSearch\" />\n <TextArea placeholder=\"theme='plain'\" theme=\"plain\" :rows=\"3\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport { message, type ChangeEvent } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst isCircle = ref();\nconst shape = ref();\nconst setShape = ({ checked }: ChangeEvent) => {\n shape.value = checked ? \"circle\" : null;\n};\nconst onSearch = (value: string) => {\n message.info(`Search: ${value}`);\n};\n</script>"
9012
+ "source": "<template>\n <Space vertical block>\n <Checkbox label=\"Circle\" v-model=\"isCircle\" @change=\"setShape\" />\n <Input placeholder=\"Please input\" :shape=\"shape\" />\n <Input placeholder=\"Disabled\" disabled :shape=\"shape\" />\n <Input placeholder=\"Please input\" :icon=\"Search\" :shape=\"shape\" />\n <Input placeholder=\"Please input\" :clearable=\"false\" :shape=\"shape\" @search=\"onSearch\" />\n <br />\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <code>theme: {{ tier }}</code>\n <TextArea :theme=\"tier\" :rows=\"2\" placeholder=\"Please input\" />\n <Input :theme=\"tier\" prefix=\"https://\" placeholder=\"Please input\" />\n </div>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport { message, type ChangeEvent, type ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// An input paints all six tiers, and the tier lands on the box itself: `fill` — what it does when nobody\n// writes a theme — plates it, `outline` and `dashed` put a solid or dashed edge on it instead, `plain` leaves\n// it bare, `solid` plates it on the primary and inverts the typed text, the placeholder and the icons, and\n// `underlined` keeps only the bottom rule. A text area and an input with an addon are drawn from the same\n// arms, so they take the same tiers. The addon is the group's own surface: a group that is not `fill` borders\n// the addon it wraps, which is why the second row of each pair reads differently from the first.\nconst tiers: ThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\", \"underlined\"];\n\nconst isCircle = ref();\nconst shape = ref();\nconst setShape = ({ checked }: ChangeEvent) => {\n shape.value = checked ? \"circle\" : null;\n};\nconst onSearch = (value: string) => {\n message.info(`Search: ${value}`);\n};\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 4px;\n}\n</style>"
8748
9013
  },
8749
9014
  {
8750
9015
  "title": "带图标",
@@ -8807,7 +9072,6 @@
8807
9072
  "type": "ThemeType | undefined",
8808
9073
  "boolean": false,
8809
9074
  "enumValues": [
8810
- "default",
8811
9075
  "fill",
8812
9076
  "outline",
8813
9077
  "plain",
@@ -8976,7 +9240,32 @@
8976
9240
  "descriptionEn": "Emitted with the native Event on text input; change and the v-model update event provide the new string value."
8977
9241
  }
8978
9242
  ],
8979
- "slots": [],
9243
+ "slots": [
9244
+ {
9245
+ "name": "prefix",
9246
+ "description": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set.",
9247
+ "descriptionZh": "输入框内部前缀,与 `prefix` 属性等效;两者同时提供时以插槽为准。",
9248
+ "descriptionEn": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set."
9249
+ },
9250
+ {
9251
+ "name": "suffix",
9252
+ "description": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set.",
9253
+ "descriptionZh": "输入框内部后缀,与 `suffix` 属性等效;两者同时提供时以插槽为准。",
9254
+ "descriptionEn": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set."
9255
+ },
9256
+ {
9257
+ "name": "addonBefore",
9258
+ "description": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set.",
9259
+ "descriptionZh": "输入框外部前置附件,与 `addonBefore` 属性等效;两者同时提供时以插槽为准。",
9260
+ "descriptionEn": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set."
9261
+ },
9262
+ {
9263
+ "name": "addonAfter",
9264
+ "description": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set.",
9265
+ "descriptionZh": "输入框外部后置附件,与 `addonAfter` 属性等效;两者同时提供时以插槽为准。",
9266
+ "descriptionEn": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set."
9267
+ }
9268
+ ],
8980
9269
  "examples": [
8981
9270
  {
8982
9271
  "title": "基本用法",
@@ -8986,7 +9275,7 @@
8986
9275
  {
8987
9276
  "title": "主题",
8988
9277
  "file": "components/input/demo/theme.vue",
8989
- "source": "<template>\n <Space vertical block>\n <Checkbox label=\"Circle\" v-model=\"isCircle\" @change=\"setShape\" />\n <Input placeholder=\"Please input\" :shape=\"shape\" />\n <Input placeholder=\"Disabled\" disabled :shape=\"shape\" />\n <Input placeholder=\"Please input\" :icon=\"Search\" :shape=\"shape\" />\n <Input placeholder=\"theme='outline'\" theme=\"outline\" :shape=\"shape\" />\n <Input placeholder=\"theme='plain'\" theme=\"plain\" :shape=\"shape\" />\n <Input placeholder=\"Please input\" :clearable=\"false\" :shape=\"shape\" @search=\"onSearch\" />\n <TextArea placeholder=\"theme='plain'\" theme=\"plain\" :rows=\"3\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport { message, type ChangeEvent } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst isCircle = ref();\nconst shape = ref();\nconst setShape = ({ checked }: ChangeEvent) => {\n shape.value = checked ? \"circle\" : null;\n};\nconst onSearch = (value: string) => {\n message.info(`Search: ${value}`);\n};\n</script>"
9278
+ "source": "<template>\n <Space vertical block>\n <Checkbox label=\"Circle\" v-model=\"isCircle\" @change=\"setShape\" />\n <Input placeholder=\"Please input\" :shape=\"shape\" />\n <Input placeholder=\"Disabled\" disabled :shape=\"shape\" />\n <Input placeholder=\"Please input\" :icon=\"Search\" :shape=\"shape\" />\n <Input placeholder=\"Please input\" :clearable=\"false\" :shape=\"shape\" @search=\"onSearch\" />\n <br />\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <code>theme: {{ tier }}</code>\n <TextArea :theme=\"tier\" :rows=\"2\" placeholder=\"Please input\" />\n <Input :theme=\"tier\" prefix=\"https://\" placeholder=\"Please input\" />\n </div>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport { message, type ChangeEvent, type ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// An input paints all six tiers, and the tier lands on the box itself: `fill` — what it does when nobody\n// writes a theme — plates it, `outline` and `dashed` put a solid or dashed edge on it instead, `plain` leaves\n// it bare, `solid` plates it on the primary and inverts the typed text, the placeholder and the icons, and\n// `underlined` keeps only the bottom rule. A text area and an input with an addon are drawn from the same\n// arms, so they take the same tiers. The addon is the group's own surface: a group that is not `fill` borders\n// the addon it wraps, which is why the second row of each pair reads differently from the first.\nconst tiers: ThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\", \"underlined\"];\n\nconst isCircle = ref();\nconst shape = ref();\nconst setShape = ({ checked }: ChangeEvent) => {\n shape.value = checked ? \"circle\" : null;\n};\nconst onSearch = (value: string) => {\n message.info(`Search: ${value}`);\n};\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 4px;\n}\n</style>"
8990
9279
  },
8991
9280
  {
8992
9281
  "title": "带图标",
@@ -9063,7 +9352,6 @@
9063
9352
  "type": "ThemeType",
9064
9353
  "boolean": false,
9065
9354
  "enumValues": [
9066
- "default",
9067
9355
  "fill",
9068
9356
  "outline",
9069
9357
  "plain",
@@ -9344,7 +9632,7 @@
9344
9632
  {
9345
9633
  "title": "外观与禁用",
9346
9634
  "file": "components/input-tag/demo/appearance.vue",
9347
- "source": "<template>\n <Space vertical>\n <InputTag size=\"small\" theme=\"plain\" :value=\"['Plain']\" />\n <InputTag shape=\"square\" theme=\"outline\" :value=\"['Outline']\" />\n <InputTag size=\"large\" shape=\"circle\" :value=\"['Circle']\" />\n <InputTag disabled :value=\"['Disabled']\" />\n </Space>\n</template>"
9635
+ "source": "<template>\n <Space vertical>\n <InputTag size=\"small\" theme=\"plain\" :value=\"['Plain']\" />\n <InputTag theme=\"dashed\" :value=\"['Plain']\" />\n <InputTag shape=\"square\" theme=\"outline\" :value=\"['Outline']\" />\n <InputTag size=\"large\" shape=\"circle\" :value=\"['Circle']\" />\n <InputTag disabled :value=\"['Disabled']\" />\n </Space>\n</template>"
9348
9636
  }
9349
9637
  ]
9350
9638
  },
@@ -9397,13 +9685,12 @@
9397
9685
  },
9398
9686
  {
9399
9687
  "name": "theme",
9400
- "description": "Visual theme",
9688
+ "description": "Theme",
9401
9689
  "descriptionZh": "主题",
9402
- "descriptionEn": "Visual theme",
9690
+ "descriptionEn": "Theme",
9403
9691
  "type": "ThemeType",
9404
9692
  "boolean": false,
9405
9693
  "enumValues": [
9406
- "default",
9407
9694
  "fill",
9408
9695
  "outline",
9409
9696
  "plain",
@@ -9705,7 +9992,6 @@
9705
9992
  "type": "ThemeType",
9706
9993
  "boolean": false,
9707
9994
  "enumValues": [
9708
- "default",
9709
9995
  "fill",
9710
9996
  "outline",
9711
9997
  "plain",
@@ -9865,17 +10151,22 @@
9865
10151
  "documented": true
9866
10152
  },
9867
10153
  {
9868
- "name": "size",
9869
- "description": "Input box size",
9870
- "descriptionZh": "输入框大小",
9871
- "descriptionEn": "Input box size",
9872
- "type": "SizeType | undefined",
10154
+ "name": "addonBefore",
10155
+ "description": "Addon before the input; complex content can use the named slot",
10156
+ "descriptionZh": "输入框外部前置附件,复杂内容可使用同名插槽",
10157
+ "descriptionEn": "Addon before the input; complex content can use the named slot",
10158
+ "type": "VNodeChild",
10159
+ "boolean": false,
10160
+ "required": false,
10161
+ "documented": true
10162
+ },
10163
+ {
10164
+ "name": "addonAfter",
10165
+ "description": "Addon after the input; complex content can use the named slot",
10166
+ "descriptionZh": "输入框外部后置附件,复杂内容可使用同名插槽",
10167
+ "descriptionEn": "Addon after the input; complex content can use the named slot",
10168
+ "type": "VNodeChild",
9873
10169
  "boolean": false,
9874
- "enumValues": [
9875
- "small",
9876
- "medium",
9877
- "large"
9878
- ],
9879
10170
  "required": false,
9880
10171
  "documented": true
9881
10172
  },
@@ -9884,7 +10175,7 @@
9884
10175
  "description": "Prefix content",
9885
10176
  "descriptionZh": "前缀内容",
9886
10177
  "descriptionEn": "Prefix content",
9887
- "type": "string | undefined",
10178
+ "type": "VNodeChild",
9888
10179
  "boolean": false,
9889
10180
  "required": false,
9890
10181
  "documented": true
@@ -9894,11 +10185,26 @@
9894
10185
  "description": "Custom suffix",
9895
10186
  "descriptionZh": "自定义后缀",
9896
10187
  "descriptionEn": "Custom suffix",
9897
- "type": "string | undefined",
10188
+ "type": "VNodeChild",
9898
10189
  "boolean": false,
9899
10190
  "required": false,
9900
10191
  "documented": true
9901
10192
  },
10193
+ {
10194
+ "name": "size",
10195
+ "description": "Input box size",
10196
+ "descriptionZh": "输入框大小",
10197
+ "descriptionEn": "Input box size",
10198
+ "type": "SizeType | undefined",
10199
+ "boolean": false,
10200
+ "enumValues": [
10201
+ "small",
10202
+ "medium",
10203
+ "large"
10204
+ ],
10205
+ "required": false,
10206
+ "documented": true
10207
+ },
9902
10208
  {
9903
10209
  "name": "precision",
9904
10210
  "description": "Numerical precision",
@@ -10000,7 +10306,32 @@
10000
10306
  "descriptionEn": "Called when a key is pressed in the input"
10001
10307
  }
10002
10308
  ],
10003
- "slots": [],
10309
+ "slots": [
10310
+ {
10311
+ "name": "prefix",
10312
+ "description": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set.",
10313
+ "descriptionZh": "输入框内部前缀,与 `prefix` 属性等效;两者同时提供时以插槽为准。",
10314
+ "descriptionEn": "Inline prefix; same as the `prefix` prop, and the slot wins when both are set."
10315
+ },
10316
+ {
10317
+ "name": "suffix",
10318
+ "description": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set.",
10319
+ "descriptionZh": "输入框内部后缀,与 `suffix` 属性等效;两者同时提供时以插槽为准。",
10320
+ "descriptionEn": "Inline suffix; same as the `suffix` prop, and the slot wins when both are set."
10321
+ },
10322
+ {
10323
+ "name": "addonBefore",
10324
+ "description": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set.",
10325
+ "descriptionZh": "输入框外部前置附件,与 `addonBefore` 属性等效;两者同时提供时以插槽为准。",
10326
+ "descriptionEn": "Boxed addon before the field; same as the `addonBefore` prop, and the slot wins when both are set."
10327
+ },
10328
+ {
10329
+ "name": "addonAfter",
10330
+ "description": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set.",
10331
+ "descriptionZh": "输入框外部后置附件,与 `addonAfter` 属性等效;两者同时提供时以插槽为准。",
10332
+ "descriptionEn": "Boxed addon after the field; same as the `addonAfter` prop, and the slot wins when both are set."
10333
+ }
10334
+ ],
10004
10335
  "examples": [
10005
10336
  {
10006
10337
  "title": "基本用法",
@@ -10013,14 +10344,19 @@
10013
10344
  "source": "<template>\n <Space vertical block>\n <code>0.1+0.2 = 0.3 (yes) ,output:{{ n }}</code>\n <InputNumber :step=\"0.2\" v-model=\"n\" />\n <code>step is 0.00000000000001 ,output:{{ n1 }}</code>\n <InputNumber v-model=\"n1\" :min=\"0\" :max=\"10\" :step=\"0.00000000000001\" />\n <code>Keep 2 decimal places, output:{{ n3 }}</code>\n <InputNumber :precision=\"2\" v-model=\"n3\" />\n <code>Currency, thousandths,output: {{ n4 }}</code>\n <InputNumber\n v-model=\"n4\"\n :min=\"0\"\n :formatter=\"(value) => `¥ ${value}`.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\"\n :parser=\"(value) => value.replace(/\\¥\\s?|(,*)/g, '')\"\n />\n <code>percent % ,output: {{ n5 }}</code>\n <InputNumber\n v-model=\"n5\"\n :min=\"0\"\n :max=\"100\"\n :formatter=\"(value) => `${value}%`\"\n :parser=\"(value) => value.replace('%', '')\"\n />\n <code>custom ,output:{{ n7 }}</code>\n <InputNumber\n v-model=\"n7\"\n :formatter=\"(value) => String(value).split('').join('-')\"\n :parser=\"(value) => value.replace(/\\-/g, '')\"\n />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst n = ref<number | undefined>(0.1);\nconst n1 = ref<number | undefined>(0.1);\nconst n3 = ref<number | undefined>(3.14159);\nconst n4 = ref<number | undefined>(1000);\nconst n5 = ref<number | undefined>(98);\nconst n7 = ref<number | undefined>(111111);\n</script>"
10014
10345
  },
10015
10346
  {
10016
- "title": "扩展, 前缀和后缀",
10347
+ "title": "扩展, 前缀、后缀与附件",
10017
10348
  "file": "components/input-number/demo/ffix.vue",
10018
- "source": "<template>\n <Space block vertical>\n <InputNumber placeholder=\"Please input amount\" suffix=\"元\" prefix=\"¥\" />\n <InputNumber placeholder=\"Please input amount\" :step=\"50\" suffix=\"元\" prefix=\"充值\" />\n <InputNumber placeholder=\"Please input amount\" suffix=\".00\" />\n </Space>\n <Divider text=\"slot\" />\n <Space vertical block>\n <InputNumber placeholder=\"请填写您的薪资\" :icon=\"LogoYen\">\n <template #suffix>\n <Tooltip title=\"此处如果不知道怎么填,请咨询管理员\">\n <Button :icon=\"CircleQuestionMark\" />\n </Tooltip>\n </template>\n </InputNumber>\n <InputNumber placeholder=\"Please input amount\">\n <template #prefix>\n <Button :icon=\"UserPlus\" />\n </template>\n <template #suffix>\n <Button>Top up</Button>\n </template>\n </InputNumber>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { CircleQuestionMark, LogoYen, UserPlus } from \"kui-icons\";\n</script>"
10349
+ "source": "<template>\n <Space block vertical>\n <InputNumber placeholder=\"Please input amount\" suffix=\"元\" prefix=\"¥\" />\n <InputNumber placeholder=\"Please input amount\" :step=\"50\" suffix=\"元\" prefix=\"充值\" />\n <InputNumber placeholder=\"Please input amount\" suffix=\".00\" />\n </Space>\n <Divider text=\"addons\" />\n <Space block vertical>\n <InputNumber placeholder=\"Please input amount\" addon-before=\"¥\" addon-after=\"RMB\" />\n <InputNumber placeholder=\"Please input weight\" addon-after=\"kg\" />\n </Space>\n <Divider text=\"slot\" />\n <Space vertical block>\n <InputNumber placeholder=\"请填写您的薪资\" :icon=\"LogoYen\">\n <template #addonAfter>\n <Tooltip title=\"此处如果不知道怎么填,请咨询管理员\">\n <Button :icon=\"CircleQuestionMark\" />\n </Tooltip>\n </template>\n </InputNumber>\n <InputNumber placeholder=\"Please input amount\">\n <template #addonBefore>\n <Button :icon=\"UserPlus\" />\n </template>\n <template #addonAfter>\n <Button>Top up</Button>\n </template>\n </InputNumber>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { CircleQuestionMark, LogoYen, UserPlus } from \"kui-icons\";\n</script>"
10019
10350
  },
10020
10351
  {
10021
10352
  "title": "尺寸",
10022
10353
  "file": "components/input-number/demo/size.vue",
10023
10354
  "source": "<template>\n <Space vertical block>\n <InputNumber placeholder=\"Large Input\" size=\"large\" :icon=\"LogoKui\" />\n <InputNumber placeholder=\"Base Input\" :icon=\"LogoKui\" />\n <InputNumber size=\"small\" placeholder=\"Small Input\" :icon=\"LogoKui\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoKui } from \"kui-icons\";\n</script>"
10355
+ },
10356
+ {
10357
+ "title": "外观档位",
10358
+ "file": "components/input-number/demo/theme.vue",
10359
+ "source": "<template>\n <Space vertical block style=\"width: 220px; max-width: 100%\">\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <code>theme: {{ tier }}</code>\n <InputNumber :theme=\"tier\" :modelValue=\"42\" />\n </div>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { ThemeType } from \"kui-vue\";\n\n// A number input is a text control, so it paints all six tiers: `fill` — what it does when nobody writes a\n// theme — plates the box, `outline` and `dashed` put a solid or dashed edge on it instead, `plain` leaves it\n// bare, `solid` plates it on the primary and inverts the digits, the placeholder and the steppers, and\n// `underlined` keeps only the bottom rule. The steppers are part of the box, so they follow the tier.\nconst tiers: ThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\", \"underlined\"];\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 4px;\n justify-items: start;\n}\n</style>"
10024
10360
  }
10025
10361
  ]
10026
10362
  },
@@ -10515,6 +10851,11 @@
10515
10851
  "title": "缩起内嵌菜单",
10516
10852
  "file": "components/menu/demo/collapsed.vue",
10517
10853
  "source": "<template>\n <div style=\"width: 256px\">\n <Button\n @click=\"change\"\n :icon=\"collapsed ? PanelLeftOpen : PanelLeftClose\"\n type=\"primary\"\n ></Button>\n <label style=\"display: inline-flex; align-items: center; gap: 8px; margin-left: 12px\">\n Tooltip\n <Switch v-model=\"collapsedTooltip\" />\n </label>\n <br />\n <br />\n <Menu\n v-model=\"current\"\n :openKeys=\"openKeys\"\n theme=\"dark\"\n :inlineCollapsed=\"collapsed\"\n :collapsedTooltip=\"collapsedTooltip\"\n mode=\"inline\"\n :items=\"items\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, PanelLeftClose, PanelLeftOpen, Settings, Table } from \"kui-icons\";\nimport { ref } from \"vue\";\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"3-1\", \"3-1-3\"]);\nconst collapsed = ref(false);\nconst collapsedTooltip = ref(true);\n\nconst change = () => {\n collapsed.value = !collapsed.value;\n};\n\nconst items = [\n { title: \"Option 1\", key: \"1-1\", icon: Mail },\n { title: \"Option 2\", key: \"2-1\", icon: Table },\n {\n title: \"Navigation Two\",\n key: \"3-1\",\n icon: Heart,\n children: [\n { title: \"Option 5\", key: \"3-1-1\", icon: Mail },\n { title: \"Option 6\", key: \"3-1-2\", icon: Mail },\n {\n title: \"SubMenu\",\n key: \"3-1-3\",\n icon: Mail,\n children: [\n { title: \"Option 7\", key: \"3-1-3-1\", icon: Mail },\n { title: \"Option 8\", key: \"3-1-3-2\", icon: Mail },\n ],\n },\n ],\n },\n {\n title: \"Navigation Three\",\n key: \"4-1\",\n icon: Settings,\n children: [\n { title: \"Option 9\", key: \"4-1-1\", icon: Mail },\n { title: \"Option 10\", key: \"4-1-2\", icon: Mail },\n { title: \"Option 11\", key: \"4-1-3\", icon: Mail },\n { title: \"Option 12\", key: \"4-1-4\", icon: Mail },\n ],\n },\n];\n</script>"
10854
+ },
10855
+ {
10856
+ "title": "分组与分割线",
10857
+ "file": "components/menu/demo/group.vue",
10858
+ "source": "<template>\n <div style=\"width: 256px\">\n <Menu v-model=\"current\" :openKeys=\"openKeys\" mode=\"inline\" @openChange=\"openChange\">\n <MenuGroup title=\"Application\">\n <MenuItem key=\"1-1\" :icon=\"Mail\">Navigation One</MenuItem>\n <MenuItem key=\"1-2\" :icon=\"Heart\">Navigation Two</MenuItem>\n <MenuItem key=\"1-3\" :icon=\"Settings\" disabled>Navigation Three</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <SubMenu key=\"sub1\" title=\"Navigation Four\" :icon=\"Mail\">\n <MenuGroup title=\"Options\">\n <MenuItem key=\"4-1\">Option 1</MenuItem>\n <MenuItem key=\"4-2\">Option 2</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <MenuItem key=\"4-3\">Option 3</MenuItem>\n </SubMenu>\n </Menu>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, Settings } from \"kui-icons\";\nimport { ref } from \"vue\";\n\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"sub1\"]);\nconst openChange = (keys: string[]) => {\n openKeys.value = keys;\n};\n</script>"
10518
10859
  }
10519
10860
  ]
10520
10861
  },
@@ -10602,6 +10943,11 @@
10602
10943
  "title": "缩起内嵌菜单",
10603
10944
  "file": "components/menu/demo/collapsed.vue",
10604
10945
  "source": "<template>\n <div style=\"width: 256px\">\n <Button\n @click=\"change\"\n :icon=\"collapsed ? PanelLeftOpen : PanelLeftClose\"\n type=\"primary\"\n ></Button>\n <label style=\"display: inline-flex; align-items: center; gap: 8px; margin-left: 12px\">\n Tooltip\n <Switch v-model=\"collapsedTooltip\" />\n </label>\n <br />\n <br />\n <Menu\n v-model=\"current\"\n :openKeys=\"openKeys\"\n theme=\"dark\"\n :inlineCollapsed=\"collapsed\"\n :collapsedTooltip=\"collapsedTooltip\"\n mode=\"inline\"\n :items=\"items\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, PanelLeftClose, PanelLeftOpen, Settings, Table } from \"kui-icons\";\nimport { ref } from \"vue\";\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"3-1\", \"3-1-3\"]);\nconst collapsed = ref(false);\nconst collapsedTooltip = ref(true);\n\nconst change = () => {\n collapsed.value = !collapsed.value;\n};\n\nconst items = [\n { title: \"Option 1\", key: \"1-1\", icon: Mail },\n { title: \"Option 2\", key: \"2-1\", icon: Table },\n {\n title: \"Navigation Two\",\n key: \"3-1\",\n icon: Heart,\n children: [\n { title: \"Option 5\", key: \"3-1-1\", icon: Mail },\n { title: \"Option 6\", key: \"3-1-2\", icon: Mail },\n {\n title: \"SubMenu\",\n key: \"3-1-3\",\n icon: Mail,\n children: [\n { title: \"Option 7\", key: \"3-1-3-1\", icon: Mail },\n { title: \"Option 8\", key: \"3-1-3-2\", icon: Mail },\n ],\n },\n ],\n },\n {\n title: \"Navigation Three\",\n key: \"4-1\",\n icon: Settings,\n children: [\n { title: \"Option 9\", key: \"4-1-1\", icon: Mail },\n { title: \"Option 10\", key: \"4-1-2\", icon: Mail },\n { title: \"Option 11\", key: \"4-1-3\", icon: Mail },\n { title: \"Option 12\", key: \"4-1-4\", icon: Mail },\n ],\n },\n];\n</script>"
10946
+ },
10947
+ {
10948
+ "title": "分组与分割线",
10949
+ "file": "components/menu/demo/group.vue",
10950
+ "source": "<template>\n <div style=\"width: 256px\">\n <Menu v-model=\"current\" :openKeys=\"openKeys\" mode=\"inline\" @openChange=\"openChange\">\n <MenuGroup title=\"Application\">\n <MenuItem key=\"1-1\" :icon=\"Mail\">Navigation One</MenuItem>\n <MenuItem key=\"1-2\" :icon=\"Heart\">Navigation Two</MenuItem>\n <MenuItem key=\"1-3\" :icon=\"Settings\" disabled>Navigation Three</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <SubMenu key=\"sub1\" title=\"Navigation Four\" :icon=\"Mail\">\n <MenuGroup title=\"Options\">\n <MenuItem key=\"4-1\">Option 1</MenuItem>\n <MenuItem key=\"4-2\">Option 2</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <MenuItem key=\"4-3\">Option 3</MenuItem>\n </SubMenu>\n </Menu>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, Settings } from \"kui-icons\";\nimport { ref } from \"vue\";\n\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"sub1\"]);\nconst openChange = (keys: string[]) => {\n openKeys.value = keys;\n};\n</script>"
10605
10951
  }
10606
10952
  ]
10607
10953
  },
@@ -10711,6 +11057,11 @@
10711
11057
  "title": "缩起内嵌菜单",
10712
11058
  "file": "components/menu/demo/collapsed.vue",
10713
11059
  "source": "<template>\n <div style=\"width: 256px\">\n <Button\n @click=\"change\"\n :icon=\"collapsed ? PanelLeftOpen : PanelLeftClose\"\n type=\"primary\"\n ></Button>\n <label style=\"display: inline-flex; align-items: center; gap: 8px; margin-left: 12px\">\n Tooltip\n <Switch v-model=\"collapsedTooltip\" />\n </label>\n <br />\n <br />\n <Menu\n v-model=\"current\"\n :openKeys=\"openKeys\"\n theme=\"dark\"\n :inlineCollapsed=\"collapsed\"\n :collapsedTooltip=\"collapsedTooltip\"\n mode=\"inline\"\n :items=\"items\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, PanelLeftClose, PanelLeftOpen, Settings, Table } from \"kui-icons\";\nimport { ref } from \"vue\";\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"3-1\", \"3-1-3\"]);\nconst collapsed = ref(false);\nconst collapsedTooltip = ref(true);\n\nconst change = () => {\n collapsed.value = !collapsed.value;\n};\n\nconst items = [\n { title: \"Option 1\", key: \"1-1\", icon: Mail },\n { title: \"Option 2\", key: \"2-1\", icon: Table },\n {\n title: \"Navigation Two\",\n key: \"3-1\",\n icon: Heart,\n children: [\n { title: \"Option 5\", key: \"3-1-1\", icon: Mail },\n { title: \"Option 6\", key: \"3-1-2\", icon: Mail },\n {\n title: \"SubMenu\",\n key: \"3-1-3\",\n icon: Mail,\n children: [\n { title: \"Option 7\", key: \"3-1-3-1\", icon: Mail },\n { title: \"Option 8\", key: \"3-1-3-2\", icon: Mail },\n ],\n },\n ],\n },\n {\n title: \"Navigation Three\",\n key: \"4-1\",\n icon: Settings,\n children: [\n { title: \"Option 9\", key: \"4-1-1\", icon: Mail },\n { title: \"Option 10\", key: \"4-1-2\", icon: Mail },\n { title: \"Option 11\", key: \"4-1-3\", icon: Mail },\n { title: \"Option 12\", key: \"4-1-4\", icon: Mail },\n ],\n },\n];\n</script>"
11060
+ },
11061
+ {
11062
+ "title": "分组与分割线",
11063
+ "file": "components/menu/demo/group.vue",
11064
+ "source": "<template>\n <div style=\"width: 256px\">\n <Menu v-model=\"current\" :openKeys=\"openKeys\" mode=\"inline\" @openChange=\"openChange\">\n <MenuGroup title=\"Application\">\n <MenuItem key=\"1-1\" :icon=\"Mail\">Navigation One</MenuItem>\n <MenuItem key=\"1-2\" :icon=\"Heart\">Navigation Two</MenuItem>\n <MenuItem key=\"1-3\" :icon=\"Settings\" disabled>Navigation Three</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <SubMenu key=\"sub1\" title=\"Navigation Four\" :icon=\"Mail\">\n <MenuGroup title=\"Options\">\n <MenuItem key=\"4-1\">Option 1</MenuItem>\n <MenuItem key=\"4-2\">Option 2</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <MenuItem key=\"4-3\">Option 3</MenuItem>\n </SubMenu>\n </Menu>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, Settings } from \"kui-icons\";\nimport { ref } from \"vue\";\n\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"sub1\"]);\nconst openChange = (keys: string[]) => {\n openKeys.value = keys;\n};\n</script>"
10714
11065
  }
10715
11066
  ]
10716
11067
  },
@@ -10802,6 +11153,11 @@
10802
11153
  "title": "缩起内嵌菜单",
10803
11154
  "file": "components/menu/demo/collapsed.vue",
10804
11155
  "source": "<template>\n <div style=\"width: 256px\">\n <Button\n @click=\"change\"\n :icon=\"collapsed ? PanelLeftOpen : PanelLeftClose\"\n type=\"primary\"\n ></Button>\n <label style=\"display: inline-flex; align-items: center; gap: 8px; margin-left: 12px\">\n Tooltip\n <Switch v-model=\"collapsedTooltip\" />\n </label>\n <br />\n <br />\n <Menu\n v-model=\"current\"\n :openKeys=\"openKeys\"\n theme=\"dark\"\n :inlineCollapsed=\"collapsed\"\n :collapsedTooltip=\"collapsedTooltip\"\n mode=\"inline\"\n :items=\"items\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, PanelLeftClose, PanelLeftOpen, Settings, Table } from \"kui-icons\";\nimport { ref } from \"vue\";\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"3-1\", \"3-1-3\"]);\nconst collapsed = ref(false);\nconst collapsedTooltip = ref(true);\n\nconst change = () => {\n collapsed.value = !collapsed.value;\n};\n\nconst items = [\n { title: \"Option 1\", key: \"1-1\", icon: Mail },\n { title: \"Option 2\", key: \"2-1\", icon: Table },\n {\n title: \"Navigation Two\",\n key: \"3-1\",\n icon: Heart,\n children: [\n { title: \"Option 5\", key: \"3-1-1\", icon: Mail },\n { title: \"Option 6\", key: \"3-1-2\", icon: Mail },\n {\n title: \"SubMenu\",\n key: \"3-1-3\",\n icon: Mail,\n children: [\n { title: \"Option 7\", key: \"3-1-3-1\", icon: Mail },\n { title: \"Option 8\", key: \"3-1-3-2\", icon: Mail },\n ],\n },\n ],\n },\n {\n title: \"Navigation Three\",\n key: \"4-1\",\n icon: Settings,\n children: [\n { title: \"Option 9\", key: \"4-1-1\", icon: Mail },\n { title: \"Option 10\", key: \"4-1-2\", icon: Mail },\n { title: \"Option 11\", key: \"4-1-3\", icon: Mail },\n { title: \"Option 12\", key: \"4-1-4\", icon: Mail },\n ],\n },\n];\n</script>"
11156
+ },
11157
+ {
11158
+ "title": "分组与分割线",
11159
+ "file": "components/menu/demo/group.vue",
11160
+ "source": "<template>\n <div style=\"width: 256px\">\n <Menu v-model=\"current\" :openKeys=\"openKeys\" mode=\"inline\" @openChange=\"openChange\">\n <MenuGroup title=\"Application\">\n <MenuItem key=\"1-1\" :icon=\"Mail\">Navigation One</MenuItem>\n <MenuItem key=\"1-2\" :icon=\"Heart\">Navigation Two</MenuItem>\n <MenuItem key=\"1-3\" :icon=\"Settings\" disabled>Navigation Three</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <SubMenu key=\"sub1\" title=\"Navigation Four\" :icon=\"Mail\">\n <MenuGroup title=\"Options\">\n <MenuItem key=\"4-1\">Option 1</MenuItem>\n <MenuItem key=\"4-2\">Option 2</MenuItem>\n </MenuGroup>\n <MenuDivider />\n <MenuItem key=\"4-3\">Option 3</MenuItem>\n </SubMenu>\n </Menu>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Mail, Settings } from \"kui-icons\";\nimport { ref } from \"vue\";\n\nconst current = ref([\"1-1\"]);\nconst openKeys = ref([\"sub1\"]);\nconst openChange = (keys: string[]) => {\n openKeys.value = keys;\n};\n</script>"
10805
11161
  }
10806
11162
  ]
10807
11163
  },
@@ -10856,18 +11212,32 @@
10856
11212
  "bottom-right"
10857
11213
  ],
10858
11214
  "required": false,
10859
- "defaultExpression": "\"bottom-left\"",
11215
+ "defaultExpression": "\"bottom-left\"",
11216
+ "documented": true
11217
+ },
11218
+ {
11219
+ "name": "destroyOnClose",
11220
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
11221
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
11222
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
11223
+ "type": "boolean",
11224
+ "boolean": true,
11225
+ "enumValues": [
11226
+ false,
11227
+ true
11228
+ ],
11229
+ "required": false,
11230
+ "defaultExpression": "true",
10860
11231
  "documented": true
10861
11232
  },
10862
11233
  {
10863
11234
  "name": "theme",
10864
- "description": "Theme",
10865
- "descriptionZh": "主题",
10866
- "descriptionEn": "Theme",
11235
+ "description": "Theme, painted on the inner text area; supports the same tiers as TextArea",
11236
+ "descriptionZh": "主题,画在内部文本域上,可用档位与 TextArea 一致",
11237
+ "descriptionEn": "Theme, painted on the inner text area; supports the same tiers as TextArea",
10867
11238
  "type": "ThemeType",
10868
11239
  "boolean": false,
10869
11240
  "enumValues": [
10870
- "default",
10871
11241
  "fill",
10872
11242
  "outline",
10873
11243
  "plain",
@@ -11285,6 +11655,21 @@
11285
11655
  "defaultExpression": "100",
11286
11656
  "documented": true
11287
11657
  },
11658
+ {
11659
+ "name": "destroyOnClose",
11660
+ "description": "Whether to destroy dialog content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened dialog",
11661
+ "descriptionZh": "关闭后是否销毁窗口内容。默认销毁(重开时重新挂载);设为 false 可保留窗口内已填写的表单状态,代价是打开过的窗口留一份隐藏 DOM",
11662
+ "descriptionEn": "Whether to destroy dialog content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened dialog",
11663
+ "type": "boolean",
11664
+ "boolean": true,
11665
+ "enumValues": [
11666
+ false,
11667
+ true
11668
+ ],
11669
+ "required": false,
11670
+ "defaultExpression": "true",
11671
+ "documented": true
11672
+ },
11288
11673
  {
11289
11674
  "name": "footer",
11290
11675
  "description": "When `footer=false`, the bottom button is not displayed.",
@@ -11313,9 +11698,9 @@
11313
11698
  },
11314
11699
  {
11315
11700
  "name": "maskClosable",
11316
- "description": "Whether clicking the mask closes the modal, if not, Esc key will be invalid",
11317
- "descriptionZh": "是否点击遮罩关闭弹窗, 为否时 Esc 键将失效",
11318
- "descriptionEn": "Whether clicking the mask closes the modal, if not, Esc key will be invalid",
11701
+ "description": "Whether clicking the mask closes the modal (mask only; Esc is gated by `escKey`)",
11702
+ "descriptionZh": "是否点击遮罩关闭弹窗(只管遮罩,Esc 由 `escKey` 控制)",
11703
+ "descriptionEn": "Whether clicking the mask closes the modal (mask only; Esc is gated by `escKey`)",
11319
11704
  "type": "boolean",
11320
11705
  "boolean": true,
11321
11706
  "enumValues": [
@@ -11387,12 +11772,13 @@
11387
11772
  },
11388
11773
  {
11389
11774
  "name": "title",
11390
- "description": "Dialog title",
11391
- "descriptionZh": "对话框标题",
11392
- "descriptionEn": "Dialog title",
11393
- "type": "string | undefined",
11775
+ "description": "Dialog title, accepts VNodes as well as text",
11776
+ "descriptionZh": "对话框标题,字符串之外可给 VNode",
11777
+ "descriptionEn": "Dialog title, accepts VNodes as well as text",
11778
+ "type": "VNodeChild",
11394
11779
  "boolean": false,
11395
11780
  "required": false,
11781
+ "defaultExpression": "undefined",
11396
11782
  "documented": true
11397
11783
  },
11398
11784
  {
@@ -11512,9 +11898,9 @@
11512
11898
  },
11513
11899
  {
11514
11900
  "name": "onOpenChange",
11515
- "description": "Callback for opening or closing a window",
11516
- "descriptionZh": "打开或者窗口关闭的回调",
11517
- "descriptionEn": "Callback for opening or closing a window",
11901
+ "description": "Fires when the window closes; opening is your own `v-model`, so it is never echoed back",
11902
+ "descriptionZh": "窗口关闭时的回调;打开由 `v-model` 决定,不会回写一次",
11903
+ "descriptionEn": "Fires when the window closes; opening is your own `v-model`, so it is never echoed back",
11518
11904
  "type": "(visible: boolean) => void",
11519
11905
  "eventName": "openChange",
11520
11906
  "boolean": false,
@@ -11522,9 +11908,9 @@
11522
11908
  },
11523
11909
  {
11524
11910
  "name": "onOk",
11525
- "description": "Callback when OK is clicked",
11526
- "descriptionZh": "点击确定的回调",
11527
- "descriptionEn": "Callback when OK is clicked",
11911
+ "description": "Callback when OK is clicked; returning a Promise hands the closing timing to the component — resolve closes it, reject only stops loading and keeps it open",
11912
+ "descriptionZh": "点击确定的回调;返回 Promise 时关闭时机交给组件:resolve 后关窗,reject 只停 loading 并保持窗口打开",
11913
+ "descriptionEn": "Callback when OK is clicked; returning a Promise hands the closing timing to the component — resolve closes it, reject only stops loading and keeps it open",
11528
11914
  "type": "() => void",
11529
11915
  "eventName": "ok",
11530
11916
  "boolean": false,
@@ -11562,16 +11948,16 @@
11562
11948
  {
11563
11949
  "name": "openChange",
11564
11950
  "type": "(visible: boolean) => void",
11565
- "description": "Callback for opening or closing a window",
11566
- "descriptionZh": "打开或者窗口关闭的回调",
11567
- "descriptionEn": "Callback for opening or closing a window"
11951
+ "description": "Fires when the window closes; opening is your own `v-model`, so it is never echoed back",
11952
+ "descriptionZh": "窗口关闭时的回调;打开由 `v-model` 决定,不会回写一次",
11953
+ "descriptionEn": "Fires when the window closes; opening is your own `v-model`, so it is never echoed back"
11568
11954
  },
11569
11955
  {
11570
11956
  "name": "ok",
11571
11957
  "type": "() => void",
11572
- "description": "Callback when OK is clicked",
11573
- "descriptionZh": "点击确定的回调",
11574
- "descriptionEn": "Callback when OK is clicked"
11958
+ "description": "Callback when OK is clicked; returning a Promise hands the closing timing to the component — resolve closes it, reject only stops loading and keeps it open",
11959
+ "descriptionZh": "点击确定的回调;返回 Promise 时关闭时机交给组件:resolve 后关窗,reject 只停 loading 并保持窗口打开",
11960
+ "descriptionEn": "Callback when OK is clicked; returning a Promise hands the closing timing to the component — resolve closes it, reject only stops loading and keeps it open"
11575
11961
  },
11576
11962
  {
11577
11963
  "name": "cancel",
@@ -11617,7 +12003,7 @@
11617
12003
  {
11618
12004
  "title": "自定义",
11619
12005
  "file": "components/modal/demo/custom.vue",
11620
- "source": "<template>\n <Space vertical>\n <Button @click=\"visible1 = true\" type=\"primary\">Width: 300px</Button>\n <Button @click=\"visible5 = true\" type=\"primary\">Width: 50%</Button>\n <Button @click=\"visible6 = true\" type=\"primary\">Width: calc(100% - 800px)</Button>\n <Button @click=\"visible2 = true\" type=\"primary\">Custom footer</Button>\n <Button @click=\"visible3 = true\" type=\"primary\">Internationalization</Button>\n <Button @click=\"visible4 = true\" type=\"primary\">Asynchronous shutdown</Button>\n <Modal title=\"Width 300px\" v-model=\"visible1\" :width=\"300\" @ok=\"visible1 = false\">\n <p>content</p>\n </Modal>\n\n <Modal title=\"Width 50%\" v-model=\"visible5\" width=\"50%\" @ok=\"visible5 = false\">\n <p>content</p>\n </Modal>\n\n <Modal\n title=\"calc(100% - 800px)\"\n v-model=\"visible6\"\n width=\"calc(100% - 800px)\"\n @ok=\"visible6 = false\"\n >\n <p>content</p>\n </Modal>\n\n <Modal title=\"Custom footer\" v-model=\"visible2\">\n <p>content</p>\n <template #footer>\n <Button :icon=\"Save\" @click=\"visible2 = false\" type=\"primary\">Save</Button>\n </template>\n </Modal>\n\n <Modal title=\"Are you ok ?\" v-model=\"visible3\" ok-text=\"Ok\" cancel-text=\"Cancel\" @ok=\"okHandle\">\n <p>Yes , I'm fine !</p>\n </Modal>\n\n <Modal title=\"Submit forms\" v-model=\"visible4\" :loading=\"loading\" @ok=\"submit\" @close=\"close\">\n <p>\n Name:\n <Input placeholder=\"Please input your name\" style=\"width: 200px\" />\n </p>\n </Modal>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Save } from \"kui-icons\";\nimport { ref } from \"vue\";\nconst visible1 = ref(false);\nconst visible2 = ref(false);\nconst visible3 = ref(false);\nconst visible4 = ref(false);\nconst visible5 = ref(false);\nconst visible6 = ref(false);\nconst loading = ref(false);\nconst timer = ref();\n\nconst okHandle = () => {\n visible3.value = false;\n};\nconst submit = () => {\n loading.value = true;\n timer.value = setTimeout(() => {\n loading.value = false;\n visible4.value = false;\n }, 2000);\n};\nconst close = () => {\n loading.value = false;\n clearTimeout(timer.value);\n};\n</script>"
12006
+ "source": "<template>\n <Space vertical>\n <Button @click=\"visible1 = true\" type=\"primary\">Width: 300px</Button>\n <Button @click=\"visible5 = true\" type=\"primary\">Width: 50%</Button>\n <Button @click=\"visible6 = true\" type=\"primary\">Width: calc(100% - 800px)</Button>\n <Button @click=\"visible2 = true\" type=\"primary\">Custom footer</Button>\n <Button @click=\"visible3 = true\" type=\"primary\">Internationalization</Button>\n <Button @click=\"visible4 = true\" type=\"primary\">Asynchronous shutdown</Button>\n <Modal title=\"Width 300px\" v-model=\"visible1\" :width=\"300\" @ok=\"visible1 = false\">\n <p>content</p>\n </Modal>\n\n <Modal title=\"Width 50%\" v-model=\"visible5\" width=\"50%\" @ok=\"visible5 = false\">\n <p>content</p>\n </Modal>\n\n <Modal\n title=\"calc(100% - 800px)\"\n v-model=\"visible6\"\n width=\"calc(100% - 800px)\"\n @ok=\"visible6 = false\"\n >\n <p>content</p>\n </Modal>\n\n <Modal title=\"Custom footer\" v-model=\"visible2\">\n <p>content</p>\n <template #footer>\n <Button :icon=\"Save\" @click=\"visible2 = false\" type=\"primary\">Save</Button>\n </template>\n </Modal>\n\n <Modal title=\"Are you ok ?\" v-model=\"visible3\" ok-text=\"Ok\" cancel-text=\"Cancel\" @ok=\"okHandle\">\n <p>Yes , I'm fine !</p>\n </Modal>\n\n <!-- 开合走 `v-model`,关掉那一刻的收尾挂在 `openChange` 上:\n 点「取消」不会触发 `close`,只挂 `close` 的话取消关掉时 loading 收不掉。 -->\n <Modal\n title=\"Submit forms\"\n v-model=\"visible4\"\n :loading=\"loading\"\n @ok=\"submit\"\n @open-change=\"close\"\n >\n <p>\n Name:\n <Input placeholder=\"Please input your name\" style=\"width: 200px\" />\n </p>\n </Modal>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Save } from \"kui-icons\";\nimport { ref } from \"vue\";\nconst visible1 = ref(false);\nconst visible2 = ref(false);\nconst visible3 = ref(false);\nconst visible4 = ref(false);\nconst visible5 = ref(false);\nconst visible6 = ref(false);\nconst loading = ref(false);\nconst timer = ref();\n\nconst okHandle = () => {\n visible3.value = false;\n};\nconst submit = () => {\n loading.value = true;\n timer.value = setTimeout(() => {\n loading.value = false;\n visible4.value = false;\n }, 2000);\n};\nconst close = () => {\n loading.value = false;\n clearTimeout(timer.value);\n};\n</script>"
11621
12007
  },
11622
12008
  {
11623
12009
  "title": "其它属性",
@@ -11666,19 +12052,17 @@
11666
12052
  "props": [
11667
12053
  {
11668
12054
  "name": "theme",
11669
- "description": "Theme",
11670
- "descriptionZh": "主题",
11671
- "descriptionEn": "Theme",
11672
- "type": "ThemeType",
12055
+ "description": "Surface theme",
12056
+ "descriptionZh": "外观主题",
12057
+ "descriptionEn": "Surface theme",
12058
+ "type": "SurfaceThemeType",
11673
12059
  "boolean": false,
11674
12060
  "enumValues": [
11675
- "default",
11676
12061
  "fill",
11677
12062
  "outline",
11678
12063
  "plain",
11679
12064
  "solid",
11680
- "dashed",
11681
- "underlined"
12065
+ "dashed"
11682
12066
  ],
11683
12067
  "required": false,
11684
12068
  "defaultExpression": "\"fill\"",
@@ -11926,6 +12310,11 @@
11926
12310
  "title": "自适应分页",
11927
12311
  "file": "components/page/demo/responsive.vue",
11928
12312
  "source": "<template>\n <div\n :style=\"{\n width: '720px',\n maxWidth: '100%',\n minWidth: '180px',\n resize: 'horizontal',\n overflow: 'auto',\n padding: '16px',\n boxSizing: 'border-box',\n border: '1px solid var(--kui-color-border)',\n }\"\n >\n <Page :total=\"10000\" :page=\"50\" show-sizer show-elevator />\n </div>\n</template>"
12313
+ },
12314
+ {
12315
+ "title": "外观",
12316
+ "file": "components/page/demo/appearance.vue",
12317
+ "source": "<template>\n <div class=\"page-demo\">\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <code>theme: {{ tier }}</code>\n <Page v-model:page=\"page\" :page-size=\"10\" :total=\"80\" :theme=\"tier\" :show-total=\"false\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// The tier lands on the page-number cells, not on the bar around them: `fill` — the pager's own look — gives\n// each cell a pale plate, `outline` and `dashed` edge them instead, `plain` leaves them bare, and `solid`\n// plates them on the primary and inverts the digits and the ellipsis. The current page flips to a white cell\n// with primary digits under `solid`, and the total line plus the previous/next arrows keep the bar's own\n// background in every tier — they are not cells.\nconst tiers: SurfaceThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\"];\nconst page = ref(2);\n</script>\n\n<style scoped>\n.page-demo {\n display: grid;\n gap: 12px;\n}\n\n.tier {\n display: grid;\n gap: 6px;\n justify-items: start;\n}\n</style>"
11929
12318
  }
11930
12319
  ]
11931
12320
  },
@@ -12069,6 +12458,21 @@
12069
12458
  "defaultExpression": "\"hover\"",
12070
12459
  "documented": true
12071
12460
  },
12461
+ {
12462
+ "name": "destroyOnClose",
12463
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
12464
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
12465
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
12466
+ "type": "boolean",
12467
+ "boolean": true,
12468
+ "enumValues": [
12469
+ false,
12470
+ true
12471
+ ],
12472
+ "required": false,
12473
+ "defaultExpression": "true",
12474
+ "documented": true
12475
+ },
12072
12476
  {
12073
12477
  "name": "show",
12074
12478
  "description": "Whether to display",
@@ -12270,6 +12674,21 @@
12270
12674
  "defaultExpression": "\"top\"",
12271
12675
  "documented": true
12272
12676
  },
12677
+ {
12678
+ "name": "destroyOnClose",
12679
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
12680
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
12681
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
12682
+ "type": "boolean",
12683
+ "boolean": true,
12684
+ "enumValues": [
12685
+ false,
12686
+ true
12687
+ ],
12688
+ "required": false,
12689
+ "defaultExpression": "true",
12690
+ "documented": true
12691
+ },
12273
12692
  {
12274
12693
  "name": "panelOnly",
12275
12694
  "description": "Render only the confirmation panel without a trigger",
@@ -12781,9 +13200,9 @@
12781
13200
  "props": [
12782
13201
  {
12783
13202
  "name": "bordered",
12784
- "description": "Whether to keep the outer border and padding container.",
12785
- "descriptionZh": "是否保留外边框和内边距容器。",
12786
- "descriptionEn": "Whether to keep the outer border and padding container.",
13203
+ "description": "Whether to keep the outer frame and the 12px padding it holds. To only drop the surface — no plate, a transparent frame — write `theme=\"plain\"` instead, which keeps the padding.",
13204
+ "descriptionZh": "是否保留外边框和它托住的 12px 内边距。只想去掉表面(不留底色、边框透明)请写 `theme=\"plain\"`,内边距会保留。",
13205
+ "descriptionEn": "Whether to keep the outer frame and the 12px padding it holds. To only drop the surface — no plate, a transparent frame — write `theme=\"plain\"` instead, which keeps the padding.",
12787
13206
  "type": "boolean",
12788
13207
  "boolean": true,
12789
13208
  "enumValues": [
@@ -12796,19 +13215,17 @@
12796
13215
  },
12797
13216
  {
12798
13217
  "name": "theme",
12799
- "description": "QR appearance",
12800
- "descriptionZh": "二维码外观",
12801
- "descriptionEn": "QR appearance",
12802
- "type": "ThemeType",
13218
+ "description": "Appearance theme",
13219
+ "descriptionZh": "外观主题",
13220
+ "descriptionEn": "Appearance theme",
13221
+ "type": "SurfaceThemeType",
12803
13222
  "boolean": false,
12804
13223
  "enumValues": [
12805
- "default",
12806
13224
  "fill",
12807
13225
  "outline",
12808
13226
  "plain",
12809
13227
  "solid",
12810
- "dashed",
12811
- "underlined"
13228
+ "dashed"
12812
13229
  ],
12813
13230
  "required": false,
12814
13231
  "defaultExpression": "\"outline\"",
@@ -13012,6 +13429,11 @@
13012
13429
  "title": "自定义状态",
13013
13430
  "file": "components/qrcode/demo/custom-status.vue",
13014
13431
  "source": "<template>\n <Space wrap>\n <QRCode :value=\"url\" :size=\"100\" />\n <QRCode :value=\"url\" status=\"loading\" :size=\"100\">\n <template #loading>\n <Spin mode=\"bounce\" />\n <p>疯狂加载中...</p>\n </template>\n </QRCode>\n <QRCode :value=\"url\" :status=\"qrStatus\" :size=\"100\">\n <template #expired>\n <Button type=\"primary\" @click=\"handleRefreshQR\" size=\"small\">刷新二维码</Button>\n </template>\n </QRCode>\n <QRCode :value=\"url\" status=\"scanned\" :size=\"100\">\n <template #scanned>\n <Icon :type=\"CircleCheck\" color=\"green\" size=\"30\" />\n <div>支付成功</div>\n </template>\n </QRCode>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { CircleCheck } from \"kui-icons\";\nimport type { QRCodeStatus } from \"kui-vue\";\nimport { ref } from \"vue\";\n\nconst qrStatus = ref<QRCodeStatus>(\"expired\");\nconst url = ref(\"https:k-ui.cn\");\nconst handleRefreshQR = () => {\n qrStatus.value = \"loading\";\n setTimeout(() => {\n url.value = \"https://xxx.com/pay\";\n qrStatus.value = \"active\"; // 刷新完毕,重新绘制\n }, 1000);\n};\n</script>"
13432
+ },
13433
+ {
13434
+ "title": "外观",
13435
+ "file": "components/qrcode/demo/appearance.vue",
13436
+ "source": "<template>\n <Space wrap>\n <div v-for=\"tier in tiers\" :key=\"tier\" class=\"tier\">\n <QRCode value=\"https://k-ui.cn\" :size=\"104\" :theme=\"tier\" />\n <code>theme: {{ tier }}</code>\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// A code is a frame around a canvas, so its tiers read the same way an image's do, and its own look is\n// `outline` — the ring it draws when nobody writes a theme. The modules inside stay the same ink in every\n// tier; only the frame around them changes.\nconst tiers: SurfaceThemeType[] = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"];\n</script>\n\n<style scoped>\n.tier {\n display: grid;\n gap: 8px;\n justify-items: center;\n}\n</style>"
13015
13437
  }
13016
13438
  ]
13017
13439
  },
@@ -13044,19 +13466,14 @@
13044
13466
  "props": [
13045
13467
  {
13046
13468
  "name": "theme",
13047
- "description": "Button theme",
13048
- "descriptionZh": "`button` 的主题",
13049
- "descriptionEn": "Button theme",
13050
- "type": "ThemeType",
13469
+ "description": "Component theme",
13470
+ "descriptionZh": "组件呈现主题",
13471
+ "descriptionEn": "Component theme",
13472
+ "type": "MarkThemeType",
13051
13473
  "boolean": false,
13052
13474
  "enumValues": [
13053
- "default",
13054
13475
  "fill",
13055
- "outline",
13056
- "plain",
13057
- "solid",
13058
- "dashed",
13059
- "underlined"
13476
+ "outline"
13060
13477
  ],
13061
13478
  "required": false,
13062
13479
  "defaultExpression": "\"fill\"",
@@ -13243,7 +13660,12 @@
13243
13660
  {
13244
13661
  "title": "组合Button使用",
13245
13662
  "file": "components/radio/demo/radio-buttons.vue",
13246
- "source": "<template>\n <Space vertical>\n <Space>\n <code>Shape :</code>\n <RadioGroup v-model=\"shape\" size=\"small\" type=\"button\">\n <RadioButton value=\"round\" label=\"Round\" />\n <RadioButton value=\"circle\" label=\"Circle\" />\n <RadioButton value=\"square\" label=\"Square\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Theme :</code>\n <RadioGroup v-model=\"theme\" size=\"small\" type=\"button\">\n <RadioButton value=\"default\">Default</RadioButton>\n <RadioButton value=\"fill\" label=\"Fill\" />\n <RadioButton value=\"outline\" label=\"Outline\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Size :</code>\n <RadioGroup v-model=\"size\" type=\"button\" size=\"small\" :options=\"sizes\"></RadioGroup>\n </Space>\n <Space>\n <code>Direction :</code>\n <RadioGroup v-model=\"direction\" type=\"button\" size=\"small\" :options=\"directions\"></RadioGroup>\n </Space>\n <Space>\n <code>Type :</code>\n <RadioGroup v-model=\"type\" type=\"button\" size=\"small\" :options=\"types\"></RadioGroup>\n </Space>\n <br />\n <RadioGroup\n v-model=\"value\"\n :size=\"size\"\n :theme=\"theme\"\n :shape=\"shape\"\n :options=\"dates\"\n :direction=\"direction\"\n :type=\"type\"\n ></RadioGroup>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoApple } from \"kui-icons\";\nimport type { DirectionType, RadioType, ShapeType, SizeType, ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"medium\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<ThemeType>(\"default\");\nconst direction = ref<DirectionType>(\"horizontal\");\nconst type = ref<RadioType>(\"button\");\nconst value = ref(0);\nconst dates = [\n { label: \"1 week\", value: 0 },\n { label: \"1 month\", value: 1 },\n { label: \"Q1\", value: 2 },\n { label: \"1 year\", value: 3 },\n { label: \"5 years\", value: 4, disabled: true },\n];\nconst directions = [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n];\nconst types = [\n { label: \"Radio\", value: \"radio\" },\n { label: \"Button\", value: \"button\" },\n];\nconst sizes = [\n { label: \"Large\", value: \"large\", icon: LogoApple },\n { label: \"Medium\", value: \"medium\" },\n { label: \"Small\", value: \"small\" },\n];\n</script>"
13663
+ "source": "<template>\n <Space vertical>\n <Space>\n <code>Shape :</code>\n <RadioGroup v-model=\"shape\" size=\"small\" type=\"button\">\n <RadioButton value=\"round\" label=\"Round\" />\n <RadioButton value=\"circle\" label=\"Circle\" />\n <RadioButton value=\"square\" label=\"Square\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Theme :</code>\n <RadioGroup v-model=\"theme\" size=\"small\" type=\"button\">\n <RadioButton value=\"fill\" label=\"Fill\" />\n <RadioButton value=\"outline\" label=\"Outline\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Size :</code>\n <RadioGroup v-model=\"size\" type=\"button\" size=\"small\" :options=\"sizes\"></RadioGroup>\n </Space>\n <Space>\n <code>Direction :</code>\n <RadioGroup v-model=\"direction\" type=\"button\" size=\"small\" :options=\"directions\"></RadioGroup>\n </Space>\n <Space>\n <code>Type :</code>\n <RadioGroup v-model=\"type\" type=\"button\" size=\"small\" :options=\"types\"></RadioGroup>\n </Space>\n <br />\n <RadioGroup\n v-model=\"value\"\n :size=\"size\"\n :theme=\"theme\"\n :shape=\"shape\"\n :options=\"dates\"\n :direction=\"direction\"\n :type=\"type\"\n ></RadioGroup>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoApple } from \"kui-icons\";\nimport type { DirectionType, RadioType, ShapeType, SizeType, SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"medium\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<SurfaceThemeType>(\"fill\");\nconst direction = ref<DirectionType>(\"horizontal\");\nconst type = ref<RadioType>(\"button\");\nconst value = ref(0);\nconst dates = [\n { label: \"1 week\", value: 0 },\n { label: \"1 month\", value: 1 },\n { label: \"Q1\", value: 2 },\n { label: \"1 year\", value: 3 },\n { label: \"5 years\", value: 4, disabled: true },\n];\nconst directions = [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n];\nconst types = [\n { label: \"Radio\", value: \"radio\" },\n { label: \"Button\", value: \"button\" },\n];\nconst sizes = [\n { label: \"Large\", value: \"large\", icon: LogoApple },\n { label: \"Medium\", value: \"medium\" },\n { label: \"Small\", value: \"small\" },\n];\n</script>"
13664
+ },
13665
+ {
13666
+ "title": "外观档位",
13667
+ "file": "components/radio/demo/theme.vue",
13668
+ "source": "<template>\n <Space vertical block>\n <Space v-for=\"tier in marks\" :key=\"`dot-${tier}`\" vertical>\n <code>theme: {{ tier }}</code>\n <RadioGroup :options=\"fruits\" v-model=\"dot\" :theme=\"tier\" />\n </Space>\n <Space v-for=\"tier in buttons\" :key=\"`button-${tier}`\" vertical>\n <code>{{ tier ? `theme: ${tier}` : \"no theme\" }}</code>\n <RadioGroup type=\"button\" :options=\"fruits\" v-model=\"button\" :theme=\"tier\" />\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { MarkThemeType, SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// A radio dot paints the two tiers a mark has, and the tier lands on the dot rather than on the label: `fill`\n// — what it does when nobody writes a theme — gives it a pale plate, `outline` puts a border on it instead.\n// `type=\"button\"` is a different surface entirely: the group renders buttons, so it paints the five tiers a\n// button has, and writing no theme at all keeps the buttons' own type-driven look — the checked one primary,\n// the rest outlined. Only `fill` changes how the buttons are joined; the others keep their adjacent borders.\nconst marks: MarkThemeType[] = [\"fill\", \"outline\"];\nconst buttons: (SurfaceThemeType | undefined)[] = [\n undefined,\n \"fill\",\n \"outline\",\n \"plain\",\n \"solid\",\n \"dashed\",\n];\nconst dot = ref(\"apple\");\nconst button = ref(\"apple\");\nconst fruits = [\"Apple\", \"Orange\", \"Banana\"].map((label) => ({\n label,\n value: label.toLowerCase(),\n}));\n</script>"
13247
13669
  }
13248
13670
  ]
13249
13671
  },
@@ -13310,19 +13732,17 @@
13310
13732
  },
13311
13733
  {
13312
13734
  "name": "theme",
13313
- "description": "Button theme",
13314
- "descriptionZh": "`button` 的主题",
13315
- "descriptionEn": "Button theme",
13316
- "type": "ThemeType | undefined",
13735
+ "description": "Button appearance",
13736
+ "descriptionZh": "按钮外观",
13737
+ "descriptionEn": "Button appearance",
13738
+ "type": "SurfaceThemeType | undefined",
13317
13739
  "boolean": false,
13318
13740
  "enumValues": [
13319
- "default",
13320
13741
  "fill",
13321
13742
  "outline",
13322
13743
  "plain",
13323
13744
  "solid",
13324
- "dashed",
13325
- "underlined"
13745
+ "dashed"
13326
13746
  ],
13327
13747
  "required": false,
13328
13748
  "documented": true
@@ -13330,7 +13750,7 @@
13330
13750
  {
13331
13751
  "name": "shape",
13332
13752
  "description": "Button shape",
13333
- "descriptionZh": "`button` 的形状",
13753
+ "descriptionZh": "按钮形状",
13334
13754
  "descriptionEn": "Button shape",
13335
13755
  "type": "ShapeType | undefined",
13336
13756
  "boolean": false,
@@ -13490,7 +13910,12 @@
13490
13910
  {
13491
13911
  "title": "组合Button使用",
13492
13912
  "file": "components/radio/demo/radio-buttons.vue",
13493
- "source": "<template>\n <Space vertical>\n <Space>\n <code>Shape :</code>\n <RadioGroup v-model=\"shape\" size=\"small\" type=\"button\">\n <RadioButton value=\"round\" label=\"Round\" />\n <RadioButton value=\"circle\" label=\"Circle\" />\n <RadioButton value=\"square\" label=\"Square\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Theme :</code>\n <RadioGroup v-model=\"theme\" size=\"small\" type=\"button\">\n <RadioButton value=\"default\">Default</RadioButton>\n <RadioButton value=\"fill\" label=\"Fill\" />\n <RadioButton value=\"outline\" label=\"Outline\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Size :</code>\n <RadioGroup v-model=\"size\" type=\"button\" size=\"small\" :options=\"sizes\"></RadioGroup>\n </Space>\n <Space>\n <code>Direction :</code>\n <RadioGroup v-model=\"direction\" type=\"button\" size=\"small\" :options=\"directions\"></RadioGroup>\n </Space>\n <Space>\n <code>Type :</code>\n <RadioGroup v-model=\"type\" type=\"button\" size=\"small\" :options=\"types\"></RadioGroup>\n </Space>\n <br />\n <RadioGroup\n v-model=\"value\"\n :size=\"size\"\n :theme=\"theme\"\n :shape=\"shape\"\n :options=\"dates\"\n :direction=\"direction\"\n :type=\"type\"\n ></RadioGroup>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoApple } from \"kui-icons\";\nimport type { DirectionType, RadioType, ShapeType, SizeType, ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"medium\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<ThemeType>(\"default\");\nconst direction = ref<DirectionType>(\"horizontal\");\nconst type = ref<RadioType>(\"button\");\nconst value = ref(0);\nconst dates = [\n { label: \"1 week\", value: 0 },\n { label: \"1 month\", value: 1 },\n { label: \"Q1\", value: 2 },\n { label: \"1 year\", value: 3 },\n { label: \"5 years\", value: 4, disabled: true },\n];\nconst directions = [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n];\nconst types = [\n { label: \"Radio\", value: \"radio\" },\n { label: \"Button\", value: \"button\" },\n];\nconst sizes = [\n { label: \"Large\", value: \"large\", icon: LogoApple },\n { label: \"Medium\", value: \"medium\" },\n { label: \"Small\", value: \"small\" },\n];\n</script>"
13913
+ "source": "<template>\n <Space vertical>\n <Space>\n <code>Shape :</code>\n <RadioGroup v-model=\"shape\" size=\"small\" type=\"button\">\n <RadioButton value=\"round\" label=\"Round\" />\n <RadioButton value=\"circle\" label=\"Circle\" />\n <RadioButton value=\"square\" label=\"Square\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Theme :</code>\n <RadioGroup v-model=\"theme\" size=\"small\" type=\"button\">\n <RadioButton value=\"fill\" label=\"Fill\" />\n <RadioButton value=\"outline\" label=\"Outline\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Size :</code>\n <RadioGroup v-model=\"size\" type=\"button\" size=\"small\" :options=\"sizes\"></RadioGroup>\n </Space>\n <Space>\n <code>Direction :</code>\n <RadioGroup v-model=\"direction\" type=\"button\" size=\"small\" :options=\"directions\"></RadioGroup>\n </Space>\n <Space>\n <code>Type :</code>\n <RadioGroup v-model=\"type\" type=\"button\" size=\"small\" :options=\"types\"></RadioGroup>\n </Space>\n <br />\n <RadioGroup\n v-model=\"value\"\n :size=\"size\"\n :theme=\"theme\"\n :shape=\"shape\"\n :options=\"dates\"\n :direction=\"direction\"\n :type=\"type\"\n ></RadioGroup>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoApple } from \"kui-icons\";\nimport type { DirectionType, RadioType, ShapeType, SizeType, SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"medium\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<SurfaceThemeType>(\"fill\");\nconst direction = ref<DirectionType>(\"horizontal\");\nconst type = ref<RadioType>(\"button\");\nconst value = ref(0);\nconst dates = [\n { label: \"1 week\", value: 0 },\n { label: \"1 month\", value: 1 },\n { label: \"Q1\", value: 2 },\n { label: \"1 year\", value: 3 },\n { label: \"5 years\", value: 4, disabled: true },\n];\nconst directions = [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n];\nconst types = [\n { label: \"Radio\", value: \"radio\" },\n { label: \"Button\", value: \"button\" },\n];\nconst sizes = [\n { label: \"Large\", value: \"large\", icon: LogoApple },\n { label: \"Medium\", value: \"medium\" },\n { label: \"Small\", value: \"small\" },\n];\n</script>"
13914
+ },
13915
+ {
13916
+ "title": "外观档位",
13917
+ "file": "components/radio/demo/theme.vue",
13918
+ "source": "<template>\n <Space vertical block>\n <Space v-for=\"tier in marks\" :key=\"`dot-${tier}`\" vertical>\n <code>theme: {{ tier }}</code>\n <RadioGroup :options=\"fruits\" v-model=\"dot\" :theme=\"tier\" />\n </Space>\n <Space v-for=\"tier in buttons\" :key=\"`button-${tier}`\" vertical>\n <code>{{ tier ? `theme: ${tier}` : \"no theme\" }}</code>\n <RadioGroup type=\"button\" :options=\"fruits\" v-model=\"button\" :theme=\"tier\" />\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { MarkThemeType, SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// A radio dot paints the two tiers a mark has, and the tier lands on the dot rather than on the label: `fill`\n// — what it does when nobody writes a theme — gives it a pale plate, `outline` puts a border on it instead.\n// `type=\"button\"` is a different surface entirely: the group renders buttons, so it paints the five tiers a\n// button has, and writing no theme at all keeps the buttons' own type-driven look — the checked one primary,\n// the rest outlined. Only `fill` changes how the buttons are joined; the others keep their adjacent borders.\nconst marks: MarkThemeType[] = [\"fill\", \"outline\"];\nconst buttons: (SurfaceThemeType | undefined)[] = [\n undefined,\n \"fill\",\n \"outline\",\n \"plain\",\n \"solid\",\n \"dashed\",\n];\nconst dot = ref(\"apple\");\nconst button = ref(\"apple\");\nconst fruits = [\"Apple\", \"Orange\", \"Banana\"].map((label) => ({\n label,\n value: label.toLowerCase(),\n}));\n</script>"
13494
13919
  }
13495
13920
  ]
13496
13921
  },
@@ -13564,19 +13989,17 @@
13564
13989
  },
13565
13990
  {
13566
13991
  "name": "theme",
13567
- "description": "Button theme",
13568
- "descriptionZh": "`button` 的主题",
13569
- "descriptionEn": "Button theme",
13570
- "type": "ThemeType | undefined",
13992
+ "description": "Radio option appearance; the button's theme when `type=\"button\"`",
13993
+ "descriptionZh": "单选项外观,`type=\"button\"` 时为按钮主题",
13994
+ "descriptionEn": "Radio option appearance; the button's theme when `type=\"button\"`",
13995
+ "type": "SurfaceThemeType | undefined",
13571
13996
  "boolean": false,
13572
13997
  "enumValues": [
13573
- "default",
13574
13998
  "fill",
13575
13999
  "outline",
13576
14000
  "plain",
13577
14001
  "solid",
13578
- "dashed",
13579
- "underlined"
14002
+ "dashed"
13580
14003
  ],
13581
14004
  "required": false,
13582
14005
  "documented": true
@@ -13718,7 +14141,12 @@
13718
14141
  {
13719
14142
  "title": "组合Button使用",
13720
14143
  "file": "components/radio/demo/radio-buttons.vue",
13721
- "source": "<template>\n <Space vertical>\n <Space>\n <code>Shape :</code>\n <RadioGroup v-model=\"shape\" size=\"small\" type=\"button\">\n <RadioButton value=\"round\" label=\"Round\" />\n <RadioButton value=\"circle\" label=\"Circle\" />\n <RadioButton value=\"square\" label=\"Square\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Theme :</code>\n <RadioGroup v-model=\"theme\" size=\"small\" type=\"button\">\n <RadioButton value=\"default\">Default</RadioButton>\n <RadioButton value=\"fill\" label=\"Fill\" />\n <RadioButton value=\"outline\" label=\"Outline\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Size :</code>\n <RadioGroup v-model=\"size\" type=\"button\" size=\"small\" :options=\"sizes\"></RadioGroup>\n </Space>\n <Space>\n <code>Direction :</code>\n <RadioGroup v-model=\"direction\" type=\"button\" size=\"small\" :options=\"directions\"></RadioGroup>\n </Space>\n <Space>\n <code>Type :</code>\n <RadioGroup v-model=\"type\" type=\"button\" size=\"small\" :options=\"types\"></RadioGroup>\n </Space>\n <br />\n <RadioGroup\n v-model=\"value\"\n :size=\"size\"\n :theme=\"theme\"\n :shape=\"shape\"\n :options=\"dates\"\n :direction=\"direction\"\n :type=\"type\"\n ></RadioGroup>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoApple } from \"kui-icons\";\nimport type { DirectionType, RadioType, ShapeType, SizeType, ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"medium\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<ThemeType>(\"default\");\nconst direction = ref<DirectionType>(\"horizontal\");\nconst type = ref<RadioType>(\"button\");\nconst value = ref(0);\nconst dates = [\n { label: \"1 week\", value: 0 },\n { label: \"1 month\", value: 1 },\n { label: \"Q1\", value: 2 },\n { label: \"1 year\", value: 3 },\n { label: \"5 years\", value: 4, disabled: true },\n];\nconst directions = [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n];\nconst types = [\n { label: \"Radio\", value: \"radio\" },\n { label: \"Button\", value: \"button\" },\n];\nconst sizes = [\n { label: \"Large\", value: \"large\", icon: LogoApple },\n { label: \"Medium\", value: \"medium\" },\n { label: \"Small\", value: \"small\" },\n];\n</script>"
14144
+ "source": "<template>\n <Space vertical>\n <Space>\n <code>Shape :</code>\n <RadioGroup v-model=\"shape\" size=\"small\" type=\"button\">\n <RadioButton value=\"round\" label=\"Round\" />\n <RadioButton value=\"circle\" label=\"Circle\" />\n <RadioButton value=\"square\" label=\"Square\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Theme :</code>\n <RadioGroup v-model=\"theme\" size=\"small\" type=\"button\">\n <RadioButton value=\"fill\" label=\"Fill\" />\n <RadioButton value=\"outline\" label=\"Outline\" />\n </RadioGroup>\n </Space>\n <Space>\n <code>Size :</code>\n <RadioGroup v-model=\"size\" type=\"button\" size=\"small\" :options=\"sizes\"></RadioGroup>\n </Space>\n <Space>\n <code>Direction :</code>\n <RadioGroup v-model=\"direction\" type=\"button\" size=\"small\" :options=\"directions\"></RadioGroup>\n </Space>\n <Space>\n <code>Type :</code>\n <RadioGroup v-model=\"type\" type=\"button\" size=\"small\" :options=\"types\"></RadioGroup>\n </Space>\n <br />\n <RadioGroup\n v-model=\"value\"\n :size=\"size\"\n :theme=\"theme\"\n :shape=\"shape\"\n :options=\"dates\"\n :direction=\"direction\"\n :type=\"type\"\n ></RadioGroup>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { LogoApple } from \"kui-icons\";\nimport type { DirectionType, RadioType, ShapeType, SizeType, SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"medium\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<SurfaceThemeType>(\"fill\");\nconst direction = ref<DirectionType>(\"horizontal\");\nconst type = ref<RadioType>(\"button\");\nconst value = ref(0);\nconst dates = [\n { label: \"1 week\", value: 0 },\n { label: \"1 month\", value: 1 },\n { label: \"Q1\", value: 2 },\n { label: \"1 year\", value: 3 },\n { label: \"5 years\", value: 4, disabled: true },\n];\nconst directions = [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n];\nconst types = [\n { label: \"Radio\", value: \"radio\" },\n { label: \"Button\", value: \"button\" },\n];\nconst sizes = [\n { label: \"Large\", value: \"large\", icon: LogoApple },\n { label: \"Medium\", value: \"medium\" },\n { label: \"Small\", value: \"small\" },\n];\n</script>"
14145
+ },
14146
+ {
14147
+ "title": "外观档位",
14148
+ "file": "components/radio/demo/theme.vue",
14149
+ "source": "<template>\n <Space vertical block>\n <Space v-for=\"tier in marks\" :key=\"`dot-${tier}`\" vertical>\n <code>theme: {{ tier }}</code>\n <RadioGroup :options=\"fruits\" v-model=\"dot\" :theme=\"tier\" />\n </Space>\n <Space v-for=\"tier in buttons\" :key=\"`button-${tier}`\" vertical>\n <code>{{ tier ? `theme: ${tier}` : \"no theme\" }}</code>\n <RadioGroup type=\"button\" :options=\"fruits\" v-model=\"button\" :theme=\"tier\" />\n </Space>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { MarkThemeType, SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// A radio dot paints the two tiers a mark has, and the tier lands on the dot rather than on the label: `fill`\n// — what it does when nobody writes a theme — gives it a pale plate, `outline` puts a border on it instead.\n// `type=\"button\"` is a different surface entirely: the group renders buttons, so it paints the five tiers a\n// button has, and writing no theme at all keeps the buttons' own type-driven look — the checked one primary,\n// the rest outlined. Only `fill` changes how the buttons are joined; the others keep their adjacent borders.\nconst marks: MarkThemeType[] = [\"fill\", \"outline\"];\nconst buttons: (SurfaceThemeType | undefined)[] = [\n undefined,\n \"fill\",\n \"outline\",\n \"plain\",\n \"solid\",\n \"dashed\",\n];\nconst dot = ref(\"apple\");\nconst button = ref(\"apple\");\nconst fruits = [\"Apple\", \"Orange\", \"Banana\"].map((label) => ({\n label,\n value: label.toLowerCase(),\n}));\n</script>"
13722
14150
  }
13723
14151
  ]
13724
14152
  },
@@ -14311,16 +14739,14 @@
14311
14739
  "description": "Appearance theme",
14312
14740
  "descriptionZh": "外观主题",
14313
14741
  "descriptionEn": "Appearance theme",
14314
- "type": "ThemeType",
14742
+ "type": "SurfaceThemeType",
14315
14743
  "boolean": false,
14316
14744
  "enumValues": [
14317
- "default",
14318
14745
  "fill",
14319
14746
  "outline",
14320
14747
  "plain",
14321
14748
  "solid",
14322
- "dashed",
14323
- "underlined"
14749
+ "dashed"
14324
14750
  ],
14325
14751
  "required": false,
14326
14752
  "defaultExpression": "\"outline\"",
@@ -14415,6 +14841,11 @@
14415
14841
  "title": "反馈类型",
14416
14842
  "file": "components/feedback-panel/demo/kinds.vue",
14417
14843
  "source": "<template>\n <Space vertical block size=\"large\">\n <FeedbackPanel\n compact\n kind=\"positive\"\n heading=\"Sync Complete\"\n description=\"12 records updated.。\"\n />\n <FeedbackPanel\n compact\n kind=\"neutral\"\n heading=\"Awaiting Confirmation\"\n description=\"The change will only be implemented upon confirmation.\"\n />\n <FeedbackPanel\n compact\n kind=\"caution\"\n heading=\"Partial Configuration Missing\"\n description=\"Please add the notification recipients.\"\n />\n <FeedbackPanel\n compact\n kind=\"negative\"\n heading=\"Connection Failed.\"\n description=\"Unable to access the target service. Please try again later.\"\n />\n </Space>\n</template>"
14844
+ },
14845
+ {
14846
+ "title": "外观",
14847
+ "file": "components/feedback-panel/demo/appearance.vue",
14848
+ "source": "<template>\n <div class=\"demo-list\">\n <FeedbackPanel\n v-for=\"tier in tiers\"\n :key=\"tier\"\n :theme=\"tier\"\n kind=\"positive\"\n :heading=\"`theme: ${tier}`\"\n description=\"状态色带和图标不受档位影响,只有面板自己铺多少。\"\n >\n <template #actions>\n <Button type=\"primary\">继续</Button>\n <Button>查看设置</Button>\n </template>\n </FeedbackPanel>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// A feedback panel paints all five tiers and starts on `outline`. The tier only decides how much of the panel\n// shows: the four-pixel status stripe on the left and the `kind` colours stay put in every tier, while `solid`\n// plates the panel itself on the primary and moves the heading and the actions onto the light ink of the plate.\nconst tiers: SurfaceThemeType[] = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"];\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 16px;\n}\n</style>"
14418
14849
  }
14419
14850
  ]
14420
14851
  },
@@ -14652,6 +15083,21 @@
14652
15083
  "defaultExpression": "\"bottom-left\"",
14653
15084
  "documented": true
14654
15085
  },
15086
+ {
15087
+ "name": "destroyOnClose",
15088
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
15089
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
15090
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
15091
+ "type": "boolean",
15092
+ "boolean": true,
15093
+ "enumValues": [
15094
+ false,
15095
+ true
15096
+ ],
15097
+ "required": false,
15098
+ "defaultExpression": "true",
15099
+ "documented": true
15100
+ },
14655
15101
  {
14656
15102
  "name": "bordered",
14657
15103
  "description": "Whether to show border",
@@ -14669,13 +15115,12 @@
14669
15115
  },
14670
15116
  {
14671
15117
  "name": "theme",
14672
- "description": "The theme of Select",
15118
+ "description": "Theme",
14673
15119
  "descriptionZh": "主题",
14674
- "descriptionEn": "The theme of Select",
15120
+ "descriptionEn": "Theme",
14675
15121
  "type": "ThemeType",
14676
15122
  "boolean": false,
14677
15123
  "enumValues": [
14678
- "default",
14679
15124
  "fill",
14680
15125
  "outline",
14681
15126
  "plain",
@@ -15177,7 +15622,6 @@
15177
15622
  "type": "ThemeType | undefined",
15178
15623
  "boolean": false,
15179
15624
  "enumValues": [
15180
- "default",
15181
15625
  "fill",
15182
15626
  "outline",
15183
15627
  "plain",
@@ -15929,12 +16373,14 @@
15929
16373
  "description": "Appearance theme",
15930
16374
  "descriptionZh": "外观主题",
15931
16375
  "descriptionEn": "Appearance theme",
15932
- "type": "\"fill\" | \"outline\" | \"plain\"",
16376
+ "type": "SurfaceThemeType",
15933
16377
  "boolean": false,
15934
16378
  "enumValues": [
15935
16379
  "fill",
15936
16380
  "outline",
15937
- "plain"
16381
+ "plain",
16382
+ "solid",
16383
+ "dashed"
15938
16384
  ],
15939
16385
  "required": false,
15940
16386
  "defaultExpression": "\"fill\"",
@@ -16009,9 +16455,29 @@
16009
16455
  },
16010
16456
  {
16011
16457
  "name": "title",
16012
- "description": "Card title, customizable via the named slot",
16013
- "descriptionZh": "卡片标题,也可通过同名插槽自定义",
16014
- "descriptionEn": "Card title, customizable via the named slot",
16458
+ "description": "Card title, or the slot of the same name; empty content such as `false` or an empty string renders no title row",
16459
+ "descriptionZh": "卡片标题,不传时可用同名插槽;`false`、空字符串等空内容不渲染标题行",
16460
+ "descriptionEn": "Card title, or the slot of the same name; empty content such as `false` or an empty string renders no title row",
16461
+ "type": "VNodeChild",
16462
+ "boolean": false,
16463
+ "required": false,
16464
+ "documented": true
16465
+ },
16466
+ {
16467
+ "name": "prefix",
16468
+ "description": "Prefix content of numerical value",
16469
+ "descriptionZh": "数值的前置内容",
16470
+ "descriptionEn": "Prefix content of numerical value",
16471
+ "type": "VNodeChild",
16472
+ "boolean": false,
16473
+ "required": false,
16474
+ "documented": true
16475
+ },
16476
+ {
16477
+ "name": "suffix",
16478
+ "description": "Suffix content of numerical value",
16479
+ "descriptionZh": "数值的后置内容",
16480
+ "descriptionEn": "Suffix content of numerical value",
16015
16481
  "type": "VNodeChild",
16016
16482
  "boolean": false,
16017
16483
  "required": false,
@@ -16043,12 +16509,31 @@
16043
16509
  }
16044
16510
  ],
16045
16511
  "events": [],
16046
- "slots": [],
16512
+ "slots": [
16513
+ {
16514
+ "name": "title",
16515
+ "description": "Custom card title; falls back to the `title` prop when the slot renders nothing.",
16516
+ "descriptionZh": "自定义卡片标题;插槽内容为空时回退到 `title` 属性。",
16517
+ "descriptionEn": "Custom card title; falls back to the `title` prop when the slot renders nothing."
16518
+ },
16519
+ {
16520
+ "name": "prefix",
16521
+ "description": "Default prefix for all values, scoped with `{ item, index }` and lowest in priority.",
16522
+ "descriptionZh": "所有数值的默认前置内容,作用域参数为 `{ item, index }`,优先级最低。",
16523
+ "descriptionEn": "Default prefix for all values, scoped with `{ item, index }` and lowest in priority."
16524
+ },
16525
+ {
16526
+ "name": "suffix",
16527
+ "description": "Default suffix for all values, scoped with `{ item, index }` and lowest in priority.",
16528
+ "descriptionZh": "所有数值的默认后置内容,作用域参数为 `{ item, index }`,优先级最低。",
16529
+ "descriptionEn": "Default suffix for all values, scoped with `{ item, index }` and lowest in priority."
16530
+ }
16531
+ ],
16047
16532
  "examples": [
16048
16533
  {
16049
16534
  "title": "卡片展示",
16050
16535
  "file": "components/stat-card/demo/card.vue",
16051
- "source": "<template>\n <Space vertical block>\n <Space>\n <Checkbox v-model=\"showTitle\">Show Title</Checkbox>\n <Checkbox v-model=\"reverse\">Reverse</Checkbox>\n <Segmented v-model=\"size\" :options=\"sizes\" />\n <Segmented v-model=\"theme\" :options=\"themeOptions\" />\n </Space>\n\n <Grid :cols=\"{ xs: 1, sm: 2, md: 3 }\" :xGap=\"16\" :yGap=\"16\">\n <GridItem>\n <StatCard\n :title=\"showTitle ? `Today's Orders` : undefined\"\n :reverse=\"reverse\"\n :items=\"items\"\n :theme=\"theme\"\n :size=\"size\"\n />\n </GridItem>\n <GridItem>\n <StatCard\n statNumberType=\"rollup\"\n :title=\"showTitle ? `Today's income` : undefined\"\n :items=\"items1\"\n :theme=\"theme\"\n :reverse=\"reverse\"\n :size=\"size\"\n />\n </GridItem>\n <GridItem :span=\"{ xs: 1, sm: 2, md: 1 }\">\n <StatCard\n :reverse=\"reverse\"\n statNumberType=\"rollup\"\n :title=\"showTitle ? 'Media data' : undefined\"\n :items=\"items2\"\n :theme=\"theme\"\n :size=\"size\"\n />\n </GridItem>\n </Grid>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Star } from \"kui-icons\";\nimport { Icon, type SizeType, type StatNumberItem } from \"kui-vue\";\nimport { h, ref } from \"vue\";\nconst showTitle = ref(true);\nconst reverse = ref(false);\nconst size = ref<SizeType>(\"medium\");\nconst theme = ref<\"fill\" | \"outline\" | \"plain\">(\"fill\");\nconst sizes = [\"small\", \"medium\", \"large\"].map((value) => ({\n value,\n label: value,\n}));\nconst themeOptions = [\"outline\", \"fill\", \"plain\"].map((value) => ({\n value,\n label: value,\n}));\nconst items = [\n { value: 5872, desc: \"Number of orders\" },\n { value: 9873672, desc: \"Total Order Amount\", prefix: \"¥\" },\n];\n\nconst items1 = [\n { value: 5872, desc: \"Alipay Revenue\", prefix: \"$\", precision: 2 },\n { value: 9873672, desc: \"WeChat Revenue\", prefix: \"¥\", precision: 2 },\n];\nconst items2: StatNumberItem[] = [\n {\n value: 5872,\n desc: \"Number of likes\",\n prefix: h(Icon, { type: Heart }),\n },\n {\n value: 9873672,\n desc: \"Number of Favorites\",\n prefix: h(Icon, { type: Star }),\n },\n];\n</script>"
16536
+ "source": "<template>\n <Space vertical block>\n <Space>\n <Checkbox v-model=\"showTitle\">Show Title</Checkbox>\n <Checkbox v-model=\"reverse\">Reverse</Checkbox>\n <Segmented v-model=\"size\" :options=\"sizes\" />\n <Segmented v-model=\"theme\" :options=\"themeOptions\" />\n </Space>\n\n <Grid :cols=\"{ xs: 1, sm: 2, md: 3 }\" :xGap=\"16\" :yGap=\"16\">\n <GridItem>\n <StatCard\n :title=\"showTitle ? `Today's Orders` : undefined\"\n :reverse=\"reverse\"\n :items=\"items\"\n :theme=\"theme\"\n :size=\"size\"\n />\n </GridItem>\n <GridItem>\n <StatCard\n statNumberType=\"rollup\"\n :title=\"showTitle ? `Today's income` : undefined\"\n :items=\"items1\"\n :theme=\"theme\"\n :reverse=\"reverse\"\n :size=\"size\"\n />\n </GridItem>\n <GridItem :span=\"{ xs: 1, sm: 2, md: 1 }\">\n <StatCard\n :reverse=\"reverse\"\n statNumberType=\"rollup\"\n :title=\"showTitle ? 'Media data' : undefined\"\n :items=\"items2\"\n :theme=\"theme\"\n :size=\"size\"\n />\n </GridItem>\n </Grid>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Heart, Star } from \"kui-icons\";\nimport { Icon, type SizeType, type StatNumberItem, type SurfaceThemeType } from \"kui-vue\";\nimport { h, ref } from \"vue\";\nconst showTitle = ref(true);\nconst reverse = ref(false);\nconst size = ref<SizeType>(\"medium\");\nconst theme = ref<SurfaceThemeType>(\"fill\");\nconst sizes = [\"small\", \"medium\", \"large\"].map((value) => ({\n value,\n label: value,\n}));\nconst themeOptions = [\"outline\", \"fill\", \"plain\", \"solid\", \"dashed\"].map((value) => ({\n value,\n label: value,\n}));\nconst items = [\n { value: 5872, desc: \"Number of orders\" },\n { value: 9873672, desc: \"Total Order Amount\", prefix: \"¥\" },\n];\n\nconst items1 = [\n { value: 5872, desc: \"Alipay Revenue\", prefix: \"$\", precision: 2 },\n { value: 9873672, desc: \"WeChat Revenue\", prefix: \"¥\", precision: 2 },\n];\nconst items2: StatNumberItem[] = [\n {\n value: 5872,\n desc: \"Number of likes\",\n prefix: h(Icon, { type: Heart }),\n },\n {\n value: 9873672,\n desc: \"Number of Favorites\",\n prefix: h(Icon, { type: Star }),\n },\n];\n</script>"
16052
16537
  },
16053
16538
  {
16054
16539
  "title": "趋势信息",
@@ -16059,6 +16544,11 @@
16059
16544
  "title": "组合展示",
16060
16545
  "file": "components/stat-card/demo/with-card.vue",
16061
16546
  "source": "<template>\n <Space vertical class=\"demo-view-fill\">\n <Card>\n <StatNumber v-model=\"value\" prefix=\"$\" suffix=\"%\" style=\"font-size: 2em\" />\n </Card>\n <Card title=\"Today's Trends\">\n <StatNumber v-model=\"value\" suffix=\"%\" style=\"font-size: 2em; color: green\">\n <template #prefix><Icon :type=\"ArrowUp\" /></template>\n </StatNumber>\n </Card>\n <Card title=\"Yesterday's Trend\">\n <StatNumber v-model=\"value\" suffix=\"%\" style=\"font-size: 2em; color: red\" type=\"rollup\">\n <template #prefix><Icon :type=\"ArrowDown\" /></template>\n </StatNumber>\n </Card>\n\n <Button @click=\"change\">change</Button>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ArrowDown, ArrowUp } from \"kui-icons\";\nimport { ref } from \"vue\";\nconst value = ref(Math.random() * 100000);\nconst change = () => {\n value.value = Math.random() * 100000;\n};\n</script>"
16547
+ },
16548
+ {
16549
+ "title": "外观",
16550
+ "file": "components/stat-card/demo/appearance.vue",
16551
+ "source": "<template>\n <div class=\"stat-demo\">\n <StatCard\n v-for=\"tier in tiers\"\n :key=\"tier\"\n :title=\"`theme: ${tier}`\"\n :items=\"items\"\n :theme=\"tier\"\n size=\"small\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { StatNumberItem, SurfaceThemeType } from \"kui-vue\";\n\n// The stat card takes the same five tiers as the other cards and starts on `fill`. `solid` is the tier worth\n// looking at here: the numbers and their captions both go to the light ink of the plate, and `plain` leaves\n// them with no box at all. One short item list, so the only thing moving down the row is the surface.\nconst tiers: SurfaceThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\"];\nconst items: StatNumberItem[] = [{ value: 5872, desc: \"订单数\" }];\n</script>\n\n<style scoped>\n.stat-demo {\n display: grid;\n grid-template-columns: repeat(5, minmax(0, 1fr));\n gap: 12px;\n}\n</style>"
16062
16552
  }
16063
16553
  ]
16064
16554
  },
@@ -16167,30 +16657,30 @@
16167
16657
  "documented": true
16168
16658
  },
16169
16659
  {
16170
- "name": "separator",
16171
- "description": "Separator",
16172
- "descriptionZh": "分隔符",
16173
- "descriptionEn": "Separator",
16660
+ "name": "prefix",
16661
+ "description": "Prefix content of numerical value",
16662
+ "descriptionZh": "数值的前置内容",
16663
+ "descriptionEn": "Prefix content of numerical value",
16174
16664
  "type": "string | undefined",
16175
16665
  "boolean": false,
16176
16666
  "required": false,
16177
16667
  "documented": true
16178
16668
  },
16179
16669
  {
16180
- "name": "prefix",
16181
- "description": "Custom prefix content, such as an icon.",
16182
- "descriptionZh": "自定义前置内容,例如图标。",
16183
- "descriptionEn": "Custom prefix content, such as an icon.",
16670
+ "name": "suffix",
16671
+ "description": "Suffix content of numerical value",
16672
+ "descriptionZh": "数值的后置内容",
16673
+ "descriptionEn": "Suffix content of numerical value",
16184
16674
  "type": "string | undefined",
16185
16675
  "boolean": false,
16186
16676
  "required": false,
16187
16677
  "documented": true
16188
16678
  },
16189
16679
  {
16190
- "name": "suffix",
16191
- "description": "Custom suffix content, such as a unit.",
16192
- "descriptionZh": "自定义后置内容,例如单位。",
16193
- "descriptionEn": "Custom suffix content, such as a unit.",
16680
+ "name": "separator",
16681
+ "description": "Separator",
16682
+ "descriptionZh": "分隔符",
16683
+ "descriptionEn": "Separator",
16194
16684
  "type": "string | undefined",
16195
16685
  "boolean": false,
16196
16686
  "required": false,
@@ -17604,10 +18094,10 @@
17604
18094
  },
17605
18095
  {
17606
18096
  "name": "rowKey",
17607
- "description": "Basis for selection",
17608
- "descriptionZh": "勾选时的依据",
17609
- "descriptionEn": "Basis for selection",
17610
- "type": "string",
18097
+ "description": "Unique row identity used by selection and expansion; a field name or an accessor function reading the key from a record",
18098
+ "descriptionZh": "行的唯一标识,勾选与展开都以它为准;可传字段名,或传函数从记录中取值",
18099
+ "descriptionEn": "Unique row identity used by selection and expansion; a field name or an accessor function reading the key from a record",
18100
+ "type": "string | ((record: TableRecord) => TableKey)",
17611
18101
  "boolean": false,
17612
18102
  "required": false,
17613
18103
  "defaultExpression": "\"key\"",
@@ -17637,9 +18127,9 @@
17637
18127
  },
17638
18128
  {
17639
18129
  "name": "scroll",
17640
- "description": "Scroll configuration; `x` is the minimum content width and `y` is the vertical viewport height",
17641
- "descriptionZh": "滚动配置;`x` 为内容最小宽度,`y` 为纵向区域高度",
17642
- "descriptionEn": "Scroll configuration; `x` is the minimum content width and `y` is the vertical viewport height",
18130
+ "description": "Scroll configuration; `x` is the minimum content width and `y` is the vertical viewport height of the body",
18131
+ "descriptionZh": "滚动配置;`x` 为内容最小宽度,`y` 为表体的纵向滚动区域高度",
18132
+ "descriptionEn": "Scroll configuration; `x` is the minimum content width and `y` is the vertical viewport height of the body",
17643
18133
  "type": "{ x?: number | string; y?: number | string; }",
17644
18134
  "boolean": false,
17645
18135
  "required": false,
@@ -17699,6 +18189,17 @@
17699
18189
  "required": false,
17700
18190
  "documented": true
17701
18191
  },
18192
+ {
18193
+ "name": "ellipsis",
18194
+ "description": "Turn on the ellipsis for every column at once, so you do not have to write `ellipsis` on each one; `true` is a single line, a number or `rows` clamps to several lines, and `tooltip` customizes the hover tip. A column that must show its full content opts out with `ellipsis: false`.",
18195
+ "descriptionZh": "一次给所有列打开省略号,省得一列列写 `ellipsis`;`true` 单行,数字或 `rows` 是多行,`tooltip` 定制悬停提示。某一列想显示完整内容,就在那列写 `ellipsis: false` 单独关掉。",
18196
+ "descriptionEn": "Turn on the ellipsis for every column at once, so you do not have to write `ellipsis` on each one; `true` is a single line, a number or `rows` clamps to several lines, and `tooltip` customizes the hover tip. A column that must show its full content opts out with `ellipsis: false`.",
18197
+ "type": "number | boolean | TableEllipsisOptions | undefined",
18198
+ "boolean": false,
18199
+ "required": false,
18200
+ "defaultExpression": "undefined",
18201
+ "documented": true
18202
+ },
17702
18203
  {
17703
18204
  "name": "expandedKeys",
17704
18205
  "description": "expanded row keys; supports `v-model:expanded-keys`",
@@ -17711,9 +18212,9 @@
17711
18212
  },
17712
18213
  {
17713
18214
  "name": "expandAllRows",
17714
- "description": "Expand every tree node on initialization or when this prop changes (explicit expandedKeys takes precedence)",
17715
- "descriptionZh": "初始化及属性变化时展开所有树节点(expandedKeys 优先)",
17716
- "descriptionEn": "Expand every tree node on initialization or when this prop changes (explicit expandedKeys takes precedence)",
18215
+ "description": "Expand every tree node on initialization; when `data` changes later only newly arrived parent rows are expanded, while rows the user expanded or collapsed by hand are kept (explicit expandedKeys takes precedence)",
18216
+ "descriptionZh": "初始化时展开所有树节点;`data` 后续变化时只补新增的父行,用户手动展开或折叠过的行保持不变(expandedKeys 优先)",
18217
+ "descriptionEn": "Expand every tree node on initialization; when `data` changes later only newly arrived parent rows are expanded, while rows the user expanded or collapsed by hand are kept (explicit expandedKeys takes precedence)",
17717
18218
  "type": "boolean | undefined",
17718
18219
  "boolean": true,
17719
18220
  "enumValues": [
@@ -17909,7 +18410,7 @@
17909
18410
  {
17910
18411
  "title": "基本用法",
17911
18412
  "file": "components/table/demo/basic.vue",
17912
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" @rowClick=\"rowClick\">\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #gender=\"{ value }\">\n <Icon :type=\"value == 1 ? Sun : Moon\" :color=\"value == 1 ? 'blue' : '#f50cff'\" size=\"15\" />\n </template>\n <template #action=\"{ record, rowIndex }\">\n <Space>\n <Button size=\"small\" @click.stop=\"() => moveUp(rowIndex)\" :icon=\"ArrowUp\"></Button>\n <Button size=\"small\" @click.stop=\"() => moveDown(rowIndex)\" :icon=\"ArrowDown\"></Button>\n <Button size=\"small\" @click.stop=\"() => deleteRow(rowIndex)\" :icon=\"Trash2\"></Button>\n <Button size=\"small\" @click.stop=\"() => show(record)\">more</Button>\n </Space>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport { ArrowDown, ArrowUp, Moon, Sun, Trash2 } from \"kui-icons\";\nimport { message, modal, type Column, type TableRecord } from \"kui-vue\";\nimport { reactive } from \"vue\";\nconst data = reactive([\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n]);\ntype TableRow = (typeof data)[number];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n { title: \"Operate\", key: \"action\" },\n];\nconst moveUp = (rowIndex: number) => {\n if (rowIndex > 0) [data[rowIndex], data[rowIndex - 1]] = [data[rowIndex - 1], data[rowIndex]];\n};\nconst moveDown = (rowIndex: number) => {\n if (rowIndex < data.length - 1)\n [data[rowIndex], data[rowIndex + 1]] = [data[rowIndex + 1], data[rowIndex]];\n};\nconst deleteRow = (rowIndex: number) => {\n data.splice(rowIndex, 1);\n};\nconst show = (record: TableRow) => {\n modal.info({\n title: \"Hi\",\n content: `My name is ${record.name}`,\n });\n};\nconst rowClick = (record: TableRecord) => {\n message.info(\"Test row click: \" + String(record.name));\n};\n</script>"
18413
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" @rowClick=\"rowClick\">\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #gender=\"{ value }\">\n <Icon :type=\"value == 1 ? Sun : Moon\" :color=\"value == 1 ? 'blue' : '#f50cff'\" size=\"15\" />\n </template>\n <template #action=\"{ record, rowIndex }\">\n <Space>\n <Button size=\"small\" @click.stop=\"() => moveUp(rowIndex)\" :icon=\"ArrowUp\"></Button>\n <Button size=\"small\" @click.stop=\"() => moveDown(rowIndex)\" :icon=\"ArrowDown\"></Button>\n <Button size=\"small\" @click.stop=\"() => deleteRow(rowIndex)\" :icon=\"Trash2\"></Button>\n <Button size=\"small\" @click.stop=\"() => show(record)\">more</Button>\n </Space>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport { ArrowDown, ArrowUp, Moon, Sun, Trash2 } from \"kui-icons\";\nimport { message, modal, type Column, type TableRecord } from \"kui-vue\";\nimport { reactive } from \"vue\";\nconst data = reactive([\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n]);\ntype TableRow = (typeof data)[number];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n { title: \"Operate\", key: \"action\", width: 200 },\n];\nconst moveUp = (rowIndex: number) => {\n if (rowIndex > 0) [data[rowIndex], data[rowIndex - 1]] = [data[rowIndex - 1], data[rowIndex]];\n};\nconst moveDown = (rowIndex: number) => {\n if (rowIndex < data.length - 1)\n [data[rowIndex], data[rowIndex + 1]] = [data[rowIndex + 1], data[rowIndex]];\n};\nconst deleteRow = (rowIndex: number) => {\n data.splice(rowIndex, 1);\n};\nconst show = (record: TableRow) => {\n modal.info({\n title: \"Hi\",\n content: `My name is ${record.name}`,\n });\n};\nconst rowClick = (record: TableRecord) => {\n message.info(\"Test row click: \" + String(record.name));\n};\n</script>"
17913
18414
  },
17914
18415
  {
17915
18416
  "title": "树形数据",
@@ -17919,7 +18420,7 @@
17919
18420
  {
17920
18421
  "title": "基本用法(使用render)",
17921
18422
  "file": "components/table/demo/base-render.vue",
17922
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" />\n</template>\n<script setup lang=\"ts\">\nimport { Moon, Sun } from \"kui-icons\";\nimport { Button, Icon, modal, Space, Tag, type Column } from \"kui-vue\";\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n {\n title: \"Gender\",\n key: \"gender\",\n render: (h, { gender }) => {\n return h(Icon, {\n type: gender == 1 ? Sun : Moon,\n color: gender == 1 ? \"blue\" : \"#f50cff\",\n size: 15,\n });\n },\n },\n { title: \"Address\", key: \"address\" },\n {\n title: \"Tags\",\n key: \"tags\",\n render: (h, record) => {\n const tags = Array.isArray(record.tags)\n ? record.tags.filter((tag): tag is string => typeof tag === \"string\")\n : [];\n return h(\n Space,\n {},\n {\n default: () =>\n tags.map(function (tag) {\n return h(\n Tag,\n {\n color: tag == \"Python\" ? \"green\" : \"blue\",\n },\n { default: () => tag },\n );\n }),\n },\n );\n },\n },\n {\n title: \"Operate\",\n key: \"action\",\n render: (h, record) => {\n return h(\n Button,\n {\n size: \"small\",\n onClick: () => {\n modal.info({\n title: \"More\",\n content: `My name is ${record.name}`,\n });\n },\n },\n { default: () => \"more\" },\n );\n },\n },\n];\n</script>"
18423
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" />\n</template>\n<script setup lang=\"ts\">\nimport { h } from \"vue\";\nimport { Moon, Sun } from \"kui-icons\";\nimport { Button, Icon, modal, Space, Tag, type Column } from \"kui-vue\";\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n {\n title: \"Gender\",\n key: \"gender\",\n render: (value) => {\n const isSun = Number(value) === 1;\n return h(Icon, {\n type: isSun ? Sun : Moon,\n color: isSun ? \"blue\" : \"#f50cff\",\n size: 15,\n });\n },\n },\n { title: \"Address\", key: \"address\" },\n {\n title: \"Tags\",\n key: \"tags\",\n render: (value) => {\n const tags = Array.isArray(value)\n ? value.filter((tag): tag is string => typeof tag === \"string\")\n : [];\n return h(\n Space,\n {},\n {\n default: () =>\n tags.map(function (tag) {\n return h(\n Tag,\n {\n color: tag == \"Python\" ? \"green\" : \"blue\",\n },\n { default: () => tag },\n );\n }),\n },\n );\n },\n },\n {\n title: \"Operate\",\n key: \"action\",\n render: (_value, record) => {\n return h(\n Button,\n {\n size: \"small\",\n onClick: () => {\n modal.info({\n title: \"More\",\n content: `My name is ${record.name}`,\n });\n },\n },\n { default: () => \"more\" },\n );\n },\n },\n];\n</script>"
17923
18424
  },
17924
18425
  {
17925
18426
  "title": "自定义表头",
@@ -17929,7 +18430,7 @@
17929
18430
  {
17930
18431
  "title": "自定义页头和页脚",
17931
18432
  "file": "components/table/demo/bordered.vue",
17932
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered>\n <template #fullname=\"{ value }\">\n <a>{{ value }}</a>\n </template>\n <template #price=\"{ value }\">\n <span :class=\"{ 'test-table-price': value > 20000 }\">¥{{ value }}/㎡</span>\n </template>\n <template #header>Header</template>\n <template #footer>Footer</template>\n </Table>\n</template>\n<script>\nexport default {\n data() {\n return {\n data: [\n {\n key: \"0\",\n fullname: \"Li Lei\",\n price: 18990,\n address: \"Wu Han Guanggu No. 328\",\n },\n {\n key: \"1\",\n fullname: \"Liu Hao\",\n price: 23900,\n address: \"Wu Han Hongshan No. 128\",\n },\n {\n key: \"2\",\n fullname: \"Hu Cong\",\n price: 12000,\n address: \"Wu Han Nanhu No. 198\",\n },\n {\n key: \"3\",\n fullname: \"Qiu\",\n price: 28000,\n address: \"Wu Han Nanhu No. 188\",\n },\n ],\n columns: [\n { title: \"Name\", key: \"fullname\" },\n { title: \"Housing price\", key: \"price\" },\n { title: \"Address\", key: \"address\" },\n ],\n };\n },\n};\n</script>"
18433
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered>\n <template #fullname=\"{ value }\">\n <a>{{ value }}</a>\n </template>\n <template #price=\"{ value }\">\n <span :style='{ color: value > 20000 ? \"red\" : undefined }'>¥{{ value }}/㎡</span>\n </template>\n <template #header>Header</template>\n <template #footer>Footer</template>\n </Table>\n</template>\n<script>\nexport default {\n data() {\n return {\n data: [\n {\n key: \"0\",\n fullname: \"Li Lei\",\n price: 18990,\n address: \"Wu Han Guanggu No. 328\",\n },\n {\n key: \"1\",\n fullname: \"Liu Hao\",\n price: 23900,\n address: \"Wu Han Hongshan No. 128\",\n },\n {\n key: \"2\",\n fullname: \"Hu Cong\",\n price: 12000,\n address: \"Wu Han Nanhu No. 198\",\n },\n {\n key: \"3\",\n fullname: \"Qiu\",\n price: 28000,\n address: \"Wu Han Nanhu No. 188\",\n },\n ],\n columns: [\n { title: \"Name\", key: \"fullname\" },\n { title: \"Housing price\", key: \"price\" },\n { title: \"Address\", key: \"address\" },\n ],\n };\n },\n};\n</script>"
17933
18434
  },
17934
18435
  {
17935
18436
  "title": "排序",
@@ -17949,18 +18450,23 @@
17949
18450
  {
17950
18451
  "title": "固定头/列",
17951
18452
  "file": "components/table/demo/fixed-col-header.vue",
17952
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" :scroll=\"{ y: 300 }\">\n <template #action>\n <Button size=\"small\">test</Button>\n </template>\n <template #action1>\n <Button size=\"small\">test2</Button>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst _columns: Column[] = [],\n dataItem: Record<string, string> = {};\nfor (let i = 0; i < 20; i++) {\n _columns.push({ title: \"Col\" + i, key: \"address\" + i, width: 150 });\n dataItem[\"address\" + i] = \"Hubei Wuhan SoftBase No.128\";\n}\n\nconst data = new Array(10).fill(\"\").map((_, i) => {\n return {\n key: i,\n name: \"Han Mei\",\n age: 28,\n address: \"Hubei Wuhan SoftBase No.128\",\n ...dataItem,\n };\n});\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\", fixed: \"left\" },\n { title: \"Age\", key: \"age\", fixed: \"left\" },\n ..._columns,\n { title: \"Operate\", key: \"action\", fixed: \"right\" },\n { title: \"Operate\", key: \"action1\", fixed: \"right\" },\n];\n</script>"
18453
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" :scroll=\"{ y: 300 }\">\n <template #action>\n <Button size=\"small\">test</Button>\n </template>\n <template #action1>\n <Button size=\"small\">test2</Button>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst _columns: Column[] = [],\n dataItem: Record<string, string> = {};\nfor (let i = 0; i < 20; i++) {\n _columns.push({ title: \"Col\" + i, key: \"address\" + i, width: 150 });\n dataItem[\"address\" + i] = \"Hubei Wuhan SoftBase No.128\";\n}\n\nconst data = new Array(10).fill(\"\").map((_, i) => {\n return {\n key: i,\n name: \"Han Mei\",\n age: 28,\n address: \"Hubei Wuhan SoftBase No.128\",\n ...dataItem,\n };\n});\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\", fixed: \"left\" },\n { title: \"Age\", key: \"age\", fixed: \"left\" },\n ..._columns,\n // 分组父列上的 `fixed` 会继承给它的每个叶子列,整组一起固定\n {\n title: \"Operate\",\n key: \"operate\",\n fixed: \"right\",\n children: [\n { title: \"Edit\", key: \"action\" },\n { title: \"More\", key: \"action1\" },\n ],\n },\n];\n</script>"
17953
18454
  },
17954
18455
  {
17955
18456
  "title": "表头分组",
17956
18457
  "file": "components/table/demo/header-span.vue",
17957
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered :scroll=\"{ y: 300 }\"></Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = [];\nfor (let i = 0; i < 10; i++) {\n data.push({\n key: i,\n name: \"John Brown\",\n age: i + 1,\n street: \"Lake Park\",\n building: \"C\",\n number: 2035,\n companyAddress: \"Lake Street 42\",\n companyName: \"SoftLake Co\",\n gender: \"M\",\n });\n}\nconst columns: Column[] = [\n {\n title: \"Name\",\n key: \"name\",\n width: 120,\n fixed: \"left\",\n },\n {\n title: \"Other\",\n key: \"other\",\n children: [\n {\n title: \"Age\",\n key: \"age\",\n sorter: true,\n },\n {\n title: \"Address\",\n key: \"address\",\n children: [\n {\n title: \"Street\",\n key: \"street\",\n },\n {\n title: \"Block\",\n key: \"block\",\n children: [\n {\n title: \"Building\",\n key: \"building\",\n },\n {\n title: \"Door No.\",\n key: \"number\",\n },\n ],\n },\n ],\n },\n ],\n },\n {\n title: \"Company\",\n key: \"Company\",\n children: [\n {\n title: \"Company Address\",\n key: \"companyAddress\",\n width: 200,\n },\n {\n title: \"Company Name\",\n key: \"companyName\",\n width: 200,\n },\n ],\n },\n {\n title: \"Gender\",\n key: \"gender\",\n width: 100,\n fixed: \"right\",\n },\n];\n</script>"
18458
+ "source": "<template>\n <!-- `scroll.x` 按叶子列宽度之和给(120+100+140+120+120+200+200+100 = 1_100)。\n 不给的话这些窄列会被挤到十几个像素,表头文字竖排换行,四层表头能长到 400 多 px,\n 比 `scroll.y` 的可视高度还高,等于把表体整个顶出可视区。与 kui-react 同一份配置。 -->\n <Table\n :data=\"data\"\n :columns=\"columns\"\n bordered\n :scroll=\"{ x: 1100, y: 300 }\"\n ></Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = [];\nfor (let i = 0; i < 10; i++) {\n data.push({\n key: i,\n name: \"John Brown\",\n age: i + 1,\n street: \"Lake Park\",\n building: \"C\",\n number: 2035,\n companyAddress: \"Lake Street 42\",\n companyName: \"SoftLake Co\",\n gender: \"M\",\n });\n}\nconst columns: Column[] = [\n {\n title: \"Name\",\n key: \"name\",\n width: 120,\n fixed: \"left\",\n },\n {\n title: \"Other\",\n key: \"other\",\n children: [\n {\n title: \"Age\",\n key: \"age\",\n width: 100,\n sorter: true,\n },\n {\n title: \"Address\",\n key: \"address\",\n children: [\n {\n title: \"Street\",\n key: \"street\",\n width: 140,\n },\n {\n title: \"Block\",\n key: \"block\",\n children: [\n {\n title: \"Building\",\n key: \"building\",\n width: 120,\n },\n {\n title: \"Door No.\",\n key: \"number\",\n width: 120,\n },\n ],\n },\n ],\n },\n ],\n },\n {\n title: \"Company\",\n key: \"company\",\n children: [\n {\n title: \"Company Address\",\n key: \"companyAddress\",\n width: 200,\n },\n {\n title: \"Company Name\",\n key: \"companyName\",\n width: 200,\n },\n ],\n },\n {\n title: \"Gender\",\n key: \"gender\",\n width: 100,\n fixed: \"right\",\n },\n];\n</script>"
17958
18459
  },
17959
18460
  {
17960
18461
  "title": "勾选",
17961
18462
  "file": "components/table/demo/table-check.vue",
17962
18463
  "source": "<template>\n <code>selectedKeys: {{ selectedKeys }}</code>\n <Table\n :data=\"data\"\n :columns=\"columns\"\n ref=\"selection\"\n checkable\n v-model:selectedKeys=\"selectedKeys\"\n >\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #action>\n <a href=\"javascript:;\">Edit</a>\n <a href=\"javascript:;\">Delete</a>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column, TableKey } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst selectedKeys = ref<TableKey[]>([]);\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n];\n</script>"
17963
18464
  },
18465
+ {
18466
+ "title": "嵌套取值",
18467
+ "file": "components/table/demo/nested-value.vue",
18468
+ "source": "<template>\n <Table\n :data=\"data\"\n :columns=\"columns\"\n row-key=\"meta.uid\"\n children-column-name=\"rows.items\"\n expand-all-rows\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\n/**\n * 嵌套数据不需要先拍平:列 `key`、`rowKey`、`childrenColumnName` 都可以写成 `a.b` 点路径。\n * 整名优先,所以字段名本身带点号时仍按整名取值;下钻途中缺字段只会渲染成空,不会抛错(kui-react 行为相同)。\n */\ninterface Member {\n [key: string]: unknown;\n meta: { uid: string };\n profile: { name: string; city?: string };\n tags?: string[];\n rows?: { items: Member[] };\n}\n\nconst data: Member[] = [\n {\n meta: { uid: \"design\" },\n profile: { name: \"Design Guild\", city: \"Hangzhou\" },\n tags: [\"Studio\", \"Brand\"],\n rows: {\n items: [\n { meta: { uid: \"ann\" }, profile: { name: \"Ann\", city: \"Hangzhou\" }, tags: [\"Studio\"] },\n { meta: { uid: \"bob\" }, profile: { name: \"Bob\" } },\n ],\n },\n },\n {\n meta: { uid: \"front-end\" },\n profile: { name: \"Front-end Guild\", city: \"Shanghai\" },\n tags: [\"Kui\"],\n rows: {\n items: [\n {\n meta: { uid: \"cara\" },\n profile: { name: \"Cara\", city: \"Shanghai\" },\n tags: [\"Kui\", \"Charts\"],\n },\n ],\n },\n },\n];\nconst columns: Column[] = [\n { key: \"profile.name\", title: \"Name\", sorter: true },\n { key: \"profile.city\", title: \"City\" },\n { key: \"tags.0\", title: \"Primary tag\" },\n { key: \"tags.1\", title: \"Secondary tag\" },\n];\n</script>"
18469
+ },
17964
18470
  {
17965
18471
  "title": "动态控制表格属性",
17966
18472
  "file": "components/table/demo/control.vue",
@@ -17969,12 +18475,17 @@
17969
18475
  {
17970
18476
  "title": "虚拟滚动",
17971
18477
  "file": "components/table/demo/virtual.vue",
17972
- "source": "<template>\n <Table\n virtual\n striped\n :data=\"data\"\n :columns=\"columns\"\n :scroll=\"{ x: 900, y: 360 }\"\n :item-height=\"44\"\n :overscan=\"6\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = Array.from({ length: 10000 }, (_, index) => ({\n key: index + 1,\n name: `User ${index + 1}`,\n email: `user${index + 1}@example.com`,\n status: index % 3 === 0 ? \"Active\" : \"Pending\",\n}));\nconst columns: Column[] = [\n { title: \"ID\", key: \"key\", width: 100 },\n { title: \"Name\", key: \"name\" },\n { title: \"Email\", key: \"email\", width: 200 },\n { title: \"Email1\", key: \"email1\" },\n { title: \"Email2\", key: \"email2\" },\n { title: \"Email3\", key: \"email3\" },\n { title: \"Email4\", key: \"email4\" },\n { title: \"Email5\", key: \"email5\" },\n { title: \"Status\", key: \"status\", width: 140, fixed: \"right\" },\n];\n</script>"
18478
+ "source": "<template>\n <Table\n virtual\n striped\n :data=\"data\"\n :columns=\"columns\"\n :scroll=\"{ x: 900, y: 360 }\"\n :item-height=\"44\"\n :overscan=\"6\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = Array.from({ length: 10000 }, (_, index) => ({\n key: index + 1,\n name: `User ${index + 1}`,\n email: `user${index + 1}@example.com`,\n status: index % 3 === 0 ? \"Active\" : \"Pending\",\n}));\nconst columns: Column[] = [\n { title: \"ID\", key: \"key\", width: 100 },\n { title: \"Name\", key: \"name\", width: 200 },\n { title: \"Email\", key: \"email\", width: 200 },\n { title: \"Email1\", key: \"email1\", width: 100 },\n { title: \"Email2\", key: \"email2\", width: 100 },\n { title: \"Email3\", key: \"email3\", width: 100 },\n { title: \"Email4\", key: \"email4\", width: 100 },\n { title: \"Email5\", key: \"email5\", width: 100 },\n { title: \"Status\", key: \"status\", width: 140, fixed: \"right\" },\n];\n</script>"
17973
18479
  },
17974
18480
  {
17975
18481
  "title": "列设置",
17976
18482
  "file": "components/table/demo/column-setting.vue",
17977
18483
  "source": "<template>\n <Space vertical block>\n <TableColumnSetting\n v-model:hidden-keys=\"hiddenKeys\"\n :columns=\"columns\"\n :disabled-keys=\"['name']\"\n title=\"显示列\"\n reset-text=\"重置\"\n />\n <Table :data=\"data\" :columns=\"columns\" :hidden-column-keys=\"hiddenKeys\" />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\n\nconst hiddenKeys = ref<string[]>([]);\nconst columns: Column[] = [\n { title: \"姓名\", key: \"name\" },\n { title: \"部门\", key: \"department\" },\n { title: \"状态\", key: \"status\" },\n];\nconst data = [{ key: 1, name: \"林晓\", department: \"产品中心\", status: \"正常\" }];\n</script>"
18484
+ },
18485
+ {
18486
+ "title": "省略号",
18487
+ "file": "components/table/demo/ellipsis.vue",
18488
+ "source": "<template>\n <Space vertical>\n <Space>\n <Switch v-model=\"global\" />\n <span>表格级 ellipsis</span>\n </Space>\n <!-- 容器压到 480px,列宽不够才看得到省略号。 -->\n <div style=\"max-width: 480px\">\n <Table :data=\"data\" :columns=\"columns\" :ellipsis=\"global\" row-key=\"key\" />\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n/**\n * 单元格内容超出列宽时截断成省略号:表格级 `ellipsis` 一次管所有列,列上的 `ellipsis` 覆盖它,\n * 那一列想留完整内容就写 `ellipsis: false`(kui-react 行为相同)。\n *\n * 悬停提示默认就有,但只在真的被截断时才弹(没截断的格子不会多出气泡),内容默认是截断的那段文本。\n */\nconst data = [\n {\n key: \"1\",\n title: \"把双仓的表格样式对齐到同一份 LESS\",\n owner: \"Qiu\",\n note: \"固定列的宽度基准、相邻固定列的 sticky 偏移、滚动条槽位的占位三处必须用同一份数据,少同步一处就会在临界宽度上露馅,横向能滚的距离也会跟着变。\",\n },\n {\n key: \"2\",\n title: \"分组表头 + 固定列 + scroll.y\",\n owner: \"Ann\",\n note: \"分组表头配上固定列和纵向滚动时,边框、圆角和右下角的空白块最容易出问题,表头分栏之后每格的裁剪范围不同,得逐个组合回归。\",\n },\n {\n key: \"3\",\n title: \"虚拟滚动窗口\",\n owner: \"Bob\",\n note: \"虚拟滚动的窗口起点要按总行数钳上界,否则滚过头会渲染出一段空窗口,保留区高度也会算错,滚动条跟着突然抖动一下。\",\n },\n];\n\nconst columns: Column[] = [\n // 没有 `ellipsis`:跟着表格级走,单行截断。\n { title: \"任务\", key: \"title\", width: 160 },\n // 这一列单独关掉:负责人一般很短,被截断反而难看。\n { title: \"负责人\", key: \"owner\", width: 100, ellipsis: false },\n // 说明截到三行,提示换成指定内容。\n {\n title: \"说明\",\n key: \"note\",\n width: 200,\n ellipsis: { rows: 3, tooltip: \"完整说明请进需求单\" },\n },\n];\n\nconst global = ref(true);\n</script>"
17978
18489
  }
17979
18490
  ]
17980
18491
  },
@@ -18124,7 +18635,7 @@
18124
18635
  {
18125
18636
  "title": "基本用法",
18126
18637
  "file": "components/table/demo/basic.vue",
18127
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" @rowClick=\"rowClick\">\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #gender=\"{ value }\">\n <Icon :type=\"value == 1 ? Sun : Moon\" :color=\"value == 1 ? 'blue' : '#f50cff'\" size=\"15\" />\n </template>\n <template #action=\"{ record, rowIndex }\">\n <Space>\n <Button size=\"small\" @click.stop=\"() => moveUp(rowIndex)\" :icon=\"ArrowUp\"></Button>\n <Button size=\"small\" @click.stop=\"() => moveDown(rowIndex)\" :icon=\"ArrowDown\"></Button>\n <Button size=\"small\" @click.stop=\"() => deleteRow(rowIndex)\" :icon=\"Trash2\"></Button>\n <Button size=\"small\" @click.stop=\"() => show(record)\">more</Button>\n </Space>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport { ArrowDown, ArrowUp, Moon, Sun, Trash2 } from \"kui-icons\";\nimport { message, modal, type Column, type TableRecord } from \"kui-vue\";\nimport { reactive } from \"vue\";\nconst data = reactive([\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n]);\ntype TableRow = (typeof data)[number];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n { title: \"Operate\", key: \"action\" },\n];\nconst moveUp = (rowIndex: number) => {\n if (rowIndex > 0) [data[rowIndex], data[rowIndex - 1]] = [data[rowIndex - 1], data[rowIndex]];\n};\nconst moveDown = (rowIndex: number) => {\n if (rowIndex < data.length - 1)\n [data[rowIndex], data[rowIndex + 1]] = [data[rowIndex + 1], data[rowIndex]];\n};\nconst deleteRow = (rowIndex: number) => {\n data.splice(rowIndex, 1);\n};\nconst show = (record: TableRow) => {\n modal.info({\n title: \"Hi\",\n content: `My name is ${record.name}`,\n });\n};\nconst rowClick = (record: TableRecord) => {\n message.info(\"Test row click: \" + String(record.name));\n};\n</script>"
18638
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" @rowClick=\"rowClick\">\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #gender=\"{ value }\">\n <Icon :type=\"value == 1 ? Sun : Moon\" :color=\"value == 1 ? 'blue' : '#f50cff'\" size=\"15\" />\n </template>\n <template #action=\"{ record, rowIndex }\">\n <Space>\n <Button size=\"small\" @click.stop=\"() => moveUp(rowIndex)\" :icon=\"ArrowUp\"></Button>\n <Button size=\"small\" @click.stop=\"() => moveDown(rowIndex)\" :icon=\"ArrowDown\"></Button>\n <Button size=\"small\" @click.stop=\"() => deleteRow(rowIndex)\" :icon=\"Trash2\"></Button>\n <Button size=\"small\" @click.stop=\"() => show(record)\">more</Button>\n </Space>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport { ArrowDown, ArrowUp, Moon, Sun, Trash2 } from \"kui-icons\";\nimport { message, modal, type Column, type TableRecord } from \"kui-vue\";\nimport { reactive } from \"vue\";\nconst data = reactive([\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n]);\ntype TableRow = (typeof data)[number];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n { title: \"Operate\", key: \"action\", width: 200 },\n];\nconst moveUp = (rowIndex: number) => {\n if (rowIndex > 0) [data[rowIndex], data[rowIndex - 1]] = [data[rowIndex - 1], data[rowIndex]];\n};\nconst moveDown = (rowIndex: number) => {\n if (rowIndex < data.length - 1)\n [data[rowIndex], data[rowIndex + 1]] = [data[rowIndex + 1], data[rowIndex]];\n};\nconst deleteRow = (rowIndex: number) => {\n data.splice(rowIndex, 1);\n};\nconst show = (record: TableRow) => {\n modal.info({\n title: \"Hi\",\n content: `My name is ${record.name}`,\n });\n};\nconst rowClick = (record: TableRecord) => {\n message.info(\"Test row click: \" + String(record.name));\n};\n</script>"
18128
18639
  },
18129
18640
  {
18130
18641
  "title": "树形数据",
@@ -18134,7 +18645,7 @@
18134
18645
  {
18135
18646
  "title": "基本用法(使用render)",
18136
18647
  "file": "components/table/demo/base-render.vue",
18137
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" />\n</template>\n<script setup lang=\"ts\">\nimport { Moon, Sun } from \"kui-icons\";\nimport { Button, Icon, modal, Space, Tag, type Column } from \"kui-vue\";\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n {\n title: \"Gender\",\n key: \"gender\",\n render: (h, { gender }) => {\n return h(Icon, {\n type: gender == 1 ? Sun : Moon,\n color: gender == 1 ? \"blue\" : \"#f50cff\",\n size: 15,\n });\n },\n },\n { title: \"Address\", key: \"address\" },\n {\n title: \"Tags\",\n key: \"tags\",\n render: (h, record) => {\n const tags = Array.isArray(record.tags)\n ? record.tags.filter((tag): tag is string => typeof tag === \"string\")\n : [];\n return h(\n Space,\n {},\n {\n default: () =>\n tags.map(function (tag) {\n return h(\n Tag,\n {\n color: tag == \"Python\" ? \"green\" : \"blue\",\n },\n { default: () => tag },\n );\n }),\n },\n );\n },\n },\n {\n title: \"Operate\",\n key: \"action\",\n render: (h, record) => {\n return h(\n Button,\n {\n size: \"small\",\n onClick: () => {\n modal.info({\n title: \"More\",\n content: `My name is ${record.name}`,\n });\n },\n },\n { default: () => \"more\" },\n );\n },\n },\n];\n</script>"
18648
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" />\n</template>\n<script setup lang=\"ts\">\nimport { h } from \"vue\";\nimport { Moon, Sun } from \"kui-icons\";\nimport { Button, Icon, modal, Space, Tag, type Column } from \"kui-vue\";\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n {\n title: \"Gender\",\n key: \"gender\",\n render: (value) => {\n const isSun = Number(value) === 1;\n return h(Icon, {\n type: isSun ? Sun : Moon,\n color: isSun ? \"blue\" : \"#f50cff\",\n size: 15,\n });\n },\n },\n { title: \"Address\", key: \"address\" },\n {\n title: \"Tags\",\n key: \"tags\",\n render: (value) => {\n const tags = Array.isArray(value)\n ? value.filter((tag): tag is string => typeof tag === \"string\")\n : [];\n return h(\n Space,\n {},\n {\n default: () =>\n tags.map(function (tag) {\n return h(\n Tag,\n {\n color: tag == \"Python\" ? \"green\" : \"blue\",\n },\n { default: () => tag },\n );\n }),\n },\n );\n },\n },\n {\n title: \"Operate\",\n key: \"action\",\n render: (_value, record) => {\n return h(\n Button,\n {\n size: \"small\",\n onClick: () => {\n modal.info({\n title: \"More\",\n content: `My name is ${record.name}`,\n });\n },\n },\n { default: () => \"more\" },\n );\n },\n },\n];\n</script>"
18138
18649
  },
18139
18650
  {
18140
18651
  "title": "自定义表头",
@@ -18144,7 +18655,7 @@
18144
18655
  {
18145
18656
  "title": "自定义页头和页脚",
18146
18657
  "file": "components/table/demo/bordered.vue",
18147
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered>\n <template #fullname=\"{ value }\">\n <a>{{ value }}</a>\n </template>\n <template #price=\"{ value }\">\n <span :class=\"{ 'test-table-price': value > 20000 }\">¥{{ value }}/㎡</span>\n </template>\n <template #header>Header</template>\n <template #footer>Footer</template>\n </Table>\n</template>\n<script>\nexport default {\n data() {\n return {\n data: [\n {\n key: \"0\",\n fullname: \"Li Lei\",\n price: 18990,\n address: \"Wu Han Guanggu No. 328\",\n },\n {\n key: \"1\",\n fullname: \"Liu Hao\",\n price: 23900,\n address: \"Wu Han Hongshan No. 128\",\n },\n {\n key: \"2\",\n fullname: \"Hu Cong\",\n price: 12000,\n address: \"Wu Han Nanhu No. 198\",\n },\n {\n key: \"3\",\n fullname: \"Qiu\",\n price: 28000,\n address: \"Wu Han Nanhu No. 188\",\n },\n ],\n columns: [\n { title: \"Name\", key: \"fullname\" },\n { title: \"Housing price\", key: \"price\" },\n { title: \"Address\", key: \"address\" },\n ],\n };\n },\n};\n</script>"
18658
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered>\n <template #fullname=\"{ value }\">\n <a>{{ value }}</a>\n </template>\n <template #price=\"{ value }\">\n <span :style='{ color: value > 20000 ? \"red\" : undefined }'>¥{{ value }}/㎡</span>\n </template>\n <template #header>Header</template>\n <template #footer>Footer</template>\n </Table>\n</template>\n<script>\nexport default {\n data() {\n return {\n data: [\n {\n key: \"0\",\n fullname: \"Li Lei\",\n price: 18990,\n address: \"Wu Han Guanggu No. 328\",\n },\n {\n key: \"1\",\n fullname: \"Liu Hao\",\n price: 23900,\n address: \"Wu Han Hongshan No. 128\",\n },\n {\n key: \"2\",\n fullname: \"Hu Cong\",\n price: 12000,\n address: \"Wu Han Nanhu No. 198\",\n },\n {\n key: \"3\",\n fullname: \"Qiu\",\n price: 28000,\n address: \"Wu Han Nanhu No. 188\",\n },\n ],\n columns: [\n { title: \"Name\", key: \"fullname\" },\n { title: \"Housing price\", key: \"price\" },\n { title: \"Address\", key: \"address\" },\n ],\n };\n },\n};\n</script>"
18148
18659
  },
18149
18660
  {
18150
18661
  "title": "排序",
@@ -18164,18 +18675,23 @@
18164
18675
  {
18165
18676
  "title": "固定头/列",
18166
18677
  "file": "components/table/demo/fixed-col-header.vue",
18167
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" :scroll=\"{ y: 300 }\">\n <template #action>\n <Button size=\"small\">test</Button>\n </template>\n <template #action1>\n <Button size=\"small\">test2</Button>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst _columns: Column[] = [],\n dataItem: Record<string, string> = {};\nfor (let i = 0; i < 20; i++) {\n _columns.push({ title: \"Col\" + i, key: \"address\" + i, width: 150 });\n dataItem[\"address\" + i] = \"Hubei Wuhan SoftBase No.128\";\n}\n\nconst data = new Array(10).fill(\"\").map((_, i) => {\n return {\n key: i,\n name: \"Han Mei\",\n age: 28,\n address: \"Hubei Wuhan SoftBase No.128\",\n ...dataItem,\n };\n});\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\", fixed: \"left\" },\n { title: \"Age\", key: \"age\", fixed: \"left\" },\n ..._columns,\n { title: \"Operate\", key: \"action\", fixed: \"right\" },\n { title: \"Operate\", key: \"action1\", fixed: \"right\" },\n];\n</script>"
18678
+ "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" :scroll=\"{ y: 300 }\">\n <template #action>\n <Button size=\"small\">test</Button>\n </template>\n <template #action1>\n <Button size=\"small\">test2</Button>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst _columns: Column[] = [],\n dataItem: Record<string, string> = {};\nfor (let i = 0; i < 20; i++) {\n _columns.push({ title: \"Col\" + i, key: \"address\" + i, width: 150 });\n dataItem[\"address\" + i] = \"Hubei Wuhan SoftBase No.128\";\n}\n\nconst data = new Array(10).fill(\"\").map((_, i) => {\n return {\n key: i,\n name: \"Han Mei\",\n age: 28,\n address: \"Hubei Wuhan SoftBase No.128\",\n ...dataItem,\n };\n});\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\", fixed: \"left\" },\n { title: \"Age\", key: \"age\", fixed: \"left\" },\n ..._columns,\n // 分组父列上的 `fixed` 会继承给它的每个叶子列,整组一起固定\n {\n title: \"Operate\",\n key: \"operate\",\n fixed: \"right\",\n children: [\n { title: \"Edit\", key: \"action\" },\n { title: \"More\", key: \"action1\" },\n ],\n },\n];\n</script>"
18168
18679
  },
18169
18680
  {
18170
18681
  "title": "表头分组",
18171
18682
  "file": "components/table/demo/header-span.vue",
18172
- "source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered :scroll=\"{ y: 300 }\"></Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = [];\nfor (let i = 0; i < 10; i++) {\n data.push({\n key: i,\n name: \"John Brown\",\n age: i + 1,\n street: \"Lake Park\",\n building: \"C\",\n number: 2035,\n companyAddress: \"Lake Street 42\",\n companyName: \"SoftLake Co\",\n gender: \"M\",\n });\n}\nconst columns: Column[] = [\n {\n title: \"Name\",\n key: \"name\",\n width: 120,\n fixed: \"left\",\n },\n {\n title: \"Other\",\n key: \"other\",\n children: [\n {\n title: \"Age\",\n key: \"age\",\n sorter: true,\n },\n {\n title: \"Address\",\n key: \"address\",\n children: [\n {\n title: \"Street\",\n key: \"street\",\n },\n {\n title: \"Block\",\n key: \"block\",\n children: [\n {\n title: \"Building\",\n key: \"building\",\n },\n {\n title: \"Door No.\",\n key: \"number\",\n },\n ],\n },\n ],\n },\n ],\n },\n {\n title: \"Company\",\n key: \"Company\",\n children: [\n {\n title: \"Company Address\",\n key: \"companyAddress\",\n width: 200,\n },\n {\n title: \"Company Name\",\n key: \"companyName\",\n width: 200,\n },\n ],\n },\n {\n title: \"Gender\",\n key: \"gender\",\n width: 100,\n fixed: \"right\",\n },\n];\n</script>"
18683
+ "source": "<template>\n <!-- `scroll.x` 按叶子列宽度之和给(120+100+140+120+120+200+200+100 = 1_100)。\n 不给的话这些窄列会被挤到十几个像素,表头文字竖排换行,四层表头能长到 400 多 px,\n 比 `scroll.y` 的可视高度还高,等于把表体整个顶出可视区。与 kui-react 同一份配置。 -->\n <Table\n :data=\"data\"\n :columns=\"columns\"\n bordered\n :scroll=\"{ x: 1100, y: 300 }\"\n ></Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = [];\nfor (let i = 0; i < 10; i++) {\n data.push({\n key: i,\n name: \"John Brown\",\n age: i + 1,\n street: \"Lake Park\",\n building: \"C\",\n number: 2035,\n companyAddress: \"Lake Street 42\",\n companyName: \"SoftLake Co\",\n gender: \"M\",\n });\n}\nconst columns: Column[] = [\n {\n title: \"Name\",\n key: \"name\",\n width: 120,\n fixed: \"left\",\n },\n {\n title: \"Other\",\n key: \"other\",\n children: [\n {\n title: \"Age\",\n key: \"age\",\n width: 100,\n sorter: true,\n },\n {\n title: \"Address\",\n key: \"address\",\n children: [\n {\n title: \"Street\",\n key: \"street\",\n width: 140,\n },\n {\n title: \"Block\",\n key: \"block\",\n children: [\n {\n title: \"Building\",\n key: \"building\",\n width: 120,\n },\n {\n title: \"Door No.\",\n key: \"number\",\n width: 120,\n },\n ],\n },\n ],\n },\n ],\n },\n {\n title: \"Company\",\n key: \"company\",\n children: [\n {\n title: \"Company Address\",\n key: \"companyAddress\",\n width: 200,\n },\n {\n title: \"Company Name\",\n key: \"companyName\",\n width: 200,\n },\n ],\n },\n {\n title: \"Gender\",\n key: \"gender\",\n width: 100,\n fixed: \"right\",\n },\n];\n</script>"
18173
18684
  },
18174
18685
  {
18175
18686
  "title": "勾选",
18176
18687
  "file": "components/table/demo/table-check.vue",
18177
18688
  "source": "<template>\n <code>selectedKeys: {{ selectedKeys }}</code>\n <Table\n :data=\"data\"\n :columns=\"columns\"\n ref=\"selection\"\n checkable\n v-model:selectedKeys=\"selectedKeys\"\n >\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #action>\n <a href=\"javascript:;\">Edit</a>\n <a href=\"javascript:;\">Delete</a>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column, TableKey } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst selectedKeys = ref<TableKey[]>([]);\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n];\n</script>"
18178
18689
  },
18690
+ {
18691
+ "title": "嵌套取值",
18692
+ "file": "components/table/demo/nested-value.vue",
18693
+ "source": "<template>\n <Table\n :data=\"data\"\n :columns=\"columns\"\n row-key=\"meta.uid\"\n children-column-name=\"rows.items\"\n expand-all-rows\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\n/**\n * 嵌套数据不需要先拍平:列 `key`、`rowKey`、`childrenColumnName` 都可以写成 `a.b` 点路径。\n * 整名优先,所以字段名本身带点号时仍按整名取值;下钻途中缺字段只会渲染成空,不会抛错(kui-react 行为相同)。\n */\ninterface Member {\n [key: string]: unknown;\n meta: { uid: string };\n profile: { name: string; city?: string };\n tags?: string[];\n rows?: { items: Member[] };\n}\n\nconst data: Member[] = [\n {\n meta: { uid: \"design\" },\n profile: { name: \"Design Guild\", city: \"Hangzhou\" },\n tags: [\"Studio\", \"Brand\"],\n rows: {\n items: [\n { meta: { uid: \"ann\" }, profile: { name: \"Ann\", city: \"Hangzhou\" }, tags: [\"Studio\"] },\n { meta: { uid: \"bob\" }, profile: { name: \"Bob\" } },\n ],\n },\n },\n {\n meta: { uid: \"front-end\" },\n profile: { name: \"Front-end Guild\", city: \"Shanghai\" },\n tags: [\"Kui\"],\n rows: {\n items: [\n {\n meta: { uid: \"cara\" },\n profile: { name: \"Cara\", city: \"Shanghai\" },\n tags: [\"Kui\", \"Charts\"],\n },\n ],\n },\n },\n];\nconst columns: Column[] = [\n { key: \"profile.name\", title: \"Name\", sorter: true },\n { key: \"profile.city\", title: \"City\" },\n { key: \"tags.0\", title: \"Primary tag\" },\n { key: \"tags.1\", title: \"Secondary tag\" },\n];\n</script>"
18694
+ },
18179
18695
  {
18180
18696
  "title": "动态控制表格属性",
18181
18697
  "file": "components/table/demo/control.vue",
@@ -18184,12 +18700,17 @@
18184
18700
  {
18185
18701
  "title": "虚拟滚动",
18186
18702
  "file": "components/table/demo/virtual.vue",
18187
- "source": "<template>\n <Table\n virtual\n striped\n :data=\"data\"\n :columns=\"columns\"\n :scroll=\"{ x: 900, y: 360 }\"\n :item-height=\"44\"\n :overscan=\"6\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = Array.from({ length: 10000 }, (_, index) => ({\n key: index + 1,\n name: `User ${index + 1}`,\n email: `user${index + 1}@example.com`,\n status: index % 3 === 0 ? \"Active\" : \"Pending\",\n}));\nconst columns: Column[] = [\n { title: \"ID\", key: \"key\", width: 100 },\n { title: \"Name\", key: \"name\" },\n { title: \"Email\", key: \"email\", width: 200 },\n { title: \"Email1\", key: \"email1\" },\n { title: \"Email2\", key: \"email2\" },\n { title: \"Email3\", key: \"email3\" },\n { title: \"Email4\", key: \"email4\" },\n { title: \"Email5\", key: \"email5\" },\n { title: \"Status\", key: \"status\", width: 140, fixed: \"right\" },\n];\n</script>"
18703
+ "source": "<template>\n <Table\n virtual\n striped\n :data=\"data\"\n :columns=\"columns\"\n :scroll=\"{ x: 900, y: 360 }\"\n :item-height=\"44\"\n :overscan=\"6\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = Array.from({ length: 10000 }, (_, index) => ({\n key: index + 1,\n name: `User ${index + 1}`,\n email: `user${index + 1}@example.com`,\n status: index % 3 === 0 ? \"Active\" : \"Pending\",\n}));\nconst columns: Column[] = [\n { title: \"ID\", key: \"key\", width: 100 },\n { title: \"Name\", key: \"name\", width: 200 },\n { title: \"Email\", key: \"email\", width: 200 },\n { title: \"Email1\", key: \"email1\", width: 100 },\n { title: \"Email2\", key: \"email2\", width: 100 },\n { title: \"Email3\", key: \"email3\", width: 100 },\n { title: \"Email4\", key: \"email4\", width: 100 },\n { title: \"Email5\", key: \"email5\", width: 100 },\n { title: \"Status\", key: \"status\", width: 140, fixed: \"right\" },\n];\n</script>"
18188
18704
  },
18189
18705
  {
18190
18706
  "title": "列设置",
18191
18707
  "file": "components/table/demo/column-setting.vue",
18192
18708
  "source": "<template>\n <Space vertical block>\n <TableColumnSetting\n v-model:hidden-keys=\"hiddenKeys\"\n :columns=\"columns\"\n :disabled-keys=\"['name']\"\n title=\"显示列\"\n reset-text=\"重置\"\n />\n <Table :data=\"data\" :columns=\"columns\" :hidden-column-keys=\"hiddenKeys\" />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\n\nconst hiddenKeys = ref<string[]>([]);\nconst columns: Column[] = [\n { title: \"姓名\", key: \"name\" },\n { title: \"部门\", key: \"department\" },\n { title: \"状态\", key: \"status\" },\n];\nconst data = [{ key: 1, name: \"林晓\", department: \"产品中心\", status: \"正常\" }];\n</script>"
18709
+ },
18710
+ {
18711
+ "title": "省略号",
18712
+ "file": "components/table/demo/ellipsis.vue",
18713
+ "source": "<template>\n <Space vertical>\n <Space>\n <Switch v-model=\"global\" />\n <span>表格级 ellipsis</span>\n </Space>\n <!-- 容器压到 480px,列宽不够才看得到省略号。 -->\n <div style=\"max-width: 480px\">\n <Table :data=\"data\" :columns=\"columns\" :ellipsis=\"global\" row-key=\"key\" />\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n/**\n * 单元格内容超出列宽时截断成省略号:表格级 `ellipsis` 一次管所有列,列上的 `ellipsis` 覆盖它,\n * 那一列想留完整内容就写 `ellipsis: false`(kui-react 行为相同)。\n *\n * 悬停提示默认就有,但只在真的被截断时才弹(没截断的格子不会多出气泡),内容默认是截断的那段文本。\n */\nconst data = [\n {\n key: \"1\",\n title: \"把双仓的表格样式对齐到同一份 LESS\",\n owner: \"Qiu\",\n note: \"固定列的宽度基准、相邻固定列的 sticky 偏移、滚动条槽位的占位三处必须用同一份数据,少同步一处就会在临界宽度上露馅,横向能滚的距离也会跟着变。\",\n },\n {\n key: \"2\",\n title: \"分组表头 + 固定列 + scroll.y\",\n owner: \"Ann\",\n note: \"分组表头配上固定列和纵向滚动时,边框、圆角和右下角的空白块最容易出问题,表头分栏之后每格的裁剪范围不同,得逐个组合回归。\",\n },\n {\n key: \"3\",\n title: \"虚拟滚动窗口\",\n owner: \"Bob\",\n note: \"虚拟滚动的窗口起点要按总行数钳上界,否则滚过头会渲染出一段空窗口,保留区高度也会算错,滚动条跟着突然抖动一下。\",\n },\n];\n\nconst columns: Column[] = [\n // 没有 `ellipsis`:跟着表格级走,单行截断。\n { title: \"任务\", key: \"title\", width: 160 },\n // 这一列单独关掉:负责人一般很短,被截断反而难看。\n { title: \"负责人\", key: \"owner\", width: 100, ellipsis: false },\n // 说明截到三行,提示换成指定内容。\n {\n title: \"说明\",\n key: \"note\",\n width: 200,\n ellipsis: { rows: 3, tooltip: \"完整说明请进需求单\" },\n },\n];\n\nconst global = ref(true);\n</script>"
18193
18714
  }
18194
18715
  ]
18195
18716
  },
@@ -18219,14 +18740,17 @@
18219
18740
  },
18220
18741
  {
18221
18742
  "name": "theme",
18222
- "description": "Column appearance",
18223
- "descriptionZh": "看板列外观",
18224
- "descriptionEn": "Column appearance",
18225
- "type": "\"fill\" | \"outline\"",
18743
+ "description": "Surface theme",
18744
+ "descriptionZh": "外观主题",
18745
+ "descriptionEn": "Surface theme",
18746
+ "type": "SurfaceThemeType",
18226
18747
  "boolean": false,
18227
18748
  "enumValues": [
18228
18749
  "fill",
18229
- "outline"
18750
+ "outline",
18751
+ "plain",
18752
+ "solid",
18753
+ "dashed"
18230
18754
  ],
18231
18755
  "required": false,
18232
18756
  "defaultExpression": "\"fill\"",
@@ -18358,7 +18882,7 @@
18358
18882
  {
18359
18883
  "title": "外观主题",
18360
18884
  "file": "components/kanban/demo/theme.vue",
18361
- "source": "<template>\n <Space vertical block>\n <RadioGroup v-model=\"theme\" type=\"button\" :options=\"themes\" />\n <Kanban :columns=\"columns\" :data=\"tasks\" :theme=\"theme\">\n <template #item=\"{ item }\">\n <Card size=\"small\" :theme=\"theme\">{{ item.title }}</Card>\n </template>\n </Kanban>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\n\nconst theme = ref<\"fill\" | \"outline\">(\"fill\");\nconst themes = [\n { label: \"Fill\", value: \"fill\" },\n { label: \"Outline\", value: \"outline\" },\n];\nconst columns = [\n { key: \"todo\", title: \"Todo\", color: \"#87909c\" },\n { key: \"doing\", title: \"Doing\", color: \"#3a95ff\" },\n { key: \"done\", title: \"Done\", color: \"#22a06b\" },\n];\nconst tasks = [\n { id: 1, status: \"todo\", title: \"Define requirements\" },\n { id: 2, status: \"todo\", title: \"Build component\" },\n];\n</script>"
18885
+ "source": "<template>\n <Space vertical block>\n <RadioGroup v-model=\"theme\" type=\"button\" :options=\"themes\" />\n <Kanban :columns=\"columns\" :data=\"tasks\" :theme=\"theme\">\n <template #item=\"{ item }\">\n <Card size=\"small\" :theme=\"theme\">{{ item.title }}</Card>\n </template>\n </Kanban>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// The board paints five tiers; `underlined` belongs to the controls and would land back on `fill`.\nconst theme = ref<SurfaceThemeType>(\"fill\");\nconst themes = [\n { label: \"Fill\", value: \"fill\" },\n { label: \"Outline\", value: \"outline\" },\n { label: \"Plain\", value: \"plain\" },\n { label: \"Solid\", value: \"solid\" },\n { label: \"Dashed\", value: \"dashed\" },\n];\nconst columns = [\n { key: \"todo\", title: \"Todo\", color: \"#87909c\" },\n { key: \"doing\", title: \"Doing\", color: \"#3a95ff\" },\n { key: \"done\", title: \"Done\", color: \"#22a06b\" },\n];\nconst tasks = [\n { id: 1, status: \"todo\", title: \"Define requirements\" },\n { id: 2, status: \"todo\", title: \"Build component\" },\n];\n</script>"
18362
18886
  }
18363
18887
  ]
18364
18888
  },
@@ -18445,6 +18969,21 @@
18445
18969
  "defaultExpression": "\"hover\"",
18446
18970
  "documented": true
18447
18971
  },
18972
+ {
18973
+ "name": "destroyOnClose",
18974
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
18975
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
18976
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
18977
+ "type": "boolean",
18978
+ "boolean": true,
18979
+ "enumValues": [
18980
+ false,
18981
+ true
18982
+ ],
18983
+ "required": false,
18984
+ "defaultExpression": "true",
18985
+ "documented": true
18986
+ },
18448
18987
  {
18449
18988
  "name": "disabled",
18450
18989
  "description": "Disabled status",
@@ -18845,11 +19384,14 @@
18845
19384
  "description": "Appearance theme",
18846
19385
  "descriptionZh": "外观主题",
18847
19386
  "descriptionEn": "Appearance theme",
18848
- "type": "\"fill\" | \"outline\"",
19387
+ "type": "SurfaceThemeType",
18849
19388
  "boolean": false,
18850
19389
  "enumValues": [
18851
19390
  "fill",
18852
- "outline"
19391
+ "outline",
19392
+ "plain",
19393
+ "solid",
19394
+ "dashed"
18853
19395
  ],
18854
19396
  "required": false,
18855
19397
  "defaultExpression": "\"outline\"",
@@ -19044,7 +19586,7 @@
19044
19586
  {
19045
19587
  "title": "主题",
19046
19588
  "file": "components/transfer/demo/theme.vue",
19047
- "source": "<template>\n <div class=\"demo-list\">\n <Transfer v-model=\"outlineSelected\" searchable theme=\"outline\" :data-source=\"items\" />\n <Transfer v-model=\"fillSelected\" searchable theme=\"fill\" :data-source=\"items\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\n\nconst outlineSelected = ref<(string | number)[]>([4]);\nconst fillSelected = ref<(string | number)[]>([4]);\nconst items = [\"Design\", \"Development\", \"Testing\", \"Deployment\"].map((title, index) => ({\n key: index + 1,\n title,\n}));\n</script>\n\n<style scoped>\n.demo-list {\n display: grid;\n gap: 24px;\n}\n</style>"
19589
+ "source": "<template>\n <Space vertical block>\n <RadioGroup v-model=\"theme\" type=\"button\" :options=\"themes\" />\n <Transfer v-model=\"selected\" searchable :theme=\"theme\" :data-source=\"items\" />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\n// The panels paint five tiers; `underlined` belongs to the controls and would land back on `outline`.\nconst theme = ref<SurfaceThemeType>(\"outline\");\nconst themes = [\n { label: \"Outline\", value: \"outline\" },\n { label: \"Fill\", value: \"fill\" },\n { label: \"Plain\", value: \"plain\" },\n { label: \"Solid\", value: \"solid\" },\n { label: \"Dashed\", value: \"dashed\" },\n];\nconst selected = ref<(string | number)[]>([4]);\nconst items = [\"Design\", \"Development\", \"Testing\", \"Deployment\"].map((title, index) => ({\n key: index + 1,\n title,\n}));\n</script>"
19048
19590
  },
19049
19591
  {
19050
19592
  "title": "禁用状态",
@@ -19160,6 +19702,17 @@
19160
19702
  "defaultExpression": "false",
19161
19703
  "documented": true
19162
19704
  },
19705
+ {
19706
+ "name": "ellipsis",
19707
+ "description": "Truncation, tooltip and expansion",
19708
+ "descriptionZh": "文本省略、提示和展开配置",
19709
+ "descriptionEn": "Truncation, tooltip and expansion",
19710
+ "type": "number | boolean | TypographyEllipsisOptions",
19711
+ "boolean": false,
19712
+ "required": false,
19713
+ "defaultExpression": "false",
19714
+ "documented": true
19715
+ },
19163
19716
  {
19164
19717
  "name": "italic",
19165
19718
  "description": "Italic text",
@@ -19213,17 +19766,6 @@
19213
19766
  "defaultExpression": "false",
19214
19767
  "documented": true
19215
19768
  },
19216
- {
19217
- "name": "ellipsis",
19218
- "description": "Truncation, tooltip and expansion",
19219
- "descriptionZh": "文本省略、提示和展开配置",
19220
- "descriptionEn": "Truncation, tooltip and expansion",
19221
- "type": "number | boolean | TypographyEllipsisOptions",
19222
- "boolean": false,
19223
- "required": false,
19224
- "defaultExpression": "false",
19225
- "documented": true
19226
- },
19227
19769
  {
19228
19770
  "name": "type",
19229
19771
  "description": "Semantic color",
@@ -20248,7 +20790,7 @@
20248
20790
  "description": "Triggered when a tree node is clicked",
20249
20791
  "descriptionZh": "点击树节点时触发",
20250
20792
  "descriptionEn": "Triggered when a tree node is clicked",
20251
- "type": "(node: TreeNode) => void",
20793
+ "type": "(node: TreeNode, keys: string[]) => void",
20252
20794
  "eventName": "select",
20253
20795
  "boolean": false,
20254
20796
  "documented": true
@@ -20352,7 +20894,7 @@
20352
20894
  },
20353
20895
  {
20354
20896
  "name": "select",
20355
- "type": "(node: TreeNode) => void",
20897
+ "type": "(node: TreeNode, keys: string[]) => void",
20356
20898
  "description": "Triggered when a tree node is clicked",
20357
20899
  "descriptionZh": "点击树节点时触发",
20358
20900
  "descriptionEn": "Triggered when a tree node is clicked"
@@ -20494,6 +21036,21 @@
20494
21036
  "defaultExpression": "\"bottom-left\"",
20495
21037
  "documented": true
20496
21038
  },
21039
+ {
21040
+ "name": "destroyOnClose",
21041
+ "description": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
21042
+ "descriptionZh": "关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内已填写的表单状态,代价是每个打开过的实例留一份隐藏 DOM",
21043
+ "descriptionEn": "Whether to destroy panel content after closing. Destroyed by default (remounted on reopen); set false to keep form state at the cost of one hidden DOM node per opened instance",
21044
+ "type": "boolean",
21045
+ "boolean": true,
21046
+ "enumValues": [
21047
+ false,
21048
+ true
21049
+ ],
21050
+ "required": false,
21051
+ "defaultExpression": "true",
21052
+ "documented": true
21053
+ },
20497
21054
  {
20498
21055
  "name": "bordered",
20499
21056
  "description": "Whether to show border",
@@ -20511,13 +21068,12 @@
20511
21068
  },
20512
21069
  {
20513
21070
  "name": "theme",
20514
- "description": "The theme of TreeSelect",
21071
+ "description": "Theme",
20515
21072
  "descriptionZh": "主题",
20516
- "descriptionEn": "The theme of TreeSelect",
21073
+ "descriptionEn": "Theme",
20517
21074
  "type": "ThemeType",
20518
21075
  "boolean": false,
20519
21076
  "enumValues": [
20520
- "default",
20521
21077
  "fill",
20522
21078
  "outline",
20523
21079
  "plain",
@@ -21091,16 +21647,14 @@
21091
21647
  "description": "The component renders the theme",
21092
21648
  "descriptionZh": "组件呈现主题",
21093
21649
  "descriptionEn": "The component renders the theme",
21094
- "type": "ThemeType",
21650
+ "type": "SurfaceThemeType",
21095
21651
  "boolean": false,
21096
21652
  "enumValues": [
21097
- "default",
21098
21653
  "fill",
21099
21654
  "outline",
21100
21655
  "plain",
21101
21656
  "solid",
21102
- "dashed",
21103
- "underlined"
21657
+ "dashed"
21104
21658
  ],
21105
21659
  "required": false,
21106
21660
  "defaultExpression": "\"fill\"",
@@ -21108,9 +21662,9 @@
21108
21662
  },
21109
21663
  {
21110
21664
  "name": "size",
21111
- "description": "Button size, optional values `small`, `large`, default not selected",
21112
- "descriptionZh": "按钮尺寸,可选值 `small`、`large`,默认不选",
21113
- "descriptionEn": "Button size, optional values `small`, `large`, default not selected",
21665
+ "description": "Tag size, optional values `small`, `medium`, `large`",
21666
+ "descriptionZh": "标签尺寸,可选值 `small`、`medium`、`large`",
21667
+ "descriptionEn": "Tag size, optional values `small`, `medium`, `large`",
21114
21668
  "type": "SizeType",
21115
21669
  "boolean": false,
21116
21670
  "enumValues": [
@@ -21150,9 +21704,9 @@
21150
21704
  },
21151
21705
  {
21152
21706
  "name": "color",
21153
- "description": "Tag color",
21154
- "descriptionZh": "标签的颜色",
21155
- "descriptionEn": "Tag color",
21707
+ "description": "Tag color: a preset name (the same set `Badge` uses, e.g. `blue`) or any readable color value",
21708
+ "descriptionZh": "标签颜色:预设色值名(与 `Badge` 同一套,如 `blue`)或任意可读色值",
21709
+ "descriptionEn": "Tag color: a preset name (the same set `Badge` uses, e.g. `blue`) or any readable color value",
21156
21710
  "type": "string | undefined",
21157
21711
  "boolean": false,
21158
21712
  "required": false,
@@ -21233,7 +21787,7 @@
21233
21787
  {
21234
21788
  "title": "尺寸和形状",
21235
21789
  "file": "components/tag/demo/size.vue",
21236
- "source": "<template>\n <Space vertical>\n <RadioGroup v-model=\"size\" type=\"button\" :options=\"sizes\" />\n <RadioGroup v-model=\"shape\" type=\"button\" :options=\"shapes\" />\n <RadioGroup v-model=\"theme\" type=\"button\" :options=\"themes\" />\n <Tag v-for=\"x in 3\" :key=\"x\" :size=\"size\" :shape=\"shape\" :theme=\"theme\">Tag{{ x }}</Tag>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { ShapeType, SizeType, ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"small\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<ThemeType>(\"default\");\nconst sizes = [\n { label: \"Large\", value: \"large\" },\n { label: \"Medium\", value: \"medium\" },\n { label: \"small\", value: \"small\" },\n];\nconst shapes = [\n { label: \"Circle\", value: \"circle\" },\n { label: \"Square\", value: \"square\" },\n];\nconst themes = [\n { label: \"Fill\", value: \"fill\" },\n { label: \"Outline\", value: \"outline\" },\n];\n</script>"
21790
+ "source": "<template>\n <Space vertical>\n <RadioGroup v-model=\"size\" type=\"button\" :options=\"sizes\" />\n <RadioGroup v-model=\"shape\" type=\"button\" :options=\"shapes\" />\n <RadioGroup v-model=\"theme\" type=\"button\" :options=\"themes\" />\n <Tag v-for=\"x in 3\" :key=\"x\" :size=\"size\" :shape=\"shape\" :theme=\"theme\">Tag{{ x }}</Tag>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { ShapeType, SizeType, SurfaceThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst size = ref<SizeType>(\"small\");\nconst shape = ref<ShapeType>(\"round\");\nconst theme = ref<SurfaceThemeType>(\"fill\");\nconst sizes = [\n { label: \"Large\", value: \"large\" },\n { label: \"Medium\", value: \"medium\" },\n { label: \"small\", value: \"small\" },\n];\nconst shapes = [\n { label: \"Circle\", value: \"circle\" },\n { label: \"Square\", value: \"square\" },\n];\nconst themes = [\n { label: \"Fill\", value: \"fill\" },\n { label: \"Outline\", value: \"outline\" },\n];\n</script>"
21237
21791
  },
21238
21792
  {
21239
21793
  "title": "图标",
@@ -21243,12 +21797,17 @@
21243
21797
  {
21244
21798
  "title": "多彩标签",
21245
21799
  "file": "components/tag/demo/color.vue",
21246
- "source": "<template>\n <div>\n <h4 style=\"margin-bottom: 16px\">Presets:</h4>\n <Space wrap>\n <Tag :color=\"color\" v-for=\"(color, i) in colors\" :key=\"i\">\n {{ color }}\n </Tag>\n </Space>\n <h4 style=\"margin: 16px 0\">Custom:</h4>\n <Space>\n <Tag color=\"#c20\">#c20</Tag>\n <Tag color=\"#39f\">#39f</Tag>\n <Tag color=\"#e3f\">#e3f</Tag>\n <Tag color=\"#6c0\">#6c0</Tag>\n </Space>\n </div>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"pink\",\n \"red\",\n \"yellow\",\n \"orange\",\n \"cyan\",\n \"green\",\n \"blue\",\n \"purple\",\n \"magenta\",\n \"volcano\",\n \"gold\",\n \"lime\",\n];\n</script>"
21800
+ "source": "<template>\n <div>\n <h4 style=\"margin-bottom: 16px\">Presets:</h4>\n <Space wrap>\n <Tag :color=\"color\" v-for=\"(color, i) in colors\" :key=\"i\">\n {{ color }}\n </Tag>\n </Space>\n <h4 style=\"margin: 16px 0\">Custom:</h4>\n <Space>\n <Tag color=\"#c20\">#c20</Tag>\n <Tag color=\"#39f\">#39f</Tag>\n <Tag color=\"#e3f\">#e3f</Tag>\n <Tag color=\"#6c0\">#6c0</Tag>\n </Space>\n </div>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"red\",\n \"orange\",\n \"yellow\",\n \"olive\",\n \"green\",\n \"teal\",\n \"blue\",\n \"volcano\",\n \"violet\",\n \"cyan\",\n \"gold\",\n \"lime\",\n \"magenta\",\n \"purple\",\n \"pink\",\n \"brown\",\n \"gray\",\n];\n</script>"
21247
21801
  },
21248
21802
  {
21249
21803
  "title": "动态添加和删除",
21250
21804
  "file": "components/tag/demo/dynamic.vue",
21251
21805
  "source": "<template>\n <Space wrap>\n <Tag color=\"blue\" closeable v-for=\"t in tags\" :key=\"t\" @after-close=\"remove(t)\">{{ t }}</Tag>\n <Input\n v-if=\"showInput\"\n @blur=\"add\"\n size=\"small\"\n style=\"width: 81px\"\n ref=\"inputRef\"\n :modelValue=\"tag\"\n />\n <Button @click=\"show\" size=\"small\" :icon=\"Bookmark\" v-show=\"!showInput\">New Tag</Button>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Bookmark } from \"kui-icons\";\nimport { nextTick, ref } from \"vue\";\nconst showInput = ref(false);\nconst tag = ref(\"\");\nconst tags = ref([\"Apple\", \"Banana\", \"Cat\", \"Dog\"]);\nconst remove = (tag: string) => {\n tags.value = tags.value.filter((item) => item !== tag);\n};\nconst inputRef = ref();\nconst show = () => {\n showInput.value = true;\n nextTick(() => {\n inputRef.value.focus();\n });\n};\nconst add = (e: FocusEvent) => {\n let value = (e.target as HTMLInputElement).value.trim();\n if (value && !tags.value.includes(value)) {\n tags.value.push(value);\n }\n tag.value = \"\";\n showInput.value = false;\n};\n</script>"
21806
+ },
21807
+ {
21808
+ "title": "外观",
21809
+ "file": "components/tag/demo/appearance.vue",
21810
+ "source": "<template>\n <Space wrap>\n <Tag v-for=\"tier in tiers\" :key=\"tier\" :theme=\"tier\" closeable>theme: {{ tier }}</Tag>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { SurfaceThemeType } from \"kui-vue\";\n\n// A tag paints the same five tiers as any other surface and starts on `fill`. `solid` is the tier that moves\n// the text: the chip goes to the primary and the label and close button invert with it. A `color` written on\n// the tag outranks the tier, which the colour demo shows, so this one leaves it out and keeps one chip per\n// tier.\nconst tiers: SurfaceThemeType[] = [\"fill\", \"outline\", \"plain\", \"solid\", \"dashed\"];\n</script>"
21252
21811
  }
21253
21812
  ]
21254
21813
  },