@opentiny/vue-renderless 3.13.2 → 3.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 (321) hide show
  1. package/action-sheet/index.js +20 -13
  2. package/action-sheet/vue.js +8 -7
  3. package/amount/index.js +100 -25
  4. package/amount/vue.js +102 -26
  5. package/anchor/index.js +1 -0
  6. package/area/index.js +8 -8
  7. package/area/vue.js +5 -5
  8. package/async-flowchart/index.js +16 -3
  9. package/autocomplete/index.js +58 -14
  10. package/autocomplete/vue.js +40 -12
  11. package/badge/index.js +12 -0
  12. package/badge/vue.js +6 -4
  13. package/breadcrumb/vue.js +3 -1
  14. package/breadcrumb-item/vue.js +6 -2
  15. package/button/index.js +5 -1
  16. package/calendar/index.js +2 -86
  17. package/calendar-bar/index.js +18 -4
  18. package/calendar-view/index.js +5 -1
  19. package/calendar-view/vue.js +16 -3
  20. package/card-group/vue.js +4 -2
  21. package/cascader/index.js +86 -34
  22. package/cascader/vue.js +61 -20
  23. package/cascader-menu/index.js +7 -7
  24. package/cascader-menu/vue.js +2 -3
  25. package/cascader-mobile/index.js +36 -23
  26. package/cascader-mobile/vue.js +6 -0
  27. package/cascader-node/index.js +13 -1
  28. package/cascader-node/vue.js +15 -4
  29. package/cascader-panel/index.js +1 -1
  30. package/cascader-select/column-index.js +150 -0
  31. package/cascader-select/column.js +120 -0
  32. package/cascader-select/index.js +29 -165
  33. package/cascader-select/usePicker.js +251 -0
  34. package/cascader-select/useTouch.js +65 -0
  35. package/cascader-select/vue.js +35 -47
  36. package/cell/vue.js +2 -1
  37. package/chart-bar/index.js +2 -3
  38. package/chart-core/deps/constants.js +43 -43
  39. package/chart-core/index.js +1 -1
  40. package/chart-gauge/index.js +2 -2
  41. package/chart-heatmap/index.js +17 -10
  42. package/chart-line/index.js +8 -9
  43. package/chart-tree/index.js +2 -2
  44. package/chart-waterfall/index.js +4 -6
  45. package/checkbox/index.js +18 -1
  46. package/checkbox/vue.js +15 -7
  47. package/checkbox-group/vue.js +1 -0
  48. package/col/vue.js +1 -1
  49. package/collapse/index.js +3 -3
  50. package/color-select-panel/vue.js +0 -7
  51. package/column-list-item/index.js +17 -1
  52. package/column-list-item/vue.js +8 -3
  53. package/common/date.js +7 -5
  54. package/common/deps/clickoutside.js +6 -2
  55. package/common/deps/dom.js +19 -4
  56. package/common/deps/popper.js +44 -11
  57. package/common/deps/resize-event.js +1 -0
  58. package/common/deps/touch-emulator.js +4 -1
  59. package/common/deps/tree-model/node.js +2 -2
  60. package/common/deps/tree-model/tree-store.js +2 -13
  61. package/common/deps/useRect.js +25 -0
  62. package/common/deps/vue-popper.js +38 -20
  63. package/common/index.js +2 -2
  64. package/common/runtime.js +1 -1
  65. package/common/string.js +2 -2
  66. package/common/type.js +2 -1
  67. package/common/validate/rules/enum.js +1 -1
  68. package/common/validate/rules/pattern.js +2 -2
  69. package/common/validate/rules/range.js +8 -5
  70. package/common/validate/rules/required.js +1 -1
  71. package/common/validate/rules/type.js +5 -5
  72. package/common/validate/rules/whitespace.js +1 -1
  73. package/common/validate/util.js +15 -16
  74. package/common/validate/validations/integer.js +1 -1
  75. package/common/validate/validations/method.js +1 -1
  76. package/currency/index.js +74 -7
  77. package/currency/vue.js +21 -5
  78. package/date-panel/index.js +16 -0
  79. package/date-panel/vue.js +8 -2
  80. package/date-picker-mobile/index.js +12 -0
  81. package/date-picker-mobile/vue.js +7 -1
  82. package/date-range/vue.js +14 -6
  83. package/date-table/index.js +5 -0
  84. package/date-table/vue.js +3 -1
  85. package/dialog-box/index.js +46 -14
  86. package/dialog-box/vue.js +30 -7
  87. package/dialog-select/index.js +6 -3
  88. package/dialog-select/vue.js +8 -4
  89. package/drawer/index.js +27 -5
  90. package/drawer/vue.js +14 -7
  91. package/dropdown/index.js +7 -7
  92. package/dropdown/vue.js +6 -2
  93. package/dropdown-item/index.js +9 -1
  94. package/dropdown-item/mf.js +6 -10
  95. package/dropdown-item/vue.js +20 -7
  96. package/dropdown-menu/index.js +20 -7
  97. package/dropdown-menu/vue.js +4 -3
  98. package/exception/index.js +2 -7
  99. package/exception/vue.js +7 -10
  100. package/fall-menu/index.js +5 -1
  101. package/fall-menu/vue.js +13 -2
  102. package/file-upload/index.js +68 -18
  103. package/file-upload/vue.js +38 -8
  104. package/filter-box/index.js +1 -0
  105. package/float-button/index.js +42 -0
  106. package/float-button/vue.js +101 -0
  107. package/floating-button/index.js +62 -16
  108. package/floating-button/vue.js +27 -9
  109. package/flowchart/index.js +134 -25
  110. package/flowchart/node.js +13 -4
  111. package/flowchart/vue.js +16 -4
  112. package/form/vue.js +8 -0
  113. package/form-item/index.js +5 -5
  114. package/form-item/vue.js +3 -1
  115. package/fullscreen/index.js +5 -5
  116. package/fullscreen/vue.js +3 -3
  117. package/grid/plugins/export.js +5 -2
  118. package/grid/utils/column.js +1 -0
  119. package/grid/utils/dom.js +7 -1
  120. package/image/index.js +6 -1
  121. package/image/vue.js +6 -3
  122. package/image-viewer/index.js +62 -51
  123. package/image-viewer/vue.js +17 -5
  124. package/input/index.js +81 -20
  125. package/input/vue.js +44 -18
  126. package/ip-address/index.js +61 -19
  127. package/ip-address/vue.js +22 -4
  128. package/link/vue.js +3 -1
  129. package/loading/index.js +2 -2
  130. package/loading/vue.js +8 -2
  131. package/logout/index.js +1 -1
  132. package/menu/index.js +15 -2
  133. package/menu/vue.js +22 -17
  134. package/mind-map/index.js +47 -0
  135. package/mind-map/vue.js +53 -0
  136. package/modal/index.js +44 -4
  137. package/modal/vue.js +18 -4
  138. package/multi-select/index.js +186 -11
  139. package/multi-select/vue.js +60 -15
  140. package/multi-select-item/index.js +23 -0
  141. package/multi-select-item/vue.js +31 -0
  142. package/numeric/index.js +46 -12
  143. package/numeric/vue.js +44 -19
  144. package/option/index.js +27 -9
  145. package/option/vue.js +37 -21
  146. package/option-group/index.js +3 -3
  147. package/package.json +1 -1
  148. package/pager/index.js +18 -4
  149. package/pager/vue.js +16 -5
  150. package/picker/index.js +258 -49
  151. package/picker/mb.js +42 -0
  152. package/picker/vue.js +70 -17
  153. package/picker-column/index.js +1 -1
  154. package/pop-upload/vue.js +3 -0
  155. package/popconfirm/index.js +3 -6
  156. package/popconfirm/vue.js +1 -1
  157. package/popeditor/index.js +71 -32
  158. package/popeditor/vue.js +15 -11
  159. package/popover/index.js +4 -4
  160. package/popover/vue.js +6 -6
  161. package/popup/index.js +3 -3
  162. package/popup/vue.js +5 -5
  163. package/pull-refresh/index.js +13 -13
  164. package/pull-refresh/vue.js +5 -4
  165. package/radio/index.js +0 -17
  166. package/radio/vue.js +4 -10
  167. package/rate/index.js +1 -1
  168. package/rate/vue.js +0 -2
  169. package/record/index.js +4 -1
  170. package/rich-text/clipboard.js +54 -0
  171. package/rich-text/index.js +192 -0
  172. package/rich-text/module/file-upload.js +107 -0
  173. package/rich-text/module/image-drop.js +63 -0
  174. package/rich-text/module/image-upload.js +89 -0
  175. package/rich-text/options.js +141 -0
  176. package/rich-text/table-module.js +382 -0
  177. package/rich-text/vue.js +102 -0
  178. package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
  179. package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
  180. package/scrollbar/index.js +11 -11
  181. package/scrollbar/vue-bar.js +3 -3
  182. package/scrollbar/vue.js +5 -5
  183. package/search/index.js +9 -9
  184. package/search/vue.js +8 -6
  185. package/select/index.js +435 -373
  186. package/select/vue.js +255 -161
  187. package/select-dropdown/index.js +61 -3
  188. package/select-dropdown/vue.js +85 -8
  189. package/select-view/index.js +3 -1
  190. package/selected-box/index.js +2 -0
  191. package/selected-box/vue.js +6 -3
  192. package/signature/index.js +241 -0
  193. package/signature/vue.js +88 -0
  194. package/skeleton/index.js +14 -0
  195. package/skeleton/vue.js +15 -0
  196. package/skeleton-item/vue.js +15 -0
  197. package/slider/index.js +70 -17
  198. package/slider/vue.js +16 -7
  199. package/split/index.js +5 -3
  200. package/split/vue.js +4 -6
  201. package/standard-list-item/index.js +15 -1
  202. package/standard-list-item/vue.js +6 -5
  203. package/steps/index.js +25 -2
  204. package/steps/slide-bar.js +8 -1
  205. package/steps/vue.js +15 -3
  206. package/tab-item-mf/vue.js +14 -8
  207. package/tab-nav/index.js +30 -5
  208. package/tab-nav/vue.js +16 -4
  209. package/tabbar/vue.js +9 -3
  210. package/tabbar-item/vue.js +3 -2
  211. package/tabs/index.js +16 -4
  212. package/tabs/vue.js +2 -1
  213. package/tabs-mf/index.js +20 -6
  214. package/tabs-mf/vue-nav.js +26 -11
  215. package/tabs-mf/vue.js +7 -7
  216. package/tabs-mf/wheel.js +1 -0
  217. package/tag/index.js +1 -1
  218. package/tag-group/index.js +2 -1
  219. package/time/index.js +5 -2
  220. package/time/vue.js +1 -1
  221. package/time-line/index.js +3 -3
  222. package/time-line/vue.js +2 -2
  223. package/time-picker-mobile/index.js +24 -5
  224. package/time-picker-mobile/vue.js +17 -7
  225. package/time-range/index.js +2 -0
  226. package/timeline-item/vue.js +1 -1
  227. package/tooltip/index.js +6 -3
  228. package/tooltip/vue.js +4 -4
  229. package/transfer/index.js +20 -22
  230. package/transfer/vue.js +1 -6
  231. package/transfer-panel/vue.js +3 -5
  232. package/tree/index.js +21 -4
  233. package/tree/vue.js +10 -8
  234. package/tree-menu/index.js +29 -3
  235. package/tree-menu/vue.js +28 -15
  236. package/tree-node/index.js +18 -18
  237. package/tree-node/vue.js +6 -5
  238. package/types/action-sheet.type.d.ts +118 -1
  239. package/types/alert.type.d.ts +1 -1
  240. package/types/amount.type.d.ts +168 -1
  241. package/types/area.type.d.ts +134 -1
  242. package/types/async-flowchart.type.d.ts +72 -0
  243. package/types/autocomplete.type.d.ts +199 -1
  244. package/types/badge.type.d.ts +3 -1
  245. package/types/breadcrumb-item.type.d.ts +2 -0
  246. package/types/breadcrumb.type.d.ts +2 -0
  247. package/types/button-group.type.d.ts +3 -3
  248. package/types/button.type.d.ts +4 -0
  249. package/types/cascader-menu.type.d.ts +3 -4
  250. package/types/cascader-node.type.d.ts +5 -2
  251. package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
  252. package/types/cascader-panel.type.d.ts +3 -241
  253. package/types/cascader.type.d.ts +329 -1
  254. package/types/checkbox.type.d.ts +9 -3
  255. package/types/collapse.type.d.ts +20 -3
  256. package/types/date-picker.type.d.ts +38 -1
  257. package/types/dialog-box.type.d.ts +13 -3
  258. package/types/drawer.type.d.ts +133 -1
  259. package/types/{dropdown-item.type-8ea6c633.d.ts → dropdown-item.type-8475a549.d.ts} +7 -13
  260. package/types/dropdown-item.type.d.ts +1 -1
  261. package/types/dropdown-menu.type.d.ts +1 -1
  262. package/types/dropdown.type.d.ts +1 -5
  263. package/types/fall-menu.type.d.ts +94 -1
  264. package/types/file-upload.type.d.ts +1 -1
  265. package/types/float-button.type.d.ts +123 -0
  266. package/types/form-item.type.d.ts +1 -1
  267. package/types/{form.type-d0fd42f3.d.ts → form.type-222799ae.d.ts} +5 -2
  268. package/types/form.type.d.ts +1 -1
  269. package/types/{index-e0250f63.d.ts → index-b012f687.d.ts} +9 -0
  270. package/types/input.type.d.ts +1 -5
  271. package/types/ip-address.type.d.ts +160 -1
  272. package/types/link.type.d.ts +6 -3
  273. package/types/loading.type.d.ts +7 -0
  274. package/types/milestone.type.d.ts +1 -1
  275. package/types/mind-map.type.d.ts +20 -0
  276. package/types/modal.type.d.ts +29 -2
  277. package/types/numeric.type.d.ts +41 -10
  278. package/types/pager.type.d.ts +13 -1
  279. package/types/picker.type.d.ts +18 -0
  280. package/types/popconfirm.type.d.ts +86 -1
  281. package/types/popeditor.type.d.ts +5 -1
  282. package/types/popover.type.d.ts +3 -3
  283. package/types/progress.type.d.ts +3 -1
  284. package/types/radio.type.d.ts +0 -4
  285. package/types/rate.type.d.ts +236 -1
  286. package/types/search.type.d.ts +88 -1
  287. package/types/shared.type.d.ts +1 -1
  288. package/types/skeleton-item.type.d.ts +38 -0
  289. package/types/skeleton.type.d.ts +45 -0
  290. package/types/slider.type.d.ts +49 -10
  291. package/types/steps.type.d.ts +15 -4
  292. package/types/switch.type.d.ts +3 -3
  293. package/types/tab-bar.type.d.ts +1 -1
  294. package/types/tab-nav.type.d.ts +7 -2
  295. package/types/tabs.type.d.ts +9 -1
  296. package/types/tag-group.type.d.ts +64 -1
  297. package/types/{time-line.type-d7daa669.d.ts → time-line.type-b155cb4f.d.ts} +12 -0
  298. package/types/time-line.type.d.ts +1 -1
  299. package/types/timeline-item.type.d.ts +1 -1
  300. package/types/tooltip.type.d.ts +2 -2
  301. package/types/transfer.type.d.ts +185 -1
  302. package/types/tree-menu.type.d.ts +210 -1
  303. package/types/upload-dragger.type.d.ts +2 -2
  304. package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-a29aea50.d.ts} +31 -8
  305. package/types/upload-list.type.d.ts +1 -1
  306. package/types/upload.type.d.ts +1 -1
  307. package/types/user-head.type.d.ts +146 -1
  308. package/types/wizard.type.d.ts +1 -0
  309. package/upload/index.js +64 -34
  310. package/upload/vue.js +9 -5
  311. package/upload-dragger/index.js +22 -20
  312. package/upload-list/index.js +24 -18
  313. package/upload-list/vue.js +9 -4
  314. package/user/index.js +34 -25
  315. package/user/vue.js +1 -1
  316. package/user-head/index.js +3 -3
  317. package/watermark/index.js +11 -0
  318. package/wheel/index.js +3 -0
  319. package/wizard/vue.js +4 -2
  320. package/common/deps/modal-queue.js +0 -6
  321. package/common/deps/requestAnimationFrame.js +0 -25
