x-next 1.13.0 → 1.14.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 (138) hide show
  1. package/AI_CODING.md +6 -5
  2. package/AI_USAGE/catalog.md +106 -105
  3. package/AI_USAGE/components/alert-api.md +48 -0
  4. package/AI_USAGE/components/alert.md +222 -3
  5. package/AI_USAGE/components/bar-chart-api.md +177 -0
  6. package/AI_USAGE/components/bar-chart.md +297 -3
  7. package/AI_USAGE/components/boxicons.md +147 -0
  8. package/AI_USAGE/components/button-api.md +144 -0
  9. package/AI_USAGE/components/button.md +447 -3
  10. package/AI_USAGE/components/charts.md +81 -0
  11. package/AI_USAGE/components/checkbox-api.md +145 -0
  12. package/AI_USAGE/components/checkbox.md +365 -3
  13. package/AI_USAGE/components/color-picker-api.md +52 -0
  14. package/AI_USAGE/components/color-picker.md +211 -3
  15. package/AI_USAGE/components/config-provider-api.md +38 -0
  16. package/AI_USAGE/components/config-provider.md +250 -3
  17. package/AI_USAGE/components/date-picker-api.md +1114 -0
  18. package/AI_USAGE/components/date-picker.md +378 -3
  19. package/AI_USAGE/components/dialog-api.md +142 -0
  20. package/AI_USAGE/components/dialog.md +284 -3
  21. package/AI_USAGE/components/draggable-api.md +146 -0
  22. package/AI_USAGE/components/draggable.md +259 -0
  23. package/AI_USAGE/components/drawer-api.md +78 -0
  24. package/AI_USAGE/components/drawer.md +227 -0
  25. package/AI_USAGE/components/dropdown-api.md +529 -0
  26. package/AI_USAGE/components/dropdown.md +392 -3
  27. package/AI_USAGE/components/empty-api.md +36 -0
  28. package/AI_USAGE/components/empty.md +227 -3
  29. package/AI_USAGE/components/finicon.md +88 -0
  30. package/AI_USAGE/components/form-api.md +524 -0
  31. package/AI_USAGE/components/form.md +454 -0
  32. package/AI_USAGE/components/grid-api.md +527 -0
  33. package/AI_USAGE/components/grid.md +224 -0
  34. package/AI_USAGE/components/heatmap-api.md +122 -0
  35. package/AI_USAGE/components/heatmap.md +220 -0
  36. package/AI_USAGE/components/icon-api.md +4707 -0
  37. package/AI_USAGE/components/icon.md +257 -0
  38. package/AI_USAGE/components/image-api.md +440 -0
  39. package/AI_USAGE/components/image.md +465 -0
  40. package/AI_USAGE/components/input-api.md +184 -0
  41. package/AI_USAGE/components/input-number-api.md +66 -0
  42. package/AI_USAGE/components/input-number.md +294 -0
  43. package/AI_USAGE/components/input-tag-api.md +114 -0
  44. package/AI_USAGE/components/input-tag.md +482 -0
  45. package/AI_USAGE/components/input.md +293 -3
  46. package/AI_USAGE/components/layout-api.md +147 -0
  47. package/AI_USAGE/components/layout.md +230 -0
  48. package/AI_USAGE/components/line-chart-api.md +197 -0
  49. package/AI_USAGE/components/line-chart.md +279 -3
  50. package/AI_USAGE/components/link-api.md +42 -0
  51. package/AI_USAGE/components/link.md +197 -0
  52. package/AI_USAGE/components/menu-api.md +516 -0
  53. package/AI_USAGE/components/menu.md +268 -0
  54. package/AI_USAGE/components/message-api.md +215 -0
  55. package/AI_USAGE/components/message-box-api.md +108 -0
  56. package/AI_USAGE/components/message-box.md +268 -3
  57. package/AI_USAGE/components/message.md +231 -3
  58. package/AI_USAGE/components/network-api.md +91 -0
  59. package/AI_USAGE/components/network.md +378 -0
  60. package/AI_USAGE/components/notification-api.md +236 -0
  61. package/AI_USAGE/components/notification.md +275 -3
  62. package/AI_USAGE/components/pagination-api.md +62 -0
  63. package/AI_USAGE/components/pagination.md +380 -3
  64. package/AI_USAGE/components/pie-chart-api.md +109 -0
  65. package/AI_USAGE/components/pie-chart.md +245 -3
  66. package/AI_USAGE/components/popconfirm-api.md +75 -0
  67. package/AI_USAGE/components/popconfirm.md +231 -3
  68. package/AI_USAGE/components/popover-api.md +75 -0
  69. package/AI_USAGE/components/popover.md +208 -3
  70. package/AI_USAGE/components/popup-api.md +75 -0
  71. package/AI_USAGE/components/popup.md +52 -0
  72. package/AI_USAGE/components/progress-api.md +44 -0
  73. package/AI_USAGE/components/progress.md +248 -3
  74. package/AI_USAGE/components/radio-api.md +165 -0
  75. package/AI_USAGE/components/radio.md +259 -3
  76. package/AI_USAGE/components/rate-api.md +54 -0
  77. package/AI_USAGE/components/rate.md +233 -3
  78. package/AI_USAGE/components/resize-box-api.md +56 -0
  79. package/AI_USAGE/components/resize-box.md +231 -0
  80. package/AI_USAGE/components/scrollbar-api.md +77 -0
  81. package/AI_USAGE/components/scrollbar.md +218 -0
  82. package/AI_USAGE/components/select-api.md +758 -0
  83. package/AI_USAGE/components/select.md +640 -3
  84. package/AI_USAGE/components/skeleton-api.md +85 -0
  85. package/AI_USAGE/components/skeleton.md +150 -0
  86. package/AI_USAGE/components/slider-api.md +51 -0
  87. package/AI_USAGE/components/slider.md +233 -3
  88. package/AI_USAGE/components/space-api.md +38 -0
  89. package/AI_USAGE/components/space.md +145 -0
  90. package/AI_USAGE/components/spin-api.md +43 -0
  91. package/AI_USAGE/components/spin.md +205 -0
  92. package/AI_USAGE/components/steps-api.md +111 -0
  93. package/AI_USAGE/components/steps.md +201 -3
  94. package/AI_USAGE/components/switch-api.md +58 -0
  95. package/AI_USAGE/components/switch.md +290 -3
  96. package/AI_USAGE/components/table-api.md +2919 -0
  97. package/AI_USAGE/components/table.md +1414 -0
  98. package/AI_USAGE/components/tabs-api.md +135 -0
  99. package/AI_USAGE/components/tabs.md +308 -3
  100. package/AI_USAGE/components/tag-api.md +124 -0
  101. package/AI_USAGE/components/tag.md +292 -0
  102. package/AI_USAGE/components/textarea-api.md +55 -0
  103. package/AI_USAGE/components/textarea.md +326 -3
  104. package/AI_USAGE/components/time-picker-api.md +137 -0
  105. package/AI_USAGE/components/time-picker.md +271 -3
  106. package/AI_USAGE/components/time-range-selector-api.md +44 -0
  107. package/AI_USAGE/components/time-range-selector.md +355 -0
  108. package/AI_USAGE/components/timeline-api.md +93 -0
  109. package/AI_USAGE/components/timeline.md +312 -0
  110. package/AI_USAGE/components/tooltip-api.md +77 -0
  111. package/AI_USAGE/components/tooltip.md +182 -0
  112. package/AI_USAGE/components/trend-chart-api.md +119 -0
  113. package/AI_USAGE/components/trend-chart.md +335 -0
  114. package/AI_USAGE/components/trigger-api.md +124 -0
  115. package/AI_USAGE/components/trigger.md +185 -0
  116. package/AI_USAGE/components/upload-api.md +200 -0
  117. package/AI_USAGE/components/upload.md +711 -3
  118. package/AI_USAGE/components/watermark-api.md +87 -0
  119. package/AI_USAGE/components/watermark.md +200 -0
  120. package/AI_USAGE/core.md +1 -1
  121. package/AI_USAGE/index.md +35 -7
  122. package/AI_USAGE/recipes/form-on-demand.md +1 -1
  123. package/AI_USAGE.md +33651 -5
  124. package/CHANGELOG.md +18 -0
  125. package/dist/_utils/inherit-component-type.d.ts +11 -0
  126. package/dist/components/date-picker/index.d.ts +420 -5
  127. package/dist/components/form-input/index.d.ts +617 -2
  128. package/dist/components/layout/index.d.ts +689 -1
  129. package/dist/components/menu/index.d.ts +786 -1
  130. package/dist/es/_utils/inherit-component-type.js +6 -0
  131. package/dist/es/components/date-picker/index.js +18 -17
  132. package/dist/es/components/form-input/index.js +12 -11
  133. package/dist/es/components/layout/index.js +10 -9
  134. package/dist/es/components/menu/hooks/use-level.js +5 -5
  135. package/dist/es/components/menu/index.js +13 -10
  136. package/dist/index.cjs +3 -3
  137. package/dist/index.umd.js +3 -3
  138. package/package.json +10 -5
