@aplus-frontend/ui 0.4.19 → 0.4.20

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 (235) hide show
  1. package/es/src/ap-action/item/index.vue.d.ts +2 -1
  2. package/es/src/ap-action/item-dropdown/index.vue.d.ts +2 -1
  3. package/es/src/ap-action/item-modal/index.vue.d.ts +2 -1
  4. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +2 -1
  5. package/es/src/ap-button/ap-action-button.vue.d.ts +2 -1
  6. package/es/src/ap-button/ap-button.vue.d.ts +2 -1
  7. package/es/src/ap-descriptions/ap-descriptions.vue.d.ts +3 -2
  8. package/es/src/ap-descriptions/help-message/index.vue.d.ts +3 -5
  9. package/es/src/ap-download/ap-download.vue.d.ts +5 -3
  10. package/es/src/ap-field/date/index.vue.d.ts +2 -1
  11. package/es/src/ap-field/date-range/index.vue.d.ts +2 -1
  12. package/es/src/ap-field/number/index.vue.d.ts +324 -2
  13. package/es/src/ap-field/radio/index.vue.d.ts +98 -2
  14. package/es/src/ap-field/rate/index.vue.d.ts +84 -2
  15. package/es/src/ap-field/segmented/index.vue.d.ts +2 -1
  16. package/es/src/ap-field/select/index.vue.d.ts +409 -2
  17. package/es/src/ap-field/select/index.vue.mjs +7 -6
  18. package/es/src/ap-field/slider/index.vue.d.ts +259 -2
  19. package/es/src/ap-field/switch/index.vue.d.ts +2 -1
  20. package/es/src/ap-field/text/index.vue.d.ts +2 -1
  21. package/es/src/ap-field/text/password.vue.d.ts +2 -1
  22. package/es/src/ap-field/text-area/index.vue.d.ts +267 -2
  23. package/es/src/ap-form/ap-form.vue.d.ts +638 -2
  24. package/es/src/ap-form/dependency/index.vue.d.ts +2 -1
  25. package/es/src/ap-form/drawer-form/index.vue.d.ts +1458 -6
  26. package/es/src/ap-form/item/index.vue.d.ts +779 -2
  27. package/es/src/ap-form/item-group/index.vue.d.ts +2 -1
  28. package/es/src/ap-form/items/checkbox/index.vue.d.ts +2 -1
  29. package/es/src/ap-form/items/date/index.vue.d.ts +2 -1
  30. package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -1
  31. package/es/src/ap-form/items/number/index.vue.d.ts +785 -3
  32. package/es/src/ap-form/items/radio/index.vue.d.ts +223 -4
  33. package/es/src/ap-form/items/select/index.vue.d.ts +2 -1
  34. package/es/src/ap-form/items/switch/index.vue.d.ts +2 -1
  35. package/es/src/ap-form/items/text/group.vue.d.ts +2 -1
  36. package/es/src/ap-form/items/text/index.vue.d.ts +141 -3
  37. package/es/src/ap-form/items/text/password.vue.d.ts +150 -2
  38. package/es/src/ap-form/items/text-area/index.vue.d.ts +568 -4
  39. package/es/src/ap-form/list/index.vue.d.ts +2 -1
  40. package/es/src/ap-form/modal-form/index.vue.d.ts +1458 -7
  41. package/es/src/ap-form/provider/index.vue.d.ts +2 -1
  42. package/es/src/ap-form/render/control.vue.d.ts +2 -1
  43. package/es/src/ap-form/render/item.vue.d.ts +2 -1
  44. package/es/src/ap-form/search-form/index.vue.d.ts +1458 -5
  45. package/es/src/ap-form/set/index.vue.d.ts +2 -1
  46. package/es/src/ap-info-layout/ApInfoLayout.vue.d.ts +3 -2
  47. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +6 -2
  48. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +3 -2
  49. package/es/src/ap-list/index.vue.d.ts +1 -1
  50. package/es/src/ap-table/ap-table.vue.d.ts +1 -1
  51. package/es/src/ap-table/components/index/index.vue.d.ts +1 -1
  52. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -1
  53. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +2 -1
  54. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +1 -1
  55. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +1 -1
  56. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +1 -1
  57. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +1 -1
  58. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  59. package/es/src/ap-table/constants.d.ts +2264 -14
  60. package/es/src/ap-table/utils.d.ts +1180 -8
  61. package/es/src/ap-tag/ap-tag-group.vue.d.ts +5 -2
  62. package/es/src/ap-tag/ap-tag.vue.d.ts +1 -1
  63. package/es/src/ap-upload/apUpload.vue.d.ts +5 -2
  64. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +453 -2
  65. package/es/src/ap-upload/components/Picture.vue.d.ts +5 -2
  66. package/es/src/ap-upload/components/SingleFile.vue.d.ts +3 -1
  67. package/es/src/business/ap-appendix/ap-appendix.vue.d.ts +5 -3
  68. package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +1 -1
  69. package/es/src/business/ap-appendix/index.d.ts +1 -1
  70. package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +5 -2
  71. package/es/src/business/ap-batch-action/index.d.ts +3 -1
  72. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -1
  73. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +3 -4
  74. package/es/src/business/ap-batch-action-group/index.d.ts +887 -5
  75. package/es/src/business/ap-card/ApCard.vue.d.ts +3 -2
  76. package/es/src/business/ap-card/index.d.ts +1 -1
  77. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +1 -1
  78. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +5 -2
  79. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +9 -8
  80. package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +10 -346
  81. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +8 -7
  82. package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +1 -1
  83. package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +1 -1
  84. package/es/src/business/ap-group-search/index.d.ts +418 -4
  85. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +412 -340
  86. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -14
  87. package/es/src/business/ap-image/ApImage.vue.d.ts +2 -1
  88. package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +1 -1
  89. package/es/src/business/ap-input-radio/index.d.ts +1 -1
  90. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +6 -2
  91. package/es/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +1 -1
  92. package/es/src/business/ap-ladder/index.d.ts +4 -1
  93. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +1 -1
  94. package/es/src/business/ap-table-modal/index.d.ts +27 -2
  95. package/es/src/business/ap-table-modal/modal-title.vue.d.ts +3 -2
  96. package/es/src/business/ap-table-modal/table-layout/index.vue.d.ts +8 -8
  97. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +30 -4
  98. package/es/src/business/ap-title/ApTitle.vue.d.ts +3 -2
  99. package/es/src/business/ap-title/index.d.ts +1 -1
  100. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -3
  101. package/es/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +1 -1
  102. package/es/src/business/ap-upload-file/icon/file-icon.vue.d.ts +1 -1
  103. package/es/src/business/batch-input-group/index.vue.d.ts +146 -3
  104. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +267 -2
  105. package/es/src/business/hooks/useTableRefresh.mjs +34 -20
  106. package/es/src/check-card/group.vue.d.ts +2 -1
  107. package/es/src/check-card/index.vue.d.ts +3 -2
  108. package/es/src/editable-table/form-item.vue.d.ts +1 -1
  109. package/es/src/editable-table/index.vue.d.ts +1 -1
  110. package/es/src/full-screen/index.vue.d.ts +6 -2
  111. package/es/src/portal/index.vue.d.ts +2 -1
  112. package/es/src/resize-observer/index.vue.d.ts +2 -1
  113. package/es/src/scroll-bar/index.vue.d.ts +42 -3
  114. package/es/src/scroll-bar/internal.vue.d.ts +5 -1
  115. package/es/src/scroll-bar/internal.vue.mjs +11 -10
  116. package/es/src/scroll-view/index.vue.d.ts +92 -4
  117. package/es/src/work-order-modal/work-order-modal.vue.d.ts +828 -2
  118. package/lib/src/ap-action/item/index.vue.d.ts +2 -1
  119. package/lib/src/ap-action/item-dropdown/index.vue.d.ts +2 -1
  120. package/lib/src/ap-action/item-modal/index.vue.d.ts +2 -1
  121. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +2 -1
  122. package/lib/src/ap-button/ap-action-button.vue.d.ts +2 -1
  123. package/lib/src/ap-button/ap-button.vue.d.ts +2 -1
  124. package/lib/src/ap-descriptions/ap-descriptions.vue.d.ts +3 -2
  125. package/lib/src/ap-descriptions/help-message/index.vue.d.ts +3 -5
  126. package/lib/src/ap-download/ap-download.vue.d.ts +5 -3
  127. package/lib/src/ap-field/date/index.vue.d.ts +2 -1
  128. package/lib/src/ap-field/date-range/index.vue.d.ts +2 -1
  129. package/lib/src/ap-field/number/index.vue.d.ts +324 -2
  130. package/lib/src/ap-field/radio/index.vue.d.ts +98 -2
  131. package/lib/src/ap-field/rate/index.vue.d.ts +84 -2
  132. package/lib/src/ap-field/segmented/index.vue.d.ts +2 -1
  133. package/lib/src/ap-field/select/index.vue.d.ts +409 -2
  134. package/lib/src/ap-field/select/index.vue.js +1 -1
  135. package/lib/src/ap-field/slider/index.vue.d.ts +259 -2
  136. package/lib/src/ap-field/switch/index.vue.d.ts +2 -1
  137. package/lib/src/ap-field/text/index.vue.d.ts +2 -1
  138. package/lib/src/ap-field/text/password.vue.d.ts +2 -1
  139. package/lib/src/ap-field/text-area/index.vue.d.ts +267 -2
  140. package/lib/src/ap-form/ap-form.vue.d.ts +638 -2
  141. package/lib/src/ap-form/dependency/index.vue.d.ts +2 -1
  142. package/lib/src/ap-form/drawer-form/index.vue.d.ts +1458 -6
  143. package/lib/src/ap-form/item/index.vue.d.ts +779 -2
  144. package/lib/src/ap-form/item-group/index.vue.d.ts +2 -1
  145. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +2 -1
  146. package/lib/src/ap-form/items/date/index.vue.d.ts +2 -1
  147. package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -1
  148. package/lib/src/ap-form/items/number/index.vue.d.ts +785 -3
  149. package/lib/src/ap-form/items/radio/index.vue.d.ts +223 -4
  150. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -1
  151. package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -1
  152. package/lib/src/ap-form/items/text/group.vue.d.ts +2 -1
  153. package/lib/src/ap-form/items/text/index.vue.d.ts +141 -3
  154. package/lib/src/ap-form/items/text/password.vue.d.ts +150 -2
  155. package/lib/src/ap-form/items/text-area/index.vue.d.ts +568 -4
  156. package/lib/src/ap-form/list/index.vue.d.ts +2 -1
  157. package/lib/src/ap-form/modal-form/index.vue.d.ts +1458 -7
  158. package/lib/src/ap-form/provider/index.vue.d.ts +2 -1
  159. package/lib/src/ap-form/render/control.vue.d.ts +2 -1
  160. package/lib/src/ap-form/render/item.vue.d.ts +2 -1
  161. package/lib/src/ap-form/search-form/index.vue.d.ts +1458 -5
  162. package/lib/src/ap-form/set/index.vue.d.ts +2 -1
  163. package/lib/src/ap-info-layout/ApInfoLayout.vue.d.ts +3 -2
  164. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +6 -2
  165. package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +3 -2
  166. package/lib/src/ap-list/index.vue.d.ts +1 -1
  167. package/lib/src/ap-table/ap-table.vue.d.ts +1 -1
  168. package/lib/src/ap-table/components/index/index.vue.d.ts +1 -1
  169. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -1
  170. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +2 -1
  171. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +1 -1
  172. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +1 -1
  173. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +1 -1
  174. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +1 -1
  175. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  176. package/lib/src/ap-table/constants.d.ts +2264 -14
  177. package/lib/src/ap-table/utils.d.ts +1180 -8
  178. package/lib/src/ap-tag/ap-tag-group.vue.d.ts +5 -2
  179. package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -1
  180. package/lib/src/ap-upload/apUpload.vue.d.ts +5 -2
  181. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +453 -2
  182. package/lib/src/ap-upload/components/Picture.vue.d.ts +5 -2
  183. package/lib/src/ap-upload/components/SingleFile.vue.d.ts +3 -1
  184. package/lib/src/business/ap-appendix/ap-appendix.vue.d.ts +5 -3
  185. package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +1 -1
  186. package/lib/src/business/ap-appendix/index.d.ts +1 -1
  187. package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +5 -2
  188. package/lib/src/business/ap-batch-action/index.d.ts +3 -1
  189. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -1
  190. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +3 -4
  191. package/lib/src/business/ap-batch-action-group/index.d.ts +887 -5
  192. package/lib/src/business/ap-card/ApCard.vue.d.ts +3 -2
  193. package/lib/src/business/ap-card/index.d.ts +1 -1
  194. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +1 -1
  195. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +5 -2
  196. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  197. package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +10 -346
  198. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  199. package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +1 -1
  200. package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +1 -1
  201. package/lib/src/business/ap-group-search/index.d.ts +418 -4
  202. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +412 -340
  203. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
  204. package/lib/src/business/ap-image/ApImage.vue.d.ts +2 -1
  205. package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +1 -1
  206. package/lib/src/business/ap-input-radio/index.d.ts +1 -1
  207. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +6 -2
  208. package/lib/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +1 -1
  209. package/lib/src/business/ap-ladder/index.d.ts +4 -1
  210. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +1 -1
  211. package/lib/src/business/ap-table-modal/index.d.ts +27 -2
  212. package/lib/src/business/ap-table-modal/modal-title.vue.d.ts +3 -2
  213. package/lib/src/business/ap-table-modal/table-layout/index.vue.d.ts +8 -8
  214. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +30 -4
  215. package/lib/src/business/ap-title/ApTitle.vue.d.ts +3 -2
  216. package/lib/src/business/ap-title/index.d.ts +1 -1
  217. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -3
  218. package/lib/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +1 -1
  219. package/lib/src/business/ap-upload-file/icon/file-icon.vue.d.ts +1 -1
  220. package/lib/src/business/batch-input-group/index.vue.d.ts +146 -3
  221. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +267 -2
  222. package/lib/src/business/hooks/useTableRefresh.js +1 -1
  223. package/lib/src/check-card/group.vue.d.ts +2 -1
  224. package/lib/src/check-card/index.vue.d.ts +3 -2
  225. package/lib/src/editable-table/form-item.vue.d.ts +1 -1
  226. package/lib/src/editable-table/index.vue.d.ts +1 -1
  227. package/lib/src/full-screen/index.vue.d.ts +6 -2
  228. package/lib/src/portal/index.vue.d.ts +2 -1
  229. package/lib/src/resize-observer/index.vue.d.ts +2 -1
  230. package/lib/src/scroll-bar/index.vue.d.ts +42 -3
  231. package/lib/src/scroll-bar/internal.vue.d.ts +5 -1
  232. package/lib/src/scroll-bar/internal.vue.js +1 -1
  233. package/lib/src/scroll-view/index.vue.d.ts +92 -4
  234. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +828 -2
  235. package/package.json +1 -1
