@opentiny/vue-renderless 3.13.1 → 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 +457 -389
  186. package/select/vue.js +257 -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 +31 -5
  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 +37 -0
  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
@@ -22,7 +22,9 @@ import {
22
22
  scrollToOption,
23
23
  handleMenuEnter,
24
24
  emitChange,
25
+ directEmitChange,
25
26
  getOption,
27
+ getSelectedOption,
26
28
  setSelected,
27
29
  handleFocus,
28
30
  focus,
@@ -37,6 +39,7 @@ import {
37
39
  resetInputState,
38
40
  resetInputHeight,
39
41
  resetHoverIndex,
42
+ resetDatas,
40
43
  handleOptionSelect,
41
44
  setSoftFocus,
42
45
  getValueIndex,
@@ -49,8 +52,11 @@ import {
49
52
  resetInputWidth,
50
53
  handleResize,
51
54
  checkDefaultFirstOption,
55
+ setOptionHighlight,
52
56
  getValueKey,
53
57
  emptyText,
58
+ emptyFlag,
59
+ recycleScrollerHeight,
54
60
  watchValue,
55
61
  watchVisible,
56
62
  watchOptions,
@@ -64,6 +70,7 @@ import {
64
70
  onCopying,
65
71
  gridOnQueryChange,
66
72
  defaultOnQueryChange,
73
+ queryChange,
67
74
  toVisible,
68
75
  toHide,
69
76
  mounted,
@@ -71,7 +78,6 @@ import {
71
78
  watchHoverIndex,
72
79
  computeOptimizeOpts,
73
80
  watchOptimizeOpts,
74
- getScrollListener,
75
81
  computeCollapseTags,
76
82
  computeMultipleLimit,
77
83
  handleDropdownClick,
@@ -95,13 +101,12 @@ import {
95
101
  watchInitValue,
96
102
  watchShowClose,
97
103
  loadTreeData,
98
- resetFilter,
104
+ getOptionIndexArr,
105
+ queryVisibleOptions,
99
106
  computedGetIcon,
100
107
  computedGetTagType,
101
- computedShowDropdownIcon,
102
- clearNoMatchValue,
103
- debouncedQueryChange,
104
- handleDebouncedQueryChange
108
+ clearSearchText,
109
+ clearNoMatchValue
105
110
  } from "./index";
106
111
  import debounce from "../common/deps/debounce";
107
112
  import { isNumber } from "../common/type";
@@ -131,6 +136,7 @@ const api = [
131
136
  "resetInputHeight",
132
137
  "managePlaceholder",
133
138
  "checkDefaultFirstOption",
139
+ "setOptionHighlight",
134
140
  "toggleLastOptionHitState",
135
141
  "deleteTag",
136
142
  "setSelected",
@@ -161,64 +167,17 @@ const api = [
161
167
  "handleEnterTag",
162
168
  "getLabelSlotValue",
163
169
  "loadTreeData",
164
- "resetFilter",
165
- "computedGetIcon"
170
+ "updateModelValue",
171
+ "clearSearchText"
166
172
  ];
167
- const initStateAdd = ({ computed, props, api: api2, parent }) => ({
168
- selectedTags: [],
169
- tips: "",
170
- showTip: false,
171
- tipHover: false,
172
- selectHover: false,
173
- tipTimer: null,
174
- selectCls: "checked-sur",
175
- overflow: null,
176
- completed: false,
177
- inputWidth: 0,
178
- inputPaddingRight: 0,
179
- hoverIndex: -1,
180
- hoverOption: -1,
181
- inputLength: 20,
182
- optionsCount: 0,
183
- selectFiexd: {},
184
- createdLabel: null,
185
- isSilentBlur: false,
186
- cachedOptions: [],
187
- selectedLabel: "",
188
- previousQuery: null,
189
- inputHovering: false,
190
- createdSelected: false,
191
- isOnComposition: false,
192
- cachedPlaceHolder: props.placeholder,
193
- inputHeight: 0,
194
- initialInputHeight: 28,
195
- currentPlaceholder: props.placeholder,
196
- filteredOptionsCount: 0,
197
- gridData: [],
198
- treeData: [],
199
- remoteData: [],
200
- currentKey: props.modelValue,
201
- updateId: "",
202
- popperElm: null,
203
- debounce: computed(() => isNumber(props.queryDebounce) ? props.queryDebounce : props.remote ? 300 : 0),
204
- emptyText: computed(() => api2.emptyText()),
205
- formItemSize: computed(() => (parent.formItem || {}).formItemSize),
206
- selectDisabled: computed(() => api2.computedSelectDisabled()),
207
- isDisplayOnly: computed(() => props.displayOnly || (parent.form || {}).displayOnly),
208
- gridCheckedData: computed(() => api2.getcheckedData()),
209
- isExpandAll: computed(() => api2.computedIsExpandAll()),
210
- searchSingleCopy: computed(() => props.allowCopy && !props.multiple && props.filterable),
211
- tooltipContent: {},
212
- isHidden: false,
213
- defaultCheckedKeys: [],
214
- filterOrSearch: computed(() => props.filterable || props.searchable)
215
- });
216
- const initState = ({ reactive, computed, props, api: api2, emitter, parent, constants, designConfig }) => {
173
+ const initState = ({ reactive, computed, props, api: api2, emitter, parent, constants, useBreakpoint, vm }) => {
217
174
  const stateAdd = initStateAdd({ computed, props, api: api2, parent });
218
175
  const state = reactive(__spreadProps(__spreadValues({}, stateAdd), {
219
176
  selectEmitter: emitter(),
220
177
  datas: [],
178
+ initDatas: [],
221
179
  query: "",
180
+ magicKey: 0,
222
181
  options: [],
223
182
  visible: false,
224
183
  showCopy: computed(() => api2.computedShowCopy()),
@@ -227,6 +186,7 @@ const initState = ({ reactive, computed, props, api: api2, emitter, parent, cons
227
186
  selected: props.multiple ? [] : {},
228
187
  softFocus: false,
229
188
  hover: false,
189
+ triggerSearch: false,
230
190
  firstAutoSearch: props.remoteConfig.autoSearch,
231
191
  tagsStyle: computed(() => api2.computedTagsStyle()),
232
192
  readonly: computed(() => api2.computedReadonly()),
@@ -237,69 +197,90 @@ const initState = ({ reactive, computed, props, api: api2, emitter, parent, cons
237
197
  showNewOption: computed(() => api2.computedShowNewOption()),
238
198
  selectSize: computed(() => props.size || state.formItemSize),
239
199
  optimizeOpts: computed(() => api2.computeOptimizeOpts()),
240
- optimizeStore: { flag: false, valueIndex: 0, startIndex: 0, viewStyle: "", datas: [] },
200
+ optimizeStore: { valueIndex: 0, recycleScrollerHeight: computed(() => api2.recycleScrollerHeight()) },
241
201
  collapseTags: computed(() => api2.computeCollapseTags()),
242
202
  multipleLimit: computed(() => api2.computeMultipleLimit()),
243
203
  disabledTooltipContent: computed(() => api2.computedDisabledTooltipContent()),
204
+ isExpand: computed(() => (state.selectHover || state.visible) && props.hoverExpand && !props.disabled),
244
205
  collapseTagsLength: 0,
245
206
  initValue: [],
246
207
  key: 0,
247
- isSelectAll: computed(() => state.selectCls === "checked-sur"),
248
- isHalfSelect: computed(() => state.selectCls === "halfselect"),
249
- getIcon: computed(() => api2.computedGetIcon(name = "dropdownIcon")),
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 新增
225
+ getIcon: computed(() => api2.computedGetIcon()),
250
226
  getTagType: computed(() => api2.computedGetTagType()),
251
- isShowDropdownIcon: computed(() => api2.computedShowDropdownIcon())
227
+ isSelectAll: computed(() => state.selectCls === "checked-sur")
252
228
  }));
253
229
  return state;
254
230
  };
255
- const addApi = ({ api: api2, props, state, emit, constants, parent, nextTick, dispatch, vm, designConfig }) => {
256
- Object.assign(api2, {
257
- resetInputHeight: resetInputHeight({ api: api2, constants, nextTick, props, vm, state, designConfig }),
258
- calcOverFlow: calcOverFlow({ vm, props, state }),
259
- handleFocus: handleFocus({ api: api2, emit, props, state }),
260
- deleteTag: deleteTag({ api: api2, constants, emit, props, vm, nextTick, state }),
261
- watchValue: watchValue({ api: api2, constants, dispatch, props, vm, state }),
262
- toHide: toHide({ constants, state, props, vm, api: api2, nextTick }),
263
- toVisible: toVisible({ constants, state, props, vm, api: api2, nextTick }),
264
- setSelected: setSelected({ api: api2, constants, nextTick, props, vm, state }),
265
- selectOption: selectOption({ api: api2, state, props }),
266
- handleResize: handleResize({ api: api2, props, state }),
267
- watchOptions: watchOptions({ api: api2, constants, nextTick, parent, props, state }),
268
- watchVisible: watchVisible({ api: api2, constants, emit, state, vm, props }),
269
- deletePrevTag: deletePrevTag({ api: api2, constants, props, state, vm }),
270
- onInputChange: onInputChange({ api: api2, props, state, constants, nextTick }),
271
- deleteSelected: deleteSelected({ api: api2, constants, emit, props, vm, state }),
272
- handleMenuEnter: handleMenuEnter({ api: api2, nextTick, state }),
273
- resetInputState: resetInputState({ api: api2, vm, state }),
274
- navigateOptions: navigateOptions({ api: api2, nextTick, state }),
275
- handleClearClick: handleClearClick(api2),
276
- handleComposition: handleComposition({ api: api2, nextTick, state }),
277
- handleQueryChange: handleQueryChange({ api: api2, constants, nextTick, props, vm, state }),
278
- handleOptionSelect: handleOptionSelect({ api: api2, nextTick, props, vm, state }),
279
- getPluginOption: getPluginOption({ api: api2, props, state }),
280
- toggleCheckAll: toggleCheckAll({ api: api2, emit, state, props }),
281
- handleDebouncedQueryChange: handleDebouncedQueryChange({ state, api: api2 }),
282
- debouncedQueryChange: debouncedQueryChange({ props, api: api2 }),
283
- debouncedOnInputChange: debounce(state.debounce, () => {
284
- api2.onInputChange();
285
- }),
286
- debouncRquest: debouncRquest({ api: api2, state, props }),
287
- defaultOnQueryChange: defaultOnQueryChange({ props, state, constants, api: api2 }),
288
- mounted: mounted({ api: api2, parent, state, props, vm, constants }),
289
- unMount: unMount({ api: api2, parent, vm, state }),
290
- watchOptimizeOpts: watchOptimizeOpts({ api: api2, props, vm, state }),
291
- handleDropdownClick: handleDropdownClick({ emit }),
292
- handleEnterTag: handleEnterTag({ state }),
293
- calcCollapseTags: calcCollapseTags({ state, vm }),
294
- initValue: initValue({ state }),
295
- getLabelSlotValue: getLabelSlotValue({ props, state }),
296
- loadTreeData: loadTreeData({ state, vm, props, api: api2 }),
297
- resetFilter: resetFilter({ state, api: api2 }),
298
- computedGetIcon: computedGetIcon({ constants, designConfig, props }),
299
- computedGetTagType: computedGetTagType({ designConfig, props }),
300
- computedShowDropdownIcon: computedShowDropdownIcon({ props, state }),
301
- clearNoMatchValue: clearNoMatchValue({ props, emit })
302
- });
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
+ };
303
284
  };
304
285
  const initApi = ({
305
286
  api: api2,
@@ -313,6 +294,7 @@ const initApi = ({
313
294
  dispatch,
314
295
  t,
315
296
  vm,
297
+ isMobileFirstMode,
316
298
  designConfig
317
299
  }) => {
318
300
  Object.assign(api2, {
@@ -326,28 +308,36 @@ const initApi = ({
326
308
  handleClose: handleClose(state),
327
309
  getValueIndex: getValueIndex(props),
328
310
  getChildValue: getChildValue(),
329
- getOption: getOption({ props, state }),
311
+ getOption: getOption({ props, state, api: api2 }),
312
+ getSelectedOption: getSelectedOption({ props, state }),
330
313
  emitChange: emitChange({ emit, props, state, constants }),
331
- toggleMenu: toggleMenu({ vm, state, props }),
314
+ directEmitChange: directEmitChange({ emit, props, state, constants }),
315
+ toggleMenu: toggleMenu({ vm, state, props, api: api2, isMobileFirstMode }),
332
316
  showTip: showTip({ props, state, vm }),
333
317
  onOptionDestroy: onOptionDestroy(state),
334
318
  setSoftFocus: setSoftFocus({ vm, state }),
335
319
  getcheckedData: getcheckedData({ props, state }),
336
320
  resetInputWidth: resetInputWidth({ vm, state }),
337
321
  resetHoverIndex: resetHoverIndex({ props, state }),
322
+ resetDatas: resetDatas({ props, state }),
338
323
  scrollToOption: scrollToOption({ vm, constants }),
339
324
  selectChange: selectChange({ emit, props, vm, state, api: api2 }),
340
- radioChange: radioChange({ emit, props, state, api: api2 }),
325
+ radioChange: radioChange({ emit, props, state, api: api2, vm }),
341
326
  handleCopyClick: handleCopyClick({ parent, props, state }),
342
327
  treeNodeClick: treeNodeClick({ emit, props, state, api: api2, vm }),
343
328
  managePlaceholder: managePlaceholder({ vm, state }),
344
329
  nodeCheckClick: nodeCheckClick({ emit, props, state, api: api2 }),
345
330
  checkDefaultFirstOption: checkDefaultFirstOption(state),
331
+ setOptionHighlight: setOptionHighlight(state),
346
332
  nodeExpand: nodeExpand({ state, constants, nextTick }),
347
333
  nodeCollapse: nodeCollapse({ state, constants, nextTick }),
348
334
  handleBlur: handleBlur({ constants, dispatch, emit, state }),
349
335
  toggleLastOptionHitState: toggleLastOptionHitState({ state }),
350
- 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 }),
351
341
  watchPropsOption: watchPropsOption({ constants, parent, props, state }),
352
342
  buildSelectConfig: buildSelectConfig({ props, state }),
353
343
  buildRadioConfig: buildRadioConfig({ props, state }),
@@ -356,13 +346,12 @@ const initApi = ({
356
346
  onCopying: onCopying({ state, vm }),
357
347
  gridOnQueryChange: gridOnQueryChange({ props, vm, constants, state }),
358
348
  watchHoverIndex: watchHoverIndex({ state }),
359
- computeOptimizeOpts: computeOptimizeOpts({ props, state }),
360
- getScrollListener: getScrollListener({ props, vm, state }),
349
+ computeOptimizeOpts: computeOptimizeOpts({ props, designConfig }),
361
350
  computeCollapseTags: computeCollapseTags(props),
362
351
  computeMultipleLimit: computeMultipleLimit({ props, state }),
363
352
  watchInputHover: watchInputHover({ vm }),
364
353
  initQuery: initQuery({ props, state, constants, vm }),
365
- updateModelValue: updateModelValue({ emit, state }),
354
+ updateModelValue: updateModelValue({ props, emit, state }),
366
355
  computedTagsStyle: computedTagsStyle({ props, parent, state }),
367
356
  computedReadonly: computedReadonly({ props, state }),
368
357
  computedShowClose: computedShowClose({ props, state }),
@@ -374,49 +363,84 @@ const initApi = ({
374
363
  computedSelectDisabled: computedSelectDisabled({ props, parent }),
375
364
  computedIsExpandAll: computedIsExpandAll(props),
376
365
  watchInitValue: watchInitValue({ props, emit }),
377
- 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 })
378
372
  });
379
- 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 });
380
374
  };
381
- const addWatch = ({ watch, props, api: api2, state, nextTick }) => {
382
- watch(() => [...state.options], api2.watchOptions);
383
- if (props.renderType === "grid") {
384
- watch(() => state.gridData, api2.setSelected, { immediate: true });
385
- }
386
- if (props.renderType === "tree") {
387
- watch(() => state.treeData, api2.setSelected, { immediate: true });
388
- }
389
- watch(() => state.hoverIndex, api2.watchHoverIndex);
390
- if (props.options) {
391
- watch(() => props.options, api2.watchPropsOption, { immediate: true, deep: true });
392
- }
393
- watch(() => state.optimizeOpts, api2.watchOptimizeOpts);
394
- watch([() => state.inputHovering, () => state.visible], api2.watchInputHover);
395
- watch(() => state.showClose, api2.watchShowClose, { immediate: true });
396
- watch(
397
- () => state.selectHover,
398
- () => props.hoverExpand && !props.disabled && !state.isDisplayOnly && nextTick(api2.resetInputHeight)
399
- );
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
+ });
400
432
  };
401
433
  const initWatch = ({ watch, props, api: api2, state, nextTick }) => {
402
- if (props.renderType === "tree" && props.treeOp.data) {
403
- watch(
404
- () => props.treeOp.data,
405
- (data) => {
406
- data && (state.treeData = data);
407
- },
408
- { immediate: true, deep: true }
409
- );
410
- }
411
- if (props.renderType === "grid" && props.gridOp.data) {
412
- watch(
413
- () => props.gridOp.data,
414
- (data) => {
415
- data && (state.gridData = data);
416
- },
417
- { immediate: true, deep: true }
418
- );
419
- }
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
+ );
420
444
  watch(
421
445
  () => state.selectDisabled,
422
446
  () => nextTick(api2.resetInputHeight)
@@ -427,23 +451,94 @@ const initWatch = ({ watch, props, api: api2, state, nextTick }) => {
427
451
  state.cachedPlaceHolder = state.currentPlaceholder = value;
428
452
  }
429
453
  );
430
- 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
+ );
431
474
  watch(
432
475
  () => props.extraQueryParams,
433
476
  () => api2.handleQueryChange(state.previousQuery, true),
434
477
  { deep: true }
435
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
+ );
436
498
  watch(() => state.visible, api2.watchVisible);
437
499
  watch(() => state.initValue, api2.watchInitValue, { deep: true });
438
500
  addWatch({ watch, props, api: api2, state, nextTick });
439
501
  };
440
- 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 }) => {
441
521
  const api2 = {};
442
- 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);
443
524
  provide("selectEmitter", state.selectEmitter);
444
525
  provide("selectVm", vm);
445
526
  const maskState = reactive({ width: "", height: "", top: "" });
446
- 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
+ });
447
542
  initWatch({ watch, props, api: api2, state, nextTick });
448
543
  onMounted(api2.mounted);
449
544
  onBeforeUnmount(api2.unMount);
@@ -456,6 +551,7 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, wat
456
551
  if (!props.multiple && Array.isArray(props.modelValue)) {
457
552
  emit("update:modelValue", "");
458
553
  }
554
+ dialog && dialog.state.emitter.on("handleSelectClose", api2.handleClose);
459
555
  state.selectEmitter.on(constants.EVENT_NAME.handleOptionClick, api2.handleOptionSelect);
460
556
  state.selectEmitter.on(constants.EVENT_NAME.setSelected, api2.setSelected);
461
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
  };