x-next 1.16.1 → 1.18.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 (179) hide show
  1. package/AI_USAGE/catalog.md +3 -2
  2. package/AI_USAGE/components/alert-api.md +1 -1
  3. package/AI_USAGE/components/alert.md +33 -1
  4. package/AI_USAGE/components/bar-chart-api.md +1 -1
  5. package/AI_USAGE/components/bar-chart.md +1 -1
  6. package/AI_USAGE/components/boxicons.md +1 -1
  7. package/AI_USAGE/components/button-api.md +13 -16
  8. package/AI_USAGE/components/button.md +242 -31
  9. package/AI_USAGE/components/charts.md +1 -1
  10. package/AI_USAGE/components/checkbox-api.md +1 -1
  11. package/AI_USAGE/components/checkbox.md +1 -1
  12. package/AI_USAGE/components/color-picker-api.md +1 -1
  13. package/AI_USAGE/components/color-picker.md +1 -1
  14. package/AI_USAGE/components/config-provider-api.md +1 -1
  15. package/AI_USAGE/components/config-provider.md +1 -1
  16. package/AI_USAGE/components/date-picker-api.md +1 -1
  17. package/AI_USAGE/components/date-picker.md +1 -1
  18. package/AI_USAGE/components/dialog-api.md +1 -1
  19. package/AI_USAGE/components/dialog.md +1 -1
  20. package/AI_USAGE/components/draggable-api.md +1 -1
  21. package/AI_USAGE/components/draggable.md +1 -1
  22. package/AI_USAGE/components/drawer-api.md +3 -3
  23. package/AI_USAGE/components/drawer.md +1 -1
  24. package/AI_USAGE/components/dropdown-api.md +3 -3
  25. package/AI_USAGE/components/dropdown.md +1 -1
  26. package/AI_USAGE/components/empty-api.md +1 -1
  27. package/AI_USAGE/components/empty.md +1 -1
  28. package/AI_USAGE/components/finicon.md +1 -1
  29. package/AI_USAGE/components/form-api.md +1 -1
  30. package/AI_USAGE/components/form.md +1 -1
  31. package/AI_USAGE/components/grid-api.md +1 -1
  32. package/AI_USAGE/components/grid.md +1 -1
  33. package/AI_USAGE/components/heatmap-api.md +1 -1
  34. package/AI_USAGE/components/heatmap.md +1 -1
  35. package/AI_USAGE/components/icon-api.md +1 -1
  36. package/AI_USAGE/components/icon.md +1 -1
  37. package/AI_USAGE/components/image-api.md +1 -1
  38. package/AI_USAGE/components/image.md +1 -1
  39. package/AI_USAGE/components/input-api.md +2 -2
  40. package/AI_USAGE/components/input-number-api.md +1 -1
  41. package/AI_USAGE/components/input-number.md +1 -1
  42. package/AI_USAGE/components/input-tag-api.md +1 -1
  43. package/AI_USAGE/components/input-tag.md +1 -1
  44. package/AI_USAGE/components/input.md +1 -1
  45. package/AI_USAGE/components/layout-api.md +1 -1
  46. package/AI_USAGE/components/layout.md +1 -1
  47. package/AI_USAGE/components/line-chart-api.md +1 -1
  48. package/AI_USAGE/components/line-chart.md +1 -1
  49. package/AI_USAGE/components/link-api.md +1 -1
  50. package/AI_USAGE/components/link.md +1 -1
  51. package/AI_USAGE/components/menu-api.md +1 -1
  52. package/AI_USAGE/components/menu.md +1 -1
  53. package/AI_USAGE/components/message-api.md +1 -1
  54. package/AI_USAGE/components/message-box-api.md +1 -1
  55. package/AI_USAGE/components/message-box.md +1 -1
  56. package/AI_USAGE/components/message.md +1 -1
  57. package/AI_USAGE/components/network-api.md +1 -1
  58. package/AI_USAGE/components/network.md +1 -1
  59. package/AI_USAGE/components/notification-api.md +1 -1
  60. package/AI_USAGE/components/notification.md +1 -1
  61. package/AI_USAGE/components/pagination-api.md +1 -1
  62. package/AI_USAGE/components/pagination.md +1 -1
  63. package/AI_USAGE/components/pie-chart-api.md +1 -1
  64. package/AI_USAGE/components/pie-chart.md +1 -1
  65. package/AI_USAGE/components/popconfirm-api.md +3 -3
  66. package/AI_USAGE/components/popconfirm.md +1 -1
  67. package/AI_USAGE/components/popover-api.md +1 -1
  68. package/AI_USAGE/components/popover.md +1 -1
  69. package/AI_USAGE/components/popup-api.md +1 -1
  70. package/AI_USAGE/components/popup.md +1 -1
  71. package/AI_USAGE/components/progress-api.md +1 -1
  72. package/AI_USAGE/components/progress.md +1 -1
  73. package/AI_USAGE/components/radio-api.md +1 -1
  74. package/AI_USAGE/components/radio.md +1 -1
  75. package/AI_USAGE/components/rate-api.md +1 -1
  76. package/AI_USAGE/components/rate.md +1 -1
  77. package/AI_USAGE/components/resize-box-api.md +1 -1
  78. package/AI_USAGE/components/resize-box.md +1 -1
  79. package/AI_USAGE/components/scrollbar-api.md +1 -1
  80. package/AI_USAGE/components/scrollbar.md +1 -1
  81. package/AI_USAGE/components/select-api.md +1 -1
  82. package/AI_USAGE/components/select.md +1 -1
  83. package/AI_USAGE/components/skeleton-api.md +1 -1
  84. package/AI_USAGE/components/skeleton.md +1 -1
  85. package/AI_USAGE/components/slider-api.md +1 -1
  86. package/AI_USAGE/components/slider.md +1 -1
  87. package/AI_USAGE/components/space-api.md +1 -1
  88. package/AI_USAGE/components/space.md +1 -1
  89. package/AI_USAGE/components/spin-api.md +1 -1
  90. package/AI_USAGE/components/spin.md +1 -1
  91. package/AI_USAGE/components/steps-api.md +1 -1
  92. package/AI_USAGE/components/steps.md +1 -1
  93. package/AI_USAGE/components/switch-api.md +1 -1
  94. package/AI_USAGE/components/switch.md +1 -1
  95. package/AI_USAGE/components/table-api.md +1 -1
  96. package/AI_USAGE/components/table.md +1 -1
  97. package/AI_USAGE/components/tabs-api.md +1 -1
  98. package/AI_USAGE/components/tabs.md +1 -1
  99. package/AI_USAGE/components/tag-api.md +1 -1
  100. package/AI_USAGE/components/tag.md +1 -1
  101. package/AI_USAGE/components/textarea-api.md +1 -1
  102. package/AI_USAGE/components/textarea.md +1 -1
  103. package/AI_USAGE/components/time-picker-api.md +1 -1
  104. package/AI_USAGE/components/time-picker.md +1 -1
  105. package/AI_USAGE/components/time-range-selector-api.md +1 -1
  106. package/AI_USAGE/components/time-range-selector.md +1 -1
  107. package/AI_USAGE/components/timeline-api.md +3 -3
  108. package/AI_USAGE/components/timeline.md +1 -1
  109. package/AI_USAGE/components/tooltip-api.md +1 -1
  110. package/AI_USAGE/components/tooltip.md +1 -1
  111. package/AI_USAGE/components/transfer-api.md +165 -0
  112. package/AI_USAGE/components/transfer.md +515 -0
  113. package/AI_USAGE/components/tree-select-api.md +1 -1
  114. package/AI_USAGE/components/tree-select.md +1 -1
  115. package/AI_USAGE/components/trend-chart-api.md +1 -1
  116. package/AI_USAGE/components/trend-chart.md +1 -1
  117. package/AI_USAGE/components/trigger-api.md +1 -1
  118. package/AI_USAGE/components/trigger.md +1 -1
  119. package/AI_USAGE/components/upload-api.md +1 -1
  120. package/AI_USAGE/components/upload.md +1 -1
  121. package/AI_USAGE/components/watermark-api.md +1 -1
  122. package/AI_USAGE/components/watermark.md +1 -1
  123. package/AI_USAGE/core.md +1 -1
  124. package/AI_USAGE/index.md +3 -2
  125. package/AI_USAGE/recipes/form-on-demand.md +1 -1
  126. package/AI_USAGE.md +957 -57
  127. package/CHANGELOG.md +40 -0
  128. package/dist/_styles/palette-aliases.d.ts +1 -0
  129. package/dist/components/button/Button.d.ts +0 -9
  130. package/dist/components/button/appearance.d.ts +7 -0
  131. package/dist/components/button/index.d.ts +0 -16
  132. package/dist/components/button/props.d.ts +2 -6
  133. package/dist/components/color-picker/panel.d.ts +0 -9
  134. package/dist/components/date-picker/DatePicker.vue.d.ts +0 -15
  135. package/dist/components/date-picker/index.d.ts +0 -30
  136. package/dist/components/drawer/index.d.ts +0 -30
  137. package/dist/components/drawer/src/Drawer.vue.d.ts +0 -15
  138. package/dist/components/dropdown/DropdownButton.vue.d.ts +0 -15
  139. package/dist/components/dropdown/index.d.ts +0 -30
  140. package/dist/components/index.d.ts +1 -0
  141. package/dist/components/popconfirm/src/popup.vue.d.ts +0 -15
  142. package/dist/components/time-picker/TimePanel.vue.d.ts +0 -15
  143. package/dist/components/time-picker/TimePicker.vue.d.ts +0 -15
  144. package/dist/components/time-picker/index.d.ts +0 -30
  145. package/dist/components/transfer/Transfer.d.ts +211 -0
  146. package/dist/components/transfer/index.d.ts +299 -0
  147. package/dist/components/transfer/interface.d.ts +80 -0
  148. package/dist/components/transfer/transfer-panel.d.ts +82 -0
  149. package/dist/components/transfer/utils.d.ts +5 -0
  150. package/dist/es/_styles/palette-aliases.js +102 -17
  151. package/dist/es/_utils/palette.js +54 -54
  152. package/dist/es/components/button/Button.js +77 -49
  153. package/dist/es/components/button/appearance.js +7 -0
  154. package/dist/es/components/button/props.js +0 -4
  155. package/dist/es/components/index.js +47 -45
  156. package/dist/es/components/transfer/Transfer.js +267 -0
  157. package/dist/es/components/transfer/index.js +7 -0
  158. package/dist/es/components/transfer/transfer-panel.js +251 -0
  159. package/dist/es/components/transfer/utils.js +9 -0
  160. package/dist/es/directives/wave.js +14 -8
  161. package/dist/es/index.js +46 -44
  162. package/dist/es/locale/en-US.js +16 -0
  163. package/dist/es/locale/zh-CN.js +16 -0
  164. package/dist/es/style.css +1 -1
  165. package/dist/index.cjs +3 -3
  166. package/dist/index.umd.js +3 -3
  167. package/dist/locale/interface.d.ts +16 -0
  168. package/dist/style/alert.css +1 -1
  169. package/dist/style/base.css +1 -1
  170. package/dist/style/button.css +1 -1
  171. package/dist/style/color-picker.css +1 -1
  172. package/dist/style/dependencies.json +14 -0
  173. package/dist/style/link.css +1 -1
  174. package/dist/style/transfer.css +1 -0
  175. package/dist/style/transfer.js +12 -0
  176. package/dist/style.css +1 -1
  177. package/dist/types.d.ts +1 -0
  178. package/package.json +3 -1
  179. package/volar.d.ts +1 -0
package/AI_USAGE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  <!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
2
2
  # x-next AI 使用手册
3
3
 
4
- 适用版本:**x-next@1.16.1**。Vue:`^3.5.0`;Node:`>=20.19.0`。
4
+ 适用版本:**x-next@1.18.0**。Vue:`^3.5.0`;Node:`>=20.19.0`。
5
5
 