@@ -8,6 +8,7 @@ import { FieldMode } from '..';
8
8
  declare function focus(): void;
9
9
  declare function blur(): void;
10
10
  declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
11
12
  slots: Readonly<{
12
13
  character: any;
13
14
  }> & {
@@ -95,7 +96,7 @@ declare function __VLS_template(): {
95
96
  allowHalf: boolean;
96
97
  }> | null;
97
98
  };
98
- attrs: Partial<{}>;
99
+ rootEl: any;
99
100
  };
100
101
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
101
102
  declare const __VLS_component: DefineComponent<ApFieldRateProps, {
@@ -113,7 +114,88 @@ declare const __VLS_component: DefineComponent<ApFieldRateProps, {
113
114
  allowClear: boolean;
114
115
  allowHalf: boolean;
115
116
  character: any;
116
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
117
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
118
+ rateRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
119
+ prefixCls: StringConstructor;
120
+ count: NumberConstructor;
121
+ value: NumberConstructor;
122
+ allowHalf: {
123
+ type: BooleanConstructor;
124
+ default: any;
125
+ };
126
+ allowClear: {
127
+ type: BooleanConstructor;
128
+ default: any;
129
+ };
130
+ tooltips: PropType<string[]>;
131
+ disabled: {
132
+ type: BooleanConstructor;
133
+ default: any;
134
+ };
135
+ character: VueTypeValidableDef<any>;
136
+ autofocus: {
137
+ type: BooleanConstructor;
138
+ default: any;
139
+ };
140
+ tabindex: VueTypeDef<string | number>;
141
+ direction: PropType<Direction>;
142
+ id: StringConstructor;
143
+ onChange: PropType<(value: number) => void>;
144
+ onHoverChange: PropType<(value: number) => void>;
145
+ 'onUpdate:value': PropType<(value: number) => void>;
146
+ onFocus: PropType<FocusEventHandler>;
147
+ onBlur: PropType<FocusEventHandler>;
148
+ onKeydown: PropType<KeyboardEventHandler>;
149
+ }>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
150
+ disabled: boolean;
151
+ autofocus: boolean;
152
+ allowClear: boolean;
153
+ allowHalf: boolean;
154
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
155
+ P: {};
156
+ B: {};
157
+ D: {};
158
+ C: {};
159
+ M: {};
160
+ Defaults: {};
161
+ }, Readonly< ExtractPropTypes<{
162
+ prefixCls: StringConstructor;
163
+ count: NumberConstructor;
164
+ value: NumberConstructor;
165
+ allowHalf: {
166
+ type: BooleanConstructor;
167
+ default: any;
168
+ };
169
+ allowClear: {
170
+ type: BooleanConstructor;
171
+ default: any;
172
+ };
173
+ tooltips: PropType<string[]>;
174
+ disabled: {
175
+ type: BooleanConstructor;
176
+ default: any;
177
+ };
178
+ character: VueTypeValidableDef<any>;
179
+ autofocus: {
180
+ type: BooleanConstructor;
181
+ default: any;
182
+ };
183
+ tabindex: VueTypeDef<string | number>;
184
+ direction: PropType<Direction>;
185
+ id: StringConstructor;
186
+ onChange: PropType<(value: number) => void>;
187
+ onHoverChange: PropType<(value: number) => void>;
188
+ 'onUpdate:value': PropType<(value: number) => void>;
189
+ onFocus: PropType<FocusEventHandler>;
190
+ onBlur: PropType<FocusEventHandler>;
191
+ onKeydown: PropType<KeyboardEventHandler>;
192
+ }>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
193
+ disabled: boolean;
194
+ autofocus: boolean;
195
+ allowClear: boolean;
196
+ allowHalf: boolean;
197
+ }> | null;
198
+ }, any>;
117
199
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
118
200
  export default _default;