package/select/vue.js CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  emitChange,
25
25
  directEmitChange,
26
26
  getOption,
27
+ getSelectedOption,
27
28
  setSelected,
28
29
  handleFocus,
29
30
  focus,
@@ -38,6 +39,7 @@ import {
38
39
  resetInputState,
39
40
  resetInputHeight,
40
41
  resetHoverIndex,
42
+ resetDatas,
41
43
  handleOptionSelect,
42
44
  setSoftFocus,
43
45
  getValueIndex,
@@ -50,8 +52,11 @@ import {
50
52
  resetInputWidth,
51
53
  handleResize,
52
54
  checkDefaultFirstOption,
55
+ setOptionHighlight,
53
56
  getValueKey,
54
57
  emptyText,
58
+ emptyFlag,
59
+ recycleScrollerHeight,
55
60
  watchValue,
56
61
  watchVisible,
57
62
  watchOptions,
@@ -65,6 +70,7 @@ import {
65
70
  onCopying,
66
71
  gridOnQueryChange,
67
72
  defaultOnQueryChange,
73
+ queryChange,
68
74
  toVisible,
69
75
  toHide,
70
76
  mounted,
@@ -72,7 +78,6 @@ import {
72
78
  watchHoverIndex,
73
79
  computeOptimizeOpts,
74
80
  watchOptimizeOpts,
75
- getScrollListener,
76
81
  computeCollapseTags,
77
82
  computeMultipleLimit,
78
83
  handleDropdownClick,
@@ -96,13 +101,12 @@ import {
96
101
  watchInitValue,
97
102
  watchShowClose,
98
103
  loadTreeData,
99
- resetFilter,
104
+ getOptionIndexArr,
105
+ queryVisibleOptions,
100
106
  computedGetIcon,
101
107
  computedGetTagType,
102
- computedShowDropdownIcon,
103
- clearNoMatchValue,
104
- debouncedQueryChange,
105
- handleDebouncedQueryChange
108
+ clearSearchText,
109
+ clearNoMatchValue
106
110
  } from "./index";
107
111
  import debounce from "../common/deps/debounce";
108
112
  import { isNumber } from "../common/type";
@@ -132,6 +136,7 @@ const api = [
132
136
  "resetInputHeight",
133
137
  "managePlaceholder",
134
138
  "checkDefaultFirstOption",
139
+ "setOptionHighlight",
135
140
  "toggleLastOptionHitState",
136
141
  "deleteTag",
137
142
  "setSelected",
@@ -162,64 +167,17 @@ const api = [
162
167
  "handleEnterTag",
163
168
  "getLabelSlotValue",
164
169
  "loadTreeData",
165
- "resetFilter",
166
- "computedGetIcon"
170
+ "updateModelValue",
171
+ "clearSearchText"
167
172
  ];
168
- const initStateAdd = ({ computed, props, api: api2, parent }) => ({
169
- selectedTags: [],
170
- tips: "",
171
- showTip: false,
172
- tipHover: false,
173
- selectHover: false,
174
- tipTimer: null,
175
- selectCls: "checked-sur",
176
- overflow: null,
177
- completed: false,
178
- inputWidth: 0,
179
- inputPaddingRight: 0,
180
- hoverIndex: -1,
181
- hoverOption: -1,
182
- inputLength: 20,
183
- optionsCount: 0,
184
- selectFiexd: {},
185
- createdLabel: null,
186
- isSilentBlur: false,
187
- cachedOptions: [],
188
- selectedLabel: "",
189
- previousQuery: null,
190
- inputHovering: false,
191
- createdSelected: false,
192
- isOnComposition: false,
193
- cachedPlaceHolder: props.placeholder,
194
- inputHeight: 0,
195
- initialInputHeight: 28,
196
- currentPlaceholder: props.placeholder,
197
- filteredOptionsCount: 0,
198
- gridData: [],
199
- treeData: [],
200
- remoteData: [],
201
- currentKey: props.modelValue,
202
- updateId: "",
203
- popperElm: null,
204
- debounce: computed(() => isNumber(props.queryDebounce) ? props.queryDebounce : props.remote ? 300 : 0),
205
- emptyText: computed(() => api2.emptyText()),
206
- formItemSize: computed(() => (parent.formItem || {}).formItemSize),
207
- selectDisabled: computed(() => api2.computedSelectDisabled()),
208
- isDisplayOnly: computed(() => props.displayOnly || (parent.form || {}).displayOnly),
209
- gridCheckedData: computed(() => api2.getcheckedData()),
210
- isExpandAll: computed(() => api2.computedIsExpandAll()),
211
- searchSingleCopy: computed(() => props.allowCopy && !props.multiple && props.filterable),
212
- tooltipContent: {},
213
- isHidden: false,
214
- defaultCheckedKeys: [],
215
- filterOrSearch: computed(() => props.filterable || props.searchable)
216
- });
217
- const initState = ({ reactive, computed, props, api: api2, emitter, parent, constants }) => {
173
+ const initState = ({ reactive, computed, props, api: api2, emitter, parent, constants, useBreakpoint, vm }) => {
218
174
  const stateAdd = initStateAdd({ computed, props, api: api2, parent });
219
175
  const state = reactive(__spreadProps(__spreadValues({}, stateAdd), {
220
176
  selectEmitter: emitter(),
221
177
  datas: [],
178
+ initDatas: [],
222
179
  query: "",
180
+ magicKey: 0,
223
181
  options: [],
224
182
  visible: false,
225
183
  showCopy: computed(() => api2.computedShowCopy()),
@@ -228,6 +186,7 @@ const initState = ({ reactive, computed, props, api: api2, emitter, parent, cons
228
186
  selected: props.multiple ? [] : {},
229
187
  softFocus: false,
230
188
  hover: false,
189
+ triggerSearch: false,
231
190
  firstAutoSearch: props.remoteConfig.autoSearch,
232
191
  tagsStyle: computed(() => api2.computedTagsStyle()),
233
192
  readonly: computed(() => api2.computedReadonly()),
@@ -238,69 +197,90 @@ const initState = ({ reactive, computed, props, api: api2, emitter, parent, cons
238
197
  showNewOption: computed(() => api2.computedShowNewOption()),
239
198
  selectSize: computed(() => props.size || state.formItemSize),
240
199
  optimizeOpts: computed(() => api2.computeOptimizeOpts()),
241
- optimizeStore: { flag: false, valueIndex: 0, startIndex: 0, viewStyle: "", datas: [] },
200
+ optimizeStore: { valueIndex: 0, recycleScrollerHeight: computed(() => api2.recycleScrollerHeight()) },
242
201
  collapseTags: computed(() => api2.computeCollapseTags()),
243
202
  multipleLimit: computed(() => api2.computeMultipleLimit()),
244
203
  disabledTooltipContent: computed(() => api2.computedDisabledTooltipContent()),
204
+ isExpand: computed(() => (state.selectHover || state.visible) && props.hoverExpand && !props.disabled),
245
205
  collapseTagsLength: 0,
246
206
  initValue: [],
247
207
  key: 0,
248
- isSelectAll: computed(() => state.selectCls === "checked-sur"),
249
- isHalfSelect: computed(() => state.selectCls === "halfselect"),
208
+ device: "",
209
+ timer: null,
210
+ modelValue: [],
211
+ queryValue: "",
212
+ selectedCopy: [],
213
+ compareValue: null,
214
+ selectedVal: computed(
215
+ () => state.device === "mb" && props.multiple && state.visible ? state.selectedCopy : state.selected
216
+ ),
217
+ displayOnlyContent: computed(
218
+ () => props.multiple && Array.isArray(state.selected) ? state.selected.map((item) => item.state ? item.state.currentLabel : item.currentLabel).join("; ") : ""
219
+ ),
220
+ breakpoint: useBreakpoint ? useBreakpoint().current : "",
221
+ isSaaSTheme: vm.theme === "saas",
222
+ disabledOptionHover: false,
223
+ hasClearSelection: false,
224
+ // tiny 新增
250
225
  getIcon: computed(() => api2.computedGetIcon()),
251
226
  getTagType: computed(() => api2.computedGetTagType()),
252
- isShowDropdownIcon: computed(() => api2.computedShowDropdownIcon())
227
+ isSelectAll: computed(() => state.selectCls === "checked-sur")
253
228
  }));
254
229
  return state;
255
230
  };
256
- const addApi = ({ api: api2, props, state, emit, constants, parent, nextTick, dispatch, vm, designConfig }) => {
257
- Object.assign(api2, {
258
- resetInputHeight: resetInputHeight({ api: api2, constants, nextTick, props, vm, state, designConfig }),
259
- calcOverFlow: calcOverFlow({ vm, props, state }),
260
- handleFocus: handleFocus({ api: api2, emit, props, state }),
261
- deleteTag: deleteTag({ api: api2, constants, emit, props, vm, nextTick, state }),
262
- watchValue: watchValue({ api: api2, constants, dispatch, props, vm, state }),
263
- toHide: toHide({ constants, state, props, vm, api: api2, nextTick }),
264
- toVisible: toVisible({ constants, state, props, vm, api: api2, nextTick }),
265
- setSelected: setSelected({ api: api2, constants, nextTick, props, vm, state }),
266
- selectOption: selectOption({ api: api2, state, props }),
267
- handleResize: handleResize({ api: api2, props, state }),
268
- watchOptions: watchOptions({ api: api2, constants, nextTick, parent, props, state }),
269
- watchVisible: watchVisible({ api: api2, constants, emit, state, vm, props }),
270
- deletePrevTag: deletePrevTag({ api: api2, constants, props, state, vm }),
271
- onInputChange: onInputChange({ api: api2, props, state, constants, nextTick }),
272
- deleteSelected: deleteSelected({ api: api2, constants, emit, props, vm, state }),
273
- handleMenuEnter: handleMenuEnter({ api: api2, nextTick, state }),
274
- resetInputState: resetInputState({ api: api2, vm, state }),
275
- navigateOptions: navigateOptions({ api: api2, nextTick, state }),
276
- handleClearClick: handleClearClick(api2),
277
- handleComposition: handleComposition({ api: api2, nextTick, state }),
278
- handleQueryChange: handleQueryChange({ api: api2, constants, nextTick, props, vm, state }),
279
- handleOptionSelect: handleOptionSelect({ api: api2, nextTick, props, vm, state }),
280
- getPluginOption: getPluginOption({ api: api2, props, state }),
281
- toggleCheckAll: toggleCheckAll({ api: api2, state }),
282
- handleDebouncedQueryChange: handleDebouncedQueryChange({ state, api: api2 }),
283
- debouncedQueryChange: debouncedQueryChange({ props, api: api2 }),
284
- debouncedOnInputChange: debounce(state.debounce, () => {
285
- api2.onInputChange();
286
- }),
287
- debouncRquest: debouncRquest({ api: api2, state, props }),
288
- defaultOnQueryChange: defaultOnQueryChange({ props, state, constants, api: api2 }),
289
- mounted: mounted({ api: api2, parent, state, props, vm, constants }),
290
- unMount: unMount({ api: api2, parent, vm, state }),
291
- watchOptimizeOpts: watchOptimizeOpts({ api: api2, props, vm, state }),
292
- handleDropdownClick: handleDropdownClick({ emit }),
293
- handleEnterTag: handleEnterTag({ state }),
294
- calcCollapseTags: calcCollapseTags({ state, vm }),
295
- initValue: initValue({ state }),
296
- getLabelSlotValue: getLabelSlotValue({ props, state }),
297
- loadTreeData: loadTreeData({ state, vm, props, api: api2 }),
298
- resetFilter: resetFilter({ state, api: api2 }),
299
- computedGetIcon: computedGetIcon({ constants, designConfig, props }),
300
- computedGetTagType: computedGetTagType({ designConfig, props }),
301
- computedShowDropdownIcon: computedShowDropdownIcon({ props, state }),
302
- clearNoMatchValue: clearNoMatchValue({ props, emit })
303
- });
231
+ const initStateAdd = ({ computed, props, api: api2, parent }) => {
232
+ return {
233
+ selectedTags: [],
234
+ tips: "",
235
+ showTip: false,
236
+ tipHover: false,
237
+ selectHover: false,
238
+ tipTimer: null,
239
+ selectCls: "checked-sur",
240
+ filteredSelectCls: "checked-sur",
241
+ overflow: null,
242
+ completed: false,
243
+ inputWidth: 0,
244
+ inputPaddingRight: 0,
245
+ hoverIndex: -1,
246
+ hoverValue: -1,
247
+ optionsIndex: -1,
248
+ inputLength: 20,
249
+ optionsCount: 0,
250
+ selectFiexd: {},
251
+ createdLabel: null,
252
+ isSilentBlur: false,
253
+ cachedOptions: [],
254
+ selectedLabel: "",
255
+ previousQuery: null,
256
+ inputHovering: false,
257
+ createdSelected: false,
258
+ isOnComposition: false,
259
+ cachedPlaceHolder: props.placeholder,
260
+ inputHeight: 0,
261
+ initialInputHeight: 0,
262
+ currentPlaceholder: props.placeholder,
263
+ filteredOptionsCount: 0,
264
+ gridData: [],
265
+ treeData: [],
266
+ remoteData: [],
267
+ currentKey: props.modelValue,
268
+ updateId: "",
269
+ popperElm: null,
270
+ debounce: computed(() => isNumber(props.queryDebounce) ? props.queryDebounce : props.remote ? 300 : 0),
271
+ emptyText: computed(() => api2.emptyText()),
272
+ emptyFlag: computed(() => api2.emptyFlag()),
273
+ formItemSize: computed(() => (parent.formItem || { state: {} }).state.formItemSize),
274
+ selectDisabled: computed(() => api2.computedSelectDisabled()),
275
+ isDisplayOnly: computed(() => props.displayOnly || (parent.form || {}).displayOnly),
276
+ gridCheckedData: computed(() => api2.getcheckedData()),
277
+ isExpandAll: computed(() => api2.computedIsExpandAll()),
278
+ searchSingleCopy: computed(() => props.allowCopy && !props.multiple && props.filterable),
279
+ tooltipContent: {},
280
+ isHidden: false,
281
+ defaultCheckedKeys: [],
282
+ optionIndexArr: []
283
+ };
304
284
  };
305
285
  const initApi = ({
306
286
  api: api2,
@@ -314,6 +294,7 @@ const initApi = ({
314
294
  dispatch,
315
295
  t,
316
296
  vm,
297
+ isMobileFirstMode,
317
298
  designConfig
318
299
  }) => {
319
300
  Object.assign(api2, {
@@ -327,29 +308,36 @@ const initApi = ({
327
308
  handleClose: handleClose(state),
328
309
  getValueIndex: getValueIndex(props),
329
310
  getChildValue: getChildValue(),
330
- getOption: getOption({ props, state }),
311
+ getOption: getOption({ props, state, api: api2 }),
312
+ getSelectedOption: getSelectedOption({ props, state }),
331
313
  emitChange: emitChange({ emit, props, state, constants }),
332
- directEmitChange: directEmitChange({ emit, props, state }),
333
- toggleMenu: toggleMenu({ vm, state, props }),
314
+ directEmitChange: directEmitChange({ emit, props, state, constants }),
315
+ toggleMenu: toggleMenu({ vm, state, props, api: api2, isMobileFirstMode }),
334
316
  showTip: showTip({ props, state, vm }),
335
317
  onOptionDestroy: onOptionDestroy(state),
336
318
  setSoftFocus: setSoftFocus({ vm, state }),
337
319
  getcheckedData: getcheckedData({ props, state }),
338
320
  resetInputWidth: resetInputWidth({ vm, state }),
339
321
  resetHoverIndex: resetHoverIndex({ props, state }),
322
+ resetDatas: resetDatas({ props, state }),
340
323
  scrollToOption: scrollToOption({ vm, constants }),
341
324
  selectChange: selectChange({ emit, props, vm, state, api: api2 }),
342
- radioChange: radioChange({ emit, props, state, api: api2 }),
325
+ radioChange: radioChange({ emit, props, state, api: api2, vm }),
343
326
  handleCopyClick: handleCopyClick({ parent, props, state }),
344
327
  treeNodeClick: treeNodeClick({ emit, props, state, api: api2, vm }),
345
328
  managePlaceholder: managePlaceholder({ vm, state }),
346
329
  nodeCheckClick: nodeCheckClick({ emit, props, state, api: api2 }),
347
330
  checkDefaultFirstOption: checkDefaultFirstOption(state),
331
+ setOptionHighlight: setOptionHighlight(state),
348
332
  nodeExpand: nodeExpand({ state, constants, nextTick }),
349
333
  nodeCollapse: nodeCollapse({ state, constants, nextTick }),
350
334
  handleBlur: handleBlur({ constants, dispatch, emit, state }),
351
335
  toggleLastOptionHitState: toggleLastOptionHitState({ state }),
352
- emptyText: emptyText({ I18N: constants.I18N, props, state, t }),
336
+ emptyText: emptyText({ I18N: constants.I18N, props, state, t, isMobileFirstMode }),
337
+ emptyFlag: emptyFlag({ props, state }),
338
+ getOptionIndexArr: getOptionIndexArr({ props, state, api: api2 }),
339
+ queryVisibleOptions: queryVisibleOptions({ props, vm, isMobileFirstMode }),
340
+ recycleScrollerHeight: recycleScrollerHeight({ state, props, recycle: constants.RECYCLE }),
353
341
  watchPropsOption: watchPropsOption({ constants, parent, props, state }),
354
342
  buildSelectConfig: buildSelectConfig({ props, state }),
355
343
  buildRadioConfig: buildRadioConfig({ props, state }),
@@ -358,13 +346,12 @@ const initApi = ({
358
346
  onCopying: onCopying({ state, vm }),
359
347
  gridOnQueryChange: gridOnQueryChange({ props, vm, constants, state }),
360
348
  watchHoverIndex: watchHoverIndex({ state }),
361
- computeOptimizeOpts: computeOptimizeOpts({ props, state }),
362
- getScrollListener: getScrollListener({ props, vm, state }),
349
+ computeOptimizeOpts: computeOptimizeOpts({ props, designConfig }),
363
350
  computeCollapseTags: computeCollapseTags(props),
364
351
  computeMultipleLimit: computeMultipleLimit({ props, state }),
365
352
  watchInputHover: watchInputHover({ vm }),
366
353
  initQuery: initQuery({ props, state, constants, vm }),
367
- updateModelValue: updateModelValue({ emit, state }),
354
+ updateModelValue: updateModelValue({ props, emit, state }),
368
355
  computedTagsStyle: computedTagsStyle({ props, parent, state }),
369
356
  computedReadonly: computedReadonly({ props, state }),
370
357
  computedShowClose: computedShowClose({ props, state }),
@@ -376,49 +363,84 @@ const initApi = ({
376
363
  computedSelectDisabled: computedSelectDisabled({ props, parent }),
377
364
  computedIsExpandAll: computedIsExpandAll(props),
378
365
  watchInitValue: watchInitValue({ props, emit }),
379
- watchShowClose: watchShowClose({ nextTick, state, parent })
366
+ watchShowClose: watchShowClose({ nextTick, state, parent }),
367
+ // tiny 新增
368
+ computedGetIcon: computedGetIcon({ designConfig, props }),
369
+ computedGetTagType: computedGetTagType({ designConfig, props }),
370
+ clearSearchText: clearSearchText({ state, api: api2 }),
371
+ clearNoMatchValue: clearNoMatchValue({ props, emit })
380
372
  });
381
- addApi({ api: api2, props, state, emit, constants, parent, nextTick, dispatch, vm, designConfig });
373
+ addApi({ api: api2, props, state, emit, constants, parent, nextTick, dispatch, vm, isMobileFirstMode, designConfig });
382
374
  };
383
- const addWatch = ({ watch, props, api: api2, state, nextTick }) => {
384
- watch(() => [...state.options], api2.watchOptions);
385
- if (props.renderType === "grid") {
386
- watch(() => state.gridData, api2.setSelected, { immediate: true });
387
- }
388
- if (props.renderType === "tree") {
389
- watch(() => state.treeData, api2.setSelected, { immediate: true });
390
- }
391
- watch(() => state.hoverIndex, api2.watchHoverIndex);
392
- if (props.options) {
393
- watch(() => props.options, api2.watchPropsOption, { immediate: true, deep: true });
394
- }
395
- watch(() => state.optimizeOpts, api2.watchOptimizeOpts);
396
- watch([() => state.inputHovering, () => state.visible], api2.watchInputHover);
397
- watch(() => state.showClose, api2.watchShowClose, { immediate: true });
398
- watch(
399
- () => state.selectHover,
400
- () => props.hoverExpand && !props.disabled && !state.isDisplayOnly && nextTick(api2.resetInputHeight)
401
- );
375
+ const addApi = ({
376
+ api: api2,
377
+ props,
378
+ state,
379
+ emit,
380
+ constants,
381
+ parent,
382
+ nextTick,
383
+ dispatch,
384
+ vm,
385
+ isMobileFirstMode,
386
+ designConfig
387
+ }) => {
388
+ Object.assign(api2, {
389
+ resetInputHeight: resetInputHeight({ api: api2, constants, nextTick, props, vm, state, designConfig }),
390
+ calcOverFlow: calcOverFlow({ vm, props, state }),
391
+ handleFocus: handleFocus({ api: api2, emit, props, state }),
392
+ deleteTag: deleteTag({ api: api2, constants, emit, props, vm, nextTick, state }),
393
+ watchValue: watchValue({ api: api2, constants, dispatch, props, vm, state }),
394
+ toHide: toHide({ constants, state, props, vm, api: api2 }),
395
+ toVisible: toVisible({ constants, state, props, vm, api: api2, nextTick }),
396
+ setSelected: setSelected({ api: api2, constants, nextTick, props, vm, state }),
397
+ selectOption: selectOption({ api: api2, state, props }),
398
+ handleResize: handleResize({ api: api2, props, state }),
399
+ watchOptions: watchOptions({ api: api2, constants, nextTick, parent, props, state, vm }),
400
+ watchVisible: watchVisible({ api: api2, constants, emit, state, vm, props, isMobileFirstMode }),
401
+ deletePrevTag: deletePrevTag({ api: api2, constants, props, state, vm }),
402
+ onInputChange: onInputChange({ api: api2, props, state, constants, nextTick }),
403
+ deleteSelected: deleteSelected({ api: api2, constants, emit, props, vm, state }),
404
+ handleMenuEnter: handleMenuEnter({ api: api2, nextTick, state, props }),
405
+ resetInputState: resetInputState({ api: api2, vm, state }),
406
+ navigateOptions: navigateOptions({ api: api2, state, props, nextTick }),
407
+ handleClearClick: handleClearClick(api2),
408
+ handleComposition: handleComposition({ api: api2, nextTick, state }),
409
+ handleQueryChange: handleQueryChange({ api: api2, constants, nextTick, props, vm, state }),
410
+ handleOptionSelect: handleOptionSelect({ api: api2, nextTick, props, vm, state }),
411
+ getPluginOption: getPluginOption({ api: api2, props, state }),
412
+ toggleCheckAll: toggleCheckAll({ api: api2, emit, state, props }),
413
+ debouncedQueryChange: debounce(state.debounce, (event) => {
414
+ api2.handleQueryChange(props.shape ? event : event.target.value, false, true);
415
+ }),
416
+ debouncedOnInputChange: debounce(state.debounce, () => {
417
+ api2.onInputChange();
418
+ }),
419
+ debouncRquest: debouncRquest({ api: api2, state, props }),
420
+ defaultOnQueryChange: defaultOnQueryChange({ props, state, constants, api: api2, nextTick, vm }),
421
+ queryChange: queryChange({ props, state, constants, api: api2, nextTick, vm }),
422
+ mounted: mounted({ api: api2, parent, state, props, vm, designConfig }),
423
+ unMount: unMount({ api: api2, parent, vm, state }),
424
+ watchOptimizeOpts: watchOptimizeOpts({ props, state }),
425
+ handleDropdownClick: handleDropdownClick({ emit }),
426
+ handleEnterTag: handleEnterTag({ state }),
427
+ calcCollapseTags: calcCollapseTags({ state, vm }),
428
+ initValue: initValue({ state }),
429
+ getLabelSlotValue: getLabelSlotValue({ props, state }),
430
+ loadTreeData: loadTreeData({ state, vm, props, api: api2 })
431
+ });
402
432
  };
403
433
  const initWatch = ({ watch, props, api: api2, state, nextTick }) => {
404
- if (props.renderType === "tree" && props.treeOp.data) {
405
- watch(
406
- () => props.treeOp.data,
407
- (data) => {
408
- data && (state.treeData = data);
409
- },
410
- { immediate: true, deep: true }
411
- );
412
- }
413
- if (props.renderType === "grid" && props.gridOp.data) {
414
- watch(
415
- () => props.gridOp.data,
416
- (data) => {
417
- data && (state.gridData = data);
418
- },
419
- { immediate: true, deep: true }
420
- );
421
- }
434
+ watch(
435
+ () => props.treeOp.data,
436
+ (data) => data && (state.treeData = data),
437
+ { immediate: true, deep: true }
438
+ );
439
+ watch(
440
+ () => props.gridOp.data,
441
+ (data) => data && (state.gridData = data),
442
+ { immediate: true, deep: true }
443
+ );
422
444
  watch(
423
445
  () => state.selectDisabled,
424
446
  () => nextTick(api2.resetInputHeight)
@@ -429,23 +451,94 @@ const initWatch = ({ watch, props, api: api2, state, nextTick }) => {
429
451
  state.cachedPlaceHolder = state.currentPlaceholder = value;
430
452
  }
431
453
  );
432
- watch(() => props.modelValue, api2.watchValue);
454
+ watch(
455
+ () => props.modelValue,
456
+ () => {
457
+ if (props.multiple && Array.isArray(props.modelValue)) {
458
+ state.modelValue = [...props.modelValue];
459
+ } else {
460
+ state.modelValue = props.modelValue;
461
+ }
462
+ },
463
+ { immediate: true, deep: true }
464
+ );
465
+ watch(() => state.modelValue, api2.watchValue);
466
+ watch(
467
+ () => state.selectedLabel,
468
+ () => {
469
+ if (props.trim) {
470
+ state.selectedLabel = state.selectedLabel.trim();
471
+ }
472
+ }
473
+ );
433
474
  watch(
434
475
  () => props.extraQueryParams,
435
476
  () => api2.handleQueryChange(state.previousQuery, true),
436
477
  { deep: true }
437
478
  );
479
+ watch(
480
+ () => state.breakpoint,
481
+ (val) => {
482
+ if (val === "default") {
483
+ state.device = "mb";
484
+ } else {
485
+ state.device = "pc";
486
+ }
487
+ },
488
+ { immediate: true, deep: true }
489
+ );
490
+ watch(
491
+ () => state.device,
492
+ (newVal, oldVal) => {
493
+ if (oldVal !== "" && state.visible) {
494
+ api2.updateModelValue(state.modelValue, true);
495
+ }
496
+ }
497
+ );
438
498
  watch(() => state.visible, api2.watchVisible);
439
499
  watch(() => state.initValue, api2.watchInitValue, { deep: true });
440
500
  addWatch({ watch, props, api: api2, state, nextTick });
441
501
  };
442
- const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, watch, provide }, { vm, parent, emit, constants, nextTick, dispatch, t, emitter, designConfig }) => {
502
+ const addWatch = ({ watch, props, api: api2, state, nextTick }) => {
503
+ watch(() => [...state.options], api2.watchOptions);
504
+ if (props.renderType === "grid" && !props.optimization) {
505
+ watch(() => state.gridData, api2.setSelected, { immediate: true });
506
+ }
507
+ if (props.renderType === "tree" && !props.optimization) {
508
+ watch(() => state.treeData, api2.setSelected, { immediate: true });
509
+ }
510
+ watch(() => state.hoverIndex, api2.watchHoverIndex);
511
+ props.options && watch(() => props.options, api2.watchPropsOption, { immediate: true, deep: true });
512
+ props.optimization && watch(() => state.optimizeOpts, api2.watchOptimizeOpts, { immediate: true });
513
+ watch([() => state.inputHovering, () => state.visible], api2.watchInputHover);
514
+ watch(() => state.showClose, api2.watchShowClose, { immediate: true });
515
+ watch(
516
+ () => state.selectHover,
517
+ () => props.hoverExpand && !props.disabled && !state.isDisplayOnly && nextTick(api2.resetInputHeight)
518
+ );
519
+ };
520
+ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, watch, provide, inject }, { vm, parent, emit, constants, nextTick, dispatch, t, emitter, isMobileFirstMode, useBreakpoint, designConfig }) => {
443
521
  const api2 = {};
444
- const state = initState({ reactive, computed, props, api: api2, emitter, parent, constants, designConfig });
522
+ const state = initState({ reactive, computed, props, api: api2, emitter, parent, constants, useBreakpoint, vm });
523
+ const dialog = inject("dialog", null);
445
524
  provide("selectEmitter", state.selectEmitter);
446
525
  provide("selectVm", vm);
447
526
  const maskState = reactive({ width: "", height: "", top: "" });
448
- initApi({ api: api2, props, state, emit, maskState, constants, parent, nextTick, dispatch, t, vm, designConfig });
527
+ initApi({
528
+ api: api2,
529
+ props,
530
+ state,
531
+ emit,
532
+ maskState,
533
+ constants,
534
+ parent,
535
+ nextTick,
536
+ dispatch,
537
+ t,
538
+ vm,
539
+ isMobileFirstMode,
540
+ designConfig
541
+ });
449
542
  initWatch({ watch, props, api: api2, state, nextTick });
450
543
  onMounted(api2.mounted);
451
544
  onBeforeUnmount(api2.unMount);
@@ -458,6 +551,7 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, wat
458
551
  if (!props.multiple && Array.isArray(props.modelValue)) {
459
552
  emit("update:modelValue", "");
460
553
  }
554
+ dialog && dialog.state.emitter.on("handleSelectClose", api2.handleClose);
461
555
  state.selectEmitter.on(constants.EVENT_NAME.handleOptionClick, api2.handleOptionSelect);
462
556
  state.selectEmitter.on(constants.EVENT_NAME.setSelected, api2.setSelected);
463
557
  state.selectEmitter.on(constants.EVENT_NAME.initValue, api2.initValue);
@@ -1,18 +1,76 @@
1
1
  import "../chunk-G2ADBYYC.js";
2
2
  const mounted = ({ selectEmitter, constants, state, selectVm, updatePopper, destroyPopper, parent }) => () => {
3
- selectEmitter.on(constants.EVENT_NAME.updatePopper, () => {
3
+ selectEmitter.on(constants.EVENT_NAME.updatePopper, (keepZIndex) => {
4
4
  let hideDrop = false;
5
5
  if (!state.referenceElm || state.referenceElm.nodeType !== 1) {
6
6
  state.referenceElm = selectVm.$refs.reference ? selectVm.$refs.reference.$el : selectVm.$refs.select;
7
7
  selectVm.popperElm = selectVm.state.popperElm = state.popperElm = parent.$el;
8
8
  }
9
9
  if (parent.select.state.visible && !hideDrop) {
10
- updatePopper();
10
+ updatePopper(keepZIndex);
11
11
  hideDrop = true;
12
12
  }
13
13
  });
14
14
  selectEmitter.on(constants.EVENT_NAME.destroyPopper, destroyPopper);
15
15
  };
16
+ const closeModal = ({ selectVm, state, props }) => ($event, isMask) => {
17
+ if (!props.closeByMask && isMask)
18
+ return;
19
+ selectVm.multiple && selectVm.updateModelValue(state.originValue);
20
+ selectVm.state.visible = false;
21
+ selectVm.state.softFocus = false;
22
+ };
23
+ const handleQueryChange = ({ selectVm }) => (value) => {
24
+ selectVm.handleQueryChange(value);
25
+ };
26
+ const toggleSelectedBox = ({ state }) => (show) => {
27
+ if (show) {
28
+ state.selectedArr = state.selected.slice(0);
29
+ state.deletedArr = [];
30
+ }
31
+ state.showSelectedBox = show;
32
+ };
33
+ const deleteSelected = ({ state }) => (option, clear) => {
34
+ if (clear) {
35
+ state.deletedArr = state.selectedArr.slice(0);
36
+ state.selectedArr = [];
37
+ } else {
38
+ state.selectedArr = state.selectedArr.filter((item) => item[state.valueField] !== option[state.valueField]);
39
+ state.deletedArr.push(option);
40
+ }
41
+ };
42
+ const selectedBoxConfirm = ({ state, selectVm }) => () => {
43
+ if (state.deletedArr.length) {
44
+ if (state.deletedArr.length === state.selected.length) {
45
+ selectVm.updateModelValue([]);
46
+ } else {
47
+ selectVm.updateModelValue(state.selectedArr.map((item) => item[state.valueField]));
48
+ }
49
+ }
50
+ state.showSelectedBox = false;
51
+ };
52
+ const selectDropdownConfirm = ({ selectVm }) => () => {
53
+ selectVm.multiple && selectVm.updateModelValue(selectVm.state.modelValue, true);
54
+ selectVm.state.visible = false;
55
+ selectVm.state.softFocus = false;
56
+ selectVm.$emit("confirm", selectVm.state.modelValue);
57
+ selectVm.emitChange(selectVm.state.modelValue, true);
58
+ };
59
+ const cancelSearch = ({ api, state }) => () => {
60
+ state.query = "";
61
+ api.debouncedQueryChange("");
62
+ };
63
+ const handleClear = ({ selectVm }) => () => {
64
+ selectVm.deleteSelected();
65
+ };
16
66
  export {
17
- mounted
67
+ cancelSearch,
68
+ closeModal,
69
+ deleteSelected,
70
+ handleClear,
71
+ handleQueryChange,
72
+ mounted,
73
+ selectDropdownConfirm,
74
+ selectedBoxConfirm,
75
+ toggleSelectedBox
18
76
  };