6
- 来源指纹(AI 行为说明、docs 导入快照、映射、样式依赖、版本、公开类型和 API 参考):`82741ea6b533ff677d8fd71ad9c907c9d8ffe3f134b363bb1584668c30115b17`。
6
+ 来源指纹(AI 行为说明、docs 导入快照、映射、样式依赖、版本、公开类型和 API 参考):`a0432ebab3728998205092a9a7e188702b81ff8c0550430bc02ff73b265af282`。
7
7
 
8
- 覆盖 58 个组件族与 105 个公开组件/服务导出。优先通过 [本地按需索引](./AI_USAGE/index.md) 读取组件页和 API,不为查本包用法默认搜索网络。
8
+ 覆盖 59 个组件族与 106 个公开组件/服务导出。优先通过 [本地按需索引](./AI_USAGE/index.md) 读取组件页和 API,不为查本包用法默认搜索网络。
9
9
 
10
10
  读取入口:`node_modules/x-next/AI_USAGE.md`;可用 `require.resolve('x-next/AI_USAGE.md')` 定位。消费项目应在自己的指令中明确引用。
11
11
 
@@ -41,6 +41,7 @@
41
41
  | Steps | `Steps` | `<x-steps>` | `v-model:current` | `x-next/style/steps` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/steps) |
42
42
  | Tabs | `Tabs` | `<x-tabs>` | `v-model:active-key` | `x-next/style/tabs` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/tabs) |