119
201
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -2,6 +2,7 @@ import { ApFieldSegmentedProps } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  import { FieldMode } from '..';
4
4
  declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
5
6
  slots: {
6
7
  label?(_: {
7
8
  value: string | number;
@@ -12,7 +13,7 @@ declare function __VLS_template(): {
12
13
  }): any;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: any;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: DefineComponent<ApFieldSegmentedProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -26,6 +26,7 @@ declare function requestIfNeeded(clear?: boolean): Promise<void>;
26
26
  declare function focus(): void;
27
27
  declare function blur(): void;
28
28
  declare function __VLS_template(): {
29
+ attrs: Partial<{}>;
29
30
  slots: Readonly<ApFieldSelectSlots> & ApFieldSelectSlots;
30
31
  refs: {
31
32
  selectRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
@@ -190,6 +191,7 @@ declare function __VLS_template(): {
190
191
  type: BooleanConstructor;
191
192
  default: any;
192
193
  };
194
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
193
195
  labelInValue: {
194
196
  type: BooleanConstructor;
195
197
  default: any;
@@ -400,6 +402,7 @@ declare function __VLS_template(): {
400
402
  type: BooleanConstructor;
401
403
  default: any;
402
404
  };
405
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
403
406
  labelInValue: {
404
407
  type: BooleanConstructor;
405
408
  default: any;
@@ -430,7 +433,7 @@ declare function __VLS_template(): {
430
433
  labelInValue: boolean;
431
434
  }> | null;
432
435
  };
433
- attrs: Partial<{}>;
436
+ rootEl: any;
434
437
  };
435
438
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
436
439
  declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
@@ -461,7 +464,411 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
461
464
  emptyText: string;
462
465
  searchMode: "filter" | "request";
463
466
  refetchOnFocus: boolean;
464
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
467
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
468
+ selectRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
469
+ value: {
470
+ type: PropType<SelectValue>;
471
+ default: SelectValue;
472
+ };
473
+ defaultValue: {
474
+ type: PropType<SelectValue>;
475
+ default: SelectValue;
476
+ };
477
+ notFoundContent: VueTypeValidableDef<any>;
478
+ suffixIcon: VueTypeValidableDef<any>;
479
+ itemIcon: VueTypeValidableDef<any>;
480
+ size: {
481
+ type: PropType<ButtonSize>;
482
+ default: ButtonSize;
483
+ };
484
+ mode: {
485
+ type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
486
+ default: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
487
+ };
488
+ bordered: {
489
+ type: BooleanConstructor;
490
+ default: boolean;
491
+ };
492
+ transitionName: StringConstructor;
493
+ choiceTransitionName: {
494
+ type: PropType<"">;
495
+ default: "";
496
+ };
497
+ popupClassName: StringConstructor;
498
+ dropdownClassName: StringConstructor;
499
+ placement: {
500
+ type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
501
+ default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
502
+ };
503
+ status: {
504
+ type: PropType<"" | "error" | "warning">;
505
+ default: "" | "error" | "warning";
506
+ };
507
+ 'onUpdate:value': {
508
+ type: PropType<(val: SelectValue) => void>;
509
+ default: (val: SelectValue) => void;
510
+ };
511
+ children: PropType< VueNode[]>;
512
+ listHeight: NumberConstructor;
513
+ onMouseenter: PropType<(e: MouseEvent) => void>;
514
+ onMouseleave: PropType<(e: MouseEvent) => void>;
515
+ tabindex: NumberConstructor;
516
+ onClick: PropType<(e: MouseEvent) => void>;
517
+ onFocus: {
518
+ type: PropType<(e: FocusEvent) => void>;
519
+ };
520
+ onBlur: {
521
+ type: PropType<(e: FocusEvent) => void>;
522
+ };
523
+ onChange: PropType<(value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void>;
524
+ onKeydown: PropType<(e: KeyboardEvent) => void>;
525
+ onKeyup: PropType<(e: KeyboardEvent) => void>;
526
+ onMousedown: PropType<(e: MouseEvent) => void>;
527
+ onSelect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
528
+ open: {
529
+ type: BooleanConstructor;
530
+ default: any;
531
+ };
532
+ animation: StringConstructor;
533
+ direction: {
534
+ type: PropType<"rtl" | "ltr">;
535
+ };
536
+ disabled: {
537
+ type: BooleanConstructor;
538
+ default: any;
539
+ };
540
+ prefixCls: StringConstructor;
541
+ id: StringConstructor;
542
+ autofocus: BooleanConstructor;
543
+ getPopupContainer: {
544
+ type: PropType<RenderDOMFunc>;
545
+ };
546
+ virtual: {
547
+ type: BooleanConstructor;
548
+ default: any;
549
+ };
550
+ dropdownMatchSelectWidth: {
551
+ type: PropType<number | boolean>;
552
+ default: any;
553
+ };
554
+ options: PropType<DefaultOptionType[]>;
555
+ showAction: {
556
+ type: PropType<("click" | "focus")[]>;
557
+ };
558
+ onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
559
+ loading: {
560
+ type: BooleanConstructor;
561
+ default: any;
562
+ };
563
+ placeholder: VueTypeValidableDef<any>;
564
+ clearIcon: VueTypeValidableDef<any>;
565
+ allowClear: {
566
+ type: BooleanConstructor;
567
+ default: any;
568
+ };
569
+ onSearch: PropType<(value: string) => void>;
570
+ fieldNames: PropType<FieldNames>;
571
+ dropdownStyle: {
572
+ type: PropType<CSSProperties>;
573
+ };
574
+ dropdownRender: {
575
+ type: PropType<DropdownRender>;
576
+ };
577
+ dropdownAlign: PropType<AlignType>;
578
+ showSearch: {
579
+ type: BooleanConstructor;
580
+ default: any;
581
+ };
582
+ searchValue: StringConstructor;
583
+ onInputKeyDown: PropType<(e: KeyboardEvent) => void>;
584
+ removeIcon: VueTypeValidableDef<any>;
585
+ maxTagCount: {
586
+ type: PropType<number | "responsive">;
587
+ };
588
+ maxTagTextLength: NumberConstructor;
589
+ maxTagPlaceholder: VueTypeValidableDef<any>;
590
+ tokenSeparators: {
591
+ type: PropType<string[]>;
592
+ };
593
+ tagRender: {
594
+ type: PropType<(props: CustomTagProps) => any>;
595
+ };
596
+ optionLabelRender: {
597
+ type: PropType<(option: Record<string, any>) => any>;
598
+ };
599
+ onClear: PropType<() => void>;
600
+ defaultOpen: {
601
+ type: BooleanConstructor;
602
+ default: any;
603
+ };
604
+ onDropdownVisibleChange: {
605
+ type: PropType<(open: boolean) => void>;
606
+ };
607
+ showArrow: {
608
+ type: BooleanConstructor;
609
+ default: any;
610
+ };
611
+ onPopupScroll: PropType<(e: UIEvent) => void>;
612
+ menuItemSelectedIcon: VueTypeValidableDef<any>;
613
+ listItemHeight: NumberConstructor;
614
+ inputValue: StringConstructor;
615
+ autoClearSearchValue: {
616
+ type: BooleanConstructor;
617
+ default: any;
618
+ };
619
+ filterOption: {
620
+ type: PropType<boolean | FilterFunc<DefaultOptionType>>;
621
+ default: any;
622
+ };
623
+ filterSort: PropType<(optionA: DefaultOptionType, optionB: DefaultOptionType) => number>;
624
+ optionFilterProp: StringConstructor;
625
+ optionLabelProp: StringConstructor;
626
+ defaultActiveFirstOption: {
627
+ type: BooleanConstructor;
628
+ default: any;
629
+ };
630
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
631
+ labelInValue: {
632
+ type: BooleanConstructor;
633
+ default: any;
634
+ };
635
+ }>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
636
+ size: ButtonSize;
637
+ value: SelectValue;
638
+ mode: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
639
+ open: boolean;
640
+ disabled: boolean;
641
+ autofocus: boolean;
642
+ virtual: boolean;
643
+ dropdownMatchSelectWidth: number | boolean;
644
+ status: "" | "error" | "warning";
645
+ defaultValue: SelectValue;
646
+ 'onUpdate:value': (val: SelectValue) => void;
647
+ placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
648
+ loading: boolean;
649
+ bordered: boolean;
650
+ allowClear: boolean;
651
+ showSearch: boolean;
652
+ choiceTransitionName: "";
653
+ defaultOpen: boolean;
654
+ showArrow: boolean;
655
+ autoClearSearchValue: boolean;
656
+ filterOption: boolean | FilterFunc<DefaultOptionType>;
657
+ defaultActiveFirstOption: boolean;
658
+ labelInValue: boolean;
659
+ }, true, {}, CustomSlotsType<{
660
+ notFoundContent: any;
661
+ suffixIcon: any;
662
+ itemIcon: any;
663
+ removeIcon: any;
664
+ clearIcon: any;
665
+ dropdownRender: any;
666
+ option: any;
667
+ placeholder: any;
668
+ tagRender: any;
669
+ maxTagPlaceholder: any;
670
+ optionLabel: any;
671
+ default: any;
672
+ }>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
673
+ P: {};
674
+ B: {};
675
+ D: {};
676
+ C: {};
677
+ M: {};
678
+ Defaults: {};
679
+ }, Readonly< ExtractPropTypes<{
680
+ value: {
681
+ type: PropType<SelectValue>;
682
+ default: SelectValue;
683
+ };
684
+ defaultValue: {
685
+ type: PropType<SelectValue>;
686
+ default: SelectValue;
687
+ };
688
+ notFoundContent: VueTypeValidableDef<any>;
689
+ suffixIcon: VueTypeValidableDef<any>;
690
+ itemIcon: VueTypeValidableDef<any>;
691
+ size: {
692
+ type: PropType<ButtonSize>;
693
+ default: ButtonSize;
694
+ };
695
+ mode: {
696
+ type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
697
+ default: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
698
+ };
699
+ bordered: {
700
+ type: BooleanConstructor;
701
+ default: boolean;
702
+ };
703
+ transitionName: StringConstructor;
704
+ choiceTransitionName: {
705
+ type: PropType<"">;
706
+ default: "";
707
+ };
708
+ popupClassName: StringConstructor;
709
+ dropdownClassName: StringConstructor;
710
+ placement: {
711
+ type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
712
+ default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
713
+ };
714
+ status: {
715
+ type: PropType<"" | "error" | "warning">;
716
+ default: "" | "error" | "warning";
717
+ };
718
+ 'onUpdate:value': {
719
+ type: PropType<(val: SelectValue) => void>;
720
+ default: (val: SelectValue) => void;
721
+ };
722
+ children: PropType< VueNode[]>;
723
+ listHeight: NumberConstructor;
724
+ onMouseenter: PropType<(e: MouseEvent) => void>;
725
+ onMouseleave: PropType<(e: MouseEvent) => void>;
726
+ tabindex: NumberConstructor;
727
+ onClick: PropType<(e: MouseEvent) => void>;
728
+ onFocus: {
729
+ type: PropType<(e: FocusEvent) => void>;
730
+ };
731
+ onBlur: {
732
+ type: PropType<(e: FocusEvent) => void>;
733
+ };
734
+ onChange: PropType<(value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void>;
735
+ onKeydown: PropType<(e: KeyboardEvent) => void>;
736
+ onKeyup: PropType<(e: KeyboardEvent) => void>;
737
+ onMousedown: PropType<(e: MouseEvent) => void>;
738
+ onSelect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
739
+ open: {
740
+ type: BooleanConstructor;
741
+ default: any;
742
+ };
743
+ animation: StringConstructor;
744
+ direction: {
745
+ type: PropType<"rtl" | "ltr">;
746
+ };
747
+ disabled: {
748
+ type: BooleanConstructor;
749
+ default: any;
750
+ };
751
+ prefixCls: StringConstructor;
752
+ id: StringConstructor;
753
+ autofocus: BooleanConstructor;
754
+ getPopupContainer: {
755
+ type: PropType<RenderDOMFunc>;
756
+ };
757
+ virtual: {
758
+ type: BooleanConstructor;
759
+ default: any;
760
+ };
761
+ dropdownMatchSelectWidth: {
762
+ type: PropType<number | boolean>;
763
+ default: any;
764
+ };
765
+ options: PropType<DefaultOptionType[]>;
766
+ showAction: {
767
+ type: PropType<("click" | "focus")[]>;
768
+ };
769
+ onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
770
+ loading: {
771
+ type: BooleanConstructor;
772
+ default: any;
773
+ };
774
+ placeholder: VueTypeValidableDef<any>;
775
+ clearIcon: VueTypeValidableDef<any>;
776
+ allowClear: {
777
+ type: BooleanConstructor;
778
+ default: any;
779
+ };
780
+ onSearch: PropType<(value: string) => void>;
781
+ fieldNames: PropType<FieldNames>;
782
+ dropdownStyle: {
783
+ type: PropType<CSSProperties>;
784
+ };
785
+ dropdownRender: {
786
+ type: PropType<DropdownRender>;
787
+ };
788
+ dropdownAlign: PropType<AlignType>;
789
+ showSearch: {
790
+ type: BooleanConstructor;
791
+ default: any;
792
+ };
793
+ searchValue: StringConstructor;
794
+ onInputKeyDown: PropType<(e: KeyboardEvent) => void>;
795
+ removeIcon: VueTypeValidableDef<any>;
796
+ maxTagCount: {
797
+ type: PropType<number | "responsive">;
798
+ };
799
+ maxTagTextLength: NumberConstructor;
800
+ maxTagPlaceholder: VueTypeValidableDef<any>;
801
+ tokenSeparators: {
802
+ type: PropType<string[]>;
803
+ };
804
+ tagRender: {
805
+ type: PropType<(props: CustomTagProps) => any>;
806
+ };
807
+ optionLabelRender: {
808
+ type: PropType<(option: Record<string, any>) => any>;
809
+ };
810
+ onClear: PropType<() => void>;
811
+ defaultOpen: {
812
+ type: BooleanConstructor;
813
+ default: any;
814
+ };
815
+ onDropdownVisibleChange: {
816
+ type: PropType<(open: boolean) => void>;
817
+ };
818
+ showArrow: {
819
+ type: BooleanConstructor;
820
+ default: any;
821
+ };
822
+ onPopupScroll: PropType<(e: UIEvent) => void>;
823
+ menuItemSelectedIcon: VueTypeValidableDef<any>;
824
+ listItemHeight: NumberConstructor;
825
+ inputValue: StringConstructor;
826
+ autoClearSearchValue: {
827
+ type: BooleanConstructor;
828
+ default: any;
829
+ };
830
+ filterOption: {
831
+ type: PropType<boolean | FilterFunc<DefaultOptionType>>;
832
+ default: any;
833
+ };
834
+ filterSort: PropType<(optionA: DefaultOptionType, optionB: DefaultOptionType) => number>;
835
+ optionFilterProp: StringConstructor;
836
+ optionLabelProp: StringConstructor;
837
+ defaultActiveFirstOption: {
838
+ type: BooleanConstructor;
839
+ default: any;
840
+ };
841
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
842
+ labelInValue: {
843
+ type: BooleanConstructor;
844
+ default: any;
845
+ };
846
+ }>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
847
+ size: ButtonSize;
848
+ value: SelectValue;
849
+ mode: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
850
+ open: boolean;
851
+ disabled: boolean;
852
+ autofocus: boolean;
853
+ virtual: boolean;
854
+ dropdownMatchSelectWidth: number | boolean;
855
+ status: "" | "error" | "warning";
856
+ defaultValue: SelectValue;
857
+ 'onUpdate:value': (val: SelectValue) => void;
858
+ placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
859
+ loading: boolean;
860
+ bordered: boolean;
861
+ allowClear: boolean;
862
+ showSearch: boolean;
863
+ choiceTransitionName: "";
864
+ defaultOpen: boolean;
865
+ showArrow: boolean;
866
+ autoClearSearchValue: boolean;
867
+ filterOption: boolean | FilterFunc<DefaultOptionType>;
868
+ defaultActiveFirstOption: boolean;
869
+ labelInValue: boolean;
870
+ }> | null;
871
+ }, any>;
465
872
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
466
873
  export default _default;
467
874
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("lodash-unified"),w=require("@aplus-frontend/antdv");require("../../hooks/index.js");const k=require("../../utils/index.js"),T=require("../hooks/use-default-placeholder.js"),_=require("../hooks/use-options.js"),A=require("../../hooks/useControllableValue.js"),D={key:0},L=o.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean,default:void 0},placeholder:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["update:value"],setup(S,{expose:g,emit:B}){let r=0;const C=i.debounce(t=>{if(!i.isFunction(e.request))return;r+=1;const n=r;s([]),u.value=!0,e.request(t).then(l=>{r===n&&s(l)}).finally(()=>{u.value=!1})},300),e=S,b=(t,n)=>{var a;const l=((a=e.fieldNames)==null?void 0:a.label)||"label";return typeof(n==null?void 0:n[l])=="string"&&n[l].toLowerCase().indexOf(t.toLowerCase())>-1},{options:c,updateOptions:s}=_.default(e),f=o.ref(),u=o.ref((e==null?void 0:e.loading)||!1),F=B;async function p(t=!0){if(!i.isFunction(e.request))return;u.value=!0,r+=1;const n=r;try{t&&s([]);const l=await e.request();if(n!==r)return;s(l)}finally{u.value=!1}}function q(t){var n;(n=e.onFocus)==null||n.call(e,t),e.refetchOnFocus&&r>0&&!u.value&&p(!0)}o.onMounted(()=>{if(e.lazy){r+=1;return}p()});const{value:v,updateValue:x}=A.useControllableValue(e,F),N=T.useDefaultPlaceholder("Select",e),O=o.computed(()=>{var d,h;const t=o.unref(v);if(!t)return e.emptyText;const n=((d=e.fieldNames)==null?void 0:d.label)||"label",l=((h=e.fieldNames)==null?void 0:h.value)||"value";if(i.isArray(t))return t.map(m=>{var y;return(y=o.unref(c).find(M=>M[l]===m))==null?void 0:y[n]}).filter(Boolean).join("、")||e.emptyText;const a=o.unref(c).find(m=>m[l]===t);return(a==null?void 0:a[n])||e.emptyText}),I=o.computed(()=>{const t=!!(e!=null&&e.showSearch),n=e.searchMode;let l={};return t&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:C,notFoundContent:u.value?void 0:null}:{showArrow:!0,filterOption:i.isNil(e==null?void 0:e.filterOption)?b:e==null?void 0:e.filterOption}),{...k.omitUndefined(i.omit(e,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus","onBeforeSelect"])),placeholder:o.unref(N),...l}});function P(){var t;(t=f.value)==null||t.focus()}function V(){var t;(t=f.value)==null||t.blur()}return g({focus:P,blur:V,request:p}),(t,n)=>t.mode==="read"?(o.openBlock(),o.createElementBlock("span",D,o.toDisplayString(O.value),1)):(o.openBlock(),o.createBlock(o.unref(w.Select),o.mergeProps({key:1,ref_key:"selectRef",ref:f,"allow-clear":""},I.value,{mode:t.multiple?"multiple":void 0,value:o.unref(v),options:o.unref(c),loading:u.value,"onUpdate:value":o.unref(x),onFocus:q}),o.createSlots({_:2},[o.renderList(t.$slots,(l,a)=>({name:a,fn:o.withCtx(d=>[o.renderSlot(t.$slots,a,o.normalizeProps(o.guardReactiveProps(d||{})))])})),u.value?{name:"notFoundContent",fn:o.withCtx(()=>[o.createVNode(o.unref(w.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","options","loading","onUpdate:value"]))}});exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("lodash-unified"),w=require("@aplus-frontend/antdv");require("../../hooks/index.js");const M=require("../../utils/index.js"),T=require("../hooks/use-default-placeholder.js"),_=require("../hooks/use-options.js"),A=require("../../hooks/useControllableValue.js"),D={key:0},L=o.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean,default:void 0},placeholder:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},onClickOption:{},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["update:value"],setup(S,{expose:g,emit:B}){let r=0;const C=i.debounce(t=>{if(!i.isFunction(e.request))return;r+=1;const n=r;s([]),u.value=!0,e.request(t).then(l=>{r===n&&s(l)}).finally(()=>{u.value=!1})},300),e=S,b=(t,n)=>{var a;const l=((a=e.fieldNames)==null?void 0:a.label)||"label";return typeof(n==null?void 0:n[l])=="string"&&n[l].toLowerCase().indexOf(t.toLowerCase())>-1},{options:c,updateOptions:s}=_.default(e),f=o.ref(),u=o.ref((e==null?void 0:e.loading)||!1),F=B;async function p(t=!0){if(!i.isFunction(e.request))return;u.value=!0,r+=1;const n=r;try{t&&s([]);const l=await e.request();if(n!==r)return;s(l)}finally{u.value=!1}}function q(t){var n;(n=e.onFocus)==null||n.call(e,t),e.refetchOnFocus&&r>0&&!u.value&&p(!0)}o.onMounted(()=>{if(e.lazy){r+=1;return}p()});const{value:v,updateValue:O}=A.useControllableValue(e,F),x=T.useDefaultPlaceholder("Select",e),N=o.computed(()=>{var d,h;const t=o.unref(v);if(!t)return e.emptyText;const n=((d=e.fieldNames)==null?void 0:d.label)||"label",l=((h=e.fieldNames)==null?void 0:h.value)||"value";if(i.isArray(t))return t.map(m=>{var y;return(y=o.unref(c).find(k=>k[l]===m))==null?void 0:y[n]}).filter(Boolean).join("、")||e.emptyText;const a=o.unref(c).find(m=>m[l]===t);return(a==null?void 0:a[n])||e.emptyText}),I=o.computed(()=>{const t=!!(e!=null&&e.showSearch),n=e.searchMode;let l={};return t&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:C,notFoundContent:u.value?void 0:null}:{showArrow:!0,filterOption:i.isNil(e==null?void 0:e.filterOption)?b:e==null?void 0:e.filterOption}),{...M.omitUndefined(i.omit(e,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus","onBeforeSelect"])),placeholder:o.unref(x),...l}});function P(){var t;(t=f.value)==null||t.focus()}function V(){var t;(t=f.value)==null||t.blur()}return g({focus:P,blur:V,request:p}),(t,n)=>t.mode==="read"?(o.openBlock(),o.createElementBlock("span",D,o.toDisplayString(N.value),1)):(o.openBlock(),o.createBlock(o.unref(w.Select),o.mergeProps({key:1,ref_key:"selectRef",ref:f,"allow-clear":""},I.value,{mode:t.multiple?"multiple":void 0,value:o.unref(v),options:o.unref(c),loading:u.value,"onUpdate:value":o.unref(O),onFocus:q}),o.createSlots({_:2},[o.renderList(t.$slots,(l,a)=>({name:a,fn:o.withCtx(d=>[o.renderSlot(t.$slots,a,o.normalizeProps(o.guardReactiveProps(d||{})))])})),u.value?{name:"notFoundContent",fn:o.withCtx(()=>[o.createVNode(o.unref(w.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","options","loading","onUpdate:value"]))}});exports.default=L;