@@ -0,0 +1,758 @@
1
+ <!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
2
+ # Select 完整公开 API
3
+
4
+ 适用版本:x-next@1.14.0;来源指纹:`014984639d816a2c7e25eb22690c586b0b2e8efba6846bec8a4e424db41a09e9`。
5
+
6
+ 从同版本构建的公开声明、运行时 props/emits 和显式 expose 生成。运行时导入始终使用 `x-next`,声明路径仅作定位。插槽类型未细化时,具体槽名与作用域见本地用法示例。
7
+
8
+ ## Select API
9
+
10
+ 公开声明:`dist/components/form-select/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
11
+
12
+ ### Props
13
+
14
+ | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
15
+ | --- | --- | --- | --- | --- |
16
+ | multiple | 是否多选 | undefined &#124; false &#124; true | 否 | false |
17
+ | modelValue | 绑定值 | undefined &#124; string &#124; number &#124; false &#124; true &#124; { [x: string]: any; } &#124; (string &#124; number &#124; boolean &#124; Record<string, any>)[] | 否 | undefined |
18
+ | defaultValue | 默认值,非受控模式 | undefined &#124; string &#124; number &#124; false &#124; true &#124; { [x: string]: unknown; } &#124; (string &#124; number &#124; boolean &#124; Record<string, unknown>)[] | 否 | 工厂函数(每个实例初始化;有效值见行为说明) |
19
+ | inputValue | 搜索输入值 | undefined &#124; string | 否 | 未声明 |
20
+ | defaultInputValue | 默认搜索输入值 | undefined &#124; string | 否 | "" |
21
+ | size | 选择器尺寸 | undefined &#124; "mini" &#124; "small" &#124; "medium" &#124; "large" | 否 | 未声明 |
22
+ | placeholder | 占位提示 | undefined &#124; string | 否 | 未声明 |
23
+ | loading | 是否加载中 | undefined &#124; false &#124; true | 否 | false |
24
+ | disabled | 是否禁用 | undefined &#124; false &#124; true | 否 | false |
25
+ | error | 是否错误状态 | undefined &#124; false &#124; true | 否 | false |
26
+ | allowClear | 是否允许清空 | undefined &#124; false &#124; true | 否 | false |
27
+ | allowSearch | 是否允许搜索 | undefined &#124; false &#124; true &#124; { retainInputValue?: boolean; } | 否 | 工厂函数(每个实例初始化;有效值见行为说明) |
28
+ | allowCreate | 是否允许创建新选项 | undefined &#124; false &#124; true | 否 | false |
29
+ | maxTagCount | 多选最多显示标签数量,0 不限制 | undefined &#124; number | 否 | 0 |
30
+ | popupContainer | 弹出层挂载容器 | undefined &#124; string &#124; HTMLElement | 否 | 未声明 |
31
+ | bordered | 是否显示边框 | undefined &#124; false &#124; true | 否 | true |
32
+ | defaultActiveFirstOption | 无有效选中项时是否默认激活首个选项;方向键展开时按方向激活首 / 末项 | undefined &#124; false &#124; true | 否 | true |
33
+ | popupVisible | 弹出层显示状态 | undefined &#124; false &#124; true | 否 | undefined |
34
+ | defaultPopupVisible | 默认弹出层显示状态 | undefined &#124; false &#124; true | 否 | false |
35
+ | unmountOnClose | 关闭时是否销毁弹出层 | undefined &#124; false &#124; true | 否 | false |
36
+ | filterOption | 是否过滤选项或自定义过滤方法 | undefined &#124; false &#124; true &#124; (inputValue: string, option: SelectOptionData) => boolean | 否 | true |
37
+ | options | 选项数据,支持分组 | undefined &#124; (string &#124; number &#124; boolean &#124; SelectOptionData &#124; SelectOptionGroupData)[] | 否 | [] |
38
+ | virtualListProps | 虚拟列表配置;仅使用 options 数据时开启,默认选项插槽退回普通列表 | undefined &#124; VirtualListProps | 否 | 未声明 |
39
+ | triggerProps | 下拉触发器配置;updateAtScroll 默认开启,可显式关闭 | undefined &#124; TriggerProps | 否 | 未声明 |
40
+ | formatLabel | 格式化显示内容 | undefined &#124; (data: SelectOptionData) => string | 否 | 未声明 |
41
+ | fallbackOption | 自定义值不存在时的兜底选项 | undefined &#124; false &#124; true &#124; (value: string &#124; number &#124; boolean &#124; Record<string, unknown>) => SelectOptionData | 否 | true |
42
+ | showExtraOptions | 是否显示额外选项 | undefined &#124; false &#124; true | 否 | true |
43
+ | valueKey | 对象值的唯一键字段 | undefined &#124; string | 否 | "value" |
44
+ | searchDelay | 搜索事件触发延迟 | undefined &#124; number | 否 | 500 |
45
+ | limit | 多选最多选择数量,0 不限制 | undefined &#124; number | 否 | 0 |
46
+ | fieldNames | 自定义选项字段名 | undefined &#124; { [x: string]: string &#124; undefined; value?: string &#124; undefined; label?: string &#124; undefined; disabled?: string &#124; undefined; tagProps?: string &#124; undefined; render?: string &#124; undefined; } | 否 | 未声明 |
47
+ | scrollbar | 是否开启滚动条或滚动条配置 | undefined &#124; false &#124; true &#124; ScrollbarProps | 否 | true |
48
+ | showHeaderOnEmpty | 空状态时是否显示 header | undefined &#124; false &#124; true | 否 | false |
49
+ | showFooterOnEmpty | 空状态时是否显示 footer | undefined &#124; false &#124; true | 否 | false |
50
+ | tagNowrap | 多选标签内容是否不换行 | undefined &#124; false &#124; true | 否 | false |
51
+
52
+ ### Events
53
+
54
+ | 事件 | 用途 | 监听器签名(即事件参数) |
55
+ | --- | --- | --- |
56
+ | focus | 默认输入触发器聚焦 | undefined &#124; (ev: FocusEvent) => any |
57
+ | blur | 默认输入触发器失焦 | undefined &#124; (ev: FocusEvent) => any |
58
+ | update:modelValue | 值更新时触发 | undefined &#124; (value: string &#124; number &#124; boolean &#124; Record<string, any> &#124; (string &#124; number &#124; boolean &#124; Record<string, any>)[] &#124; undefined) => any |
59
+ | update:inputValue | 搜索输入值更新时触发 | undefined &#124; (inputValue: string) => any |
60
+ | update:popupVisible | 弹出层显示状态更新时触发 | undefined &#124; (visible: boolean) => any |
61
+ | change | 值变化时触发 | undefined &#124; (value: string &#124; number &#124; boolean &#124; Record<string, any> &#124; (string &#124; number &#124; boolean &#124; Record<string, any>)[] &#124; undefined) => any |
62
+ | inputValueChange | 输入值变化时触发 | undefined &#124; (inputValue: string) => any |
63
+ | popupVisibleChange | 弹出层显示状态变化时触发 | undefined &#124; (visible: boolean) => any |
64
+ | clear | 点击清除按钮时触发 | undefined &#124; (ev: Event) => any |
65
+ | remove | 删除多选标签时触发 | undefined &#124; (removed: string &#124; number &#124; boolean &#124; Record<string, any> &#124; undefined) => any |
66
+ | search | 用户搜索时触发 | undefined &#124; (inputValue: string) => any |
67
+ | dropdownScroll | 下拉菜单滚动时触发 | undefined &#124; (ev: Event) => any |
68
+ | dropdownReachBottom | 下拉菜单滚动到底部时触发 | undefined &#124; (ev: Event) => any |
69
+ | exceedLimit | 多选超过数量限制时触发 | undefined &#124; (value: string &#124; number &#124; boolean &#124; Record<string, any> &#124; undefined, ev: Event) => any |
70
+
71
+ ### Slots
72
+
73
+ | 名称 | 用途 | 公开类型 |
74
+ | --- | --- | --- |
75
+ | default | SelectOption / SelectOptionGroup 选项节点 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
76
+ | empty | 空状态内容 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
77
+ | option | 自定义选项内容;参数 { data: SelectOptionData },为原始选项数据 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
78
+ | label | 自定义选择框显示内容;参数 { data: SelectOptionData },为原始选项数据 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
79
+ | header | 下拉框页头 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
80
+ | footer | 下拉框页脚 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
81
+ | arrow-icon | 箭头图标 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
82
+ | loading-icon | 加载中图标 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
83
+ | search-icon | 搜索图标 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
84
+ | prefix | 前缀元素 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
85
+ | trigger | 自定义触发元素;参数:{ popupVisible, disabled, listboxId, activeDescendant, onKeydown } | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
86
+
87
+ ### 实例方法 / 暴露值
88
+
89
+ | 名称 | 公开类型 |
90
+ | --- | --- |
91
+ | focus | 公开声明未细化(用法和实现已显式暴露) |
92
+ | blur | 公开声明未细化(用法和实现已显式暴露) |
93
+
94
+ ### 关联类型定义
95
+
96
+ 以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
97
+
98
+ ```typescript-reference
99
+ interface SelectInstance {
100
+ focus: () => void;
101
+ blur: () => void;
102
+ }
103
+
104
+ interface SelectProps {
105
+ options?: (string | number | boolean | SelectOptionData | SelectOptionGroup)[];
106
+ multiple?: boolean;
107
+ modelValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
108
+ defaultValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
109
+ inputValue?: string;
110
+ defaultInputValue?: string;
111
+ size?: Size;
112
+ placeholder?: string;
113
+ loading?: boolean;
114
+ disabled?: boolean;
115
+ error?: boolean;
116
+ allowClear?: boolean;
117
+ allowSearch?: boolean | {
118
+ retainInputValue?: boolean;
119
+ };
120
+ allowCreate?: boolean;
121
+ maxTagCount?: number;
122
+ popupContainer?: string | HTMLElement;
123
+ bordered?: boolean;
124
+ popupVisible?: boolean;
125
+ defaultPopupVisible?: boolean;
126
+ defaultActiveFirstOption?: boolean;
127
+ unmountOnClose?: boolean;
128
+ filterOption?: boolean | ((inputValue: string, option: SelectOptionData) => boolean);
129
+ virtualListProps?: VirtualListProps;
130
+ triggerProps?: TriggerProps;
131
+ formatLabel?: (data: SelectOptionData) => string;
132
+ fallbackOption?: boolean | ((value: string | number | boolean | Record<string, unknown>) => SelectOptionData);
133
+ showExtraOptions?: boolean;
134
+ valueKey?: string;
135
+ searchDelay?: number;
136
+ limit?: number;
137
+ fieldNames?: SelectFieldNames;
138
+ showHeaderOnEmpty?: boolean;
139
+ showFooterOnEmpty?: boolean;
140
+ scrollbar?: boolean | ScrollbarProps;
141
+ tagNowrap?: boolean;
142
+ }
143
+
144
+ type SelectOptionValue = string | number | boolean | Record<string, unknown>;
145
+
146
+ interface OptionValueWithKey {
147
+ value: SelectOptionValue;
148
+ key: string;
149
+ }
150
+
151
+ type SelectFieldNames = FieldString<SelectOptionData>;
152
+
153
+ interface SelectOptionData {
154
+ /**
155
+ * @zh 选项值
156
+ * @en Option Value
157
+ */
158
+ value?: string | number | boolean | Record<string, unknown>;
159
+ /**
160
+ * @zh 选项内容
161
+ * @en Option content
162
+ */
163
+ label?: string;
164
+ /**
165
+ * @zh 是否禁用
166
+ * @en Whether to disable
167
+ */
168
+ disabled?: boolean;
169
+ /**
170
+ * @zh 选项对应的多选标签的属性
171
+ * @en Props of the multi-select label corresponding to the option
172
+ */
173
+ tagProps?: any;
174
+ /**
175
+ * @zh 自定义渲染
176
+ * @en Custom Render
177
+ */
178
+ render?: RenderFunction;
179
+ [other: string]: any;
180
+ }
181
+
182
+ interface SelectOptionGroup {
183
+ /**
184
+ * @zh 是否为选项组
185
+ * @en Whether it is an option group
186
+ */
187
+ isGroup: true;
188
+ /**
189
+ * @zh 选项组标题
190
+ * @en Option group title
191
+ */
192
+ label: string;
193
+ /**
194
+ * @zh 选项组中的选项
195
+ * @en Options in the option group
196
+ */
197
+ options: SelectOption[];
198
+ [other: string]: any;
199
+ }
200
+
201
+ type SelectOption = string | number | boolean | SelectOptionData | SelectOptionGroup;
202
+
203
+ interface SelectOptionInfo extends SelectOptionData {
204
+ raw: Record<string, unknown>;
205
+ key: string;
206
+ index?: number;
207
+ origin: 'slot' | 'options' | 'extraOptions';
208
+ value: SelectOptionValue;
209
+ label: string;
210
+ }
211
+
212
+ interface SelectOptionGroupInfo extends SelectOptionGroup {
213
+ key: string;
214
+ options: (SelectOptionInfo | SelectOptionGroupInfo)[];
215
+ }
216
+
217
+ type FilterOption = boolean | ((inputValue: string, option: SelectOptionData) => boolean);
218
+
219
+ interface SelectContext {
220
+ multiple?: boolean;
221
+ valueKey?: string;
222
+ inputValue?: string;
223
+ filterOption?: FilterOption;
224
+ component?: string;
225
+ valueKeys: string[];
226
+ activeKey?: string;
227
+ getOptionId: (key: string) => string;
228
+ onSelect: (key: string, ev: Event) => void;
229
+ setActiveKey: (key?: string) => void;
230
+ getNextSlotOptionIndex: () => number;
231
+ addSlotOptionInfo: (id: number, optionInfo: SelectOptionInfo) => void;
232
+ removeSlotOptionInfo: (id: number) => void;
233
+ }
234
+ ```
235
+
236
+
237
+ ## SelectDropdown API
238
+
239
+ 公开声明:`dist/components/form-select/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
240
+
241
+ ### Props
242
+
243
+ | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
244
+ | --- | --- | --- | --- | --- |
245
+ | id | 见场景用法与类型 | undefined &#124; string | 否 | 未声明 |
246
+ | multiple | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
247
+ | loading | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
248
+ | empty | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
249
+ | virtualList | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
250
+ | bottomOffset | 见场景用法与类型 | undefined &#124; number | 否 | 0 |
251
+ | scrollbar | 见场景用法与类型 | undefined &#124; false &#124; true &#124; ScrollbarProps | 否 | true |
252
+ | onScroll | 见场景用法与类型 | undefined &#124; ((ev: Event) => void) & ((...args: any[]) => any) &#124; ((ev: Event) => void)[] & ((...args: any[]) => any) | 否 | 未声明 |
253
+ | onReachBottom | 见场景用法与类型 | undefined &#124; ((ev: Event) => void) & ((...args: any[]) => any) &#124; ((ev: Event) => void)[] & ((...args: any[]) => any) | 否 | 未声明 |
254
+ | showHeaderOnEmpty | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | false |
255
+ | showFooterOnEmpty | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | false |
256
+
257
+ ### Events
258
+
259
+ | 事件 | 用途 | 监听器签名(即事件参数) |
260
+ | --- | --- | --- |
261
+ | scroll | 见场景用法与类型 | undefined &#124; ((ev: Event) => void) & ((...args: any[]) => any) &#124; ((ev: Event) => void)[] & ((...args: any[]) => any) |
262
+ | reachBottom | 见场景用法与类型 | undefined &#124; ((ev: Event) => void) & ((...args: any[]) => any) &#124; ((ev: Event) => void)[] & ((...args: any[]) => any) |
263
+
264
+ ### Slots
265
+
266
+ 公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
267
+
268
+ ### 实例方法
269
+
270
+ 没有检索到显式 expose 或 Options API methods 的公开方法;不把 setup 内部函数当成稳定实例 API。
271
+
272
+ ### 关联类型定义
273
+
274
+ 以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
275
+
276
+ ```typescript-reference
277
+ interface SelectInstance {
278
+ focus: () => void;
279
+ blur: () => void;
280
+ }
281
+
282
+ interface SelectProps {
283
+ options?: (string | number | boolean | SelectOptionData | SelectOptionGroup)[];
284
+ multiple?: boolean;
285
+ modelValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
286
+ defaultValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
287
+ inputValue?: string;
288
+ defaultInputValue?: string;
289
+ size?: Size;
290
+ placeholder?: string;
291
+ loading?: boolean;
292
+ disabled?: boolean;
293
+ error?: boolean;
294
+ allowClear?: boolean;
295
+ allowSearch?: boolean | {
296
+ retainInputValue?: boolean;
297
+ };
298
+ allowCreate?: boolean;
299
+ maxTagCount?: number;
300
+ popupContainer?: string | HTMLElement;
301
+ bordered?: boolean;
302
+ popupVisible?: boolean;
303
+ defaultPopupVisible?: boolean;
304
+ defaultActiveFirstOption?: boolean;
305
+ unmountOnClose?: boolean;
306
+ filterOption?: boolean | ((inputValue: string, option: SelectOptionData) => boolean);
307
+ virtualListProps?: VirtualListProps;
308
+ triggerProps?: TriggerProps;
309
+ formatLabel?: (data: SelectOptionData) => string;
310
+ fallbackOption?: boolean | ((value: string | number | boolean | Record<string, unknown>) => SelectOptionData);
311
+ showExtraOptions?: boolean;
312
+ valueKey?: string;
313
+ searchDelay?: number;
314
+ limit?: number;
315
+ fieldNames?: SelectFieldNames;
316
+ showHeaderOnEmpty?: boolean;
317
+ showFooterOnEmpty?: boolean;
318
+ scrollbar?: boolean | ScrollbarProps;
319
+ tagNowrap?: boolean;
320
+ }
321
+
322
+ type SelectOptionValue = string | number | boolean | Record<string, unknown>;
323
+
324
+ interface OptionValueWithKey {
325
+ value: SelectOptionValue;
326
+ key: string;
327
+ }
328
+
329
+ type SelectFieldNames = FieldString<SelectOptionData>;
330
+
331
+ interface SelectOptionData {
332
+ /**
333
+ * @zh 选项值
334
+ * @en Option Value
335
+ */
336
+ value?: string | number | boolean | Record<string, unknown>;
337
+ /**
338
+ * @zh 选项内容
339
+ * @en Option content
340
+ */
341
+ label?: string;
342
+ /**
343
+ * @zh 是否禁用
344
+ * @en Whether to disable
345
+ */
346
+ disabled?: boolean;
347
+ /**
348
+ * @zh 选项对应的多选标签的属性
349
+ * @en Props of the multi-select label corresponding to the option
350
+ */
351
+ tagProps?: any;
352
+ /**
353
+ * @zh 自定义渲染
354
+ * @en Custom Render
355
+ */
356
+ render?: RenderFunction;
357
+ [other: string]: any;
358
+ }
359
+
360
+ interface SelectOptionGroup {
361
+ /**
362
+ * @zh 是否为选项组
363
+ * @en Whether it is an option group
364
+ */
365
+ isGroup: true;
366
+ /**
367
+ * @zh 选项组标题
368
+ * @en Option group title
369
+ */
370
+ label: string;
371
+ /**
372
+ * @zh 选项组中的选项
373
+ * @en Options in the option group
374
+ */
375
+ options: SelectOption[];
376
+ [other: string]: any;
377
+ }
378
+
379
+ type SelectOption = string | number | boolean | SelectOptionData | SelectOptionGroup;
380
+
381
+ interface SelectOptionInfo extends SelectOptionData {
382
+ raw: Record<string, unknown>;
383
+ key: string;
384
+ index?: number;
385
+ origin: 'slot' | 'options' | 'extraOptions';
386
+ value: SelectOptionValue;
387
+ label: string;
388
+ }
389
+
390
+ interface SelectOptionGroupInfo extends SelectOptionGroup {
391
+ key: string;
392
+ options: (SelectOptionInfo | SelectOptionGroupInfo)[];
393
+ }
394
+
395
+ type FilterOption = boolean | ((inputValue: string, option: SelectOptionData) => boolean);
396
+
397
+ interface SelectContext {
398
+ multiple?: boolean;
399
+ valueKey?: string;
400
+ inputValue?: string;
401
+ filterOption?: FilterOption;
402
+ component?: string;
403
+ valueKeys: string[];
404
+ activeKey?: string;
405
+ getOptionId: (key: string) => string;
406
+ onSelect: (key: string, ev: Event) => void;
407
+ setActiveKey: (key?: string) => void;
408
+ getNextSlotOptionIndex: () => number;
409
+ addSlotOptionInfo: (id: number, optionInfo: SelectOptionInfo) => void;
410
+ removeSlotOptionInfo: (id: number) => void;
411
+ }
412
+ ```
413
+
414
+
415
+ ## SelectOption API
416
+
417
+ 公开声明:`dist/components/form-select/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
418
+
419
+ ### Props
420
+
421
+ | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
422
+ | --- | --- | --- | --- | --- |
423
+ | value | 选项值,不填时从内容获取 | undefined &#124; string &#124; number &#124; false &#124; true &#124; { [x: string]: any; } | 否 | undefined |
424
+ | label | 选项标签,不填时从内容获取 | undefined &#124; string | 否 | 未声明 |
425
+ | disabled | 是否禁用 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
426
+ | tagProps | 多选时展示标签的属性 | undefined &#124; TagProps | 否 | 未声明 |
427
+ | extra | 见场景用法与类型 | undefined &#124; { [x: string]: any; } | 否 | 未声明 |
428
+ | index | 手动指定选项 index | undefined &#124; number | 否 | 未声明 |
429
+ | internal | 见场景用法与类型 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
430
+
431
+ ### Events
432
+
433
+ 未声明组件 emits;原生事件与包装透传按本页用法核实。
434
+
435
+ ### Slots
436
+
437
+ | 名称 | 用途 | 公开类型 |
438
+ | --- | --- | --- |
439
+ | default | 选项内容 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
440
+ | icon | 选项图标 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
441
+ | suffix | 选项后缀 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
442
+
443
+ ### 实例方法
444
+
445
+ 没有检索到显式 expose 或 Options API methods 的公开方法;不把 setup 内部函数当成稳定实例 API。
446
+
447
+ ### 关联类型定义
448
+
449
+ 以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
450
+
451
+ ```typescript-reference
452
+ interface SelectInstance {
453
+ focus: () => void;
454
+ blur: () => void;
455
+ }
456
+
457
+ interface SelectProps {
458
+ options?: (string | number | boolean | SelectOptionData | SelectOptionGroup)[];
459
+ multiple?: boolean;
460
+ modelValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
461
+ defaultValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
462
+ inputValue?: string;
463
+ defaultInputValue?: string;
464
+ size?: Size;
465
+ placeholder?: string;
466
+ loading?: boolean;
467
+ disabled?: boolean;
468
+ error?: boolean;
469
+ allowClear?: boolean;
470
+ allowSearch?: boolean | {
471
+ retainInputValue?: boolean;
472
+ };
473
+ allowCreate?: boolean;
474
+ maxTagCount?: number;
475
+ popupContainer?: string | HTMLElement;
476
+ bordered?: boolean;
477
+ popupVisible?: boolean;
478
+ defaultPopupVisible?: boolean;
479
+ defaultActiveFirstOption?: boolean;
480
+ unmountOnClose?: boolean;
481
+ filterOption?: boolean | ((inputValue: string, option: SelectOptionData) => boolean);
482
+ virtualListProps?: VirtualListProps;
483
+ triggerProps?: TriggerProps;
484
+ formatLabel?: (data: SelectOptionData) => string;
485
+ fallbackOption?: boolean | ((value: string | number | boolean | Record<string, unknown>) => SelectOptionData);
486
+ showExtraOptions?: boolean;
487
+ valueKey?: string;
488
+ searchDelay?: number;
489
+ limit?: number;
490
+ fieldNames?: SelectFieldNames;
491
+ showHeaderOnEmpty?: boolean;
492
+ showFooterOnEmpty?: boolean;
493
+ scrollbar?: boolean | ScrollbarProps;
494
+ tagNowrap?: boolean;
495
+ }
496
+
497
+ type SelectOptionValue = string | number | boolean | Record<string, unknown>;
498
+
499
+ interface OptionValueWithKey {
500
+ value: SelectOptionValue;
501
+ key: string;
502
+ }
503
+
504
+ type SelectFieldNames = FieldString<SelectOptionData>;
505
+
506
+ interface SelectOptionData {
507
+ /**
508
+ * @zh 选项值
509
+ * @en Option Value
510
+ */
511
+ value?: string | number | boolean | Record<string, unknown>;
512
+ /**
513
+ * @zh 选项内容
514
+ * @en Option content
515
+ */
516
+ label?: string;
517
+ /**
518
+ * @zh 是否禁用
519
+ * @en Whether to disable
520
+ */
521
+ disabled?: boolean;
522
+ /**
523
+ * @zh 选项对应的多选标签的属性
524
+ * @en Props of the multi-select label corresponding to the option
525
+ */
526
+ tagProps?: any;
527
+ /**
528
+ * @zh 自定义渲染
529
+ * @en Custom Render
530
+ */
531
+ render?: RenderFunction;
532
+ [other: string]: any;
533
+ }
534
+
535
+ interface SelectOptionGroup {
536
+ /**
537
+ * @zh 是否为选项组
538
+ * @en Whether it is an option group
539
+ */
540
+ isGroup: true;
541
+ /**
542
+ * @zh 选项组标题
543
+ * @en Option group title
544
+ */
545
+ label: string;
546
+ /**
547
+ * @zh 选项组中的选项
548
+ * @en Options in the option group
549
+ */
550
+ options: SelectOption[];
551
+ [other: string]: any;
552
+ }
553
+
554
+ type SelectOption = string | number | boolean | SelectOptionData | SelectOptionGroup;
555
+
556
+ interface SelectOptionInfo extends SelectOptionData {
557
+ raw: Record<string, unknown>;
558
+ key: string;
559
+ index?: number;
560
+ origin: 'slot' | 'options' | 'extraOptions';
561
+ value: SelectOptionValue;
562
+ label: string;
563
+ }
564
+
565
+ interface SelectOptionGroupInfo extends SelectOptionGroup {
566
+ key: string;
567
+ options: (SelectOptionInfo | SelectOptionGroupInfo)[];
568
+ }
569
+
570
+ type FilterOption = boolean | ((inputValue: string, option: SelectOptionData) => boolean);
571
+
572
+ interface SelectContext {
573
+ multiple?: boolean;
574
+ valueKey?: string;
575
+ inputValue?: string;
576
+ filterOption?: FilterOption;
577
+ component?: string;
578
+ valueKeys: string[];
579
+ activeKey?: string;
580
+ getOptionId: (key: string) => string;
581
+ onSelect: (key: string, ev: Event) => void;
582
+ setActiveKey: (key?: string) => void;
583
+ getNextSlotOptionIndex: () => number;
584
+ addSlotOptionInfo: (id: number, optionInfo: SelectOptionInfo) => void;
585
+ removeSlotOptionInfo: (id: number) => void;
586
+ }
587
+ ```
588
+
589
+
590
+ ## SelectOptionGroup API
591
+
592
+ 公开声明:`dist/components/form-select/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
593
+
594
+ ### Props
595
+
596
+ | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
597
+ | --- | --- | --- | --- | --- |
598
+ | label | 选项组标题 | undefined &#124; string | 否 | 未声明 |
599
+
600
+ ### Events
601
+
602
+ 未声明组件 emits;原生事件与包装透传按本页用法核实。
603
+
604
+ ### Slots
605
+
606
+ | 名称 | 用途 | 公开类型 |
607
+ | --- | --- | --- |
608
+ | default | 选项组内容 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
609
+ | label | 自定义选项组标题 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
610
+
611
+ ### 实例方法
612
+
613
+ 没有检索到显式 expose 或 Options API methods 的公开方法;不把 setup 内部函数当成稳定实例 API。
614
+
615
+ ### 关联类型定义
616
+
617
+ 以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
618
+
619
+ ```typescript-reference
620
+ interface SelectInstance {
621
+ focus: () => void;
622
+ blur: () => void;
623
+ }
624
+
625
+ interface SelectProps {
626
+ options?: (string | number | boolean | SelectOptionData | SelectOptionGroup)[];
627
+ multiple?: boolean;
628
+ modelValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
629
+ defaultValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
630
+ inputValue?: string;
631
+ defaultInputValue?: string;
632
+ size?: Size;
633
+ placeholder?: string;
634
+ loading?: boolean;
635
+ disabled?: boolean;
636
+ error?: boolean;
637
+ allowClear?: boolean;
638
+ allowSearch?: boolean | {
639
+ retainInputValue?: boolean;
640
+ };
641
+ allowCreate?: boolean;
642
+ maxTagCount?: number;
643
+ popupContainer?: string | HTMLElement;
644
+ bordered?: boolean;
645
+ popupVisible?: boolean;
646
+ defaultPopupVisible?: boolean;
647
+ defaultActiveFirstOption?: boolean;
648
+ unmountOnClose?: boolean;
649
+ filterOption?: boolean | ((inputValue: string, option: SelectOptionData) => boolean);
650
+ virtualListProps?: VirtualListProps;
651
+ triggerProps?: TriggerProps;
652
+ formatLabel?: (data: SelectOptionData) => string;
653
+ fallbackOption?: boolean | ((value: string | number | boolean | Record<string, unknown>) => SelectOptionData);
654
+ showExtraOptions?: boolean;
655
+ valueKey?: string;
656
+ searchDelay?: number;
657
+ limit?: number;
658
+ fieldNames?: SelectFieldNames;
659
+ showHeaderOnEmpty?: boolean;
660
+ showFooterOnEmpty?: boolean;
661
+ scrollbar?: boolean | ScrollbarProps;
662
+ tagNowrap?: boolean;
663
+ }
664
+
665
+ type SelectOptionValue = string | number | boolean | Record<string, unknown>;
666
+
667
+ interface OptionValueWithKey {
668
+ value: SelectOptionValue;
669
+ key: string;
670
+ }
671
+
672
+ type SelectFieldNames = FieldString<SelectOptionData>;
673
+
674
+ interface SelectOptionData {
675
+ /**
676
+ * @zh 选项值
677
+ * @en Option Value
678
+ */
679
+ value?: string | number | boolean | Record<string, unknown>;
680
+ /**
681
+ * @zh 选项内容
682
+ * @en Option content
683
+ */
684
+ label?: string;
685
+ /**
686
+ * @zh 是否禁用
687
+ * @en Whether to disable
688
+ */
689
+ disabled?: boolean;
690
+ /**
691
+ * @zh 选项对应的多选标签的属性
692
+ * @en Props of the multi-select label corresponding to the option
693
+ */
694
+ tagProps?: any;
695
+ /**
696
+ * @zh 自定义渲染
697
+ * @en Custom Render
698
+ */
699
+ render?: RenderFunction;
700
+ [other: string]: any;
701
+ }
702
+
703
+ interface SelectOptionGroup {
704
+ /**
705
+ * @zh 是否为选项组
706
+ * @en Whether it is an option group
707
+ */
708
+ isGroup: true;
709
+ /**
710
+ * @zh 选项组标题
711
+ * @en Option group title
712
+ */
713
+ label: string;
714
+ /**
715
+ * @zh 选项组中的选项
716
+ * @en Options in the option group
717
+ */
718
+ options: SelectOption[];
719
+ [other: string]: any;
720
+ }
721
+
722
+ type SelectOption = string | number | boolean | SelectOptionData | SelectOptionGroup;
723
+
724
+ interface SelectOptionInfo extends SelectOptionData {
725
+ raw: Record<string, unknown>;
726
+ key: string;
727
+ index?: number;
728
+ origin: 'slot' | 'options' | 'extraOptions';
729
+ value: SelectOptionValue;
730
+ label: string;
731
+ }
732
+
733
+ interface SelectOptionGroupInfo extends SelectOptionGroup {
734
+ key: string;
735
+ options: (SelectOptionInfo | SelectOptionGroupInfo)[];
736
+ }
737
+
738
+ type FilterOption = boolean | ((inputValue: string, option: SelectOptionData) => boolean);
739
+
740
+ interface SelectContext {
741
+ multiple?: boolean;
742
+ valueKey?: string;
743
+ inputValue?: string;
744
+ filterOption?: FilterOption;
745
+ component?: string;
746
+ valueKeys: string[];
747
+ activeKey?: string;
748
+ getOptionId: (key: string) => string;
749
+ onSelect: (key: string, ev: Event) => void;
750
+ setActiveKey: (key?: string) => void;
751
+ getNextSlotOptionIndex: () => number;
752
+ addSlotOptionInfo: (id: number, optionInfo: SelectOptionInfo) => void;
753
+ removeSlotOptionInfo: (id: number) => void;
754
+ }
755
+ ```
756
+
757
+
758
+ 返回 [Select 用法](./select.md)。