43
43
  | TreeSelect | `TreeSelect`, `TreeSelectDropdown` | `<x-tree-select>` | `v-model`, `v-model:input-value`, `v-model:popup-visible`, `v-model:expanded-keys` | `x-next/style/tree-select` | `empty.css`, `form-checkbox.css`, `form-select.css`, `scrollbar-v2.css`, `spin.css`, `trigger.css` | [组件文档](https://x-next.yjmf.com/components/tree-select) |
44
+ | Transfer | `Transfer` | `<x-transfer>` | `v-model`, `v-model:selected-keys` | `x-next/style/transfer` | `button.css`, `empty.css`, `form-checkbox.css`, `form-input.css`, `form-input-number.css`, `form-select.css`, `pagination.css`, `scrollbar-v2.css`, `spin.css`, `trigger.css` | [组件文档](https://x-next.yjmf.com/components/transfer) |
44
45
  | Empty | `Empty` | `<x-empty>` | 无 | `x-next/style/empty` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/empty) |
45
46
  | Upload | `Upload` | `<x-upload>` | `v-model:file-list` | `x-next/style/upload` | `image.css`, `progress.css`, `trigger.css`, `tooltip.css` | [组件文档](https://x-next.yjmf.com/components/upload) |
46
47
  | BarChart | `BarChart` | `<x-bar-chart>` | 无 | `x-next/style/bar-chart` | `spin.css` | [组件文档](https://x-next.yjmf.com/components/bar-chart) |
@@ -225,7 +226,7 @@ const pickerAttrs = { id: 'brand-color', 'aria-label': '品牌色' };
225
226
 
226
227
  ## Button
227
228
 
228
- [组件文档与 live demo](https://x-next.yjmf.com/components/button)。`type` 默认 `'default'`,视觉主按钮用 `'primary'`;`htmlType` 默认 `'button'`,原生提交用 `'submit'`。尺寸优先级为显式 `size` → ButtonGroup → ConfigProvider → `'medium'`;Button 不通过 FormItem 继承尺寸。`disabled` / `loading` 默认关闭。
229
+ [组件文档与 live demo](https://x-next.yjmf.com/components/button)。`type` 管形态,默认 `'default'`;实心用 `'solid'`、弱底用 `'subtle'`、透明用 `'outline'/'dashed'/'text'`。`status` 管颜色,默认中性 `'default'`,品牌色显式 `'primary'`。默认与中性 outline 是同一普通操作层级的弱底 / 透明表面差异;品牌描边显式使用 status=primary。兼容 `type='primary'` 解析品牌实心,其他语义 status 优先;`plain` 仅把填充形态转为 subtle,`border=false` 只隐藏边框;语义弱底不额外描边,中性默认保留细边,outline/dashed 需要边框。波纹颜色跟随状态;text、disabled/loading 无外部波纹。深灰实心是独立纯灰的高权重进阶组合,不代表次要或禁用。text 保留按钮点击区域,`type="text" narrow` 去掉水平内边距且保持按钮高度;URL 导航用 Link 的 href 或项目路由方案。Button 不提供 link 类型或布尔 link 属性。`htmlType` 默认 `'button'`,原生提交用 `'submit'`。尺寸优先级为显式 `size` → ButtonGroup → ConfigProvider → `'medium'`;Button 不通过 FormItem 继承尺寸。`disabled` / `loading` 默认关闭。
229
230
 
230
231
  `click` 载荷为 `MouseEvent`,禁用或加载中不会触发。`default`、`prefix`、`suffix`、`icon` 插槽可组合内容;异步业务自行维护 `loading`。
231
232
 
@@ -783,6 +784,40 @@ function resized(size: number) { current.value = 1; feedback.value = `每页 ${s
783
784
  </template>
784
785
  ```
785
786
 
787
+ ## Transfer
788
+
789
+ [组件文档与 live demo](https://x-next.yjmf.com/components/transfer)。`data` 是 `{ value: string | number, label: string, disabled?: boolean }[]`,可附加业务字段。`v-model` 是目标侧值数组;`v-model:selected-keys` 是两侧临时勾选数组,彼此独立。`defaultValue` / `defaultSelectedKeys` 只初始化非受控状态。数字与字符串值不同;重复数据值保留首项。目标模型中的未加载值不展示,移动其他项时仍保留。
790
+
791
+ `showSearch=false`、`showSelectAll=true`、`simple=false`、`oneWay=false`、`loading=false`、`disabled=false`。搜索默认不区分大小写,`filterOption(input, item, type)` 适配业务字段。全选只处理当前搜索结果,分页时仅当前页,禁用项不参与;已勾选的搜索隐藏项仍可移动。`simple` 点击即移动;`oneWay` 只显示向右按钮,目标侧逐项移除,禁用项不可移除。加载阻止操作。`targetOrder='original'` 按源数据排序,`append` 按模型顺序。
792
+
793
+ `change(values, type, movedValues)` 的 `type` 是目的侧 `'source' | 'target'`;`select(sourceSelected, targetSelected)` 报告两侧有效勾选;`search(input, type)`、`scroll(event, type)` 报告源/目标侧。受控模型必须回写;不回写时不提交界面状态。Form 只在移动时触发 change,搜索/临时勾选不触发字段校验。
794
+
795
+ `pagination=true | { pageSize }` 默认每页 10,优先于 `virtualListProps`。`item` 自定义内容;`source` / `target` 替换列表,提供 `data`、`pageData`、`selectedKeys`、`disabled`、`onSelect(value, checked)`、`onSelectAll(values, checked)`、`onMove(values)`。回调统一校验同侧、存在性、禁用和加载。自定义列表自行实现空态、虚拟滚动及键盘语义;默认列表用 Tab/Space 和方向键/Home/End 操作。没有 readonly、远程分页、拖拽排序或字段映射 API。
796
+
797
+ ```vue
798
+ <script setup lang="ts">
799
+ import { ref } from 'vue';
800
+ import { Transfer } from 'x-next';
801
+ import type { TransferItem, TransferValue, TransferType } from 'x-next';
802
+ import 'x-next/style/transfer';
803
+ const values = ref<TransferValue[]>(['audit']);
804
+ const data: TransferItem[] = [
805
+ { value: 'read', label: '查看数据' },
806
+ { value: 'edit', label: '编辑数据' },
807
+ { value: 'audit', label: '审核数据' },
808
+ { value: 'admin', label: '管理配置', disabled: true },
809
+ ];
810
+ const log = ref('');
811
+ function changed(next: TransferValue[], type: TransferType, moved: TransferValue[]) {
812
+ log.value = `${type} ${moved.join(',')};目标值 ${JSON.stringify(next)}`;
813
+ }
814
+ </script>
815
+ <template>
816
+ <Transfer v-model="values" :data="data" show-search @change="changed" />
817
+ <p aria-live="polite">{{ log }}</p>
818
+ </template>
819
+ ```
820
+
786
821
  ## TreeSelect
787
822
 
788
823
  [组件文档与 live demo](https://x-next.yjmf.com/components/tree-select)。用于在层级数据中选择节点,`data` 是 `{ key, title, children }` 树。单选为标量、`multiple` 为数组、`treeCheckable` 勾选模式始终返回数组;`allowSearch` 默认多选 / 勾选开启、单选关闭,`checkedStrategy` 默认 `parent`。
@@ -1541,14 +1576,141 @@ import { Button } from 'x-next';
1541
1576
  <template>
1542
1577
  <Button>默认按钮</Button>
1543
1578
  <Button type="primary">主要按钮</Button>
1544
- <Button type="outline">描边按钮</Button>
1579
+ <Button type="outline" status="primary">品牌描边</Button>
1545
1580
  <Button type="text">文本按钮</Button>
1546
1581
  </template>
1547
1582
  ```
1548
1583
 
1584
+ ### 形态与颜色
1585
+
1586
+ 通过 `type` 设置形态,通过 `status` 设置颜色。品牌色使用 `status="primary"`。
1587
+
1588
+ | 形态 | 表现 |
1589
+ | --- | --- |
1590
+ | default | 浅色背景;中性按钮有细边框,状态色按钮无边框 |
1591
+ | solid | 实心底、白字 |
1592
+ | subtle | 弱填充、无可见边框 |
1593
+ | outline / dashed | 透明底、实线 / 虚线边框 |
1594
+ | text | 透明文字,保留按钮尺寸与内边距 |
1595
+
1596
+ ### 文本动作与跳转链接
1597
+
1598
+ `type="text"` 适合表格或工具栏操作,加上 `narrow` 可去掉水平内边距。跳转页面使用 `x-link` 的 `href`。
1599
+
1600
+ ### 进阶组合:深灰实心
1601
+
1602
+ 深灰实心适合黑白品牌或强调操作;次要操作可使用默认或文本按钮。
1603
+
1604
+ ### 组合预览
1605
+
1606
+ ```vue
1607
+ <script setup lang="ts">
1608
+ import 'x-next/style.css';
1609
+ import { Button } from 'x-next';
1610
+
1611
+ </script>
1612
+ <template>
1613
+ <Button type="solid" status="primary">品牌实心</Button>
1614
+ <Button type="subtle" status="primary">品牌弱底</Button>
1615
+ <Button type="outline" status="primary">品牌描边</Button>
1616
+ <Button type="text" status="primary">品牌文本</Button>
1617
+ </template>
1618
+ ```
1619
+
1620
+ ```vue
1621
+ <script setup lang="ts">
1622
+ import 'x-next/style.css';
1623
+ import { ref } from 'vue';
1624
+ import { Button as XButton, Link as XLink } from 'x-next';
1625
+ import 'x-next/style/button';
1626
+ import 'x-next/style/link';
1627
+ const textCount = ref(0);
1628
+ const compactCount = ref(0);
1629
+ </script>
1630
+ <template>
1631
+ <XButton type="text" status="primary" @click="textCount++">文本操作</XButton>
1632
+ <span>行内动作:<XButton type="text" narrow status="primary" @click="compactCount++">紧凑文本操作</XButton></span>
1633
+ <XLink href="/components/link" :hoverable="false">查看 Link 文档</XLink>
1634
+ <span role="status">文本操作 {{ textCount }} 次,紧凑操作 {{ compactCount }} 次</span>
1635
+ </template>
1636
+ ```
1637
+
1638
+ ```vue
1639
+ <script setup lang="ts">
1640
+ import 'x-next/style.css';
1641
+ import { Button } from 'x-next';
1642
+
1643
+ </script>
1644
+ <template>
1645
+ <Button type="solid">深灰实心</Button>
1646
+ </template>
1647
+ ```
1648
+
1649
+ ```vue
1650
+ <script setup lang="ts">
1651
+ import 'x-next/style.css';
1652
+ import { ref } from 'vue';
1653
+ import { Button as XButton, ButtonGroup as XButtonGroup, Select as XSelect, Checkbox as XCheckbox } from 'x-next';
1654
+ import type { ButtonTypes, ButtonStatus } from 'x-next';
1655
+ import 'x-next/style/button';
1656
+ import 'x-next/style/form-select';
1657
+ import 'x-next/style/form-checkbox';
1658
+ const types = ['default', 'solid', 'subtle', 'outline', 'dashed', 'text', 'primary'] as const;
1659
+ const statuses = ['default', 'primary', 'success', 'warning', 'strong', 'danger', 'info'] as const;
1660
+ const typeOptions = types.map(value => ({ label: value, value }));
1661
+ const statusOptions = statuses.map(value => ({ label: value, value }));
1662
+ const typeAttrs = { 'aria-label': '按钮形态' };
1663
+ const statusAttrs = { 'aria-label': '按钮颜色' };
1664
+ const type = ref<ButtonTypes>('outline');
1665
+ const status = ref<ButtonStatus>('default');
1666
+ const plain = ref(false), border = ref(true), count = ref(0);
1667
+ </script>
1668
+ <template>
1669
+ <div class="button-controls">
1670
+ <div class="button-field">
1671
+ <span>形态</span>
1672
+ <XSelect v-model="type" :options="typeOptions" v-bind="typeAttrs" class="button-select" />
1673
+ </div>
1674
+ <div class="button-field">
1675
+ <span>颜色</span>
1676
+ <XSelect v-model="status" :options="statusOptions" v-bind="statusAttrs" class="button-select" />
1677
+ </div>
1678
+ <XCheckbox v-model="plain">plain</XCheckbox>
1679
+ <XCheckbox v-model="border">border</XCheckbox>
1680
+ </div>
1681
+ <XButton :type="type" :status="status" :plain="plain" :border="border" @click="count++">组合按钮</XButton>
1682
+ <span role="status">已触发 {{ count }} 次</span>
1683
+ <XButtonGroup type="outline">
1684
+ <XButton :border="false">组内无边框一</XButton>
1685
+ <XButton :border="false">组内无边框二</XButton>
1686
+ </XButtonGroup>
1687
+ </template>
1688
+ <style scoped>
1689
+ .button-controls {
1690
+ display: flex;
1691
+ flex-wrap: wrap;
1692
+ align-items: center;
1693
+ gap: 12px;
1694
+ }
1695
+ .button-field {
1696
+ display: flex;
1697
+ align-items: center;
1698
+ gap: 8px;
1699
+ flex: none;
1700
+ }
1701
+ .button-field > span {
1702
+ white-space: nowrap;
1703
+ }
1704
+ .button-field :deep(.button-select) {
1705
+ width: 136px;
1706
+ flex: none;
1707
+ }
1708
+ </style>
1709
+ ```
1710
+
1549
1711
  ### 外部水波纹
1550
1712
 
1551
- Button 默认开启类似 Ant Design Vue 的外部轮廓水波纹。`disabled`、`loading`、`link` 和 `type="text"` 状态不会展示外部水波纹。
1713
+ 点击按钮查看反馈。禁用、加载或文本按钮不显示水波纹。
1552
1714
 
1553
1715
  ```vue
1554
1716
  <script setup lang="ts">
@@ -1560,6 +1722,7 @@ import { Button } from 'x-next';
1560
1722
  <Button>默认水波纹</Button>
1561
1723
  <Button type="primary">主要水波纹</Button>
1562
1724
  <Button status="danger">危险水波纹</Button>
1725
+ <Button type="outline" status="danger">危险描边水波纹</Button>
1563
1726
  <Button loading>加载不触发</Button>
1564
1727
  <Button disabled>禁用不触发</Button>
1565
1728
  </template>
@@ -1567,6 +1730,8 @@ import { Button } from 'x-next';
1567
1730
 
1568
1731
  ### 状态
1569
1732
 
1733
+ 通过 `status` 表达成功、警告、危险等状态。
1734
+
1570
1735
  ```vue
1571
1736
  <script setup lang="ts">
1572
1737
  import 'x-next/style.css';
@@ -1584,15 +1749,45 @@ import { Button } from 'x-next';
1584
1749
  </template>
1585
1750
  ```
1586
1751
 
1587
- ### 状态色实心按钮
1752
+ ### 暗色状态按钮
1588
1753
 
1589
- 五种状态色都提供实心(高亮)形态,**统一使用白字**与主题惯例一致。实心底色即主题种子色:主要 `#1c61ff`、成功 `#00a809`、警告 `#ffb800`、强调 `#ff8200`、危险 `#e02225`。
1754
+ 通过 `ConfigProvider` 的 `dark` 属性设置局部暗色。
1590
1755
 
1591
- 危险色种子 `#e02225` 的白字对比为 4.75:1,实心底直接使用种子本身,不再需要压暗变体。
1756
+ ```vue
1757
+ <script setup lang="ts">
1758
+ import 'x-next/style.css';
1759
+ import { Button as XButton, ConfigProvider as XConfigProvider } from 'x-next';
1760
+ import 'x-next/style/base.css';
1761
+ import 'x-next/style/button.css';
1762
+ </script>
1763
+ <template>
1764
+ <XConfigProvider :dark="true" class="button-dark-example">
1765
+ <XButton>默认</XButton>
1766
+ <XButton status="success">成功</XButton>
1767
+ <XButton status="warning">警告</XButton>
1768
+ <XButton status="strong">强调</XButton>
1769
+ <XButton status="danger">危险</XButton>
1770
+ <XButton status="info">信息</XButton>
1771
+ <XButton disabled>禁用</XButton>
1772
+ </XConfigProvider>
1773
+ </template>
1774
+ <style scoped>
1775
+ .button-dark-example {
1776
+ display: flex;
1777
+ flex-wrap: wrap;
1778
+ gap: 12px;
1779
+ padding: 20px;
1780
+ border-radius: 8px;
1781
+ background: var(--x-color-bg-surface);
1782
+ }
1783
+ </style>
1784
+ ```
1785
+
1786
+ ### 状态色实心按钮
1592
1787
 
1593
- 实心底与白字在明暗主题下都恒定不翻转,因此暗色下仍是同一块强调色。更换主题种子色(`base.scss` 的 `--x-color-<name>`)后实心按钮整体联动。
1788
+ 实心按钮适合强调操作,搭配 `status` 设置颜色。
1594
1789
 
1595
- 亮黄色、亮橙色实底上的白字属于主题惯例内的折中:这类底亮度过高,强行让白字达到正文级 4.5:1 只能压深到底色失去品牌识别。参考 Arco 的橙色实底白字为 2.57:1、Ant Design 的 `warning` 为 1.90:1,本库 `warning` / `strong` 与二者处于同一水平。需要更高可读性时,可改用 `type="outline"`、`plain` 或 `type="text"` 形态,或把种子色选得更深。各状态实测值与回归下限由 `script/check-contrast.js` 守护。
1790
+ 黄色、橙色实心按钮的文字对比较弱,需要更高可读性时可选用描边或弱底形态。
1596
1791
 
1597
1792
  ```vue
1598
1793
  <script setup lang="ts">
@@ -1611,25 +1806,11 @@ import { Button } from 'x-next';
1611
1806
 
1612
1807
  ### 类型与边框
1613
1808
 
1614
- `border="false"` 使用弱背景状态色,不会切换成实心危险按钮。需要实心危险按钮时使用 `type="primary" status="danger"`。
1615
-
1616
- `link` 保持透明背景和对应状态文字色,非圆形链接按钮的高度随文字行高变化、没有水平内边距。禁用和加载期间不会响应悬浮或按下颜色。
1617
-
1618
- 彩色文字按钮(`plain`、`outline`、`text`、`link`)在亮色主题中沿用品牌主色,暗色主题中使用同色系的亮色档,与 Link、Tag 同源。对比度下限对齐 Arco 同级角色,由 `script/check-contrast.js` 的 `ARCO_BASELINE` 守护。
1809
+ `:border="false"` 只隐藏边框。需要弱底危险按钮时使用 `type="subtle" status="danger"`,实心危险按钮使用 `type="solid" status="danger"`。
1619
1810
 
1620
- ### 交互三态
1811
+ ### 交互状态
1621
1812
 
1622
- 按钮的常态、悬浮、按下按**渐深梯度**设计,每一级都可感知且保持轻盈(明度差 ≥ 0.025,由门禁守护):
1623
-
1624
- | 形态 | 常态 | 悬浮 | 按下 |
1625
- | --- | --- | --- | --- |
1626
- | 默认 / 信息(灰色系) | `fill-2` | `neutral-3` | `neutral-4` |
1627
- | 彩色弱底 / 描边 / 文本(除 warning) | 无色或同色浅底 | 同色浅底混入按钮文字色 10% | 同色浅底混入按钮文字色 16% |
1628
- | warning 弱底 / 描边 / 文本 | 无色或同色浅底 | 同色浅底混入按钮文字色 25% | 同色浅底混入按钮文字色 40% |
1629
- | 链接 | 透明背景、状态文字色 | 保持常态 | 保持常态 |
1630
- | 实色 | 种子实底 | 混白 8%(更亮) | 混恒定深 10%(更深) |
1631
-
1632
- 默认按钮不用 `fill-2/3/4` 递进:全局 fill 灰阶在浅端被压缩,`fill-2` 与 `fill-3` 只差 3 个通道,悬浮态几乎看不出变化;改用 `neutral-3/4` 后与 Arco 的步进一致。
1813
+ 悬浮或按住按钮查看状态变化,也可用 Tab 聚焦后按 Space / Enter 操作。第二组展示局部暗色。
1633
1814
 
1634
1815
  ```vue
1635
1816
  <script setup lang="ts">
@@ -1643,15 +1824,52 @@ import { Button } from 'x-next';
1643
1824
  <Button type="text">文本按钮</Button>
1644
1825
  <Button plain status="success">朴素成功</Button>
1645
1826
  <Button :border="false" status="danger">无边框危险</Button>
1646
- <Button link>链接按钮</Button>
1647
- <Button link status="danger">危险链接</Button>
1648
- <Button link disabled>禁用链接</Button>
1827
+ <Button type="text" narrow>紧凑文本</Button>
1828
+ <Button type="text" narrow status="danger">危险文本</Button>
1829
+ <Button type="text" narrow disabled>禁用文本</Button>
1649
1830
  </template>
1650
1831
  ```
1651
1832
 
1652
- ### 状态矩阵
1833
+ ```vue
1834
+ <script setup lang="ts">
1835
+ import 'x-next/style.css';
1836
+ import { ref } from 'vue';
1837
+ import { Button as XButton, ConfigProvider as XConfigProvider } from 'x-next';
1838
+ import 'x-next/style/base.css';
1839
+ import 'x-next/style/button.css';
1840
+
1841
+ const count = ref(0);
1842
+ const statuses = ['default', 'primary', 'success', 'warning', 'strong', 'danger', 'info'] as const;
1843
+ </script>
1844
+ <template>
1845
+ <div v-for="status in statuses" :key="status">
1846
+ <XButton type="outline" :status="status" @click="count++">描边</XButton>
1847
+ <XButton type="dashed" :status="status" @click="count++">虚线</XButton>
1848
+ <XButton type="text" :status="status" @click="count++">文本</XButton>
1849
+ <XButton type="text" narrow :status="status" @click="count++">紧凑文本</XButton>
1850
+ </div>
1851
+ <XConfigProvider :dark="true" class="button-dark-example">
1852
+ <XButton type="outline" @click="count++">暗色描边</XButton>
1853
+ <XButton type="dashed" @click="count++">暗色虚线</XButton>
1854
+ <XButton type="text" @click="count++">暗色文本</XButton>
1855
+ <XButton type="text" narrow @click="count++">暗色紧凑文本</XButton>
1856
+ <XButton type="outline" disabled>禁用</XButton>
1857
+ <XButton type="text" loading>加载</XButton>
1858
+ </XConfigProvider>
1859
+ <span role="status">已触发 {{ count }} 次</span>
1860
+ </template>
1861
+ <style scoped>
1862
+ .button-dark-example {
1863
+ display: flex;
1864
+ flex-wrap: wrap;
1865
+ gap: 12px;
1866
+ padding: 20px;
1867
+ background: var(--x-color-bg-surface);
1868
+ }
1869
+ </style>
1870
+ ```
1653
1871
 
1654
- Button 的状态色基于组件 alias token 组织,例如 `--x-button-color-bg-danger-subtle`、`--x-button-color-bg-danger-solid`、`--x-button-color-text-danger`。后续自定义主题可以优先覆盖这些组件级 token。
1872
+ ### 状态矩阵
1655
1873
 
1656
1874
  ```vue
1657
1875
  <script setup lang="ts">
@@ -1763,6 +1981,15 @@ const pushLog = (label: string) => {
1763
1981
 
1764
1982
  `type` 控制视觉样式,`html-type` 控制原生按钮行为。默认 `html-type="button"`,不会因为放进表单而意外提交。
1765
1983
 
1984
+ ### 原生动作与防重复点击
1985
+
1986
+ <form class="example-box example-box-column" data-demo="button-native-debounce" @submit.prevent="nativeCount++" @reset="formStatus = '防重复示例已重置'">
1987
+ <label>必填内容 <input name="message" required value="初始内容" /></label>
1988
+ <span role="status">已提交 {{ nativeCount }} 次;{{ formStatus }}</span>
1989
+ </form>
1990
+
1991
+ `debounce` 用于防止重复点击,提交结果在表单的 submit 事件中处理。
1992
+
1766
1993
  ```vue
1767
1994
  <script setup lang="ts">
1768
1995
  import 'x-next/style.css';
@@ -1780,6 +2007,23 @@ const handleSubmit = () => {
1780
2007
  </template>
1781
2008
  ```
1782
2009
 
2010
+ ```vue
2011
+ <script setup lang="ts">
2012
+ import 'x-next/style.css';
2013
+ import { Button } from 'x-next';
2014
+ import { ref } from 'vue';
2015
+ const count = ref(0), message = ref('尚未重置');
2016
+ </script>
2017
+ <template>
2018
+ <form @submit.prevent="count++" @reset="message = '已重置'">
2019
+ <label>必填内容 <input name="message" required value="初始内容" /></label>
2020
+ <Button type="solid" status="primary" html-type="submit" :debounce="800">防重复提交</Button>
2021
+ <Button html-type="reset" :debounce="800">防重复重置</Button>
2022
+ <span role="status">已提交 {{ count }} 次;{{ message }}</span>
2023
+ </form>
2024
+ </template>
2025
+ ```
2026
+
1783
2027
  ### 文字与图标
1784
2028
 
1785
2029
  按钮支持中英文混排,可以通过 `prefix`、`suffix` 插槽添加图标或附加文字。下面展示不同尺寸的组合,切换加载状态可查看加载图标与内容的排列。
@@ -1913,6 +2157,8 @@ const nativeAttrs1 = { "aria-label": "切换填充加载" } satisfies ButtonHTML
1913
2157
 
1914
2158
  按钮组只连接相邻边缘,保留两端的形状;只有一个按钮时仍保留完整圆角。
1915
2159
 
2160
+ circle 与 block 同用时保持圆形等宽高;普通纯图标与 block 同用时撑满父宽。按钮组中无边框、subtle 和 text 形态不自动补左侧分隔边框。
2161
+
1916
2162
  ```vue
1917
2163
  <script setup lang="ts">
1918
2164
  import 'x-next/style.css';
@@ -5209,6 +5455,38 @@ import { Alert } from 'x-next';
5209
5455
  </template>
5210
5456
  ```
5211
5457
 
5458
+ ### 暗色主题
5459
+
5460
+ 暗色提示与 Button 状态按钮、Link 悬浮背景及反馈图标底使用同组状态配色,正文保持浅色,图标保留类型辨识度。`normal` 继续使用中性弱提示背景。下面通过 ConfigProvider 展示局部暗色,页面主题切换时也会应用相同配色。
5461
+
5462
+ ```vue
5463
+ <script setup lang="ts">
5464
+ import 'x-next/style.css';
5465
+ import { Alert as XAlert, ConfigProvider as XConfigProvider } from 'x-next';
5466
+ import 'x-next/style/base.css';
5467
+ import 'x-next/style/alert.css';
5468
+ </script>
5469
+ <template>
5470
+ <XConfigProvider :dark="true" class="alert-dark-example">
5471
+ <XAlert type="info">用于普通信息提示。</XAlert>
5472
+ <XAlert type="success">用于成功状态反馈。</XAlert>
5473
+ <XAlert type="warning">用于需要关注的警告信息。</XAlert>
5474
+ <XAlert type="strong">用于需要强调的提醒信息。</XAlert>
5475
+ <XAlert type="error">用于错误或失败信息。</XAlert>
5476
+ <XAlert type="normal">用于弱提示或中性说明。</XAlert>
5477
+ </XConfigProvider>
5478
+ </template>
5479
+ <style scoped>
5480
+ .alert-dark-example {
5481
+ display: grid;
5482
+ gap: 12px;
5483
+ padding: 20px;
5484
+ border-radius: 8px;
5485
+ background: var(--x-color-bg-surface);
5486
+ }
5487
+ </style>
5488
+ ```
5489
+
5212
5490
  ### 标题
5213
5491
 
5214
5492
  ```vue
@@ -9010,6 +9288,474 @@ const nativeAttrs1 = { "aria-label": "键盘选择地区" } satisfies HTMLAttrib
9010
9288
  - 与 Arco 的差异:`checkedStrategy` 默认 `parent`(Arco 默认 `all`),并在其基础上提供 `child`;值可为 `labelInValue` 对象且附带 `raw` 原始节点,属于 x-next 的扩展。
9011
9289
 
9012
9290
 
9291
+ ## Transfer 扩展场景
9292
+
9293
+ ### 用途与选型
9294
+
9295
+ 在两列列表之间移动数据,用于权限分配、成员分组和资源授权。
9296
+
9297
+
9298
+ ### 何时使用
9299
+
9300
+ - 同时查看候选与已分配数据,进行批量分配或取消分配。
9301
+ - 选项包含较多业务信息,Select 展开空间不足。
9302
+ - 自定义列表可以接入表格或树;层级关联与列表键盘逻辑由业务组合实现。
9303
+
9304
+
9305
+ ### 基础用法与移动事件
9306
+
9307
+ 先勾选,再点击方向按钮。`change` 的第二参数是移动目的侧,第三参数仅包含实际移动值。
9308
+
9309
+ ```vue
9310
+ <script setup lang="ts">
9311
+ import 'x-next/style.css';
9312
+ import { reactive, ref } from 'vue';
9313
+ import { Transfer } from 'x-next';
9314
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9315
+ const basicValue = ref<TransferValue[]>(['audit']);
9316
+ const basicData: TransferItem[] = [
9317
+ { value: 'read', label: '查看数据' },
9318
+ { value: 'edit', label: '编辑数据' },
9319
+ { value: 'audit', label: '审核数据' },
9320
+ { value: 'admin', label: '管理配置(不可分配)', disabled: true },
9321
+ ];
9322
+ const basicLog = ref('请勾选权限并移动');
9323
+ function basicChange(value: TransferValue[], type: TransferType, moved: TransferValue[]) {
9324
+ basicLog.value = `移至 ${type}:${moved.join(', ')};当前值 ${JSON.stringify(value)}`;
9325
+ }
9326
+ </script>
9327
+ <template>
9328
+ <Transfer
9329
+ v-model="basicValue"
9330
+ :data="basicData"
9331
+ :title="['可分配权限', '已分配权限']"
9332
+ @change="basicChange"
9333
+ />
9334
+ <p aria-live="polite">{{ basicLog }}</p>
9335
+ <p>目标值:{{ basicValue }}</p>
9336
+ </template>
9337
+ ```
9338
+
9339
+ ### 受控勾选与目标排序
9340
+
9341
+ `v-model:selected-keys` 控制两侧临时勾选,与目标值独立。`target-order="append"` 以模型顺序展示目标项。
9342
+
9343
+ ```vue
9344
+ <script setup lang="ts">
9345
+ import 'x-next/style.css';
9346
+ import { reactive, ref } from 'vue';
9347
+ import { Transfer, Button } from 'x-next';
9348
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9349
+ const checkedValue = ref<TransferValue[]>([2]);
9350
+ const checkedKeys = ref<TransferValue[]>([1]);
9351
+ const checkedData: TransferItem[] = Array.from({ length: 6 }, (_, index) => ({
9352
+ value: index + 1,
9353
+ label: `成员 ${index + 1}`,
9354
+ }));
9355
+ const checkedLog = ref('');
9356
+ function checkedSelect(source: TransferValue[], target: TransferValue[]) {
9357
+ checkedLog.value = `左侧 ${JSON.stringify(source)};右侧 ${JSON.stringify(target)}`;
9358
+ }
9359
+ </script>
9360
+ <template>
9361
+ <p
9362
+ ><Button @click="checkedKeys = [1, 2, 3]">勾选成员 1 / 2 / 3</Button>
9363
+ <Button @click="checkedKeys = []">取消所有勾选</Button></p
9364
+ >
9365
+ <Transfer
9366
+ v-model="checkedValue"
9367
+ v-model:selected-keys="checkedKeys"
9368
+ :data="checkedData"
9369
+ target-order="append"
9370
+ @select="checkedSelect"
9371
+ />
9372
+ <p>目标:{{ checkedValue }};勾选:{{ checkedKeys }}</p>
9373
+ <p aria-live="polite">{{ checkedLog }}</p>
9374
+ </template>
9375
+ ```
9376
+
9377
+ ### 搜索与过滤后的全选
9378
+
9379
+ 全选只作用于当前搜索结果,禁用项不参与;已勾选的隐藏项仍可以移动。自定义过滤可搜索附加业务字段。
9380
+
9381
+ ```vue
9382
+ <script setup lang="ts">
9383
+ import 'x-next/style.css';
9384
+ import { reactive, ref } from 'vue';
9385
+ import { Transfer } from 'x-next';
9386
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9387
+ const searchValue = ref<TransferValue[]>([]);
9388
+ const searchData: TransferItem[] = [
9389
+ { value: 'east-1', label: '杭州', region: '华东' },
9390
+ { value: 'east-2', label: '上海', region: '华东' },
9391
+ { value: 'north', label: '北京', region: '华北' },
9392
+ { value: 'south', label: '深圳', region: '华南', disabled: true },
9393
+ ];
9394
+ const searchLog = ref('尝试搜索“华东”,然后全选');
9395
+ function searchFilter(input: string, item: TransferItem) {
9396
+ return `${item.label} ${String(item.region ?? '')}`.includes(input.trim());
9397
+ }
9398
+ function searchChanged(input: string, type: TransferType) {
9399
+ searchLog.value = `${type} 搜索:${input || '已清空'}`;
9400
+ }
9401
+ </script>
9402
+ <template>
9403
+ <Transfer
9404
+ v-model="searchValue"
9405
+ :data="searchData"
9406
+ show-search
9407
+ search-placeholder="搜索城市或大区"
9408
+ :filter-option="searchFilter"
9409
+ @search="searchChanged"
9410
+ />
9411
+ <p aria-live="polite">{{ searchLog }}</p>
9412
+ <p>目标值:{{ searchValue }}</p>
9413
+ </template>
9414
+ ```
9415
+
9416
+ ### 禁用、加载与错误状态
9417
+
9418
+ 加载时显示真实加载组件并阻止操作。单项禁用只影响该项;`error` 同时支持从 Form 继承。
9419
+
9420
+ ```vue
9421
+ <script setup lang="ts">
9422
+ import 'x-next/style.css';
9423
+ import { reactive, ref } from 'vue';
9424
+ import { Transfer, Checkbox } from 'x-next';
9425
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9426
+ const stateValue = ref<TransferValue[]>([1]);
9427
+ const stateDisabled = ref(false);
9428
+ const stateLoading = ref(false);
9429
+ const stateError = ref(false);
9430
+ const stateData: TransferItem[] = [
9431
+ { value: 1, label: '业务成员' },
9432
+ { value: 2, label: '运维成员' },
9433
+ { value: 3, label: '只读成员(禁用)', disabled: true },
9434
+ { value: 4, label: '这是一个用于检查溢出省略和原生标题的超长成员名称' },
9435
+ ];
9436
+ </script>
9437
+ <template>
9438
+ <p
9439
+ ><Checkbox v-model="stateDisabled">禁用</Checkbox>
9440
+ <Checkbox v-model="stateLoading">加载中</Checkbox>
9441
+ <Checkbox v-model="stateError">错误</Checkbox></p
9442
+ >
9443
+ <Transfer
9444
+ v-model="stateValue"
9445
+ :data="stateData"
9446
+ :disabled="stateDisabled"
9447
+ :loading="stateLoading"
9448
+ :error="stateError"
9449
+ show-search
9450
+ />
9451
+ </template>
9452
+ ```
9453
+
9454
+ ### 单向分配与逐项移除
9455
+
9456
+ 只保留向右按钮,目标侧使用可通过键盘到达的移除按钮。已分配的禁用项不能移除。
9457
+
9458
+ ```vue
9459
+ <script setup lang="ts">
9460
+ import 'x-next/style.css';
9461
+ import { reactive, ref } from 'vue';
9462
+ import { Transfer } from 'x-next';
9463
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9464
+ const oneWayValue = ref<TransferValue[]>(['owner', 'viewer']);
9465
+ const oneWayData: TransferItem[] = [
9466
+ { value: 'owner', label: '固定负责人', disabled: true },
9467
+ { value: 'viewer', label: '查看成员' },
9468
+ { value: 'editor', label: '编辑成员' },
9469
+ ];
9470
+ </script>
9471
+ <template>
9472
+ <Transfer v-model="oneWayValue" :data="oneWayData" one-way :operations="['分配']" />
9473
+ <p>已分配:{{ oneWayValue }}</p>
9474
+ </template>
9475
+ ```
9476
+
9477
+ ### 简单模式
9478
+
9479
+ 点击选项直接移动,也支持 Tab 与 Enter/Space。与 `one-way` 组合时,目标侧仍使用移除按钮。
9480
+
9481
+ ```vue
9482
+ <script setup lang="ts">
9483
+ import 'x-next/style.css';
9484
+ import { reactive, ref } from 'vue';
9485
+ import { Transfer } from 'x-next';
9486
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9487
+ const simpleValue = ref<TransferValue[]>(['b']);
9488
+ const simpleData: TransferItem[] = [
9489
+ { value: 'a', label: '开发组' },
9490
+ { value: 'b', label: '产品组' },
9491
+ { value: 'c', label: '测试组' },
9492
+ { value: 'd', label: '归档组', disabled: true },
9493
+ ];
9494
+ </script>
9495
+ <template>
9496
+ <Transfer v-model="simpleValue" :data="simpleData" simple />
9497
+ <p>点击组名即可移动:{{ simpleValue }}</p>
9498
+ </template>
9499
+ ```
9500
+
9501
+ ### 自定义选项、标题、图标和页脚
9502
+
9503
+ item 仅替换内容,保留原生勾选交互。标题通过 `onSelectAllChange` 调用当前搜索结果/页内的全选。
9504
+
9505
+ ```vue
9506
+ <script setup lang="ts">
9507
+ import 'x-next/style.css';
9508
+ import { reactive, ref } from 'vue';
9509
+ import { Transfer, Checkbox } from 'x-next';
9510
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9511
+ const slotValue = ref<TransferValue[]>([]);
9512
+ const slotData: TransferItem[] = [
9513
+ { value: 1, label: '林老师', role: '产品设计' },
9514
+ { value: 2, label: '陈同学', role: '前端研发' },
9515
+ { value: 3, label: '张同学', role: '质量保障' },
9516
+ ];
9517
+ </script>
9518
+ <template>
9519
+ <Transfer
9520
+ v-model="slotValue"
9521
+ :data="slotData"
9522
+ show-search
9523
+ :title="['团队成员', '项目成员']"
9524
+ :list-style="{ width: '260px' }"
9525
+ >
9526
+ <template #item="{ item }"
9527
+ ><span>{{ item.label }} · {{ item.role }}</span></template
9528
+ >
9529
+ <template #source-title="{ title, checked, indeterminate, disabled, onSelectAllChange }">
9530
+ <Checkbox
9531
+ :model-value="checked"
9532
+ :indeterminate="indeterminate"
9533
+ :disabled="disabled"
9534
+ @change="onSelectAllChange($event === true)"
9535
+ >{{ title }}</Checkbox
9536
+ >
9537
+ </template>
9538
+ <template #to-target-icon><span aria-hidden="true">→</span></template>
9539
+ <template #to-source-icon><span aria-hidden="true">←</span></template>
9540
+ <template #footer="{ type, data, selectedKeys }"
9541
+ ><small
9542
+ >{{ type === 'source' ? '可选' : '已选' }} {{ data.length }} 人,勾选
9543
+ {{ selectedKeys.length }} 人</small
9544
+ ></template
9545
+ >
9546
+ </Transfer>
9547
+ </template>
9548
+ ```
9549
+
9550
+ ### 自定义列表
9551
+
9552
+ source/target 替换列表内容。回调接入表格、树或业务卡片,保持共享移动规则。示例按钮支持键盘,并用 aria-pressed 表达勾选状态。
9553
+
9554
+ ```vue
9555
+ <script setup lang="ts">
9556
+ import 'x-next/style.css';
9557
+ import { reactive, ref } from 'vue';
9558
+ import { Transfer } from 'x-next';
9559
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9560
+ const customValue = ref<TransferValue[]>(['release']);
9561
+ const customData: TransferItem[] = [
9562
+ { value: 'design', label: '设计评审' },
9563
+ { value: 'develop', label: '研发联调' },
9564
+ { value: 'release', label: '上线验证' },
9565
+ { value: 'archived', label: '已归档', disabled: true },
9566
+ ];
9567
+ </script>
9568
+ <template>
9569
+ <Transfer v-model="customValue" :data="customData" show-search>
9570
+ <template #source="{ pageData, selectedKeys, disabled, onSelect }">
9571
+ <div style="padding: 12px; display: grid; gap: 8px">
9572
+ <button
9573
+ v-for="item in pageData"
9574
+ :key="item.value"
9575
+ type="button"
9576
+ :disabled="disabled || item.disabled"
9577
+ :aria-pressed="selectedKeys.includes(item.value)"
9578
+ @click="onSelect(item.value, !selectedKeys.includes(item.value))"
9579
+ >
9580
+ {{ selectedKeys.includes(item.value) ? '✓ ' : '+ ' }}{{ item.label }}
9581
+ </button>
9582
+ <span v-if="!pageData.length">没有可选任务</span>
9583
+ </div>
9584
+ </template>
9585
+ <template #target="{ pageData, selectedKeys, disabled, onSelect }">
9586
+ <div style="padding: 12px; display: grid; gap: 8px">
9587
+ <button
9588
+ v-for="item in pageData"
9589
+ :key="item.value"
9590
+ type="button"
9591
+ :disabled="disabled || item.disabled"
9592
+ :aria-pressed="selectedKeys.includes(item.value)"
9593
+ @click="onSelect(item.value, !selectedKeys.includes(item.value))"
9594
+ >
9595
+ {{ selectedKeys.includes(item.value) ? '✓ ' : '+ ' }}{{ item.label }}
9596
+ </button>
9597
+ <span v-if="!pageData.length">尚未分配任务</span>
9598
+ </div>
9599
+ </template>
9600
+ </Transfer>
9601
+ <p>当前项目任务:{{ customValue }}</p>
9602
+ </template>
9603
+ ```
9604
+
9605
+ ### 分页
9606
+
9607
+ 两侧页码独立,全选仅当前页。搜索或每页条数变化后回到第一页,移动使页码超出范围时自动收敛。
9608
+
9609
+ ```vue
9610
+ <script setup lang="ts">
9611
+ import 'x-next/style.css';
9612
+ import { reactive, ref } from 'vue';
9613
+ import { Transfer } from 'x-next';
9614
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9615
+ const pagedValue = ref<TransferValue[]>([2, 4]);
9616
+ const pagedData: TransferItem[] = Array.from({ length: 30 }, (_, index) => ({
9617
+ value: index + 1,
9618
+ label: `候选成员 ${index + 1}`,
9619
+ disabled: index === 8,
9620
+ }));
9621
+ </script>
9622
+ <template>
9623
+ <Transfer v-model="pagedValue" :data="pagedData" :pagination="{ pageSize: 5 }" show-search />
9624
+ <p>已分配:{{ pagedValue }}</p>
9625
+ </template>
9626
+ ```
9627
+
9628
+ ### 虚拟滚动
9629
+
9630
+ 大数据列表复用库内 VirtualList。分页优先于虚拟滚动;自定义列表自行决定渲染方式。
9631
+
9632
+ ```vue
9633
+ <script setup lang="ts">
9634
+ import 'x-next/style.css';
9635
+ import { reactive, ref } from 'vue';
9636
+ import { Transfer } from 'x-next';
9637
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9638
+ const virtualValue = ref<TransferValue[]>([100, 500]);
9639
+ const virtualData: TransferItem[] = Array.from({ length: 1000 }, (_, index) => ({
9640
+ value: index + 1,
9641
+ label: `数据项 ${index + 1}`,
9642
+ }));
9643
+ const virtualLog = ref('尝试滚动列表或搜索数据项 999');
9644
+ function virtualScroll(_event: Event, type: TransferType) {
9645
+ virtualLog.value = `${type} 列表正在滚动`;
9646
+ }
9647
+ </script>
9648
+ <template>
9649
+ <Transfer
9650
+ v-model="virtualValue"
9651
+ :data="virtualData"
9652
+ show-search
9653
+ :virtual-list-props="{
9654
+ height: 240,
9655
+ threshold: 30,
9656
+ fixedSize: true,
9657
+ estimatedSize: 36,
9658
+ buffer: 5,
9659
+ }"
9660
+ @scroll="virtualScroll"
9661
+ />
9662
+ <p aria-live="polite">{{ virtualLog }}</p>
9663
+ <p>目标值:{{ virtualValue }}</p>
9664
+ </template>
9665
+ ```
9666
+
9667
+ ### Form 校验联动
9668
+
9669
+ 勾选和搜索不改变字段值;实际移动才触发 change 校验。标签/必填/错误说明绑定到整个组,内部控件不会重复注册。
9670
+
9671
+ ```vue
9672
+ <script setup lang="ts">
9673
+ import 'x-next/style.css';
9674
+ import { reactive, ref } from 'vue';
9675
+ import { Transfer, Button, FormItem, Form } from 'x-next';
9676
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9677
+ const transferFormRef = ref<FormInstance>();
9678
+ const transferForm = reactive({ members: [] as TransferValue[] });
9679
+ const transferRules: Record<string, FieldRule[]> = {
9680
+ members: [{ type: 'array', required: true, minLength: 2, message: '请至少分配 2 个成员' }],
9681
+ };
9682
+ const transferFormData: TransferItem[] = [
9683
+ { value: 'lin', label: '林老师' },
9684
+ { value: 'chen', label: '陈同学' },
9685
+ { value: 'zhang', label: '张同学' },
9686
+ ];
9687
+ const transferFormLog = ref('');
9688
+ async function validateTransfer() {
9689
+ transferFormLog.value = (await transferFormRef.value?.validate()) ? '请补齐成员' : '校验通过';
9690
+ }
9691
+ </script>
9692
+ <template>
9693
+ <Form ref="transferFormRef" :model="transferForm" :rules="transferRules" layout="vertical">
9694
+ <FormItem field="members" label="项目成员" required>
9695
+ <Transfer v-model="transferForm.members" :data="transferFormData" show-search />
9696
+ </FormItem>
9697
+ <Button type="primary" @click="validateTransfer">校验成员</Button>
9698
+ <Button @click="transferFormRef?.resetFields()">重置</Button>
9699
+ <p aria-live="polite">{{ transferFormLog }}</p>
9700
+ </Form>
9701
+ </template>
9702
+ ```
9703
+
9704
+ ### 空态与异步数据
9705
+
9706
+ 模型中暂时没有对应数据的值会保留,数据到达后展示。空态插槽能区分源侧、目标侧和搜索条件。
9707
+
9708
+ ```vue
9709
+ <script setup lang="ts">
9710
+ import 'x-next/style.css';
9711
+ const searchValue = ref<TransferValue[]>([]);
9712
+
9713
+ import { reactive, ref } from 'vue';
9714
+ import { Transfer, Button } from 'x-next';
9715
+ import type { TransferItem, TransferValue, TransferType, FormInstance, FieldRule } from 'x-next';
9716
+ const emptyValue = ref<TransferValue[]>(['remote']);
9717
+ const emptyData = ref<TransferItem[]>([]);
9718
+ function loadTransferData() {
9719
+ emptyData.value = [
9720
+ { value: 'remote', label: '已分配的远程成员' },
9721
+ { value: 'new', label: '新加载的候选成员' },
9722
+ ];
9723
+ }
9724
+ </script>
9725
+ <template>
9726
+ <p
9727
+ ><Button @click="loadTransferData">加载模拟数据</Button>
9728
+ <Button @click="emptyData = []">清空数据源</Button></p
9729
+ >
9730
+ <Transfer v-model="emptyValue" :data="emptyData" show-search>
9731
+ <template #empty="{ type, searchValue }"
9732
+ ><span>{{
9733
+ searchValue ? '没有匹配的成员' : type === 'source' ? '暂无候选成员' : '暂无已加载成员'
9734
+ }}</span></template
9735
+ >
9736
+ </Transfer>
9737
+ <p>模型值保留:{{ emptyValue }}</p>
9738
+ </template>
9739
+ ```
9740
+
9741
+ ### 键盘与行为边界
9742
+
9743
+ - Tab 到达搜索、全选、选项和方向按钮;Space 勾选复选框,Enter/Space 激活方向/移除/简单模式按钮。
9744
+ - 默认列表支持 ↑ / ↓、Home / End 定位,跳过禁用项。自定义列表由业务实现键盘语义。
9745
+ - 勾选值与目标值分别受控;传入模型而不回写时保持原值。默认值只在创建时初始化。
9746
+ - `value` 必须全局唯一,数字 `1` 和字符串 `"1"` 不同。重复项保留首项,非法值不展示;不原地修改输入数组。
9747
+ - 默认搜索不区分大小写。全选仅当前搜索结果,分页时仅当前页;已勾选的搜索隐藏项仍参与移动。
9748
+ - 禁用项不能全选、移入或移除。缺失数据的目标值在移动其他项时保留。
9749
+ - `targetOrder="original"` 按数据源排序;`append` 按模型顺序,移入值追加在已有目标值之后。
9750
+ - `pagination` 优先于 `virtualListProps`。source/target 插槽接收过滤数据和当前页数据,自行实现虚拟渲染与键盘。
9751
+ - 数组控件没有 readonly 属性;只读展示可使用 disabled。字段映射、远程分页、拖拽排序需业务适配。
9752
+
9753
+
9754
+ ### 数据类型
9755
+
9756
+ 组合参见 [Form 表单](./form.md)、[Checkbox 复选框](./checkbox.md)、[Table 表格](./table.md)、[TreeSelect 树选择器](./tree-select.md)。
9757
+
9758
+
9013
9759
  ## Empty 扩展场景
9014
9760
 
9015
9761
  ### 用途与选型
@@ -19227,13 +19973,12 @@ interface BarChartLayout {
19227
19973
  | loadingFill | 加载时居中覆盖内容并保持尺寸;结束后恢复文字和插槽 | undefined &#124; false &#124; true | 否 | false |
19228
19974
  | debounce | 点击后保持 loading 态的时间,单位 ms,用于防重复点击 | undefined &#124; number | 否 | 0 |
19229
19975
  | shape | 胶囊形、圆形或直角;未设置时使用默认圆角 | undefined &#124; "round" &#124; "circle" &#124; "square" | 否 | undefined |
19230
- | link | 是否展示为链接按钮样式 | undefined &#124; false &#124; true | 否 | false |
19231
- | type | 按钮类型 | undefined &#124; "default" &#124; "primary" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | "default" |
19976
+ | type | 按钮形态;primary 是实心形态的快捷类型,默认使用品牌色 | undefined &#124; "default" &#124; "primary" &#124; "solid" &#124; "subtle" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | "default" |
19232
19977
  | htmlType | 原生按钮类型;模板中使用 html-type | undefined &#124; "button" &#124; "submit" &#124; "reset" | 否 | "button" |
19233
- | status | 按钮状态 | undefined &#124; "default" &#124; "success" &#124; "warning" &#124; "strong" &#124; "info" &#124; "danger" | 否 | "default" |
19234
- | plain | 是否朴素样式 | undefined &#124; false &#124; true | 否 | false |
19978
+ | status | 按钮颜色 | undefined &#124; "default" &#124; "success" &#124; "warning" &#124; "strong" &#124; "info" &#124; "primary" &#124; "danger" | 否 | "default" |
19979
+ | plain | 将 default / solid / primary 改为弱底,保留颜色 | undefined &#124; false &#124; true | 否 | false |
19235
19980
  | size | 按钮尺寸 | undefined &#124; "mini" &#124; "small" &#124; "medium" &#124; "large" &#124; "huge" | 否 | undefined |
19236
- | border | 是否显示边框 | undefined &#124; false &#124; true | 否 | true |
19981
+ | border | 是否允许形态的边框;false 只隐藏边框 | undefined &#124; false &#124; true | 否 | true |
19237
19982
  | narrow | 是否使用窄按钮,无内边距 | undefined &#124; false &#124; true | 否 | false |
19238
19983
 
19239
19984
  ### Events
@@ -19249,7 +19994,7 @@ interface BarChartLayout {
19249
19994
  | default | 按钮内容 | () => any |
19250
19995
  | prefix | 前置内容 | () => any |
19251
19996
  | suffix | 后置内容 | () => any |
19252
- | icon | 图标内容,会渲染在文字前;仅有此插槽时按钮等宽高,请设置 aria-label | any |
19997
+ | icon | 图标内容,会渲染在文字前;仅有此插槽时通常等宽高,block 时撑满父宽;请设置 aria-label | any |
19253
19998
 
19254
19999
  ### 实例方法
19255
20000
 
@@ -19262,9 +20007,9 @@ interface BarChartLayout {
19262
20007
  ```typescript-reference
19263
20008
  type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
19264
20009
 
19265
- type ButtonStatus = 'default' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
20010
+ type ButtonStatus = 'default' | 'primary' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
19266
20011
 
19267
- type ButtonTypes = 'primary' | 'default' | 'dashed' | 'outline' | 'text';
20012
+ type ButtonTypes = 'primary' | 'default' | 'solid' | 'subtle' | 'dashed' | 'outline' | 'text';
19268
20013
 
19269
20014
  type ButtonHtmlType = 'button' | 'submit' | 'reset';
19270
20015
 
@@ -19277,7 +20022,6 @@ type ButtonProps = {
19277
20022
  loadingFill?: boolean;
19278
20023
  debounce?: number;
19279
20024
  shape?: ButtonShape;
19280
- link?: boolean;
19281
20025
  type?: ButtonTypes;
19282
20026
  htmlType?: ButtonHtmlType;
19283
20027
  status?: ButtonStatus;
@@ -19297,11 +20041,11 @@ type ButtonProps = {
19297
20041
 
19298
20042
  | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
19299
20043
  | --- | --- | --- | --- | --- |
19300
- | type | 子按钮默认类型 | undefined &#124; "default" &#124; "primary" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | 未声明 |
19301
- | status | 子按钮默认状态 | undefined &#124; "default" &#124; "success" &#124; "warning" &#124; "strong" &#124; "info" &#124; "danger" | 否 | 未声明 |
20044
+ | type | 子按钮默认类型 | undefined &#124; "default" &#124; "primary" &#124; "solid" &#124; "subtle" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | 未声明 |
20045
+ | status | 子按钮默认状态 | undefined &#124; "default" &#124; "success" &#124; "warning" &#124; "strong" &#124; "info" &#124; "primary" &#124; "danger" | 否 | 未声明 |
19302
20046
  | shape | 子按钮默认形状 | undefined &#124; "round" &#124; "circle" &#124; "square" | 否 | 未声明 |
19303
20047
  | size | 子按钮默认尺寸 | undefined &#124; "mini" &#124; "small" &#124; "medium" &#124; "large" &#124; "huge" | 否 | 未声明 |
19304
- | disabled | 是否禁用所有子按钮 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
20048
+ | disabled | 子按钮默认禁用值;子按钮显式值优先 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
19305
20049
 
19306
20050
  ### Events
19307
20051
 
@@ -19322,9 +20066,9 @@ type ButtonProps = {
19322
20066
  ```typescript-reference
19323
20067
  type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
19324
20068
 
19325
- type ButtonStatus = 'default' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
20069
+ type ButtonStatus = 'default' | 'primary' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
19326
20070
 
19327
- type ButtonTypes = 'primary' | 'default' | 'dashed' | 'outline' | 'text';
20071
+ type ButtonTypes = 'primary' | 'default' | 'solid' | 'subtle' | 'dashed' | 'outline' | 'text';
19328
20072
 
19329
20073
  type ButtonHtmlType = 'button' | 'submit' | 'reset';
19330
20074
 
@@ -19337,7 +20081,6 @@ type ButtonProps = {
19337
20081
  loadingFill?: boolean;
19338
20082
  debounce?: number;
19339
20083
  shape?: ButtonShape;
19340
- link?: boolean;
19341
20084
  type?: ButtonTypes;
19342
20085
  htmlType?: ButtonHtmlType;
19343
20086
  status?: ButtonStatus;
@@ -20177,8 +20920,8 @@ interface UseDraggableOptions<T> extends Options {
20177
20920
  | okText | 确认按钮文案 | undefined &#124; string | 否 | "" |
20178
20921
  | cancelText | 取消按钮文案 | undefined &#124; string | 否 | "" |
20179
20922
  | okLoading | 确认按钮是否 loading | undefined &#124; false &#124; true | 否 | false |
20180
- | okButtonProps | 确认按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; link?: boolean; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
20181
- | cancelButtonProps | 取消按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; link?: boolean; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
20923
+ | okButtonProps | 确认按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
20924
+ | cancelButtonProps | 取消按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
20182
20925
  | hideCancel | 是否隐藏默认取消按钮 | undefined &#124; false &#124; true | 否 | false |
20183
20926
  | onBeforeOk | 确认前拦截,返回 false 阻止关闭 | undefined &#124; (event?: Event) => boolean &#124; void &#124; Promise<boolean &#124; void> | 否 | 未声明 |
20184
20927
  | onBeforeCancel | 取消前拦截,返回 false 阻止关闭 | undefined &#124; (event?: Event) => boolean &#124; void &#124; Promise<boolean &#124; void> | 否 | 未声明 |
@@ -20351,9 +21094,9 @@ interface DropdownPanelRef {
20351
21094
  | position | 弹出位置 | undefined &#124; "top" &#124; "bottom" &#124; "tl" &#124; "tr" &#124; "bl" &#124; "br" | 否 | "br" |
20352
21095
  | popupContainer | 弹出层挂载容器 | undefined &#124; string &#124; HTMLElement | 否 | 未声明 |
20353
21096
  | disabled | 是否禁用 | undefined &#124; false &#124; true | 否 | false |
20354
- | type | 按钮类型 | undefined &#124; "default" &#124; "primary" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | "default" |
21097
+ | type | 按钮类型 | undefined &#124; "default" &#124; "primary" &#124; "solid" &#124; "subtle" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | "default" |
20355
21098
  | size | 按钮尺寸 | undefined &#124; "mini" &#124; "small" &#124; "medium" &#124; "large" &#124; "huge" | 否 | "medium" |
20356
- | buttonProps | 左侧主按钮属性 | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; link?: boolean; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
21099
+ | buttonProps | 左侧主按钮属性 | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
20357
21100
  | hideOnSelect | 选择后是否隐藏弹出层 | undefined &#124; false &#124; true | 否 | true |
20358
21101
 
20359
21102
  ### Events
@@ -26988,7 +27731,7 @@ interface ActionType {
26988
27731
  | disabled | 禁用输入和搜索按钮 | undefined &#124; false &#124; true | 否 | false |
26989
27732
  | size | 尺寸,继承 Form / 全局配置 | undefined &#124; "mini" &#124; "small" &#124; "medium" &#124; "large" | 否 | 未声明 |
26990
27733
  | buttonText | 搜索按钮文字 | undefined &#124; string | 否 | 未声明 |
26991
- | buttonProps | 搜索按钮属性 | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; link?: boolean; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
27734
+ | buttonProps | 搜索按钮属性 | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
26992
27735
  | modelValue | 见场景用法与类型 | undefined &#124; string | 否 | 透传内层组件;默认值见对应组件 |
26993
27736
  | type | 见场景用法与类型 | undefined &#124; "text" &#124; "password" | 否 | 透传内层组件;默认值见对应组件 |
26994
27737
  | error | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | 透传内层组件;默认值见对应组件 |
@@ -28977,8 +29720,8 @@ interface PieChartSegment {
28977
29720
  | okText | 确认按钮文案 | undefined &#124; string | 否 | undefined |
28978
29721
  | cancelText | 取消按钮文案 | undefined &#124; string | 否 | undefined |
28979
29722
  | okLoading | 确认按钮是否为 loading | undefined &#124; false &#124; true | 否 | false |
28980
- | okButtonProps | 确认按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; link?: boolean; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
28981
- | cancelButtonProps | 取消按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; link?: boolean; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
29723
+ | okButtonProps | 确认按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
29724
+ | cancelButtonProps | 取消按钮 props | undefined &#124; { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
28982
29725
  | onBeforeOk | 确认前拦截,返回 false 阻止关闭;返回 Promise 时确认按钮进入 loading | undefined &#124; (e: Event) => boolean &#124; void &#124; Promise<boolean &#124; void> | 否 | undefined |
28983
29726
  | onBeforeCancel | 取消前拦截,返回 false 阻止关闭;返回 Promise 时取消按钮进入 loading | undefined &#124; (e: Event) => boolean &#124; void &#124; Promise<boolean &#124; void> | 否 | undefined |
28984
29727
  | renderTo | 弹层挂载容器 | undefined &#124; string &#124; HTMLElement | 否 | 未声明 |
@@ -33752,7 +34495,7 @@ type Filters = Record<string, string[]>;
33752
34495
  | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
33753
34496
  | --- | --- | --- | --- | --- |
33754
34497
  | reverse | 是否倒序展示 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
33755
- | lineType | 轴线样式 | undefined &#124; "dashed" &#124; "dotted" &#124; "solid" | 否 | "solid" |
34498
+ | lineType | 轴线样式 | undefined &#124; "solid" &#124; "dashed" &#124; "dotted" | 否 | "solid" |
33756
34499
  | direction | 时间线方向 | undefined &#124; "horizontal" &#124; "vertical" | 否 | "vertical" |
33757
34500
  | mode | 展示模式 | undefined &#124; "top" &#124; "bottom" &#124; "right" &#124; "left" &#124; "alternate" | 否 | "left" |
33758
34501
  | pending | 是否展示幽灵节点,传入字符串时作为节点内容展示 | undefined &#124; string &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
@@ -33805,7 +34548,7 @@ type TimelineItemPosition = 'left' | 'right' | 'top' | 'bottom';
33805
34548
  | label | 标签文本 | undefined &#124; string | 否 | 未声明 |
33806
34549
  | dotColor | 时间点颜色 | undefined &#124; string & {} &#124; "initial" &#124; "red" &#124; "orangered" &#124; "orange" &#124; "gold" &#124; "lime" &#124; "green" &#124; "cyan" &#124; "blue" &#124; "purple" &#124; "magenta" &#124; "gray" &#124; "-moz-initial" &#124; "inherit" &#124; "revert" &#124; "revert-layer" &#124; "unset" &#124; "aliceblue" &#124; "antiquewhite" &#124; "aqua" &#124; "aquamarine" &#124; "azure" &#124; "beige" &#124; "bisque" &#124; "black" &#124; "blanchedalmond" &#124; "blueviolet" &#124; "brown" &#124; "burlywood" &#124; "cadetblue" &#124; "chartreuse" &#124; "chocolate" &#124; "coral" &#124; "cornflowerblue" &#124; "cornsilk" &#124; "crimson" &#124; "darkblue" &#124; "darkcyan" &#124; "darkgoldenrod" &#124; "darkgray" &#124; "darkgreen" &#124; "darkgrey" &#124; "darkkhaki" &#124; "darkmagenta" &#124; "darkolivegreen" &#124; "darkorange" &#124; "darkorchid" &#124; "darkred" &#124; "darksalmon" &#124; "darkseagreen" &#124; "darkslateblue" &#124; "darkslategray" &#124; "darkslategrey" &#124; "darkturquoise" &#124; "darkviolet" &#124; "deeppink" &#124; "deepskyblue" &#124; "dimgray" &#124; "dimgrey" &#124; "dodgerblue" &#124; "firebrick" &#124; "floralwhite" &#124; "forestgreen" &#124; "fuchsia" &#124; "gainsboro" &#124; "ghostwhite" &#124; "goldenrod" &#124; "greenyellow" &#124; "grey" &#124; "honeydew" &#124; "hotpink" &#124; "indianred" &#124; "indigo" &#124; "ivory" &#124; "khaki" &#124; "lavender" &#124; "lavenderblush" &#124; "lawngreen" &#124; "lemonchiffon" &#124; "lightblue" &#124; "lightcoral" &#124; "lightcyan" &#124; "lightgoldenrodyellow" &#124; "lightgray" &#124; "lightgreen" &#124; "lightgrey" &#124; "lightpink" &#124; "lightsalmon" &#124; "lightseagreen" &#124; "lightskyblue" &#124; "lightslategray" &#124; "lightslategrey" &#124; "lightsteelblue" &#124; "lightyellow" &#124; "limegreen" &#124; "linen" &#124; "maroon" &#124; "mediumaquamarine" &#124; "mediumblue" &#124; "mediumorchid" &#124; "mediumpurple" &#124; "mediumseagreen" &#124; "mediumslateblue" &#124; "mediumspringgreen" &#124; "mediumturquoise" &#124; "mediumvioletred" &#124; "midnightblue" &#124; "mintcream" &#124; "mistyrose" &#124; "moccasin" &#124; "navajowhite" &#124; "navy" &#124; "oldlace" &#124; "olive" &#124; "olivedrab" &#124; "orchid" &#124; "palegoldenrod" &#124; "palegreen" &#124; "paleturquoise" &#124; "palevioletred" &#124; "papayawhip" &#124; "peachpuff" &#124; "peru" &#124; "pink" &#124; "plum" &#124; "powderblue" &#124; "rebeccapurple" &#124; "rosybrown" &#124; "royalblue" &#124; "saddlebrown" &#124; "salmon" &#124; "sandybrown" &#124; "seagreen" &#124; "seashell" &#124; "sienna" &#124; "silver" &#124; "skyblue" &#124; "slateblue" &#124; "slategray" &#124; "slategrey" &#124; "snow" &#124; "springgreen" &#124; "steelblue" &#124; "tan" &#124; "teal" &#124; "thistle" &#124; "tomato" &#124; "turquoise" &#124; "violet" &#124; "wheat" &#124; "white" &#124; "whitesmoke" &#124; "yellow" &#124; "yellowgreen" &#124; "transparent" &#124; "AccentColor" &#124; "AccentColorText" &#124; "ActiveText" &#124; "ButtonBorder" &#124; "ButtonFace" &#124; "ButtonText" &#124; "Canvas" &#124; "CanvasText" &#124; "Field" &#124; "FieldText" &#124; "GrayText" &#124; "Highlight" &#124; "HighlightText" &#124; "LinkText" &#124; "Mark" &#124; "MarkText" &#124; "SelectedItem" &#124; "SelectedItemText" &#124; "VisitedText" &#124; "ActiveBorder" &#124; "ActiveCaption" &#124; "AppWorkspace" &#124; "Background" &#124; "ButtonHighlight" &#124; "ButtonShadow" &#124; "CaptionText" &#124; "InactiveBorder" &#124; "InactiveCaption" &#124; "InactiveCaptionText" &#124; "InfoBackground" &#124; "InfoText" &#124; "Menu" &#124; "MenuText" &#124; "Scrollbar" &#124; "ThreeDDarkShadow" &#124; "ThreeDFace" &#124; "ThreeDHighlight" &#124; "ThreeDLightShadow" &#124; "ThreeDShadow" &#124; "Window" &#124; "WindowFrame" &#124; "WindowText" &#124; "currentColor" | 否 | 未声明 |
33807
34550
  | dotType | 时间点类型 | undefined &#124; "solid" &#124; "hollow" | 否 | "solid" |
33808
- | lineType | 当前节点后的轴线样式 | undefined &#124; "dashed" &#124; "dotted" &#124; "solid" | 否 | 未声明 |
34551
+ | lineType | 当前节点后的轴线样式 | undefined &#124; "solid" &#124; "dashed" &#124; "dotted" | 否 | 未声明 |
33809
34552
  | lineColor | 当前节点后的轴线颜色 | undefined &#124; string & {} &#124; "initial" &#124; "red" &#124; "orangered" &#124; "orange" &#124; "gold" &#124; "lime" &#124; "green" &#124; "cyan" &#124; "blue" &#124; "purple" &#124; "magenta" &#124; "gray" &#124; "-moz-initial" &#124; "inherit" &#124; "revert" &#124; "revert-layer" &#124; "unset" &#124; "aliceblue" &#124; "antiquewhite" &#124; "aqua" &#124; "aquamarine" &#124; "azure" &#124; "beige" &#124; "bisque" &#124; "black" &#124; "blanchedalmond" &#124; "blueviolet" &#124; "brown" &#124; "burlywood" &#124; "cadetblue" &#124; "chartreuse" &#124; "chocolate" &#124; "coral" &#124; "cornflowerblue" &#124; "cornsilk" &#124; "crimson" &#124; "darkblue" &#124; "darkcyan" &#124; "darkgoldenrod" &#124; "darkgray" &#124; "darkgreen" &#124; "darkgrey" &#124; "darkkhaki" &#124; "darkmagenta" &#124; "darkolivegreen" &#124; "darkorange" &#124; "darkorchid" &#124; "darkred" &#124; "darksalmon" &#124; "darkseagreen" &#124; "darkslateblue" &#124; "darkslategray" &#124; "darkslategrey" &#124; "darkturquoise" &#124; "darkviolet" &#124; "deeppink" &#124; "deepskyblue" &#124; "dimgray" &#124; "dimgrey" &#124; "dodgerblue" &#124; "firebrick" &#124; "floralwhite" &#124; "forestgreen" &#124; "fuchsia" &#124; "gainsboro" &#124; "ghostwhite" &#124; "goldenrod" &#124; "greenyellow" &#124; "grey" &#124; "honeydew" &#124; "hotpink" &#124; "indianred" &#124; "indigo" &#124; "ivory" &#124; "khaki" &#124; "lavender" &#124; "lavenderblush" &#124; "lawngreen" &#124; "lemonchiffon" &#124; "lightblue" &#124; "lightcoral" &#124; "lightcyan" &#124; "lightgoldenrodyellow" &#124; "lightgray" &#124; "lightgreen" &#124; "lightgrey" &#124; "lightpink" &#124; "lightsalmon" &#124; "lightseagreen" &#124; "lightskyblue" &#124; "lightslategray" &#124; "lightslategrey" &#124; "lightsteelblue" &#124; "lightyellow" &#124; "limegreen" &#124; "linen" &#124; "maroon" &#124; "mediumaquamarine" &#124; "mediumblue" &#124; "mediumorchid" &#124; "mediumpurple" &#124; "mediumseagreen" &#124; "mediumslateblue" &#124; "mediumspringgreen" &#124; "mediumturquoise" &#124; "mediumvioletred" &#124; "midnightblue" &#124; "mintcream" &#124; "mistyrose" &#124; "moccasin" &#124; "navajowhite" &#124; "navy" &#124; "oldlace" &#124; "olive" &#124; "olivedrab" &#124; "orchid" &#124; "palegoldenrod" &#124; "palegreen" &#124; "paleturquoise" &#124; "palevioletred" &#124; "papayawhip" &#124; "peachpuff" &#124; "peru" &#124; "pink" &#124; "plum" &#124; "powderblue" &#124; "rebeccapurple" &#124; "rosybrown" &#124; "royalblue" &#124; "saddlebrown" &#124; "salmon" &#124; "sandybrown" &#124; "seagreen" &#124; "seashell" &#124; "sienna" &#124; "silver" &#124; "skyblue" &#124; "slateblue" &#124; "slategray" &#124; "slategrey" &#124; "snow" &#124; "springgreen" &#124; "steelblue" &#124; "tan" &#124; "teal" &#124; "thistle" &#124; "tomato" &#124; "turquoise" &#124; "violet" &#124; "wheat" &#124; "white" &#124; "whitesmoke" &#124; "yellow" &#124; "yellowgreen" &#124; "transparent" &#124; "AccentColor" &#124; "AccentColorText" &#124; "ActiveText" &#124; "ButtonBorder" &#124; "ButtonFace" &#124; "ButtonText" &#124; "Canvas" &#124; "CanvasText" &#124; "Field" &#124; "FieldText" &#124; "GrayText" &#124; "Highlight" &#124; "HighlightText" &#124; "LinkText" &#124; "Mark" &#124; "MarkText" &#124; "SelectedItem" &#124; "SelectedItemText" &#124; "VisitedText" &#124; "ActiveBorder" &#124; "ActiveCaption" &#124; "AppWorkspace" &#124; "Background" &#124; "ButtonHighlight" &#124; "ButtonShadow" &#124; "CaptionText" &#124; "InactiveBorder" &#124; "InactiveCaption" &#124; "InactiveCaptionText" &#124; "InfoBackground" &#124; "InfoText" &#124; "Menu" &#124; "MenuText" &#124; "Scrollbar" &#124; "ThreeDDarkShadow" &#124; "ThreeDFace" &#124; "ThreeDHighlight" &#124; "ThreeDLightShadow" &#124; "ThreeDShadow" &#124; "Window" &#124; "WindowFrame" &#124; "WindowText" &#124; "currentColor" | 否 | 未声明 |
33810
34553
  | position | 交替模式下的单项位置 | undefined &#124; "top" &#124; "bottom" &#124; "right" &#124; "left" | 否 | 未声明 |
33811
34554
 
@@ -34619,6 +35362,163 @@ type Filters = Record<string, string[]>;
34619
35362
  ```
34620
35363
 
34621
35364
 
35365
+ ## Transfer API
35366
+
35367
+ 公开声明:`dist/components/transfer/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
35368
+
35369
+ ### Props
35370
+
35371
+ | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
35372
+ | --- | --- | --- | --- | --- |
35373
+ | data | 数据源,value 唯一,支持附加字段 | undefined &#124; TransferItem[] | 否 | [] |
35374
+ | modelValue | 见场景用法与类型 | undefined &#124; TransferValue[] | 否 | undefined |
35375
+ | defaultValue | 非受控目标初始值 | undefined &#124; TransferValue[] | 否 | [] |
35376
+ | selectedKeys | 见场景用法与类型 | undefined &#124; TransferValue[] | 否 | undefined |
35377
+ | defaultSelectedKeys | 非受控勾选初始值 | undefined &#124; TransferValue[] | 否 | [] |
35378
+ | disabled | 禁用,继承 Form | undefined &#124; false &#124; true | 否 | false |
35379
+ | loading | 加载并阻止操作 | undefined &#124; false &#124; true | 否 | false |
35380
+ | error | 错误,继承 Form | undefined &#124; false &#124; true | 否 | false |
35381
+ | simple | 点击立即移动 | undefined &#124; false &#124; true | 否 | false |
35382
+ | oneWay | 单向分配,目标逐项移除 | undefined &#124; false &#124; true | 否 | false |
35383
+ | showSearch | 两侧搜索 | undefined &#124; false &#124; true | 否 | false |
35384
+ | showSelectAll | 显示全选;simple/oneWay 目标侧不显示 | undefined &#124; false &#124; true | 否 | true |
35385
+ | title | 两侧标题,缺项按语言包回退 | undefined &#124; string[] | 否 | 未声明 |
35386
+ | operations | 向右、向左操作文案 | undefined &#124; string[] | 否 | [] |
35387
+ | searchPlaceholder | 搜索占位 | undefined &#124; string | 否 | 未声明 |
35388
+ | filterOption | 非空搜索的过滤函数 | undefined &#124; (input: string, item: TransferItem, type: TransferType) => boolean | 否 | 未声明 |
35389
+ | targetOrder | 目标排序 | undefined &#124; "append" &#124; "original" | 否 | "original" |
35390
+ | listStyle | 面板样式,可设置 width 或组件 CSS token | undefined &#124; CSSProperties | 否 | 未声明 |
35391
+ | pagination | 分页,非法 pageSize 回退 10 | undefined &#124; false &#124; true &#124; TransferPagination | 否 | false |
35392
+ | virtualListProps | VirtualList 配置,默认高度 240 | undefined &#124; VirtualListProps | 否 | 未声明 |
35393
+
35394
+ ### Events
35395
+
35396
+ | 事件 | 用途 | 监听器签名(即事件参数) |
35397
+ | --- | --- | --- |
35398
+ | update:modelValue | 请求更新目标模型 | undefined &#124; (_values: TransferValue[]) => any |
35399
+ | update:selectedKeys | 请求更新临时勾选模型 | undefined &#124; (_values: TransferValue[]) => any |
35400
+ | change | 实际移动,type 为目的侧 | undefined &#124; (_values: TransferValue[], _type: TransferType, _movedValues: TransferValue[]) => any |
35401
+ | select | 临时勾选变化或移动清除勾选 | undefined &#124; (_sourceSelected: TransferValue[], _targetSelected: TransferValue[]) => any |
35402
+ | search | 输入/清空/隐藏搜索重置 | undefined &#124; (_value: string, _type: TransferType) => any |
35403
+ | scroll | 列表滚动 | undefined &#124; (_event: Event, _type: TransferType) => any |
35404
+
35405
+ ### Slots
35406
+
35407
+ | 名称 | 用途 | 公开类型 |
35408
+ | --- | --- | --- |
35409
+ | item | 选项内容 | undefined &#124; (props: TransferItemSlotProps) => VNodeChild |
35410
+ | source | 见场景用法与类型 | undefined &#124; (props: TransferListSlotProps) => VNodeChild |
35411
+ | target | 见场景用法与类型 | undefined &#124; (props: TransferListSlotProps) => VNodeChild |
35412
+ | source-title | 见场景用法与类型 | undefined &#124; (props: TransferTitleSlotProps) => VNodeChild |
35413
+ | target-title | 见场景用法与类型 | undefined &#124; (props: TransferTitleSlotProps) => VNodeChild |
35414
+ | footer | 两侧页脚 | undefined &#124; (props: TransferListSlotProps) => VNodeChild |
35415
+ | empty | 默认列表空态,自定义列表自行处理 | undefined &#124; (props: { type: TransferType; searchValue: string; }) => VNodeChild |
35416
+ | to-target-icon | 见场景用法与类型 | undefined &#124; () => VNodeChild |
35417
+ | to-source-icon | 见场景用法与类型 | undefined &#124; () => VNodeChild |
35418
+ | source / target | 替换对应侧列表 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
35419
+ | source-title / target-title | 替换标题 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
35420
+ | to-target-icon / to-source-icon | 方向图标 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
35421
+
35422
+ ### 实例方法
35423
+
35424
+ 没有检索到显式 expose 或 Options API methods 的公开方法;不把 setup 内部函数当成稳定实例 API。
35425
+
35426
+ ### 关联类型定义
35427
+
35428
+ 以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
35429
+
35430
+ ```typescript-reference
35431
+ type TransferValue = string | number;
35432
+
35433
+ type TransferType = 'source' | 'target';
35434
+
35435
+ interface TransferItem {
35436
+ value: TransferValue;
35437
+ label: string;
35438
+ disabled?: boolean;
35439
+ [key: string]: unknown;
35440
+ }
35441
+
35442
+ interface TransferPagination {
35443
+ /** 每页条数,默认 10 */
35444
+ pageSize?: number;
35445
+ }
35446
+
35447
+ interface TransferProps {
35448
+ data?: TransferItem[];
35449
+ modelValue?: TransferValue[];
35450
+ defaultValue?: TransferValue[];
35451
+ selectedKeys?: TransferValue[];
35452
+ defaultSelectedKeys?: TransferValue[];
35453
+ disabled?: boolean;
35454
+ loading?: boolean;
35455
+ error?: boolean;
35456
+ simple?: boolean;
35457
+ oneWay?: boolean;
35458
+ showSearch?: boolean;
35459
+ showSelectAll?: boolean;
35460
+ title?: string[];
35461
+ operations?: string[];
35462
+ searchPlaceholder?: string;
35463
+ filterOption?: (inputValue: string, item: TransferItem, type: TransferType) => boolean;
35464
+ targetOrder?: 'original' | 'append';
35465
+ listStyle?: CSSProperties;
35466
+ pagination?: boolean | TransferPagination;
35467
+ virtualListProps?: VirtualListProps;
35468
+ }
35469
+
35470
+ interface TransferListSlotProps {
35471
+ type: TransferType;
35472
+ /** 搜索过滤后的全部数据 */
35473
+ data: TransferItem[];
35474
+ /** 当前页数据,未分页时等于 data */
35475
+ pageData: TransferItem[];
35476
+ /** 本侧有效勾选值,包含搜索隐藏项 */
35477
+ selectedKeys: TransferValue[];
35478
+ disabled: boolean;
35479
+ onSelect: (value: TransferValue, checked: boolean) => void;
35480
+ onSelectAll: (values: TransferValue[], checked: boolean) => void;
35481
+ onMove: (values: TransferValue[]) => void;
35482
+ }
35483
+
35484
+ interface TransferTitleSlotProps {
35485
+ type: TransferType;
35486
+ title: string;
35487
+ countTotal: number;
35488
+ countSelected: number;
35489
+ searchValue: string;
35490
+ checked: boolean;
35491
+ indeterminate: boolean;
35492
+ disabled: boolean;
35493
+ onSelectAllChange: (checked: boolean) => void;
35494
+ }
35495
+
35496
+ interface TransferItemSlotProps {
35497
+ item: TransferItem;
35498
+ type: TransferType;
35499
+ selected: boolean;
35500
+ disabled: boolean;
35501
+ }
35502
+
35503
+ interface TransferSlots {
35504
+ item?: (props: TransferItemSlotProps) => VNodeChild;
35505
+ source?: (props: TransferListSlotProps) => VNodeChild;
35506
+ target?: (props: TransferListSlotProps) => VNodeChild;
35507
+ 'source-title'?: (props: TransferTitleSlotProps) => VNodeChild;
35508
+ 'target-title'?: (props: TransferTitleSlotProps) => VNodeChild;
35509
+ footer?: (props: TransferListSlotProps) => VNodeChild;
35510
+ empty?: (props: {
35511
+ type: TransferType;
35512
+ searchValue: string;
35513
+ }) => VNodeChild;
35514
+ 'to-target-icon'?: () => VNodeChild;
35515
+ 'to-source-icon'?: () => VNodeChild;
35516
+ }
35517
+
35518
+ type TransferInstance = InstanceType<typeof Transfer>;
35519
+ ```
35520
+
35521
+
34622
35522
  ## TreeSelect API
34623
35523
 
34624
35524
  公开声明:`dist/components/tree-select/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。