vxe-pc-ui 4.20.34 → 4.20.36

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 (879) hide show
  1. package/dist/all.esm.js +45718 -45038
  2. package/dist/all.esm.min.js +3 -3
  3. package/dist/style.css +307 -1
  4. package/dist/style.mini.css +1 -1
  5. package/es/alert/src/alert.js +117 -114
  6. package/es/anchor/index.d.ts +8 -8
  7. package/es/anchor/src/anchor-link.js +110 -107
  8. package/es/anchor/src/anchor.d.ts +1 -1
  9. package/es/anchor/src/anchor.js +212 -209
  10. package/es/avatar/index.d.ts +6 -6
  11. package/es/avatar/src/avatar.d.ts +1 -1
  12. package/es/avatar/src/avatar.js +132 -129
  13. package/es/backtop/index.d.ts +42 -42
  14. package/es/backtop/src/backtop.d.ts +7 -7
  15. package/es/backtop/src/backtop.js +267 -264
  16. package/es/badge/index.d.ts +6 -6
  17. package/es/badge/src/badge.d.ts +1 -1
  18. package/es/badge/src/badge.js +102 -99
  19. package/es/breadcrumb/src/breadcrumb-item.js +104 -101
  20. package/es/breadcrumb/src/breadcrumb.js +70 -67
  21. package/es/button/index.d.ts +20 -20
  22. package/es/button/src/button-group.js +88 -85
  23. package/es/button/src/button.d.ts +3 -3
  24. package/es/calendar/index.d.ts +20 -20
  25. package/es/calendar/src/calendar.d.ts +3 -3
  26. package/es/calendar/src/calendar.js +1371 -1368
  27. package/es/card/index.d.ts +12 -12
  28. package/es/card/src/card.d.ts +2 -2
  29. package/es/card/src/card.js +235 -232
  30. package/es/carousel/index.d.ts +14 -14
  31. package/es/carousel/src/carousel-item.js +78 -75
  32. package/es/carousel/src/carousel.d.ts +2 -2
  33. package/es/carousel/src/carousel.js +392 -389
  34. package/es/cascader/index.d.ts +70 -70
  35. package/es/cascader/src/cascader.d.ts +11 -11
  36. package/es/cascader/src/cascader.js +1667 -1664
  37. package/es/checkbox/index.d.ts +14 -14
  38. package/es/checkbox/src/button.d.ts +2 -2
  39. package/es/checkbox/src/button.js +198 -195
  40. package/es/checkbox/src/checkbox.d.ts +2 -2
  41. package/es/checkbox/src/checkbox.js +181 -178
  42. package/es/checkbox/src/group.d.ts +4 -4
  43. package/es/checkbox/src/group.js +210 -207
  44. package/es/checkbox-button/index.d.ts +14 -14
  45. package/es/checkbox-group/index.d.ts +26 -26
  46. package/es/collapse/index.d.ts +14 -14
  47. package/es/collapse/src/collapse-pane.js +98 -95
  48. package/es/collapse/src/collapse.d.ts +2 -2
  49. package/es/collapse/src/collapse.js +340 -337
  50. package/es/color-picker/index.d.ts +46 -46
  51. package/es/color-picker/src/color-picker.d.ts +8 -8
  52. package/es/color-picker/src/color-picker.js +1116 -1113
  53. package/es/color-picker/src/util.d.ts +9 -1
  54. package/es/components.d.ts +1 -0
  55. package/es/components.js +3 -0
  56. package/es/context-menu/index.d.ts +16 -16
  57. package/es/context-menu/src/context-menu.d.ts +3 -3
  58. package/es/context-menu/src/context-menu.js +601 -598
  59. package/es/countdown/index.d.ts +2 -2
  60. package/es/countdown/src/countdown.d.ts +1 -1
  61. package/es/countdown/src/countdown.js +224 -221
  62. package/es/date-panel/index.d.ts +46 -46
  63. package/es/date-panel/src/date-panel.d.ts +7 -7
  64. package/es/date-panel/src/date-panel.js +1905 -1902
  65. package/es/date-picker/index.d.ts +110 -110
  66. package/es/date-picker/src/date-picker.d.ts +17 -17
  67. package/es/date-picker/src/date-picker.js +1537 -1534
  68. package/es/date-range-picker/index.d.ts +114 -114
  69. package/es/date-range-picker/src/date-range-picker.d.ts +17 -17
  70. package/es/date-range-picker/src/date-range-picker.js +1412 -1409
  71. package/es/divider/index.d.ts +6 -6
  72. package/es/divider/src/divider.d.ts +1 -1
  73. package/es/divider/src/divider.js +80 -77
  74. package/es/drawer/index.d.ts +74 -74
  75. package/es/drawer/src/drawer.d.ts +13 -13
  76. package/es/drawer/src/drawer.js +778 -775
  77. package/es/dynamics/index.d.ts +12 -12
  78. package/es/empty/src/empty.js +100 -97
  79. package/es/form/index.d.ts +36 -36
  80. package/es/form/src/form-config-item.d.ts +7 -7
  81. package/es/form/src/form-group.d.ts +7 -7
  82. package/es/form/src/form-group.js +74 -71
  83. package/es/form/src/form-item.d.ts +7 -7
  84. package/es/form/src/form-item.js +76 -73
  85. package/es/form/src/form.d.ts +6 -6
  86. package/es/form/src/form.js +789 -786
  87. package/es/form-gather/index.d.ts +42 -42
  88. package/es/form-group/index.d.ts +42 -42
  89. package/es/form-item/index.d.ts +42 -42
  90. package/es/icon/src/icon.js +59 -56
  91. package/es/icon/style.css +1 -1
  92. package/es/icon/style.mini.css +1 -1
  93. package/es/icon-picker/index.d.ts +22 -22
  94. package/es/icon-picker/src/icon-picker.d.ts +4 -4
  95. package/es/icon-picker/src/icon-picker.js +719 -716
  96. package/es/image/index.d.ts +30 -30
  97. package/es/image/src/group.d.ts +2 -2
  98. package/es/image/src/group.js +130 -127
  99. package/es/image/src/image.d.ts +5 -5
  100. package/es/image/src/image.js +243 -240
  101. package/es/image/src/preview.d.ts +3 -3
  102. package/es/image/src/preview.js +627 -624
  103. package/es/image-group/index.d.ts +8 -8
  104. package/es/image-preview/index.d.ts +16 -16
  105. package/es/index.esm.js +2 -0
  106. package/es/index.js +2 -0
  107. package/es/input/index.d.ts +160 -160
  108. package/es/input/src/input.d.ts +25 -25
  109. package/es/input/src/input.js +2700 -2697
  110. package/es/layout-aside/src/layout-aside.js +138 -135
  111. package/es/layout-body/src/layout-body.js +145 -142
  112. package/es/layout-container/src/layout-container.js +71 -68
  113. package/es/layout-footer/src/layout-footer.js +60 -57
  114. package/es/layout-header/src/layout-header.js +58 -55
  115. package/es/link/src/link.js +131 -128
  116. package/es/list/src/list.js +2174 -2171
  117. package/es/loading/index.d.ts +6 -6
  118. package/es/loading/src/loading.d.ts +1 -1
  119. package/es/loading/src/loading.js +141 -138
  120. package/es/mention/src/mention.js +49 -46
  121. package/es/menu/index.d.ts +32 -32
  122. package/es/menu/src/menu.d.ts +5 -5
  123. package/es/menu/src/menu.js +799 -796
  124. package/es/modal/index.d.ts +92 -92
  125. package/es/modal/src/modal.d.ts +16 -16
  126. package/es/modal/src/modal.js +1519 -1527
  127. package/es/notice-bar/index.d.ts +8 -8
  128. package/es/notice-bar/src/notice-bar.d.ts +2 -2
  129. package/es/notice-bar/src/notice-bar.js +168 -165
  130. package/es/number-input/index.d.ts +134 -134
  131. package/es/number-input/src/number-input.d.ts +21 -21
  132. package/es/number-input/src/number-input.js +1094 -1091
  133. package/es/optgroup/index.d.ts +6 -6
  134. package/es/option/index.d.ts +6 -6
  135. package/es/pager/index.d.ts +34 -34
  136. package/es/pager/src/pager.d.ts +6 -6
  137. package/es/pager/src/pager.js +767 -764
  138. package/es/password-input/index.d.ts +72 -72
  139. package/es/password-input/src/password-input.d.ts +11 -11
  140. package/es/password-input/src/password-input.js +431 -428
  141. package/es/print/index.d.ts +6 -6
  142. package/es/print/src/page-break.js +63 -60
  143. package/es/print/src/print.d.ts +1 -1
  144. package/es/print/src/print.js +303 -300
  145. package/es/pulldown/index.d.ts +22 -22
  146. package/es/pulldown/src/pulldown.d.ts +4 -4
  147. package/es/pulldown/src/pulldown.js +403 -400
  148. package/es/radio/index.d.ts +20 -20
  149. package/es/radio/src/button.d.ts +3 -3
  150. package/es/radio/src/button.js +214 -211
  151. package/es/radio/src/group.d.ts +4 -4
  152. package/es/radio/src/group.js +195 -192
  153. package/es/radio/src/radio.d.ts +3 -3
  154. package/es/radio/src/radio.js +194 -191
  155. package/es/radio-button/index.d.ts +20 -20
  156. package/es/radio-group/index.d.ts +26 -26
  157. package/es/rate/index.d.ts +14 -14
  158. package/es/rate/src/rate.d.ts +2 -2
  159. package/es/rate/src/rate.js +164 -161
  160. package/es/result/src/result.js +116 -113
  161. package/es/row/index.d.ts +6 -6
  162. package/es/row/src/col.js +133 -130
  163. package/es/row/src/row.d.ts +1 -1
  164. package/es/row/src/row.js +111 -108
  165. package/es/scrollbar/index.d.ts +30 -30
  166. package/es/scrollbar/src/scrollbar.d.ts +5 -5
  167. package/es/scrollbar/src/scrollbar.js +518 -515
  168. package/es/segmented/index.d.ts +14 -14
  169. package/es/segmented/src/segmented.d.ts +2 -2
  170. package/es/segmented/src/segmented.js +240 -237
  171. package/es/select/index.d.ts +66 -66
  172. package/es/select/src/optgroup.d.ts +1 -1
  173. package/es/select/src/optgroup.js +44 -41
  174. package/es/select/src/option.d.ts +1 -1
  175. package/es/select/src/option.js +39 -36
  176. package/es/select/src/select.d.ts +11 -11
  177. package/es/select/src/select.js +1914 -1896
  178. package/es/slider/index.d.ts +38 -38
  179. package/es/slider/src/slider.d.ts +6 -6
  180. package/es/slider/src/slider.js +419 -416
  181. package/es/space/index.d.ts +36 -36
  182. package/es/space/src/space.d.ts +6 -6
  183. package/es/space/src/space.js +190 -187
  184. package/es/split/index.d.ts +14 -14
  185. package/es/split-pane/index.d.ts +18 -18
  186. package/es/splitter/index.d.ts +14 -14
  187. package/es/splitter/src/splitter-panel.d.ts +3 -3
  188. package/es/splitter/src/splitter-panel.js +146 -143
  189. package/es/splitter/src/splitter.d.ts +3 -3
  190. package/es/splitter/src/splitter.js +917 -914
  191. package/es/splitter-panel/index.d.ts +18 -18
  192. package/es/step-item/index.d.ts +76 -0
  193. package/es/step-item/index.js +17 -0
  194. package/es/steps/index.d.ts +288 -34
  195. package/es/steps/src/step-info.d.ts +6 -0
  196. package/es/steps/src/step-info.js +20 -0
  197. package/es/steps/src/step-item.d.ts +14 -0
  198. package/es/steps/src/step-item.js +39 -0
  199. package/es/steps/src/steps.d.ts +68 -8
  200. package/es/steps/src/steps.js +299 -47
  201. package/es/steps/src/util.d.ts +7 -0
  202. package/es/steps/src/util.js +44 -0
  203. package/es/steps/style.css +297 -0
  204. package/es/steps/style.mini.css +1 -0
  205. package/es/style.css +307 -1
  206. package/es/style.mini.css +1 -1
  207. package/es/switch/index.d.ts +24 -24
  208. package/es/switch/src/switch.d.ts +4 -4
  209. package/es/switch/src/switch.js +228 -225
  210. package/es/table-select/index.d.ts +30 -30
  211. package/es/table-select/src/table-select.d.ts +5 -5
  212. package/es/table-select/src/table-select.js +865 -862
  213. package/es/table-transfer/src/table-transfer.js +61 -58
  214. package/es/tabs/index.d.ts +26 -26
  215. package/es/tabs/src/tab-pane.js +102 -99
  216. package/es/tabs/src/tabs.d.ts +4 -4
  217. package/es/tabs/src/tabs.js +936 -933
  218. package/es/tag/index.d.ts +16 -16
  219. package/es/tag/src/tag.d.ts +3 -3
  220. package/es/tag/src/tag.js +163 -160
  221. package/es/text/src/text.js +232 -229
  222. package/es/text-ellipsis/src/text-ellipsis.js +252 -249
  223. package/es/textarea/index.d.ts +76 -76
  224. package/es/textarea/src/textarea.d.ts +12 -12
  225. package/es/textarea/src/textarea.js +434 -431
  226. package/es/timeline/index.d.ts +6 -6
  227. package/es/timeline/src/timeline.d.ts +1 -1
  228. package/es/timeline/src/timeline.js +74 -36
  229. package/es/timeline/src/util.js +7 -4
  230. package/es/tip/index.d.ts +9 -9
  231. package/es/tip/src/tip.d.ts +1 -1
  232. package/es/tip/src/tip.js +117 -114
  233. package/es/tooltip/index.d.ts +72 -72
  234. package/es/tooltip/src/tooltip.d.ts +14 -14
  235. package/es/tooltip/src/tooltip.js +552 -549
  236. package/es/tour/src/tour.js +49 -46
  237. package/es/transfer/src/transfer.js +95 -92
  238. package/es/tree/index.d.ts +44 -44
  239. package/es/tree/src/tree.d.ts +7 -7
  240. package/es/tree/src/tree.js +3379 -3376
  241. package/es/tree-select/index.d.ts +74 -74
  242. package/es/tree-select/src/tree-select.d.ts +12 -12
  243. package/es/tree-select/src/tree-select.js +969 -966
  244. package/es/ui/index.js +8 -2
  245. package/es/ui/src/log.js +1 -1
  246. package/es/ui/src/vn.d.ts +1 -1
  247. package/es/upload/index.d.ts +128 -128
  248. package/es/upload/src/upload.d.ts +21 -21
  249. package/es/upload/src/upload.js +1791 -1788
  250. package/es/vxe-icon/style.css +1 -1
  251. package/es/vxe-icon/style.mini.css +1 -1
  252. package/es/vxe-steps/style.css +297 -0
  253. package/es/vxe-steps/style.mini.css +1 -0
  254. package/es/watermark/index.d.ts +6 -6
  255. package/es/watermark/src/watermark.d.ts +1 -1
  256. package/es/watermark/src/watermark.js +158 -155
  257. package/lib/alert/index.d.ts +170 -0
  258. package/lib/alert/src/alert.d.ts +35 -0
  259. package/lib/alert/src/alert.js +117 -114
  260. package/lib/anchor/index.d.ts +140 -0
  261. package/lib/anchor/src/anchor-link.d.ts +12 -0
  262. package/lib/anchor/src/anchor-link.js +110 -107
  263. package/lib/anchor/src/anchor.d.ts +26 -0
  264. package/lib/anchor/src/anchor.js +212 -209
  265. package/lib/anchor/src/util.d.ts +3 -0
  266. package/lib/anchor-link/index.d.ts +64 -0
  267. package/lib/avatar/index.d.ts +216 -0
  268. package/lib/avatar/src/avatar.d.ts +48 -0
  269. package/lib/avatar/src/avatar.js +132 -129
  270. package/lib/backtop/index.d.ts +640 -0
  271. package/lib/backtop/src/backtop.d.ts +146 -0
  272. package/lib/backtop/src/backtop.js +267 -264
  273. package/lib/badge/index.d.ts +154 -0
  274. package/lib/badge/src/badge.d.ts +33 -0
  275. package/lib/badge/src/badge.js +102 -99
  276. package/lib/breadcrumb/index.d.ts +108 -0
  277. package/lib/breadcrumb/src/breadcrumb-item.d.ts +10 -0
  278. package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
  279. package/lib/breadcrumb/src/breadcrumb.d.ts +20 -0
  280. package/lib/breadcrumb/src/breadcrumb.js +70 -67
  281. package/lib/breadcrumb-item/index.d.ts +56 -0
  282. package/lib/button/index.d.ts +592 -0
  283. package/lib/button/src/button-group.d.ts +39 -0
  284. package/lib/button/src/button-group.js +88 -85
  285. package/lib/button/src/button.d.ts +235 -0
  286. package/lib/button-group/index.d.ts +188 -0
  287. package/lib/calendar/index.d.ts +442 -0
  288. package/lib/calendar/src/calendar.d.ts +93 -0
  289. package/lib/calendar/src/calendar.js +1371 -1368
  290. package/lib/card/index.d.ts +314 -0
  291. package/lib/card/src/card.d.ts +71 -0
  292. package/lib/card/src/card.js +235 -232
  293. package/lib/carousel/index.d.ts +360 -0
  294. package/lib/carousel/src/carousel-item.d.ts +12 -0
  295. package/lib/carousel/src/carousel-item.js +78 -75
  296. package/lib/carousel/src/carousel.d.ts +79 -0
  297. package/lib/carousel/src/carousel.js +392 -389
  298. package/lib/carousel/src/util.d.ts +3 -0
  299. package/lib/carousel-item/index.d.ts +64 -0
  300. package/lib/cascader/index.d.ts +842 -0
  301. package/lib/cascader/src/cascader.d.ts +183 -0
  302. package/lib/cascader/src/cascader.js +1665 -1662
  303. package/lib/cascader/src/util.d.ts +2 -0
  304. package/lib/checkbox/index.d.ts +292 -0
  305. package/lib/checkbox/src/button.d.ts +73 -0
  306. package/lib/checkbox/src/button.js +198 -195
  307. package/lib/checkbox/src/checkbox.d.ts +71 -0
  308. package/lib/checkbox/src/checkbox.js +181 -178
  309. package/lib/checkbox/src/group.d.ts +68 -0
  310. package/lib/checkbox/src/group.js +210 -207
  311. package/lib/checkbox-button/index.d.ts +304 -0
  312. package/lib/checkbox-group/index.d.ts +320 -0
  313. package/lib/col/index.d.ts +124 -0
  314. package/lib/collapse/index.d.ts +224 -0
  315. package/lib/collapse/src/collapse-pane.d.ts +16 -0
  316. package/lib/collapse/src/collapse-pane.js +98 -95
  317. package/lib/collapse/src/collapse.d.ts +45 -0
  318. package/lib/collapse/src/collapse.js +340 -337
  319. package/lib/collapse/src/util.d.ts +3 -0
  320. package/lib/collapse-pane/index.d.ts +80 -0
  321. package/lib/color-picker/index.d.ts +636 -0
  322. package/lib/color-picker/src/color-picker.d.ts +159 -0
  323. package/lib/color-picker/src/color-picker.js +1116 -1113
  324. package/lib/color-picker/src/util.d.ts +62 -0
  325. package/lib/components.d.ts +156 -0
  326. package/lib/components.js +3 -0
  327. package/lib/context-menu/index.d.ts +338 -0
  328. package/lib/context-menu/src/context-menu.d.ts +70 -0
  329. package/lib/context-menu/src/context-menu.js +601 -598
  330. package/lib/countdown/index.d.ts +148 -0
  331. package/lib/countdown/src/countdown.d.ts +28 -0
  332. package/lib/countdown/src/countdown.js +224 -221
  333. package/lib/date-panel/index.d.ts +520 -0
  334. package/lib/date-panel/src/date-panel.d.ts +112 -0
  335. package/lib/date-panel/src/date-panel.js +1905 -1902
  336. package/lib/date-panel/src/util.d.ts +40 -0
  337. package/lib/date-picker/index.d.ts +1074 -0
  338. package/lib/date-picker/src/date-picker.d.ts +262 -0
  339. package/lib/date-picker/src/date-picker.js +1537 -1534
  340. package/lib/date-range-picker/index.d.ts +1044 -0
  341. package/lib/date-range-picker/src/date-range-picker.d.ts +245 -0
  342. package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
  343. package/lib/divider/index.d.ts +198 -0
  344. package/lib/divider/src/divider.d.ts +43 -0
  345. package/lib/divider/src/divider.js +80 -77
  346. package/lib/drawer/index.d.ts +1398 -0
  347. package/lib/drawer/src/drawer.d.ts +317 -0
  348. package/lib/drawer/src/drawer.js +778 -775
  349. package/lib/drawer/src/store.d.ts +2 -0
  350. package/lib/dynamics/index.d.ts +463 -0
  351. package/lib/empty/index.d.ts +116 -0
  352. package/lib/empty/src/empty.d.ts +24 -0
  353. package/lib/empty/src/empty.js +100 -97
  354. package/lib/form/index.d.ts +836 -0
  355. package/lib/form/render/index.d.ts +1 -0
  356. package/lib/form/src/form-config-item.d.ts +187 -0
  357. package/lib/form/src/form-group.d.ts +188 -0
  358. package/lib/form/src/form-group.js +74 -71
  359. package/lib/form/src/form-item.d.ts +271 -0
  360. package/lib/form/src/form-item.js +76 -73
  361. package/lib/form/src/form.d.ts +191 -0
  362. package/lib/form/src/form.js +789 -786
  363. package/lib/form/src/itemInfo.d.ts +5 -0
  364. package/lib/form/src/render.d.ts +27 -0
  365. package/lib/form/src/util.d.ts +13 -0
  366. package/lib/form-gather/index.d.ts +840 -0
  367. package/lib/form-group/index.d.ts +828 -0
  368. package/lib/form-item/index.d.ts +828 -0
  369. package/lib/icon/index.d.ts +132 -0
  370. package/lib/icon/src/icon.d.ts +26 -0
  371. package/lib/icon/src/icon.js +59 -56
  372. package/lib/icon/style/style.css +1 -1
  373. package/lib/icon/style/style.mini.css +1 -1
  374. package/lib/icon-picker/index.d.ts +440 -0
  375. package/lib/icon-picker/src/icon-picker.d.ts +105 -0
  376. package/lib/icon-picker/src/icon-picker.js +719 -716
  377. package/lib/image/index.d.ts +442 -0
  378. package/lib/image/src/group.d.ts +57 -0
  379. package/lib/image/src/group.js +130 -127
  380. package/lib/image/src/image.d.ts +96 -0
  381. package/lib/image/src/image.js +243 -240
  382. package/lib/image/src/preview.d.ts +73 -0
  383. package/lib/image/src/preview.js +627 -624
  384. package/lib/image/src/util.d.ts +2 -0
  385. package/lib/image-group/index.d.ts +270 -0
  386. package/lib/image-preview/index.d.ts +352 -0
  387. package/lib/index.common.js +2 -0
  388. package/lib/index.d.ts +6 -0
  389. package/lib/index.js +2 -0
  390. package/lib/index.umd.js +47411 -46732
  391. package/lib/index.umd.min.js +3 -3
  392. package/lib/input/index.d.ts +1402 -0
  393. package/lib/input/src/input.d.ts +318 -0
  394. package/lib/input/src/input.js +2700 -2697
  395. package/lib/language/ar-EG.d.ts +908 -0
  396. package/lib/language/de-DE.d.ts +908 -0
  397. package/lib/language/en-US.d.ts +908 -0
  398. package/lib/language/es-ES.d.ts +908 -0
  399. package/lib/language/fr-FR.d.ts +908 -0
  400. package/lib/language/hu-HU.d.ts +908 -0
  401. package/lib/language/hy-AM.d.ts +908 -0
  402. package/lib/language/id-ID.d.ts +908 -0
  403. package/lib/language/it-IT.d.ts +908 -0
  404. package/lib/language/ja-JP.d.ts +908 -0
  405. package/lib/language/ko-KR.d.ts +908 -0
  406. package/lib/language/ms-MY.d.ts +908 -0
  407. package/lib/language/nb-NO.d.ts +908 -0
  408. package/lib/language/pt-BR.d.ts +908 -0
  409. package/lib/language/ru-RU.d.ts +908 -0
  410. package/lib/language/th-TH.d.ts +908 -0
  411. package/lib/language/ug-CN.d.ts +908 -0
  412. package/lib/language/uk-UA.d.ts +908 -0
  413. package/lib/language/uz-UZ.d.ts +908 -0
  414. package/lib/language/vi-VN.d.ts +908 -0
  415. package/lib/language/zh-CHT.d.ts +908 -0
  416. package/lib/language/zh-CN.d.ts +908 -0
  417. package/lib/language/zh-HK.d.ts +908 -0
  418. package/lib/language/zh-MO.d.ts +908 -0
  419. package/lib/language/zh-TC.d.ts +908 -0
  420. package/lib/language/zh-TW.d.ts +908 -0
  421. package/lib/layout-aside/index.d.ts +178 -0
  422. package/lib/layout-aside/src/layout-aside.d.ts +39 -0
  423. package/lib/layout-aside/src/layout-aside.js +138 -135
  424. package/lib/layout-body/index.d.ts +192 -0
  425. package/lib/layout-body/src/layout-body.d.ts +42 -0
  426. package/lib/layout-body/src/layout-body.js +145 -142
  427. package/lib/layout-container/index.d.ts +130 -0
  428. package/lib/layout-container/src/layout-container.d.ts +27 -0
  429. package/lib/layout-container/src/layout-container.js +71 -68
  430. package/lib/layout-footer/index.d.ts +56 -0
  431. package/lib/layout-footer/src/layout-footer.d.ts +10 -0
  432. package/lib/layout-footer/src/layout-footer.js +60 -57
  433. package/lib/layout-header/index.d.ts +48 -0
  434. package/lib/layout-header/src/layout-header.d.ts +8 -0
  435. package/lib/layout-header/src/layout-header.js +58 -55
  436. package/lib/link/index.d.ts +210 -0
  437. package/lib/link/src/link.d.ts +51 -0
  438. package/lib/link/src/link.js +131 -128
  439. package/lib/list/index.d.ts +538 -0
  440. package/lib/list/src/list.d.ts +110 -0
  441. package/lib/list/src/list.js +2173 -2170
  442. package/lib/list/src/store.d.ts +6 -0
  443. package/lib/list/src/util.d.ts +2 -0
  444. package/lib/loading/index.d.ts +257 -0
  445. package/lib/loading/src/loading.d.ts +56 -0
  446. package/lib/loading/src/loading.js +141 -138
  447. package/lib/locale/ar-EG.umd.d.ts +908 -0
  448. package/lib/locale/de-DE.umd.d.ts +908 -0
  449. package/lib/locale/en-US.umd.d.ts +908 -0
  450. package/lib/locale/es-ES.umd.d.ts +908 -0
  451. package/lib/locale/fr-FR.umd.d.ts +908 -0
  452. package/lib/locale/hu-HU.umd.d.ts +908 -0
  453. package/lib/locale/hy-AM.umd.d.ts +908 -0
  454. package/lib/locale/id-ID.umd.d.ts +908 -0
  455. package/lib/locale/it-IT.umd.d.ts +908 -0
  456. package/lib/locale/ja-JP.umd.d.ts +908 -0
  457. package/lib/locale/ko-KR.umd.d.ts +908 -0
  458. package/lib/locale/ms-MY.umd.d.ts +908 -0
  459. package/lib/locale/nb-NO.umd.d.ts +908 -0
  460. package/lib/locale/pt-BR.umd.d.ts +908 -0
  461. package/lib/locale/ru-RU.umd.d.ts +908 -0
  462. package/lib/locale/th-TH.umd.d.ts +908 -0
  463. package/lib/locale/ug-CN.umd.d.ts +908 -0
  464. package/lib/locale/uk-UA.umd.d.ts +908 -0
  465. package/lib/locale/uz-UZ.umd.d.ts +908 -0
  466. package/lib/locale/vi-VN.umd.d.ts +908 -0
  467. package/lib/locale/zh-CHT.umd.d.ts +908 -0
  468. package/lib/locale/zh-CN.umd.d.ts +908 -0
  469. package/lib/locale/zh-HK.umd.d.ts +908 -0
  470. package/lib/locale/zh-MO.umd.d.ts +908 -0
  471. package/lib/locale/zh-TC.umd.d.ts +908 -0
  472. package/lib/locale/zh-TW.umd.d.ts +908 -0
  473. package/lib/mention/index.d.ts +84 -0
  474. package/lib/mention/src/mention.d.ts +16 -0
  475. package/lib/mention/src/mention.js +49 -46
  476. package/lib/menu/index.d.ts +446 -0
  477. package/lib/menu/src/menu.d.ts +98 -0
  478. package/lib/menu/src/menu.js +799 -796
  479. package/lib/modal/index.d.ts +1934 -0
  480. package/lib/modal/src/modal.d.ts +457 -0
  481. package/lib/modal/src/modal.js +1519 -1527
  482. package/lib/modal/src/store.d.ts +2 -0
  483. package/lib/notice-bar/index.d.ts +232 -0
  484. package/lib/notice-bar/src/notice-bar.d.ts +49 -0
  485. package/lib/notice-bar/src/notice-bar.js +168 -165
  486. package/lib/number-input/index.d.ts +1208 -0
  487. package/lib/number-input/src/number-input.d.ts +268 -0
  488. package/lib/number-input/src/number-input.js +1094 -1091
  489. package/lib/number-input/src/util.d.ts +3 -0
  490. package/lib/optgroup/index.d.ts +150 -0
  491. package/lib/option/index.d.ts +158 -0
  492. package/lib/pager/index.d.ts +682 -0
  493. package/lib/pager/src/pager.d.ts +155 -0
  494. package/lib/pager/src/pager.js +767 -764
  495. package/lib/password-input/index.d.ts +572 -0
  496. package/lib/password-input/src/password-input.d.ts +122 -0
  497. package/lib/password-input/src/password-input.js +431 -428
  498. package/lib/print/index.d.ts +454 -0
  499. package/lib/print/src/page-break.d.ts +9 -0
  500. package/lib/print/src/page-break.js +63 -60
  501. package/lib/print/src/print.d.ts +113 -0
  502. package/lib/print/src/print.js +303 -300
  503. package/lib/print/src/util.d.ts +6 -0
  504. package/lib/print-page-break/index.d.ts +60 -0
  505. package/lib/pulldown/index.d.ts +356 -0
  506. package/lib/pulldown/src/pulldown.d.ts +99 -0
  507. package/lib/pulldown/src/pulldown.js +403 -400
  508. package/lib/radio/index.d.ts +292 -0
  509. package/lib/radio/src/button.d.ts +73 -0
  510. package/lib/radio/src/button.js +214 -211
  511. package/lib/radio/src/group.d.ts +66 -0
  512. package/lib/radio/src/group.js +195 -192
  513. package/lib/radio/src/radio.d.ts +71 -0
  514. package/lib/radio/src/radio.js +194 -191
  515. package/lib/radio-button/index.d.ts +304 -0
  516. package/lib/radio-group/index.d.ts +308 -0
  517. package/lib/rate/index.d.ts +200 -0
  518. package/lib/rate/src/rate.d.ts +41 -0
  519. package/lib/rate/src/rate.js +164 -161
  520. package/lib/result/index.d.ts +96 -0
  521. package/lib/result/src/result.d.ts +20 -0
  522. package/lib/result/src/result.js +116 -113
  523. package/lib/row/index.d.ts +192 -0
  524. package/lib/row/src/col.d.ts +26 -0
  525. package/lib/row/src/col.js +133 -130
  526. package/lib/row/src/row.d.ts +40 -0
  527. package/lib/row/src/row.js +111 -108
  528. package/lib/scrollbar/index.d.ts +660 -0
  529. package/lib/scrollbar/src/scrollbar.d.ts +167 -0
  530. package/lib/scrollbar/src/scrollbar.js +518 -515
  531. package/lib/segmented/index.d.ts +210 -0
  532. package/lib/segmented/src/segmented.d.ts +44 -0
  533. package/lib/segmented/src/segmented.js +240 -237
  534. package/lib/select/index.d.ts +1120 -0
  535. package/lib/select/src/optgroup.d.ts +31 -0
  536. package/lib/select/src/optgroup.js +44 -41
  537. package/lib/select/src/option-info.d.ts +5 -0
  538. package/lib/select/src/option.d.ts +33 -0
  539. package/lib/select/src/option.js +39 -36
  540. package/lib/select/src/select.d.ts +303 -0
  541. package/lib/select/src/select.js +1915 -1897
  542. package/lib/select/src/util.d.ts +10 -0
  543. package/lib/slider/index.d.ts +530 -0
  544. package/lib/slider/src/slider.d.ts +115 -0
  545. package/lib/slider/src/slider.js +419 -416
  546. package/lib/space/index.d.ts +548 -0
  547. package/lib/space/src/space.d.ts +126 -0
  548. package/lib/space/src/space.js +190 -187
  549. package/lib/split/index.d.ts +348 -0
  550. package/lib/split-pane/index.d.ts +230 -0
  551. package/lib/splitter/index.d.ts +348 -0
  552. package/lib/splitter/src/splitter-panel.d.ts +51 -0
  553. package/lib/splitter/src/splitter-panel.js +146 -143
  554. package/lib/splitter/src/splitter.d.ts +73 -0
  555. package/lib/splitter/src/splitter.js +917 -914
  556. package/lib/splitter/src/util.d.ts +3 -0
  557. package/lib/splitter-panel/index.d.ts +230 -0
  558. package/lib/step-item/index.d.ts +76 -0
  559. package/lib/step-item/index.js +47 -0
  560. package/lib/steps/index.d.ts +314 -0
  561. package/lib/steps/src/step-info.d.ts +6 -0
  562. package/lib/steps/src/step-info.js +49 -0
  563. package/lib/steps/src/step-item.d.ts +14 -0
  564. package/lib/steps/src/step-item.js +59 -0
  565. package/lib/steps/src/steps.d.ts +69 -0
  566. package/lib/steps/src/steps.js +298 -46
  567. package/lib/steps/src/util.d.ts +7 -0
  568. package/lib/steps/src/util.js +74 -0
  569. package/lib/steps/style/style.css +297 -0
  570. package/lib/steps/style/style.mini.css +1 -0
  571. package/lib/style.css +307 -1
  572. package/lib/style.mini.css +1 -1
  573. package/lib/switch/index.d.ts +332 -0
  574. package/lib/switch/src/switch.d.ts +71 -0
  575. package/lib/switch/src/switch.js +228 -225
  576. package/lib/tab-pane/index.d.ts +96 -0
  577. package/lib/table-select/index.d.ts +528 -0
  578. package/lib/table-select/src/table-select.d.ts +122 -0
  579. package/lib/table-select/src/table-select.js +865 -862
  580. package/lib/table-transfer/index.d.ts +100 -0
  581. package/lib/table-transfer/src/table-transfer.d.ts +20 -0
  582. package/lib/table-transfer/src/table-transfer.js +61 -58
  583. package/lib/tabs/index.d.ts +488 -0
  584. package/lib/tabs/src/tab-pane.d.ts +20 -0
  585. package/lib/tabs/src/tab-pane.js +102 -99
  586. package/lib/tabs/src/tabs.d.ts +105 -0
  587. package/lib/tabs/src/tabs.js +936 -933
  588. package/lib/tabs/src/util.d.ts +3 -0
  589. package/lib/tag/index.d.ts +332 -0
  590. package/lib/tag/src/tag.d.ts +71 -0
  591. package/lib/tag/src/tag.js +163 -160
  592. package/lib/text/index.d.ts +242 -0
  593. package/lib/text/src/text.d.ts +48 -0
  594. package/lib/text/src/text.js +232 -229
  595. package/lib/text-ellipsis/index.d.ts +218 -0
  596. package/lib/text-ellipsis/src/text-ellipsis.d.ts +53 -0
  597. package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
  598. package/lib/textarea/index.d.ts +738 -0
  599. package/lib/textarea/src/textarea.d.ts +170 -0
  600. package/lib/textarea/src/textarea.js +434 -431
  601. package/lib/timeline/index.d.ts +176 -0
  602. package/lib/timeline/src/timeline-info.d.ts +6 -0
  603. package/lib/timeline/src/timeline-item.d.ts +12 -0
  604. package/lib/timeline/src/timeline.d.ts +38 -0
  605. package/lib/timeline/src/timeline.js +74 -36
  606. package/lib/timeline/src/util.d.ts +7 -0
  607. package/lib/timeline/src/util.js +7 -4
  608. package/lib/timeline-item/index.d.ts +68 -0
  609. package/lib/tip/index.d.ts +275 -0
  610. package/lib/tip/src/tip.d.ts +46 -0
  611. package/lib/tip/src/tip.js +117 -114
  612. package/lib/tooltip/index.d.ts +890 -0
  613. package/lib/tooltip/src/tooltip.d.ts +202 -0
  614. package/lib/tooltip/src/tooltip.js +552 -549
  615. package/lib/tour/index.d.ts +84 -0
  616. package/lib/tour/src/tour.d.ts +16 -0
  617. package/lib/tour/src/tour.js +49 -46
  618. package/lib/transfer/index.d.ts +100 -0
  619. package/lib/transfer/src/transfer.d.ts +20 -0
  620. package/lib/transfer/src/transfer.js +95 -92
  621. package/lib/tree/index.d.ts +1402 -0
  622. package/lib/tree/src/store.d.ts +6 -0
  623. package/lib/tree/src/tree.d.ts +313 -0
  624. package/lib/tree/src/tree.js +3379 -3376
  625. package/lib/tree/src/util.d.ts +3 -0
  626. package/lib/tree-select/index.d.ts +986 -0
  627. package/lib/tree-select/src/tree-select.d.ts +255 -0
  628. package/lib/tree-select/src/tree-select.js +969 -966
  629. package/lib/ui/index.d.ts +6 -0
  630. package/lib/ui/index.js +8 -2
  631. package/lib/ui/src/anime.d.ts +10 -0
  632. package/lib/ui/src/comp.d.ts +2 -0
  633. package/lib/ui/src/dom.d.ts +70 -0
  634. package/lib/ui/src/log.d.ts +6 -0
  635. package/lib/ui/src/log.js +1 -1
  636. package/lib/ui/src/utils.d.ts +23 -0
  637. package/lib/ui/src/vn.d.ts +6 -0
  638. package/lib/upload/index.d.ts +1778 -0
  639. package/lib/upload/src/upload.d.ts +413 -0
  640. package/lib/upload/src/upload.js +1788 -1785
  641. package/lib/upload/src/util.d.ts +16 -0
  642. package/lib/vxe-alert/index.d.ts +3 -0
  643. package/lib/vxe-anchor/index.d.ts +3 -0
  644. package/lib/vxe-anchor-link/index.d.ts +3 -0
  645. package/lib/vxe-avatar/index.d.ts +3 -0
  646. package/lib/vxe-backtop/index.d.ts +3 -0
  647. package/lib/vxe-badge/index.d.ts +3 -0
  648. package/lib/vxe-breadcrumb/index.d.ts +3 -0
  649. package/lib/vxe-breadcrumb-item/index.d.ts +3 -0
  650. package/lib/vxe-button/index.d.ts +3 -0
  651. package/lib/vxe-button-group/index.d.ts +3 -0
  652. package/lib/vxe-calendar/index.d.ts +3 -0
  653. package/lib/vxe-card/index.d.ts +3 -0
  654. package/lib/vxe-carousel/index.d.ts +3 -0
  655. package/lib/vxe-carousel-item/index.d.ts +3 -0
  656. package/lib/vxe-cascader/index.d.ts +3 -0
  657. package/lib/vxe-checkbox/index.d.ts +3 -0
  658. package/lib/vxe-checkbox-button/index.d.ts +3 -0
  659. package/lib/vxe-checkbox-group/index.d.ts +3 -0
  660. package/lib/vxe-col/index.d.ts +3 -0
  661. package/lib/vxe-collapse/index.d.ts +3 -0
  662. package/lib/vxe-collapse-pane/index.d.ts +3 -0
  663. package/lib/vxe-color-picker/index.d.ts +3 -0
  664. package/lib/vxe-context-menu/index.d.ts +3 -0
  665. package/lib/vxe-countdown/index.d.ts +3 -0
  666. package/lib/vxe-date-panel/index.d.ts +3 -0
  667. package/lib/vxe-date-picker/index.d.ts +3 -0
  668. package/lib/vxe-date-range-picker/index.d.ts +3 -0
  669. package/lib/vxe-divider/index.d.ts +3 -0
  670. package/lib/vxe-drawer/index.d.ts +3 -0
  671. package/lib/vxe-empty/index.d.ts +3 -0
  672. package/lib/vxe-form/index.d.ts +3 -0
  673. package/lib/vxe-form-gather/index.d.ts +3 -0
  674. package/lib/vxe-form-group/index.d.ts +3 -0
  675. package/lib/vxe-form-item/index.d.ts +3 -0
  676. package/lib/vxe-icon/index.d.ts +3 -0
  677. package/lib/vxe-icon/style/style.css +1 -1
  678. package/lib/vxe-icon/style/style.mini.css +1 -1
  679. package/lib/vxe-icon-picker/index.d.ts +3 -0
  680. package/lib/vxe-image/index.d.ts +3 -0
  681. package/lib/vxe-image-group/index.d.ts +3 -0
  682. package/lib/vxe-image-preview/index.d.ts +3 -0
  683. package/lib/vxe-input/index.d.ts +3 -0
  684. package/lib/vxe-layout-aside/index.d.ts +3 -0
  685. package/lib/vxe-layout-body/index.d.ts +3 -0
  686. package/lib/vxe-layout-container/index.d.ts +3 -0
  687. package/lib/vxe-layout-footer/index.d.ts +3 -0
  688. package/lib/vxe-layout-header/index.d.ts +3 -0
  689. package/lib/vxe-link/index.d.ts +3 -0
  690. package/lib/vxe-list/index.d.ts +3 -0
  691. package/lib/vxe-loading/index.d.ts +3 -0
  692. package/lib/vxe-mention/index.d.ts +3 -0
  693. package/lib/vxe-menu/index.d.ts +3 -0
  694. package/lib/vxe-modal/index.d.ts +3 -0
  695. package/lib/vxe-notice-bar/index.d.ts +3 -0
  696. package/lib/vxe-number-input/index.d.ts +3 -0
  697. package/lib/vxe-optgroup/index.d.ts +3 -0
  698. package/lib/vxe-option/index.d.ts +3 -0
  699. package/lib/vxe-pager/index.d.ts +3 -0
  700. package/lib/vxe-password-input/index.d.ts +3 -0
  701. package/lib/vxe-print/index.d.ts +3 -0
  702. package/lib/vxe-print-page-break/index.d.ts +3 -0
  703. package/lib/vxe-pulldown/index.d.ts +3 -0
  704. package/lib/vxe-radio/index.d.ts +3 -0
  705. package/lib/vxe-radio-button/index.d.ts +3 -0
  706. package/lib/vxe-radio-group/index.d.ts +3 -0
  707. package/lib/vxe-rate/index.d.ts +3 -0
  708. package/lib/vxe-result/index.d.ts +3 -0
  709. package/lib/vxe-row/index.d.ts +3 -0
  710. package/lib/vxe-scrollbar/index.d.ts +3 -0
  711. package/lib/vxe-segmented/index.d.ts +3 -0
  712. package/lib/vxe-select/index.d.ts +3 -0
  713. package/lib/vxe-slider/index.d.ts +3 -0
  714. package/lib/vxe-space/index.d.ts +3 -0
  715. package/lib/vxe-split/index.d.ts +3 -0
  716. package/lib/vxe-split-pane/index.d.ts +3 -0
  717. package/lib/vxe-splitter/index.d.ts +3 -0
  718. package/lib/vxe-splitter-panel/index.d.ts +3 -0
  719. package/lib/vxe-steps/index.d.ts +3 -0
  720. package/lib/vxe-steps/style/style.css +297 -0
  721. package/lib/vxe-steps/style/style.mini.css +1 -0
  722. package/lib/vxe-switch/index.d.ts +3 -0
  723. package/lib/vxe-tab-pane/index.d.ts +3 -0
  724. package/lib/vxe-table-select/index.d.ts +3 -0
  725. package/lib/vxe-table-transfer/index.d.ts +3 -0
  726. package/lib/vxe-tabs/index.d.ts +3 -0
  727. package/lib/vxe-tag/index.d.ts +3 -0
  728. package/lib/vxe-text/index.d.ts +3 -0
  729. package/lib/vxe-text-ellipsis/index.d.ts +3 -0
  730. package/lib/vxe-textarea/index.d.ts +3 -0
  731. package/lib/vxe-timeline/index.d.ts +3 -0
  732. package/lib/vxe-timeline-item/index.d.ts +3 -0
  733. package/lib/vxe-tip/index.d.ts +3 -0
  734. package/lib/vxe-tooltip/index.d.ts +3 -0
  735. package/lib/vxe-tour/index.d.ts +3 -0
  736. package/lib/vxe-transfer/index.d.ts +3 -0
  737. package/lib/vxe-tree/index.d.ts +3 -0
  738. package/lib/vxe-tree-select/index.d.ts +3 -0
  739. package/lib/vxe-ui/index.d.ts +3 -0
  740. package/lib/vxe-upload/index.d.ts +3 -0
  741. package/lib/vxe-watermark/index.d.ts +3 -0
  742. package/lib/watermark/index.d.ts +183 -0
  743. package/lib/watermark/src/util.d.ts +9 -0
  744. package/lib/watermark/src/watermark.d.ts +39 -0
  745. package/lib/watermark/src/watermark.js +158 -155
  746. package/package.json +9 -9
  747. package/packages/alert/src/alert.ts +2 -2
  748. package/packages/anchor/src/anchor-link.ts +2 -2
  749. package/packages/anchor/src/anchor.ts +2 -2
  750. package/packages/avatar/src/avatar.ts +2 -2
  751. package/packages/backtop/src/backtop.ts +2 -2
  752. package/packages/badge/src/badge.ts +2 -2
  753. package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
  754. package/packages/breadcrumb/src/breadcrumb.ts +2 -2
  755. package/packages/button/src/button-group.ts +2 -2
  756. package/packages/calendar/src/calendar.ts +2 -2
  757. package/packages/card/src/card.ts +2 -2
  758. package/packages/carousel/src/carousel-item.ts +2 -2
  759. package/packages/carousel/src/carousel.ts +2 -2
  760. package/packages/cascader/src/cascader.ts +2 -2
  761. package/packages/checkbox/src/button.ts +3 -15
  762. package/packages/checkbox/src/checkbox.ts +2 -2
  763. package/packages/checkbox/src/group.ts +2 -2
  764. package/packages/collapse/src/collapse-pane.ts +2 -2
  765. package/packages/collapse/src/collapse.ts +2 -2
  766. package/packages/color-picker/src/color-picker.ts +2 -2
  767. package/packages/components.ts +3 -0
  768. package/packages/context-menu/src/context-menu.ts +3 -16
  769. package/packages/countdown/src/countdown.ts +2 -2
  770. package/packages/date-panel/src/date-panel.ts +2 -2
  771. package/packages/date-picker/src/date-picker.ts +2 -2
  772. package/packages/date-range-picker/src/date-range-picker.ts +2 -2
  773. package/packages/divider/src/divider.ts +2 -2
  774. package/packages/drawer/src/drawer.ts +2 -2
  775. package/packages/empty/src/empty.ts +2 -2
  776. package/packages/form/src/form-group.ts +2 -2
  777. package/packages/form/src/form-item.ts +2 -2
  778. package/packages/form/src/form.ts +2 -2
  779. package/packages/icon/src/icon.ts +2 -2
  780. package/packages/icon-picker/src/icon-picker.ts +2 -2
  781. package/packages/image/src/group.ts +2 -2
  782. package/packages/image/src/image.ts +2 -2
  783. package/packages/image/src/preview.ts +3 -16
  784. package/packages/index.ts +2 -2
  785. package/packages/input/src/input.ts +2 -2
  786. package/packages/layout-aside/src/layout-aside.ts +2 -2
  787. package/packages/layout-body/src/layout-body.ts +2 -2
  788. package/packages/layout-container/src/layout-container.ts +3 -14
  789. package/packages/layout-footer/src/layout-footer.ts +2 -2
  790. package/packages/layout-header/src/layout-header.ts +2 -2
  791. package/packages/link/src/link.ts +2 -2
  792. package/packages/list/src/list.ts +2 -2
  793. package/packages/loading/src/loading.ts +2 -2
  794. package/packages/mention/src/mention.ts +2 -2
  795. package/packages/menu/src/menu.ts +2 -2
  796. package/packages/modal/src/modal.ts +5 -20
  797. package/packages/notice-bar/src/notice-bar.ts +2 -2
  798. package/packages/number-input/src/number-input.ts +3 -17
  799. package/packages/pager/src/pager.ts +2 -2
  800. package/packages/password-input/src/password-input.ts +2 -2
  801. package/packages/print/src/page-break.ts +2 -2
  802. package/packages/print/src/print.ts +2 -2
  803. package/packages/pulldown/src/pulldown.ts +2 -2
  804. package/packages/radio/src/button.ts +3 -16
  805. package/packages/radio/src/group.ts +3 -17
  806. package/packages/radio/src/radio.ts +2 -2
  807. package/packages/rate/src/rate.ts +2 -2
  808. package/packages/result/src/result.ts +2 -2
  809. package/packages/row/src/col.ts +2 -2
  810. package/packages/row/src/row.ts +2 -2
  811. package/packages/scrollbar/src/scrollbar.ts +3 -4
  812. package/packages/segmented/src/segmented.ts +2 -2
  813. package/packages/select/src/optgroup.ts +2 -2
  814. package/packages/select/src/option.ts +2 -2
  815. package/packages/select/src/select.ts +33 -19
  816. package/packages/slider/src/slider.ts +2 -2
  817. package/packages/space/src/space.ts +2 -2
  818. package/packages/splitter/src/splitter-panel.ts +2 -2
  819. package/packages/splitter/src/splitter.ts +2 -2
  820. package/packages/step-item/index.ts +16 -0
  821. package/packages/steps/src/step-info.ts +18 -0
  822. package/packages/steps/src/step-item.ts +41 -0
  823. package/packages/steps/src/steps.ts +273 -13
  824. package/packages/steps/src/util.ts +44 -0
  825. package/packages/switch/src/switch.ts +2 -2
  826. package/packages/table-select/src/table-select.ts +2 -2
  827. package/packages/table-transfer/src/table-transfer.ts +3 -15
  828. package/packages/tabs/src/tab-pane.ts +2 -2
  829. package/packages/tabs/src/tabs.ts +2 -2
  830. package/packages/tag/src/tag.ts +2 -2
  831. package/packages/text/src/text.ts +2 -2
  832. package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
  833. package/packages/textarea/src/textarea.ts +2 -2
  834. package/packages/timeline/src/timeline-info.ts +17 -17
  835. package/packages/timeline/src/timeline.ts +93 -49
  836. package/packages/timeline/src/util.ts +44 -41
  837. package/packages/tip/src/tip.ts +2 -2
  838. package/packages/tooltip/src/tooltip.ts +2 -2
  839. package/packages/tour/src/tour.ts +2 -2
  840. package/packages/transfer/src/transfer.ts +2 -2
  841. package/packages/tree/src/tree.ts +2 -2
  842. package/packages/tree-select/src/tree-select.ts +2 -2
  843. package/packages/ui/index.ts +8 -1
  844. package/packages/upload/src/upload.ts +2 -2
  845. package/packages/watermark/src/watermark.ts +2 -2
  846. package/styles/all.scss +1 -0
  847. package/styles/components/step-item.scss +0 -0
  848. package/styles/components/steps.scss +354 -0
  849. package/styles/theme/base.scss +9 -0
  850. package/types/all.d.ts +3 -0
  851. package/types/components/gantt.d.ts +1 -3
  852. package/types/components/select.d.ts +1 -13
  853. package/types/components/step-item.d.ts +72 -0
  854. package/types/components/steps.d.ts +67 -8
  855. package/types/components/table.d.ts +7 -66
  856. package/types/handles/form-design.d.ts +1 -4
  857. package/types/ui/global-config.d.ts +2 -0
  858. package/types/ui/global-icon.d.ts +7 -0
  859. /package/dist/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  860. /package/dist/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  861. /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  862. /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  863. /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  864. /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  865. /package/es/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  866. /package/es/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  867. /package/es/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  868. /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  869. /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  870. /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  871. /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  872. /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  873. /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  874. /package/lib/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  875. /package/lib/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  876. /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  877. /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  878. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  879. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
@@ -103,874 +103,853 @@ function createInternalData() {
103
103
  hpTimeout: void 0
104
104
  };
105
105
  }
106
- var select_default = (0, import_comp.defineVxeComponent)({
107
- name: "VxeSelect",
108
- props: {
109
- modelValue: [String, Number, Boolean, Array],
110
- defaultConfig: Object,
111
- emptyValue: {
112
- type: [String, Number, Boolean, Array],
113
- default: () => getConfig().select.emptyValue
114
- },
115
- clearable: {
116
- type: Boolean,
117
- default: () => getConfig().select.clearable
118
- },
119
- placeholder: String,
120
- readonly: {
121
- type: Boolean,
122
- default: null
123
- },
124
- loading: Boolean,
125
- disabled: {
126
- type: Boolean,
127
- default: null
128
- },
129
- multiple: Boolean,
130
- multiCharOverflow: {
131
- type: [Number, String],
132
- default: () => getConfig().select.multiCharOverflow
133
- },
134
- prefixIcon: String,
135
- allowCreate: {
136
- type: Boolean,
137
- default: () => getConfig().select.allowCreate
138
- },
139
- placement: String,
140
- lazyOptions: Array,
141
- options: Array,
142
- optionProps: Object,
143
- optionGroups: Array,
144
- optionGroupProps: Object,
145
- optionConfig: Object,
146
- className: [String, Function],
147
- /**
148
- * 已废弃,请使用 popupConfig.className
149
- * @deprecated
150
- */
151
- popupClassName: [String, Function],
152
- width: [String, Number],
153
- max: {
154
- type: [String, Number],
155
- default: null
156
- },
157
- showRadio: {
158
- type: Boolean,
159
- default: () => getConfig().select.showRadio
160
- },
161
- radioConfig: Object,
162
- showCheckbox: {
163
- type: Boolean,
164
- default: () => getConfig().select.showCheckedButton
165
- },
166
- checkboxConfig: Object,
167
- /**
168
- * 已废弃,请使用 popupConfig.zIndex
169
- * @deprecated
170
- */
171
- zIndex: Number,
172
- size: {
173
- type: String,
174
- default: () => getConfig().select.size || getConfig().size
175
- },
176
- filterable: Boolean,
177
- /**
178
- * 已废弃,被 filter-config.filterMethod 替换
179
- * @deprecated
180
- */
181
- filterMethod: Function,
182
- filterConfig: Object,
183
- remote: Boolean,
184
- remoteConfig: Object,
185
- showBadge: Boolean,
186
- badgeConfig: Object,
187
- emptyText: String,
188
- checkedClosable: {
189
- type: Boolean,
190
- default: () => getConfig().select.checkedClosable
191
- },
192
- clearClosable: {
193
- type: Boolean,
194
- default: () => getConfig().select.clearClosable
195
- },
196
- showCloseButton: {
197
- type: Boolean,
198
- default: () => getConfig().select.showCloseButton
199
- },
200
- showTotalButton: {
201
- type: Boolean,
202
- default: () => getConfig().select.showTotalButton
203
- },
204
- showCheckedButton: {
205
- type: Boolean,
206
- default: () => getConfig().select.showCheckedButton
207
- },
208
- showClearButton: {
209
- type: Boolean,
210
- default: () => getConfig().select.showClearButton
211
- },
212
- transfer: {
213
- type: Boolean,
214
- default: null
215
- },
216
- popupConfig: Object,
217
- virtualYConfig: Object,
218
- scrollY: Object,
219
- useScrollbar: {
220
- type: Boolean,
221
- default: () => getDefVal(getConfig().select.useScrollbar, getConfig().useScrollbar)
222
- },
223
- scrollbarConfig: Object,
224
- /**
225
- * 已废弃,被 remote-config.queryMethod 替换
226
- * @deprecated
227
- */
228
- remoteMethod: Function,
229
- /**
230
- * 已废弃,被 option-config.keyField 替换
231
- * @deprecated
232
- */
233
- optionId: {
234
- type: String,
235
- default: () => getConfig().select.optionId
106
+ var select_default = (
107
+ /* define-vxe-component start */
108
+ (0, import_comp.defineVxeComponent)({
109
+ name: "VxeSelect",
110
+ props: {
111
+ modelValue: [String, Number, Boolean, Array],
112
+ defaultConfig: Object,
113
+ emptyValue: {
114
+ type: [String, Number, Boolean, Array],
115
+ default: () => getConfig().select.emptyValue
116
+ },
117
+ clearable: {
118
+ type: Boolean,
119
+ default: () => getConfig().select.clearable
120
+ },
121
+ placeholder: String,
122
+ readonly: {
123
+ type: Boolean,
124
+ default: null
125
+ },
126
+ loading: Boolean,
127
+ disabled: {
128
+ type: Boolean,
129
+ default: null
130
+ },
131
+ multiple: Boolean,
132
+ multiCharOverflow: {
133
+ type: [Number, String],
134
+ default: () => getConfig().select.multiCharOverflow
135
+ },
136
+ prefixIcon: String,
137
+ allowCreate: {
138
+ type: Boolean,
139
+ default: () => getConfig().select.allowCreate
140
+ },
141
+ placement: String,
142
+ lazyOptions: Array,
143
+ options: Array,
144
+ optionProps: Object,
145
+ optionGroups: Array,
146
+ optionGroupProps: Object,
147
+ optionConfig: Object,
148
+ className: [String, Function],
149
+ /**
150
+ * 已废弃,请使用 popupConfig.className
151
+ * @deprecated
152
+ */
153
+ popupClassName: [String, Function],
154
+ width: [String, Number],
155
+ max: {
156
+ type: [String, Number],
157
+ default: null
158
+ },
159
+ showRadio: {
160
+ type: Boolean,
161
+ default: () => getConfig().select.showRadio
162
+ },
163
+ radioConfig: Object,
164
+ showCheckbox: {
165
+ type: Boolean,
166
+ default: () => getConfig().select.showCheckedButton
167
+ },
168
+ checkboxConfig: Object,
169
+ /**
170
+ * 已废弃,请使用 popupConfig.zIndex
171
+ * @deprecated
172
+ */
173
+ zIndex: Number,
174
+ size: {
175
+ type: String,
176
+ default: () => getConfig().select.size || getConfig().size
177
+ },
178
+ filterable: Boolean,
179
+ /**
180
+ * 已废弃,被 filter-config.filterMethod 替换
181
+ * @deprecated
182
+ */
183
+ filterMethod: Function,
184
+ filterConfig: Object,
185
+ remote: Boolean,
186
+ remoteConfig: Object,
187
+ showBadge: Boolean,
188
+ badgeConfig: Object,
189
+ emptyText: String,
190
+ checkedClosable: {
191
+ type: Boolean,
192
+ default: () => getConfig().select.checkedClosable
193
+ },
194
+ clearClosable: {
195
+ type: Boolean,
196
+ default: () => getConfig().select.clearClosable
197
+ },
198
+ showCloseButton: {
199
+ type: Boolean,
200
+ default: () => getConfig().select.showCloseButton
201
+ },
202
+ showTotalButton: {
203
+ type: Boolean,
204
+ default: () => getConfig().select.showTotalButton
205
+ },
206
+ showCheckedButton: {
207
+ type: Boolean,
208
+ default: () => getConfig().select.showCheckedButton
209
+ },
210
+ showClearButton: {
211
+ type: Boolean,
212
+ default: () => getConfig().select.showClearButton
213
+ },
214
+ transfer: {
215
+ type: Boolean,
216
+ default: null
217
+ },
218
+ popupConfig: Object,
219
+ virtualYConfig: Object,
220
+ scrollY: Object,
221
+ useScrollbar: {
222
+ type: Boolean,
223
+ default: () => getDefVal(getConfig().select.useScrollbar, getConfig().useScrollbar)
224
+ },
225
+ scrollbarConfig: Object,
226
+ /**
227
+ * 已废弃,被 remote-config.queryMethod 替换
228
+ * @deprecated
229
+ */
230
+ remoteMethod: Function,
231
+ /**
232
+ * 已废弃,被 option-config.keyField 替换
233
+ * @deprecated
234
+ */
235
+ optionId: {
236
+ type: String,
237
+ default: () => getConfig().select.optionId
238
+ },
239
+ /**
240
+ * 已废弃,被 option-config.useKey 替换
241
+ * @deprecated
242
+ */
243
+ optionKey: Boolean
236
244
  },
237
- /**
238
- * 已废弃,被 option-config.useKey 替换
239
- * @deprecated
240
- */
241
- optionKey: Boolean
242
- },
243
- emits: ["update:modelValue", "change", "default-change", "all-change", "clear", "blur", "focus", "click", "scroll", "visible-change"],
244
- setup(props, context) {
245
- const { slots, emit } = context;
246
- const $xeModal = (0, import_vue.inject)("$xeModal", null);
247
- const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
248
- const $xeTable = (0, import_vue.inject)("$xeTable", null);
249
- const $xeCard = (0, import_vue.inject)("$xeCard", null);
250
- const $xeForm = (0, import_vue.inject)("$xeForm", null);
251
- const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
252
- const xID = import_xe_utils.default.uniqueId();
253
- const refElem = (0, import_vue.ref)();
254
- const refInput = (0, import_vue.ref)();
255
- const refInpSearch = (0, import_vue.ref)();
256
- const refVirtualWrapper = (0, import_vue.ref)();
257
- const refOptionPanel = (0, import_vue.ref)();
258
- const refVirtualSpaceElem = (0, import_vue.ref)();
259
- const refVirtualBody = (0, import_vue.ref)();
260
- const { computeSize } = useFns.useSize(props);
261
- const { computeIsVScrollbar } = useFns.useVScrollbar(props);
262
- const reactData = (0, import_vue.reactive)(createReactData());
263
- const internalData = createInternalData();
264
- const refMaps = {
265
- refElem
266
- };
267
- const $xeSelect = {
268
- xID,
269
- props,
270
- context,
271
- reactData,
272
- internalData,
273
- getRefMaps: () => refMaps
274
- };
275
- const { refTrackXElem, refTrackYElem, refThumbXElem, refThumbYElem, updateThumbSize, updateThumbOffset, clickTrackXEvent, clickTrackYEvent, pointerdownThumbXEvent, pointermoveThumbXEvent, cleatPointerThumbEvent, pointerdownThumbYEvent, pointermoveThumbYEvent } = useFns.useInitVScrollbar($xeSelect);
276
- const computeFormReadonly = (0, import_vue.computed)(() => {
277
- const { readonly } = props;
278
- if (readonly === null) {
279
- if ($xeForm) {
280
- return $xeForm.props.readonly;
245
+ emits: ["update:modelValue", "change", "default-change", "all-change", "clear", "blur", "focus", "click", "scroll", "visible-change"],
246
+ setup(props, context) {
247
+ const { slots, emit } = context;
248
+ const $xeModal = (0, import_vue.inject)("$xeModal", null);
249
+ const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
250
+ const $xeTable = (0, import_vue.inject)("$xeTable", null);
251
+ const $xeCard = (0, import_vue.inject)("$xeCard", null);
252
+ const $xeForm = (0, import_vue.inject)("$xeForm", null);
253
+ const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
254
+ const xID = import_xe_utils.default.uniqueId();
255
+ const refElem = (0, import_vue.ref)();
256
+ const refInput = (0, import_vue.ref)();
257
+ const refInpSearch = (0, import_vue.ref)();
258
+ const refVirtualWrapper = (0, import_vue.ref)();
259
+ const refOptionPanel = (0, import_vue.ref)();
260
+ const refVirtualSpaceElem = (0, import_vue.ref)();
261
+ const refVirtualBody = (0, import_vue.ref)();
262
+ const { computeSize } = useFns.useSize(props);
263
+ const { computeIsVScrollbar } = useFns.useVScrollbar(props);
264
+ const reactData = (0, import_vue.reactive)(createReactData());
265
+ const internalData = createInternalData();
266
+ const refMaps = {
267
+ refElem
268
+ };
269
+ const $xeSelect = {
270
+ xID,
271
+ props,
272
+ context,
273
+ reactData,
274
+ internalData,
275
+ getRefMaps: () => refMaps
276
+ };
277
+ const { refTrackXElem, refTrackYElem, refThumbXElem, refThumbYElem, updateThumbSize, updateThumbOffset, clickTrackXEvent, clickTrackYEvent, pointerdownThumbXEvent, pointermoveThumbXEvent, cleatPointerThumbEvent, pointerdownThumbYEvent, pointermoveThumbYEvent } = useFns.useInitVScrollbar($xeSelect);
278
+ const computeFormReadonly = (0, import_vue.computed)(() => {
279
+ const { readonly } = props;
280
+ if (readonly === null) {
281
+ if ($xeForm) {
282
+ return $xeForm.props.readonly;
283
+ }
284
+ return false;
281
285
  }
282
- return false;
283
- }
284
- return readonly;
285
- });
286
- const computeIsDisabled = (0, import_vue.computed)(() => {
287
- const { disabled } = props;
288
- if (disabled === null) {
289
- if ($xeForm) {
290
- return $xeForm.props.disabled;
286
+ return readonly;
287
+ });
288
+ const computeIsDisabled = (0, import_vue.computed)(() => {
289
+ const { disabled } = props;
290
+ if (disabled === null) {
291
+ if ($xeForm) {
292
+ return $xeForm.props.disabled;
293
+ }
294
+ return false;
291
295
  }
292
- return false;
293
- }
294
- return disabled;
295
- });
296
- const computeBtnTransfer = (0, import_vue.computed)(() => {
297
- const { transfer } = props;
298
- const popupOpts = computePopupOpts.value;
299
- if (import_xe_utils.default.isBoolean(popupOpts.transfer)) {
300
- return popupOpts.transfer;
301
- }
302
- if (transfer === null) {
303
- const globalTransfer = getConfig().select.transfer;
304
- if (import_xe_utils.default.isBoolean(globalTransfer)) {
305
- return globalTransfer;
306
- }
307
- if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
308
- return true;
296
+ return disabled;
297
+ });
298
+ const computeBtnTransfer = (0, import_vue.computed)(() => {
299
+ const { transfer } = props;
300
+ const popupOpts = computePopupOpts.value;
301
+ if (import_xe_utils.default.isBoolean(popupOpts.transfer)) {
302
+ return popupOpts.transfer;
309
303
  }
310
- }
311
- return transfer;
312
- });
313
- const computeInpPlaceholder = (0, import_vue.computed)(() => {
314
- const { placeholder } = props;
315
- if (placeholder) {
316
- return (0, import_utils.getFuncText)(placeholder);
317
- }
318
- const globalPlaceholder = getConfig().select.placeholder;
319
- if (globalPlaceholder) {
320
- return (0, import_utils.getFuncText)(globalPlaceholder);
321
- }
322
- return getI18n("vxe.base.pleaseSelect");
323
- });
324
- const computeDefaultOpts = (0, import_vue.computed)(() => {
325
- return Object.assign({}, props.defaultConfig);
326
- });
327
- const computePropsOpts = (0, import_vue.computed)(() => {
328
- return Object.assign({}, getConfig().select.optionProps, props.optionProps);
329
- });
330
- const computeGroupPropsOpts = (0, import_vue.computed)(() => {
331
- return Object.assign({}, getConfig().select.optionGroupProps, props.optionGroupProps);
332
- });
333
- const computeLabelField = (0, import_vue.computed)(() => {
334
- const propsOpts = computePropsOpts.value;
335
- return propsOpts.label || "label";
336
- });
337
- const computeValueField = (0, import_vue.computed)(() => {
338
- const propsOpts = computePropsOpts.value;
339
- return propsOpts.value || "value";
340
- });
341
- const computeGroupLabelField = (0, import_vue.computed)(() => {
342
- const groupPropsOpts = computeGroupPropsOpts.value;
343
- return groupPropsOpts.label || "label";
344
- });
345
- const computeGroupOptionsField = (0, import_vue.computed)(() => {
346
- const groupPropsOpts = computeGroupPropsOpts.value;
347
- return groupPropsOpts.options || "options";
348
- });
349
- const computeIsMaximize = (0, import_vue.computed)(() => {
350
- const selectVals = computeSelectVals.value;
351
- return checkMaxLimit(selectVals);
352
- });
353
- const computePopupOpts = (0, import_vue.computed)(() => {
354
- return Object.assign({}, getConfig().select.popupConfig, props.popupConfig);
355
- });
356
- const computeVirtualYOpts = (0, import_vue.computed)(() => {
357
- return Object.assign({}, getConfig().select.virtualYConfig || getConfig().select.scrollY, props.virtualYConfig || props.scrollY);
358
- });
359
- const computeRemoteOpts = (0, import_vue.computed)(() => {
360
- return Object.assign({}, getConfig().select.remoteConfig, props.remoteConfig);
361
- });
362
- const computeBadgeOpts = (0, import_vue.computed)(() => {
363
- return Object.assign({}, getConfig().select.badgeConfig, props.badgeConfig);
364
- });
365
- const computeBadgeCountNum = (0, import_vue.computed)(() => {
366
- const { showBadge } = props;
367
- if (!showBadge) {
368
- return 0;
369
- }
370
- const badgeOpts = computeBadgeOpts.value;
371
- const { count } = badgeOpts;
372
- return count ? import_xe_utils.default.toNumber(count) : 0;
373
- });
374
- const computeBadgeLabel = (0, import_vue.computed)(() => {
375
- const { showBadge } = props;
376
- if (!showBadge) {
377
- return "";
378
- }
379
- const badgeOpts = computeBadgeOpts.value;
380
- const { dot, text, max } = badgeOpts;
381
- if (dot) {
382
- return "";
383
- }
384
- if (text) {
385
- return `${text}`;
386
- }
387
- const countNum = computeBadgeCountNum.value;
388
- if (countNum) {
389
- const maxNum = max ? import_xe_utils.default.toNumber(max) : 99;
390
- return countNum > maxNum ? `${maxNum}+` : `${countNum}`;
391
- }
392
- return "";
393
- });
394
- const computeFilterOpts = (0, import_vue.computed)(() => {
395
- return Object.assign({}, getConfig().select.filterConfig, props.filterConfig);
396
- });
397
- const computeOptionOpts = (0, import_vue.computed)(() => {
398
- return Object.assign({}, getConfig().select.optionConfig, props.optionConfig);
399
- });
400
- const computeRadioOpts = (0, import_vue.computed)(() => {
401
- return Object.assign({}, getConfig().select.radioConfig, props.radioConfig);
402
- });
403
- const computeCheckboxOpts = (0, import_vue.computed)(() => {
404
- return Object.assign({}, getConfig().select.checkboxConfig, props.checkboxConfig);
405
- });
406
- const computeMultiMaxCharNum = (0, import_vue.computed)(() => {
407
- return import_xe_utils.default.toNumber(props.multiCharOverflow);
408
- });
409
- const computeCurrStyle = (0, import_vue.computed)(() => {
410
- const { width } = props;
411
- const stys = {};
412
- if (width) {
413
- stys.width = (0, import_dom.toCssUnit)(width);
414
- }
415
- return stys;
416
- });
417
- const computePopupWrapperStyle = (0, import_vue.computed)(() => {
418
- const popupOpts = computePopupOpts.value;
419
- const { height, width } = popupOpts;
420
- const stys = {};
421
- if (width) {
422
- stys.width = (0, import_dom.toCssUnit)(width);
423
- }
424
- if (height) {
425
- stys.height = (0, import_dom.toCssUnit)(height);
426
- stys.maxHeight = (0, import_dom.toCssUnit)(height);
427
- }
428
- return stys;
429
- });
430
- const computeSelectVals = (0, import_vue.computed)(() => {
431
- const { modelValue, multiple } = props;
432
- let vals = [];
433
- if (import_xe_utils.default.isArray(modelValue)) {
434
- vals = modelValue;
435
- } else {
436
- if (multiple) {
437
- if (!(0, import_utils.eqEmptyValue)(modelValue)) {
438
- vals = `${modelValue}`.indexOf(",") > -1 ? `${modelValue}`.split(",") : [modelValue];
304
+ if (transfer === null) {
305
+ const globalTransfer = getConfig().select.transfer;
306
+ if (import_xe_utils.default.isBoolean(globalTransfer)) {
307
+ return globalTransfer;
439
308
  }
440
- } else {
441
- vals = modelValue === null || modelValue === void 0 ? [] : [modelValue];
442
- }
443
- }
444
- return vals;
445
- });
446
- const computeFullLabel = (0, import_vue.computed)(() => {
447
- const { remote } = props;
448
- const { reactFlag } = reactData;
449
- const selectVals = computeSelectVals.value;
450
- if (remote && reactFlag) {
451
- return selectVals.map((val) => getRemoteSelectLabel(val)).join(", ");
452
- }
453
- return selectVals.map((val) => getSelectLabel(val)).join(", ");
454
- });
455
- const computeSelectLabel = (0, import_vue.computed)(() => {
456
- const { remote, multiple } = props;
457
- const { reactFlag } = reactData;
458
- const multiMaxCharNum = computeMultiMaxCharNum.value;
459
- const selectVals = computeSelectVals.value;
460
- if (remote && reactFlag) {
461
- return selectVals.map((val) => getRemoteSelectLabel(val)).join(", ");
462
- }
463
- const labels = selectVals.map((val) => getSelectLabel(val));
464
- if (multiple && multiMaxCharNum > 0 && labels.length > multiMaxCharNum) {
465
- return `${labels.slice(0, multiMaxCharNum)}...`;
466
- }
467
- return labels.join(", ");
468
- });
469
- const computeScrollbarOpts = (0, import_vue.computed)(() => {
470
- return Object.assign({}, getConfig().tree.scrollbarConfig, props.scrollbarConfig);
471
- });
472
- const computeScrollbarXOpts = (0, import_vue.computed)(() => {
473
- const scrollbarOpts = computeScrollbarOpts.value;
474
- return Object.assign({}, getConfig().scrollbar.xConfig, scrollbarOpts.xConfig, {
475
- visible: false
309
+ if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
310
+ return true;
311
+ }
312
+ }
313
+ return transfer;
476
314
  });
477
- });
478
- const computeScrollbarYOpts = (0, import_vue.computed)(() => {
479
- const scrollbarOpts = computeScrollbarOpts.value;
480
- return Object.assign({}, getConfig().scrollbar.yConfig, scrollbarOpts.yConfig);
481
- });
482
- const computeScrollXHeight = (0, import_vue.computed)(() => {
483
- const scrollbarOpts = computeScrollbarOpts.value;
484
- const scrollbarXOpts = computeScrollbarXOpts.value;
485
- return getDefVal(getDefVal(scrollbarXOpts.height, scrollbarOpts.height), getConfig().scrollbar.height);
486
- });
487
- const computeScrollYWidth = (0, import_vue.computed)(() => {
488
- const scrollbarOpts = computeScrollbarOpts.value;
489
- const scrollbarYOpts = computeScrollbarYOpts.value;
490
- return getDefVal(getDefVal(scrollbarYOpts.width, scrollbarOpts.width), getConfig().scrollbar.width);
491
- });
492
- const computeScrollXVisible = (0, import_vue.computed)(() => {
493
- const scrollbarOpts = computeScrollbarOpts.value;
494
- const scrollbarXOpts = computeScrollbarXOpts.value;
495
- return getDefVal(scrollbarXOpts.visible, scrollbarOpts.visible);
496
- });
497
- const computeScrollYVisible = (0, import_vue.computed)(() => {
498
- const scrollbarOpts = computeScrollbarOpts.value;
499
- const scrollbarYOpts = computeScrollbarYOpts.value;
500
- return getDefVal(scrollbarYOpts.visible, scrollbarOpts.visible);
501
- });
502
- const computeScrollXAutoHide = (0, import_vue.computed)(() => {
503
- const scrollbarOpts = computeScrollbarOpts.value;
504
- const scrollbarXOpts = computeScrollbarXOpts.value;
505
- return getDefVal(getDefVal(scrollbarXOpts.autoHide, scrollbarOpts.autoHide), getConfig().scrollbar.autoHide);
506
- });
507
- const computeScrollYAutoHide = (0, import_vue.computed)(() => {
508
- const scrollbarOpts = computeScrollbarOpts.value;
509
- const scrollbarYOpts = computeScrollbarYOpts.value;
510
- return getDefVal(getDefVal(scrollbarYOpts.autoHide, scrollbarOpts.autoHide), getConfig().scrollbar.autoHide);
511
- });
512
- const computeScrollbarWrapperClss = (0, import_vue.computed)(() => {
513
- const { yThumbHeight, xThumbWidth } = reactData;
514
- const scrollbarOpts = computeScrollbarOpts.value;
515
- const scrollbarXToTop = computeScrollbarXToTop.value;
516
- const scrollbarYToLeft = computeScrollbarYToLeft.value;
517
- const scrollXVisible = computeScrollXVisible.value;
518
- const scrollYVisible = computeScrollYVisible.value;
519
- return domUtils.buildClass(
520
- [
521
- "vxe-scrollbar is--virtual",
522
- scrollbarOpts.fluentOverlay ? "is--fluent-overlay" : "is--default-mode",
523
- `ov-x--${scrollXVisible === false ? "hidden" : "visible"}`,
524
- `ov-y--${scrollYVisible === false ? "hidden" : "visible"}`,
525
- `sx-pos--${scrollbarXToTop ? "top" : "bottom"}`,
526
- `sy-pos--${scrollbarYToLeft ? "left" : "right"}`
527
- ],
528
- {
529
- "overflow-y": yThumbHeight,
530
- "overflow-x": xThumbWidth
315
+ const computeInpPlaceholder = (0, import_vue.computed)(() => {
316
+ const { placeholder } = props;
317
+ if (placeholder) {
318
+ return (0, import_utils.getFuncText)(placeholder);
531
319
  }
532
- );
533
- });
534
- const computeScrollbarXToTop = (0, import_vue.computed)(() => {
535
- const scrollbarXOpts = computeScrollbarXOpts.value;
536
- return scrollbarXOpts.position === "top";
537
- });
538
- const computeScrollbarYToLeft = (0, import_vue.computed)(() => {
539
- const scrollbarYOpts = computeScrollbarYOpts.value;
540
- return scrollbarYOpts.position === "left";
541
- });
542
- const callSlot = (slotFunc, params) => {
543
- if (slotFunc) {
544
- if (import_xe_utils.default.isString(slotFunc)) {
545
- slotFunc = slots[slotFunc] || null;
546
- }
547
- if (import_xe_utils.default.isFunction(slotFunc)) {
548
- return (0, import_vn.getSlotVNs)(slotFunc(params));
549
- }
550
- }
551
- return [];
552
- };
553
- const dispatchEvent = (type, params, evnt) => {
554
- emit(type, createEvent(evnt, { $select: $xeSelect }, params));
555
- };
556
- const emitModel = (value) => {
557
- emit("update:modelValue", value);
558
- };
559
- const emitDefaultValue = (value) => {
560
- emitModel(value);
561
- dispatchEvent("default-change", { value }, null);
562
- };
563
- const getOptKey = () => {
564
- const optionOpts = computeOptionOpts.value;
565
- return optionOpts.keyField || props.optionId || "_X_OPTION_KEY";
566
- };
567
- const getOptId = (option) => {
568
- const optid = option[getOptKey()];
569
- return optid ? encodeURIComponent(optid) : "";
570
- };
571
- const checkMaxLimit = (selectVals) => {
572
- const { multiple, max } = props;
573
- if (multiple && max) {
574
- return selectVals.length >= import_xe_utils.default.toNumber(max);
575
- }
576
- return false;
577
- };
578
- const getRemoteSelectLabel = (value) => {
579
- const { lazyOptions } = props;
580
- const { remoteValMaps, optFullValMaps } = internalData;
581
- const valueField = computeValueField.value;
582
- const labelField = computeLabelField.value;
583
- const remoteItem = remoteValMaps[value] || optFullValMaps[value];
584
- const item = remoteItem ? remoteItem.item : null;
585
- if (item) {
586
- return import_xe_utils.default.toValueString(item[labelField]);
587
- }
588
- if (lazyOptions) {
589
- const lazyItem = lazyOptions.find((item2) => item2[valueField] === value);
590
- if (lazyItem) {
591
- return lazyItem[labelField];
592
- }
593
- }
594
- return value;
595
- };
596
- const getSelectLabel = (value) => {
597
- const { lazyOptions } = props;
598
- const { optFullValMaps } = internalData;
599
- const valueField = computeValueField.value;
600
- const labelField = computeLabelField.value;
601
- const cacheItem = reactData.reactFlag ? optFullValMaps[value] : null;
602
- if (cacheItem) {
603
- return cacheItem.item[labelField];
604
- }
605
- if (lazyOptions) {
606
- const lazyItem = lazyOptions.find((item) => item[valueField] === value);
607
- if (lazyItem) {
608
- return lazyItem[labelField];
609
- }
610
- }
611
- return value;
612
- };
613
- const cacheItemMap = (datas) => {
614
- const groupOptionsField = computeGroupOptionsField.value;
615
- const valueField = computeValueField.value;
616
- const key = getOptKey();
617
- const groupKeyMaps = {};
618
- const fullKeyMaps = {};
619
- const list = [];
620
- const handleOptItem = (item) => {
621
- list.push(item);
622
- let optid = getOptId(item);
623
- if (!optid) {
624
- optid = getOptUniqueId();
625
- item[key] = optid;
626
- }
627
- fullKeyMaps[item[valueField]] = {
628
- key: optid,
629
- item,
630
- _index: -1
631
- };
632
- };
633
- datas.forEach((group) => {
634
- handleOptItem(group);
635
- if (group[groupOptionsField]) {
636
- groupKeyMaps[group[key]] = group;
637
- group[groupOptionsField].forEach(handleOptItem);
320
+ const globalPlaceholder = getConfig().select.placeholder;
321
+ if (globalPlaceholder) {
322
+ return (0, import_utils.getFuncText)(globalPlaceholder);
638
323
  }
324
+ return getI18n("vxe.base.pleaseSelect");
639
325
  });
640
- internalData.fullData = list;
641
- internalData.optGroupKeyMaps = groupKeyMaps;
642
- internalData.optFullValMaps = fullKeyMaps;
643
- reactData.reactFlag++;
644
- handleOption();
645
- };
646
- const handleOption = () => {
647
- const { remote, modelValue, filterable } = props;
648
- const { searchValue } = reactData;
649
- const { fullData, optFullValMaps } = internalData;
650
- const labelField = computeLabelField.value;
651
- const valueField = computeValueField.value;
652
- const filterOpts = computeFilterOpts.value;
653
- const frMethod = filterOpts.filterMethod || props.filterMethod;
654
- const searchStr = `${searchValue || ""}`.toLowerCase();
655
- let avList = [];
656
- if (remote) {
657
- avList = fullData.filter(isOptionVisible);
658
- } else {
659
- if (filterable && frMethod) {
660
- avList = searchValue ? fullData.filter((option) => {
661
- return isOptionVisible(option) && frMethod({
662
- $select: $xeSelect,
663
- group: null,
664
- option,
665
- filterValue: searchValue,
666
- searchValue,
667
- value: modelValue
668
- });
669
- }) : fullData;
670
- } else if (filterable) {
671
- avList = searchStr ? fullData.filter((option) => isOptionVisible(option) && `${option[labelField] || option[valueField]}`.toLowerCase().indexOf(searchStr) > -1) : fullData;
326
+ const computeDefaultOpts = (0, import_vue.computed)(() => {
327
+ return Object.assign({}, props.defaultConfig);
328
+ });
329
+ const computePropsOpts = (0, import_vue.computed)(() => {
330
+ return Object.assign({}, getConfig().select.optionProps, props.optionProps);
331
+ });
332
+ const computeGroupPropsOpts = (0, import_vue.computed)(() => {
333
+ return Object.assign({}, getConfig().select.optionGroupProps, props.optionGroupProps);
334
+ });
335
+ const computeLabelField = (0, import_vue.computed)(() => {
336
+ const propsOpts = computePropsOpts.value;
337
+ return propsOpts.label || "label";
338
+ });
339
+ const computeValueField = (0, import_vue.computed)(() => {
340
+ const propsOpts = computePropsOpts.value;
341
+ return propsOpts.value || "value";
342
+ });
343
+ const computeGroupLabelField = (0, import_vue.computed)(() => {
344
+ const groupPropsOpts = computeGroupPropsOpts.value;
345
+ return groupPropsOpts.label || "label";
346
+ });
347
+ const computeGroupOptionsField = (0, import_vue.computed)(() => {
348
+ const groupPropsOpts = computeGroupPropsOpts.value;
349
+ return groupPropsOpts.options || "options";
350
+ });
351
+ const computeIsMaximize = (0, import_vue.computed)(() => {
352
+ const selectVals = computeSelectVals.value;
353
+ return checkMaxLimit(selectVals);
354
+ });
355
+ const computePopupOpts = (0, import_vue.computed)(() => {
356
+ return Object.assign({}, getConfig().select.popupConfig, props.popupConfig);
357
+ });
358
+ const computeVirtualYOpts = (0, import_vue.computed)(() => {
359
+ return Object.assign({}, getConfig().select.virtualYConfig || getConfig().select.scrollY, props.virtualYConfig || props.scrollY);
360
+ });
361
+ const computeRemoteOpts = (0, import_vue.computed)(() => {
362
+ return Object.assign({}, getConfig().select.remoteConfig, props.remoteConfig);
363
+ });
364
+ const computeBadgeOpts = (0, import_vue.computed)(() => {
365
+ return Object.assign({}, getConfig().select.badgeConfig, props.badgeConfig);
366
+ });
367
+ const computeBadgeCountNum = (0, import_vue.computed)(() => {
368
+ const { showBadge } = props;
369
+ if (!showBadge) {
370
+ return 0;
371
+ }
372
+ const badgeOpts = computeBadgeOpts.value;
373
+ const { count } = badgeOpts;
374
+ return count ? import_xe_utils.default.toNumber(count) : 0;
375
+ });
376
+ const computeBadgeLabel = (0, import_vue.computed)(() => {
377
+ const { showBadge } = props;
378
+ if (!showBadge) {
379
+ return "";
380
+ }
381
+ const badgeOpts = computeBadgeOpts.value;
382
+ const { dot, text, max } = badgeOpts;
383
+ if (dot) {
384
+ return "";
385
+ }
386
+ if (text) {
387
+ return `${text}`;
388
+ }
389
+ const countNum = computeBadgeCountNum.value;
390
+ if (countNum) {
391
+ const maxNum = max ? import_xe_utils.default.toNumber(max) : 99;
392
+ return countNum > maxNum ? `${maxNum}+` : `${countNum}`;
393
+ }
394
+ return "";
395
+ });
396
+ const computeFilterOpts = (0, import_vue.computed)(() => {
397
+ return Object.assign({}, getConfig().select.filterConfig, props.filterConfig);
398
+ });
399
+ const computeOptionOpts = (0, import_vue.computed)(() => {
400
+ return Object.assign({}, getConfig().select.optionConfig, props.optionConfig);
401
+ });
402
+ const computeRadioOpts = (0, import_vue.computed)(() => {
403
+ return Object.assign({}, getConfig().select.radioConfig, props.radioConfig);
404
+ });
405
+ const computeCheckboxOpts = (0, import_vue.computed)(() => {
406
+ return Object.assign({}, getConfig().select.checkboxConfig, props.checkboxConfig);
407
+ });
408
+ const computeMultiMaxCharNum = (0, import_vue.computed)(() => {
409
+ return import_xe_utils.default.toNumber(props.multiCharOverflow);
410
+ });
411
+ const computeCurrStyle = (0, import_vue.computed)(() => {
412
+ const { width } = props;
413
+ const stys = {};
414
+ if (width) {
415
+ stys.width = (0, import_dom.toCssUnit)(width);
416
+ }
417
+ return stys;
418
+ });
419
+ const computePopupWrapperStyle = (0, import_vue.computed)(() => {
420
+ const popupOpts = computePopupOpts.value;
421
+ const { height, width } = popupOpts;
422
+ const stys = {};
423
+ if (width) {
424
+ stys.width = (0, import_dom.toCssUnit)(width);
425
+ }
426
+ if (height) {
427
+ stys.height = (0, import_dom.toCssUnit)(height);
428
+ stys.maxHeight = (0, import_dom.toCssUnit)(height);
429
+ }
430
+ return stys;
431
+ });
432
+ const computeSelectVals = (0, import_vue.computed)(() => {
433
+ const { modelValue, multiple } = props;
434
+ let vals = [];
435
+ if (import_xe_utils.default.isArray(modelValue)) {
436
+ vals = modelValue;
672
437
  } else {
673
- avList = fullData.filter(isOptionVisible);
438
+ if (multiple) {
439
+ if (!(0, import_utils.eqEmptyValue)(modelValue)) {
440
+ vals = `${modelValue}`.indexOf(",") > -1 ? `${modelValue}`.split(",") : [modelValue];
441
+ }
442
+ } else {
443
+ vals = modelValue === null || modelValue === void 0 ? [] : [modelValue];
444
+ }
674
445
  }
675
- }
676
- avList.forEach((item, index) => {
677
- const cacheItem = optFullValMaps[item[valueField]];
678
- if (cacheItem) {
679
- cacheItem._index = index;
446
+ return vals;
447
+ });
448
+ const computeFullLabel = (0, import_vue.computed)(() => {
449
+ const { remote } = props;
450
+ const { reactFlag } = reactData;
451
+ const selectVals = computeSelectVals.value;
452
+ if (remote && reactFlag) {
453
+ return selectVals.map((val) => getRemoteSelectLabel(val)).join(", ");
680
454
  }
455
+ return selectVals.map((val) => getSelectLabel(val)).join(", ");
681
456
  });
682
- internalData.afterVisibleList = avList;
683
- return (0, import_vue.nextTick)();
684
- };
685
- const setCurrentOption = (option) => {
686
- if (option) {
687
- reactData.currentOption = option;
688
- }
689
- };
690
- const updateZIndex = () => {
691
- const popupOpts = computePopupOpts.value;
692
- const customZIndex = popupOpts.zIndex || props.zIndex;
693
- if (customZIndex) {
694
- reactData.panelIndex = import_xe_utils.default.toNumber(customZIndex);
695
- } else if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
696
- reactData.panelIndex = (0, import_utils.nextZIndex)();
697
- }
698
- };
699
- const updatePlacement = () => {
700
- const { placement } = props;
701
- const { panelIndex } = reactData;
702
- const targetElem = refElem.value;
703
- const panelElem = refOptionPanel.value;
704
- const btnTransfer = computeBtnTransfer.value;
705
- const popupOpts = computePopupOpts.value;
706
- const handleStyle = () => {
707
- const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
708
- placement: popupOpts.placement || placement,
709
- defaultPlacement: popupOpts.defaultPlacement,
710
- appendTo: popupOpts.appendTo,
711
- teleportTo: btnTransfer
712
- });
713
- const panelStyle = Object.assign(ppObj.style, {
714
- zIndex: panelIndex
715
- });
716
- reactData.panelStyle = panelStyle;
717
- reactData.panelPlacement = ppObj.placement;
718
- };
719
- handleStyle();
720
- return (0, import_vue.nextTick)().then(handleStyle);
721
- };
722
- const handleScrollSelect = () => {
723
- (0, import_vue.nextTick)(() => {
724
- const { isAniVisible, visiblePanel } = reactData;
725
- const { optFullValMaps } = internalData;
457
+ const computeSelectLabel = (0, import_vue.computed)(() => {
458
+ const { remote, multiple } = props;
459
+ const { reactFlag } = reactData;
460
+ const multiMaxCharNum = computeMultiMaxCharNum.value;
726
461
  const selectVals = computeSelectVals.value;
727
- if (selectVals.length && isAniVisible && visiblePanel) {
728
- const cacheItem = reactData.reactFlag ? optFullValMaps[`${selectVals[0]}`] : null;
729
- if (cacheItem) {
730
- reactData.currentOption = cacheItem.item;
731
- handleScrollToOption(cacheItem.item);
732
- }
462
+ if (remote && reactFlag) {
463
+ return selectVals.map((val) => getRemoteSelectLabel(val)).join(", ");
464
+ }
465
+ const labels = selectVals.map((val) => getSelectLabel(val));
466
+ if (multiple && multiMaxCharNum > 0 && labels.length > multiMaxCharNum) {
467
+ return `${labels.slice(0, multiMaxCharNum)}...`;
733
468
  }
469
+ return labels.join(", ");
734
470
  });
735
- };
736
- const showOptionPanel = () => {
737
- const { loading, filterable, remote } = props;
738
- const { fullData, hpTimeout } = internalData;
739
- const isDisabled = computeIsDisabled.value;
740
- const remoteOpts = computeRemoteOpts.value;
741
- const selectVals = computeSelectVals.value;
742
- if (!loading && !isDisabled) {
743
- if (hpTimeout) {
744
- clearTimeout(hpTimeout);
745
- internalData.hpTimeout = void 0;
746
- }
747
- if (!reactData.initialized) {
748
- reactData.initialized = true;
749
- (0, import_vue.nextTick)(() => {
750
- bindScrollbarResize();
751
- });
471
+ const computeScrollbarOpts = (0, import_vue.computed)(() => {
472
+ return Object.assign({}, getConfig().tree.scrollbarConfig, props.scrollbarConfig);
473
+ });
474
+ const computeScrollbarXOpts = (0, import_vue.computed)(() => {
475
+ const scrollbarOpts = computeScrollbarOpts.value;
476
+ return Object.assign({}, getConfig().scrollbar.xConfig, scrollbarOpts.xConfig, {
477
+ visible: false
478
+ });
479
+ });
480
+ const computeScrollbarYOpts = (0, import_vue.computed)(() => {
481
+ const scrollbarOpts = computeScrollbarOpts.value;
482
+ return Object.assign({}, getConfig().scrollbar.yConfig, scrollbarOpts.yConfig);
483
+ });
484
+ const computeScrollXHeight = (0, import_vue.computed)(() => {
485
+ const scrollbarOpts = computeScrollbarOpts.value;
486
+ const scrollbarXOpts = computeScrollbarXOpts.value;
487
+ return getDefVal(getDefVal(scrollbarXOpts.height, scrollbarOpts.height), getConfig().scrollbar.height);
488
+ });
489
+ const computeScrollYWidth = (0, import_vue.computed)(() => {
490
+ const scrollbarOpts = computeScrollbarOpts.value;
491
+ const scrollbarYOpts = computeScrollbarYOpts.value;
492
+ return getDefVal(getDefVal(scrollbarYOpts.width, scrollbarOpts.width), getConfig().scrollbar.width);
493
+ });
494
+ const computeScrollXVisible = (0, import_vue.computed)(() => {
495
+ const scrollbarOpts = computeScrollbarOpts.value;
496
+ const scrollbarXOpts = computeScrollbarXOpts.value;
497
+ return getDefVal(scrollbarXOpts.visible, scrollbarOpts.visible);
498
+ });
499
+ const computeScrollYVisible = (0, import_vue.computed)(() => {
500
+ const scrollbarOpts = computeScrollbarOpts.value;
501
+ const scrollbarYOpts = computeScrollbarYOpts.value;
502
+ return getDefVal(scrollbarYOpts.visible, scrollbarOpts.visible);
503
+ });
504
+ const computeScrollXAutoHide = (0, import_vue.computed)(() => {
505
+ const scrollbarOpts = computeScrollbarOpts.value;
506
+ const scrollbarXOpts = computeScrollbarXOpts.value;
507
+ return getDefVal(getDefVal(scrollbarXOpts.autoHide, scrollbarOpts.autoHide), getConfig().scrollbar.autoHide);
508
+ });
509
+ const computeScrollYAutoHide = (0, import_vue.computed)(() => {
510
+ const scrollbarOpts = computeScrollbarOpts.value;
511
+ const scrollbarYOpts = computeScrollbarYOpts.value;
512
+ return getDefVal(getDefVal(scrollbarYOpts.autoHide, scrollbarOpts.autoHide), getConfig().scrollbar.autoHide);
513
+ });
514
+ const computeScrollbarWrapperClss = (0, import_vue.computed)(() => {
515
+ const { yThumbHeight, xThumbWidth } = reactData;
516
+ const scrollbarOpts = computeScrollbarOpts.value;
517
+ const scrollbarXToTop = computeScrollbarXToTop.value;
518
+ const scrollbarYToLeft = computeScrollbarYToLeft.value;
519
+ const scrollXVisible = computeScrollXVisible.value;
520
+ const scrollYVisible = computeScrollYVisible.value;
521
+ return domUtils.buildClass(
522
+ [
523
+ "vxe-scrollbar is--virtual",
524
+ scrollbarOpts.fluentOverlay ? "is--fluent-overlay" : "is--default-mode",
525
+ `ov-x--${scrollXVisible === false ? "hidden" : "visible"}`,
526
+ `ov-y--${scrollYVisible === false ? "hidden" : "visible"}`,
527
+ `sx-pos--${scrollbarXToTop ? "top" : "bottom"}`,
528
+ `sy-pos--${scrollbarYToLeft ? "left" : "right"}`
529
+ ],
530
+ {
531
+ "overflow-y": yThumbHeight,
532
+ "overflow-x": xThumbWidth
533
+ }
534
+ );
535
+ });
536
+ const computeScrollbarXToTop = (0, import_vue.computed)(() => {
537
+ const scrollbarXOpts = computeScrollbarXOpts.value;
538
+ return scrollbarXOpts.position === "top";
539
+ });
540
+ const computeScrollbarYToLeft = (0, import_vue.computed)(() => {
541
+ const scrollbarYOpts = computeScrollbarYOpts.value;
542
+ return scrollbarYOpts.position === "left";
543
+ });
544
+ const callSlot = (slotFunc, params) => {
545
+ if (slotFunc) {
546
+ if (import_xe_utils.default.isString(slotFunc)) {
547
+ slotFunc = slots[slotFunc] || null;
548
+ }
549
+ if (import_xe_utils.default.isFunction(slotFunc)) {
550
+ return (0, import_vn.getSlotVNs)(slotFunc(params));
551
+ }
752
552
  }
753
- reactData.isActivated = true;
754
- reactData.isAniVisible = true;
755
- if (filterable) {
756
- if (remote && remoteOpts.enabled && (remoteOpts.autoLoad && !fullData.length || fullData.length && remoteOpts.clearOnClose)) {
757
- handleSearchEvent();
553
+ return [];
554
+ };
555
+ const dispatchEvent = (type, params, evnt) => {
556
+ emit(type, createEvent(evnt, { $select: $xeSelect }, params));
557
+ };
558
+ const emitModel = (value) => {
559
+ emit("update:modelValue", value);
560
+ };
561
+ const emitDefaultValue = (value) => {
562
+ emitModel(value);
563
+ dispatchEvent("default-change", { value }, null);
564
+ };
565
+ const getOptKey = () => {
566
+ const optionOpts = computeOptionOpts.value;
567
+ return optionOpts.keyField || props.optionId || "_X_OPTION_KEY";
568
+ };
569
+ const getOptId = (option) => {
570
+ const optid = option[getOptKey()];
571
+ return optid ? encodeURIComponent(optid) : "";
572
+ };
573
+ const checkMaxLimit = (selectVals) => {
574
+ const { multiple, max } = props;
575
+ if (multiple && max) {
576
+ return selectVals.length >= import_xe_utils.default.toNumber(max);
577
+ }
578
+ return false;
579
+ };
580
+ const getRemoteSelectLabel = (value) => {
581
+ const { lazyOptions } = props;
582
+ const { remoteValMaps, optFullValMaps } = internalData;
583
+ const valueField = computeValueField.value;
584
+ const labelField = computeLabelField.value;
585
+ const remoteItem = remoteValMaps[value] || optFullValMaps[value];
586
+ const item = remoteItem ? remoteItem.item : null;
587
+ if (item) {
588
+ return import_xe_utils.default.toValueString(item[labelField]);
589
+ }
590
+ if (lazyOptions) {
591
+ const lazyItem = lazyOptions.find((item2) => item2[valueField] === value);
592
+ if (lazyItem) {
593
+ return lazyItem[labelField];
594
+ }
595
+ }
596
+ return value;
597
+ };
598
+ const getSelectLabel = (value) => {
599
+ const { lazyOptions } = props;
600
+ const { optFullValMaps } = internalData;
601
+ const valueField = computeValueField.value;
602
+ const labelField = computeLabelField.value;
603
+ const cacheItem = reactData.reactFlag ? optFullValMaps[value] : null;
604
+ if (cacheItem) {
605
+ return cacheItem.item[labelField];
606
+ }
607
+ if (lazyOptions) {
608
+ const lazyItem = lazyOptions.find((item) => item[valueField] === value);
609
+ if (lazyItem) {
610
+ return lazyItem[labelField];
611
+ }
612
+ }
613
+ return value;
614
+ };
615
+ const cacheItemMap = (datas) => {
616
+ const groupOptionsField = computeGroupOptionsField.value;
617
+ const valueField = computeValueField.value;
618
+ const key = getOptKey();
619
+ const groupKeyMaps = {};
620
+ const fullKeyMaps = {};
621
+ const list = [];
622
+ const handleOptItem = (item) => {
623
+ list.push(item);
624
+ let optid = getOptId(item);
625
+ if (!optid) {
626
+ optid = getOptUniqueId();
627
+ item[key] = optid;
628
+ }
629
+ fullKeyMaps[item[valueField]] = {
630
+ key: optid,
631
+ item,
632
+ _index: -1
633
+ };
634
+ };
635
+ datas.forEach((group) => {
636
+ handleOptItem(group);
637
+ if (group[groupOptionsField]) {
638
+ groupKeyMaps[group[key]] = group;
639
+ group[groupOptionsField].forEach(handleOptItem);
640
+ }
641
+ });
642
+ internalData.fullData = list;
643
+ internalData.optGroupKeyMaps = groupKeyMaps;
644
+ internalData.optFullValMaps = fullKeyMaps;
645
+ reactData.reactFlag++;
646
+ handleOption();
647
+ };
648
+ const handleOption = () => {
649
+ const { remote, modelValue, filterable } = props;
650
+ const { searchValue } = reactData;
651
+ const { fullData, optFullValMaps } = internalData;
652
+ const labelField = computeLabelField.value;
653
+ const valueField = computeValueField.value;
654
+ const filterOpts = computeFilterOpts.value;
655
+ const frMethod = filterOpts.filterMethod || props.filterMethod;
656
+ const searchStr = `${searchValue || ""}`.toLowerCase();
657
+ let avList = [];
658
+ if (remote) {
659
+ avList = fullData.filter(isOptionVisible);
660
+ } else {
661
+ if (filterable && frMethod) {
662
+ avList = searchValue ? fullData.filter((option) => {
663
+ return isOptionVisible(option) && frMethod({
664
+ $select: $xeSelect,
665
+ group: null,
666
+ option,
667
+ filterValue: searchValue,
668
+ searchValue,
669
+ value: modelValue
670
+ });
671
+ }) : fullData;
672
+ } else if (filterable) {
673
+ avList = searchStr ? fullData.filter((option) => isOptionVisible(option) && `${option[labelField] || option[valueField]}`.toLowerCase().indexOf(searchStr) > -1) : fullData;
758
674
  } else {
759
- handleOption();
760
- updateYData();
675
+ avList = fullData.filter(isOptionVisible);
676
+ }
677
+ }
678
+ avList.forEach((item, index) => {
679
+ const cacheItem = optFullValMaps[item[valueField]];
680
+ if (cacheItem) {
681
+ cacheItem._index = index;
761
682
  }
683
+ });
684
+ internalData.afterVisibleList = avList;
685
+ return (0, import_vue.nextTick)();
686
+ };
687
+ const setCurrentOption = (option) => {
688
+ if (option) {
689
+ reactData.currentOption = option;
690
+ }
691
+ };
692
+ const updateZIndex = () => {
693
+ const popupOpts = computePopupOpts.value;
694
+ const customZIndex = popupOpts.zIndex || props.zIndex;
695
+ if (customZIndex) {
696
+ reactData.panelIndex = import_xe_utils.default.toNumber(customZIndex);
697
+ } else if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
698
+ reactData.panelIndex = (0, import_utils.nextZIndex)();
762
699
  }
763
- setTimeout(() => {
764
- reactData.visiblePanel = true;
765
- handleFocusSearch();
766
- recalculate().then(() => {
767
- if (selectVals && selectVals.length) {
768
- handleScrollSelect();
700
+ };
701
+ const updatePlacement = () => {
702
+ const { placement } = props;
703
+ const { panelIndex } = reactData;
704
+ const targetElem = refElem.value;
705
+ const panelElem = refOptionPanel.value;
706
+ const btnTransfer = computeBtnTransfer.value;
707
+ const popupOpts = computePopupOpts.value;
708
+ const handleStyle = () => {
709
+ const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
710
+ placement: popupOpts.placement || placement,
711
+ defaultPlacement: popupOpts.defaultPlacement,
712
+ appendTo: popupOpts.appendTo,
713
+ teleportTo: btnTransfer
714
+ });
715
+ const panelStyle = Object.assign(ppObj.style, {
716
+ zIndex: panelIndex
717
+ });
718
+ reactData.panelStyle = panelStyle;
719
+ reactData.panelPlacement = ppObj.placement;
720
+ };
721
+ handleStyle();
722
+ return (0, import_vue.nextTick)().then(handleStyle);
723
+ };
724
+ const handleScrollSelect = () => {
725
+ (0, import_vue.nextTick)(() => {
726
+ const { isAniVisible, visiblePanel } = reactData;
727
+ const { optFullValMaps } = internalData;
728
+ const selectVals = computeSelectVals.value;
729
+ if (selectVals.length && isAniVisible && visiblePanel) {
730
+ const cacheItem = reactData.reactFlag ? optFullValMaps[`${selectVals[0]}`] : null;
731
+ if (cacheItem) {
732
+ reactData.currentOption = cacheItem.item;
733
+ handleScrollToOption(cacheItem.item);
734
+ }
735
+ }
736
+ });
737
+ };
738
+ const showOptionPanel = () => {
739
+ const { loading, filterable, remote } = props;
740
+ const { fullData, hpTimeout } = internalData;
741
+ const isDisabled = computeIsDisabled.value;
742
+ const remoteOpts = computeRemoteOpts.value;
743
+ const selectVals = computeSelectVals.value;
744
+ if (!loading && !isDisabled) {
745
+ if (hpTimeout) {
746
+ clearTimeout(hpTimeout);
747
+ internalData.hpTimeout = void 0;
748
+ }
749
+ if (!reactData.initialized) {
750
+ reactData.initialized = true;
751
+ (0, import_vue.nextTick)(() => {
752
+ bindScrollbarResize();
753
+ });
754
+ }
755
+ reactData.isActivated = true;
756
+ reactData.isAniVisible = true;
757
+ if (filterable) {
758
+ if (remote && remoteOpts.enabled && (remoteOpts.autoLoad && !fullData.length || fullData.length && remoteOpts.clearOnClose)) {
759
+ handleSearchEvent();
769
760
  } else {
770
- refreshScroll();
761
+ handleOption();
762
+ updateYData();
771
763
  }
772
- });
764
+ }
765
+ setTimeout(() => {
766
+ reactData.visiblePanel = true;
767
+ handleFocusSearch();
768
+ recalculate().then(() => {
769
+ if (selectVals && selectVals.length) {
770
+ handleScrollSelect();
771
+ } else {
772
+ refreshScroll();
773
+ }
774
+ });
775
+ updatePlacement();
776
+ }, 10);
777
+ setTimeout(() => {
778
+ recalculate().then(() => refreshScroll());
779
+ }, 100);
780
+ updateZIndex();
773
781
  updatePlacement();
774
- }, 10);
775
- setTimeout(() => {
776
- recalculate().then(() => refreshScroll());
777
- }, 100);
778
- updateZIndex();
779
- updatePlacement();
780
- dispatchEvent("visible-change", { visible: true }, null);
781
- }
782
- };
783
- const hideOptionPanel = (evnt) => {
784
- const { filterable, remote } = props;
785
- const filterOpts = computeFilterOpts.value;
786
- const remoteOpts = computeRemoteOpts.value;
787
- if (remote) {
788
- if (remoteOpts.clearOnClose) {
789
- reactData.searchValue = "";
782
+ dispatchEvent("visible-change", { visible: true }, null);
790
783
  }
791
- } else if (filterable) {
792
- if (filterOpts.clearOnClose) {
784
+ };
785
+ const hideOptionPanel = (evnt) => {
786
+ const { filterable, remote } = props;
787
+ const filterOpts = computeFilterOpts.value;
788
+ const remoteOpts = computeRemoteOpts.value;
789
+ if (remote) {
790
+ if (remoteOpts.clearOnClose) {
791
+ reactData.searchValue = "";
792
+ }
793
+ } else if (filterable) {
794
+ if (filterOpts.clearOnClose) {
795
+ reactData.searchValue = "";
796
+ }
797
+ } else {
793
798
  reactData.searchValue = "";
794
799
  }
795
- } else {
796
- reactData.searchValue = "";
797
- }
798
- reactData.searchLoading = false;
799
- reactData.visiblePanel = false;
800
- internalData.hpTimeout = setTimeout(() => {
801
- reactData.isAniVisible = false;
802
- }, 350);
803
- dispatchEvent("visible-change", { visible: false }, evnt || null);
804
- };
805
- const changeEvent = (evnt, selectValue, option) => {
806
- emitModel(selectValue);
807
- if (selectValue !== props.modelValue) {
808
- dispatchEvent("change", { value: selectValue, option }, evnt);
809
- if ($xeForm && formItemInfo) {
810
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
811
- }
812
- }
813
- };
814
- const clearValueEvent = (evnt, selectValue) => {
815
- internalData.remoteValMaps = {};
816
- changeEvent(evnt, selectValue, null);
817
- dispatchEvent("clear", { value: selectValue }, evnt);
818
- };
819
- const clearEvent = (params) => {
820
- const { emptyValue } = props;
821
- const { $event } = params;
822
- clearValueEvent($event, emptyValue);
823
- hideOptionPanel($event);
824
- };
825
- const allCheckedPanelEvent = (params) => {
826
- const { $event } = params;
827
- const { multiple, max, checkedClosable } = props;
828
- const { optList } = reactData;
829
- const valueField = computeValueField.value;
830
- if (multiple) {
831
- const selectVals = computeSelectVals.value;
832
- const currVlas = selectVals.slice(0);
833
- for (let i = 0; i < optList.length; i++) {
834
- const option = optList[i];
835
- const selectValue = option[valueField];
836
- if (checkMaxLimit(currVlas)) {
837
- if (import_core.VxeUI) {
838
- import_core.VxeUI.modal.message({
839
- content: getI18n("vxe.select.overSizeErr", [max]),
840
- status: "warning"
841
- });
800
+ reactData.searchLoading = false;
801
+ reactData.visiblePanel = false;
802
+ internalData.hpTimeout = setTimeout(() => {
803
+ reactData.isAniVisible = false;
804
+ }, 350);
805
+ dispatchEvent("visible-change", { visible: false }, evnt || null);
806
+ };
807
+ const changeEvent = (evnt, selectValue, option) => {
808
+ emitModel(selectValue);
809
+ if (selectValue !== props.modelValue) {
810
+ dispatchEvent("change", { value: selectValue, option }, evnt);
811
+ if ($xeForm && formItemInfo) {
812
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
813
+ }
814
+ }
815
+ };
816
+ const clearValueEvent = (evnt, selectValue) => {
817
+ internalData.remoteValMaps = {};
818
+ changeEvent(evnt, selectValue, null);
819
+ dispatchEvent("clear", { value: selectValue }, evnt);
820
+ };
821
+ const clearEvent = (params) => {
822
+ const { emptyValue } = props;
823
+ const { $event } = params;
824
+ clearValueEvent($event, emptyValue);
825
+ hideOptionPanel($event);
826
+ };
827
+ const allCheckedPanelEvent = (params) => {
828
+ const { $event } = params;
829
+ const { multiple, max, checkedClosable } = props;
830
+ const { optList } = reactData;
831
+ const valueField = computeValueField.value;
832
+ if (multiple) {
833
+ const selectVals = computeSelectVals.value;
834
+ const currVlas = selectVals.slice(0);
835
+ for (let i = 0; i < optList.length; i++) {
836
+ const option = optList[i];
837
+ const selectValue = option[valueField];
838
+ if (checkMaxLimit(currVlas)) {
839
+ if (import_core.VxeUI) {
840
+ import_core.VxeUI.modal.message({
841
+ content: getI18n("vxe.select.overSizeErr", [max]),
842
+ status: "warning"
843
+ });
844
+ }
845
+ break;
846
+ }
847
+ if (!currVlas.some((val) => val === selectValue)) {
848
+ currVlas.push(selectValue);
842
849
  }
843
- break;
844
850
  }
845
- if (!currVlas.some((val) => val === selectValue)) {
846
- currVlas.push(selectValue);
851
+ changeEvent($event, currVlas, optList[0]);
852
+ if (checkedClosable) {
853
+ hideOptionPanel($event);
847
854
  }
855
+ dispatchEvent("all-change", { value: currVlas }, $event);
848
856
  }
849
- changeEvent($event, currVlas, optList[0]);
850
- if (checkedClosable) {
857
+ };
858
+ const clearCheckedPanelEvent = (params) => {
859
+ const { emptyValue, clearClosable } = props;
860
+ const { $event } = params;
861
+ clearValueEvent($event, emptyValue);
862
+ if (clearClosable) {
851
863
  hideOptionPanel($event);
852
864
  }
853
- dispatchEvent("all-change", { value: currVlas }, $event);
854
- }
855
- };
856
- const clearCheckedPanelEvent = (params) => {
857
- const { emptyValue, clearClosable } = props;
858
- const { $event } = params;
859
- clearValueEvent($event, emptyValue);
860
- if (clearClosable) {
865
+ };
866
+ const closePanelEvent = (params) => {
867
+ const { $event } = params;
861
868
  hideOptionPanel($event);
862
- }
863
- };
864
- const closePanelEvent = (params) => {
865
- const { $event } = params;
866
- hideOptionPanel($event);
867
- };
868
- const changeOptionEvent = (evnt, option) => {
869
- const { multiple } = props;
870
- const { remoteValMaps } = internalData;
871
- const valueField = computeValueField.value;
872
- const selectValue = option[valueField];
873
- const remoteItem = remoteValMaps[selectValue];
874
- if (!reactData.visiblePanel) {
875
- return;
876
- }
877
- if (remoteItem) {
878
- remoteItem.item = option;
879
- } else {
880
- remoteValMaps[selectValue] = {
881
- key: getOptId(option),
882
- item: option,
883
- _index: -1
884
- };
885
- }
886
- if (multiple) {
887
- let multipleValue = [];
888
- const selectVals = computeSelectVals.value;
889
- const index = import_xe_utils.default.findIndexOf(selectVals, (val) => val === selectValue);
890
- if (index === -1) {
891
- multipleValue = selectVals.concat([selectValue]);
869
+ };
870
+ const changeOptionEvent = (evnt, option) => {
871
+ const { multiple } = props;
872
+ const { remoteValMaps } = internalData;
873
+ const valueField = computeValueField.value;
874
+ const selectValue = option[valueField];
875
+ const remoteItem = remoteValMaps[selectValue];
876
+ if (!reactData.visiblePanel) {
877
+ return;
878
+ }
879
+ if (remoteItem) {
880
+ remoteItem.item = option;
892
881
  } else {
893
- multipleValue = selectVals.filter((val) => val !== selectValue);
894
- }
895
- changeEvent(evnt, multipleValue, option);
896
- } else {
897
- changeEvent(evnt, selectValue, option);
898
- hideOptionPanel(evnt);
899
- }
900
- reactData.reactFlag++;
901
- };
902
- const handleGlobalMousedownEvent = (evnt) => {
903
- const { visiblePanel } = reactData;
904
- const isDisabled = computeIsDisabled.value;
905
- const popupOpts = computePopupOpts.value;
906
- const { trigger } = popupOpts;
907
- if (!isDisabled) {
908
- const el = refElem.value;
909
- const panelElem = refOptionPanel.value;
910
- reactData.isActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelElem).flag;
911
- if (visiblePanel && !reactData.isActivated) {
912
- if (trigger !== "manual") {
913
- hideOptionPanel(evnt);
914
- }
882
+ remoteValMaps[selectValue] = {
883
+ key: getOptId(option),
884
+ item: option,
885
+ _index: -1
886
+ };
915
887
  }
916
- }
917
- };
918
- const validOffsetOption = (option) => {
919
- const isDisabled = option.disabled;
920
- const optid = getOptId(option);
921
- if (!isDisabled && !hasOptGroupById(optid)) {
922
- return true;
923
- }
924
- return false;
925
- };
926
- const findOffsetOption = (option, isDwArrow) => {
927
- const { allowCreate } = props;
928
- const { optList } = reactData;
929
- const { optFullValMaps, optAddMaps, afterVisibleList } = internalData;
930
- const valueField = computeValueField.value;
931
- let fullList = afterVisibleList;
932
- let offsetAddIndex = 0;
933
- if (allowCreate && optList.length) {
934
- const firstItem = optList[0];
935
- const optid = getOptId(firstItem);
936
- if (optAddMaps[optid]) {
937
- offsetAddIndex = 1;
938
- fullList = [optAddMaps[optid]].concat(fullList);
939
- }
940
- }
941
- if (!option) {
942
- if (isDwArrow) {
943
- for (let i = 0; i < fullList.length; i++) {
944
- const item = fullList[i];
945
- if (validOffsetOption(item)) {
946
- return item;
947
- }
888
+ if (multiple) {
889
+ let multipleValue = [];
890
+ const selectVals = computeSelectVals.value;
891
+ const index = import_xe_utils.default.findIndexOf(selectVals, (val) => val === selectValue);
892
+ if (index === -1) {
893
+ multipleValue = selectVals.concat([selectValue]);
894
+ } else {
895
+ multipleValue = selectVals.filter((val) => val !== selectValue);
948
896
  }
897
+ changeEvent(evnt, multipleValue, option);
949
898
  } else {
950
- for (let len = fullList.length - 1; len >= 0; len--) {
951
- const item = fullList[len];
952
- if (validOffsetOption(item)) {
953
- return item;
899
+ changeEvent(evnt, selectValue, option);
900
+ hideOptionPanel(evnt);
901
+ }
902
+ reactData.reactFlag++;
903
+ };
904
+ const handleGlobalMousedownEvent = (evnt) => {
905
+ const { visiblePanel } = reactData;
906
+ const isDisabled = computeIsDisabled.value;
907
+ const popupOpts = computePopupOpts.value;
908
+ const { trigger } = popupOpts;
909
+ if (!isDisabled) {
910
+ const el = refElem.value;
911
+ const panelElem = refOptionPanel.value;
912
+ reactData.isActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelElem).flag;
913
+ if (visiblePanel && !reactData.isActivated) {
914
+ if (trigger !== "manual") {
915
+ hideOptionPanel(evnt);
954
916
  }
955
917
  }
956
918
  }
957
- }
958
- let avIndex = 0;
959
- const cacheItem = option ? optFullValMaps[option[valueField]] : null;
960
- if (cacheItem) {
961
- avIndex = cacheItem._index + offsetAddIndex;
962
- }
963
- if (avIndex > -1) {
964
- if (isDwArrow) {
965
- for (let i = avIndex + 1; i <= fullList.length - 1; i++) {
966
- const item = fullList[i];
967
- if (validOffsetOption(item)) {
968
- return item;
969
- }
919
+ };
920
+ const validOffsetOption = (option) => {
921
+ const isDisabled = option.disabled;
922
+ const optid = getOptId(option);
923
+ if (!isDisabled && !hasOptGroupById(optid)) {
924
+ return true;
925
+ }
926
+ return false;
927
+ };
928
+ const findOffsetOption = (option, isDwArrow) => {
929
+ const { allowCreate } = props;
930
+ const { optList } = reactData;
931
+ const { optFullValMaps, optAddMaps, afterVisibleList } = internalData;
932
+ const valueField = computeValueField.value;
933
+ let fullList = afterVisibleList;
934
+ let offsetAddIndex = 0;
935
+ if (allowCreate && optList.length) {
936
+ const firstItem = optList[0];
937
+ const optid = getOptId(firstItem);
938
+ if (optAddMaps[optid]) {
939
+ offsetAddIndex = 1;
940
+ fullList = [optAddMaps[optid]].concat(fullList);
970
941
  }
971
- } else {
972
- if (avIndex > 0) {
973
- for (let len = avIndex - 1; len >= 0; len--) {
942
+ }
943
+ if (!option) {
944
+ if (isDwArrow) {
945
+ for (let i = 0; i < fullList.length; i++) {
946
+ const item = fullList[i];
947
+ if (validOffsetOption(item)) {
948
+ return item;
949
+ }
950
+ }
951
+ } else {
952
+ for (let len = fullList.length - 1; len >= 0; len--) {
974
953
  const item = fullList[len];
975
954
  if (validOffsetOption(item)) {
976
955
  return item;
@@ -978,767 +957,854 @@ var select_default = (0, import_comp.defineVxeComponent)({
978
957
  }
979
958
  }
980
959
  }
981
- }
982
- return null;
983
- };
984
- const handleGlobalKeydownEvent = (evnt) => {
985
- const { emptyValue, clearable } = props;
986
- const { visiblePanel, currentOption } = reactData;
987
- const isDisabled = computeIsDisabled.value;
988
- const popupOpts = computePopupOpts.value;
989
- const { trigger } = popupOpts;
990
- if (!isDisabled) {
991
- const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
992
- const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
993
- const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
994
- const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
995
- const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
996
- const isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
997
- if (isTab) {
998
- reactData.isActivated = false;
960
+ let avIndex = 0;
961
+ const cacheItem = option ? optFullValMaps[option[valueField]] : null;
962
+ if (cacheItem) {
963
+ avIndex = cacheItem._index + offsetAddIndex;
999
964
  }
1000
- if (visiblePanel) {
1001
- if (isEsc || isTab) {
1002
- if (trigger !== "manual") {
1003
- hideOptionPanel(evnt);
965
+ if (avIndex > -1) {
966
+ if (isDwArrow) {
967
+ for (let i = avIndex + 1; i <= fullList.length - 1; i++) {
968
+ const item = fullList[i];
969
+ if (validOffsetOption(item)) {
970
+ return item;
971
+ }
1004
972
  }
1005
- } else if (isEnter) {
1006
- if (currentOption) {
973
+ } else {
974
+ if (avIndex > 0) {
975
+ for (let len = avIndex - 1; len >= 0; len--) {
976
+ const item = fullList[len];
977
+ if (validOffsetOption(item)) {
978
+ return item;
979
+ }
980
+ }
981
+ }
982
+ }
983
+ }
984
+ return null;
985
+ };
986
+ const handleGlobalKeydownEvent = (evnt) => {
987
+ const { emptyValue, clearable } = props;
988
+ const { visiblePanel, currentOption } = reactData;
989
+ const isDisabled = computeIsDisabled.value;
990
+ const popupOpts = computePopupOpts.value;
991
+ const { trigger } = popupOpts;
992
+ if (!isDisabled) {
993
+ const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
994
+ const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
995
+ const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
996
+ const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
997
+ const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
998
+ const isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
999
+ if (isTab) {
1000
+ reactData.isActivated = false;
1001
+ }
1002
+ if (visiblePanel) {
1003
+ if (isEsc || isTab) {
1004
+ if (trigger !== "manual") {
1005
+ hideOptionPanel(evnt);
1006
+ }
1007
+ } else if (isEnter) {
1008
+ if (currentOption) {
1009
+ evnt.preventDefault();
1010
+ evnt.stopPropagation();
1011
+ changeOptionEvent(evnt, currentOption);
1012
+ }
1013
+ } else if (isUpArrow || isDwArrow) {
1007
1014
  evnt.preventDefault();
1008
- evnt.stopPropagation();
1009
- changeOptionEvent(evnt, currentOption);
1015
+ let offsetOption = findOffsetOption(currentOption, isDwArrow);
1016
+ if (!offsetOption) {
1017
+ offsetOption = findOffsetOption(null, isDwArrow);
1018
+ }
1019
+ if (offsetOption) {
1020
+ setCurrentOption(offsetOption);
1021
+ handleScrollToOption(offsetOption, isDwArrow);
1022
+ }
1010
1023
  }
1011
- } else if (isUpArrow || isDwArrow) {
1024
+ } else if ((isUpArrow || isDwArrow || isEnter) && reactData.isActivated) {
1012
1025
  evnt.preventDefault();
1013
- let offsetOption = findOffsetOption(currentOption, isDwArrow);
1014
- if (!offsetOption) {
1015
- offsetOption = findOffsetOption(null, isDwArrow);
1016
- }
1017
- if (offsetOption) {
1018
- setCurrentOption(offsetOption);
1019
- handleScrollToOption(offsetOption, isDwArrow);
1026
+ showOptionPanel();
1027
+ }
1028
+ if (reactData.isActivated) {
1029
+ if (isDel && clearable) {
1030
+ clearValueEvent(evnt, emptyValue);
1020
1031
  }
1021
1032
  }
1022
- } else if ((isUpArrow || isDwArrow || isEnter) && reactData.isActivated) {
1023
- evnt.preventDefault();
1024
- showOptionPanel();
1025
1033
  }
1026
- if (reactData.isActivated) {
1027
- if (isDel && clearable) {
1028
- clearValueEvent(evnt, emptyValue);
1034
+ };
1035
+ const handleGlobalBlurEvent = (evnt) => {
1036
+ const { visiblePanel, isActivated } = reactData;
1037
+ const popupOpts = computePopupOpts.value;
1038
+ const { trigger } = popupOpts;
1039
+ if (visiblePanel) {
1040
+ if (trigger !== "manual") {
1041
+ hideOptionPanel(evnt);
1029
1042
  }
1030
1043
  }
1031
- }
1032
- };
1033
- const handleGlobalBlurEvent = (evnt) => {
1034
- const { visiblePanel, isActivated } = reactData;
1035
- const popupOpts = computePopupOpts.value;
1036
- const { trigger } = popupOpts;
1037
- if (visiblePanel) {
1038
- if (trigger !== "manual") {
1039
- hideOptionPanel(evnt);
1044
+ if (isActivated) {
1045
+ reactData.isActivated = false;
1040
1046
  }
1041
- }
1042
- if (isActivated) {
1043
- reactData.isActivated = false;
1044
- }
1045
- if (visiblePanel || isActivated) {
1046
- const $input = refInput.value;
1047
- if ($input) {
1048
- $input.blur();
1049
- }
1050
- }
1051
- };
1052
- const handleGlobalResizeEvent = () => {
1053
- const { visiblePanel } = reactData;
1054
- if (visiblePanel) {
1055
- updatePlacement();
1056
- }
1057
- };
1058
- const handleGlobalScrollEvent = () => {
1059
- const { visiblePanel } = reactData;
1060
- if (visiblePanel) {
1061
- updatePlacement();
1062
- }
1063
- };
1064
- const handleFocusSearch = () => {
1065
- if (props.filterable) {
1066
- (0, import_vue.nextTick)(() => {
1067
- const inpSearch = refInpSearch.value;
1068
- if (inpSearch) {
1069
- inpSearch.focus();
1047
+ if (visiblePanel || isActivated) {
1048
+ const $input = refInput.value;
1049
+ if ($input) {
1050
+ $input.blur();
1070
1051
  }
1071
- });
1072
- }
1073
- };
1074
- const focusEvent = (evnt) => {
1075
- const isDisabled = computeIsDisabled.value;
1076
- const popupOpts = computePopupOpts.value;
1077
- const { trigger } = popupOpts;
1078
- if (!isDisabled) {
1079
- if (!reactData.visiblePanel) {
1080
- if (!trigger || trigger === "default") {
1081
- reactData.triggerFocusPanel = true;
1082
- showOptionPanel();
1083
- setTimeout(() => {
1084
- reactData.triggerFocusPanel = false;
1085
- }, 500);
1052
+ }
1053
+ };
1054
+ const handleGlobalResizeEvent = () => {
1055
+ const { visiblePanel } = reactData;
1056
+ if (visiblePanel) {
1057
+ updatePlacement();
1058
+ }
1059
+ };
1060
+ const handleGlobalScrollEvent = () => {
1061
+ const { visiblePanel } = reactData;
1062
+ if (visiblePanel) {
1063
+ updatePlacement();
1064
+ }
1065
+ };
1066
+ const handleFocusSearch = () => {
1067
+ if (props.filterable) {
1068
+ (0, import_vue.nextTick)(() => {
1069
+ const inpSearch = refInpSearch.value;
1070
+ if (inpSearch) {
1071
+ inpSearch.focus();
1072
+ }
1073
+ });
1074
+ }
1075
+ };
1076
+ const focusEvent = (evnt) => {
1077
+ const isDisabled = computeIsDisabled.value;
1078
+ const popupOpts = computePopupOpts.value;
1079
+ const { trigger } = popupOpts;
1080
+ if (!isDisabled) {
1081
+ if (!reactData.visiblePanel) {
1082
+ if (!trigger || trigger === "default") {
1083
+ reactData.triggerFocusPanel = true;
1084
+ showOptionPanel();
1085
+ setTimeout(() => {
1086
+ reactData.triggerFocusPanel = false;
1087
+ }, 500);
1088
+ }
1086
1089
  }
1087
1090
  }
1088
- }
1089
- dispatchEvent("focus", {}, evnt);
1090
- };
1091
- const clickEvent = (evnt) => {
1092
- const popupOpts = computePopupOpts.value;
1093
- const { trigger } = popupOpts;
1094
- if (!trigger || trigger === "default") {
1095
- togglePanelEvent(evnt);
1096
- }
1097
- dispatchEvent("click", { triggerButton: false, visible: reactData.visiblePanel }, evnt);
1098
- };
1099
- const blurEvent = (evnt) => {
1100
- reactData.isActivated = false;
1101
- dispatchEvent("blur", {}, evnt);
1102
- };
1103
- const suffixClickEvent = (evnt) => {
1104
- const popupOpts = computePopupOpts.value;
1105
- const { trigger } = popupOpts;
1106
- if (!trigger || trigger === "default" || trigger === "icon") {
1107
- togglePanelEvent(evnt);
1108
- }
1109
- dispatchEvent("click", { triggerButton: true, visible: reactData.visiblePanel }, evnt);
1110
- };
1111
- const modelSearchEvent = (value) => {
1112
- reactData.searchValue = value;
1113
- };
1114
- const focusSearchEvent = () => {
1115
- reactData.isActivated = true;
1116
- };
1117
- const handleSearchEvent = () => {
1118
- const { modelValue, remote } = props;
1119
- const { searchValue } = reactData;
1120
- const remoteOpts = computeRemoteOpts.value;
1121
- const qyMethod = remoteOpts.queryMethod || props.remoteMethod;
1122
- if (remote && qyMethod && remoteOpts.enabled) {
1123
- reactData.searchLoading = true;
1124
- Promise.resolve(qyMethod({ $select: $xeSelect, searchValue, value: modelValue })).then(() => (0, import_vue.nextTick)()).catch(() => (0, import_vue.nextTick)()).finally(() => {
1125
- reactData.searchLoading = false;
1091
+ dispatchEvent("focus", {}, evnt);
1092
+ };
1093
+ const clickEvent = (evnt) => {
1094
+ const popupOpts = computePopupOpts.value;
1095
+ const { trigger } = popupOpts;
1096
+ if (!trigger || trigger === "default") {
1097
+ togglePanelEvent(evnt);
1098
+ }
1099
+ dispatchEvent("click", { triggerButton: false, visible: reactData.visiblePanel }, evnt);
1100
+ };
1101
+ const blurEvent = (evnt) => {
1102
+ reactData.isActivated = false;
1103
+ dispatchEvent("blur", {}, evnt);
1104
+ };
1105
+ const suffixClickEvent = (evnt) => {
1106
+ const popupOpts = computePopupOpts.value;
1107
+ const { trigger } = popupOpts;
1108
+ if (!trigger || trigger === "default" || trigger === "icon") {
1109
+ togglePanelEvent(evnt);
1110
+ }
1111
+ dispatchEvent("click", { triggerButton: true, visible: reactData.visiblePanel }, evnt);
1112
+ };
1113
+ const modelSearchEvent = (value) => {
1114
+ reactData.searchValue = value;
1115
+ };
1116
+ const focusSearchEvent = () => {
1117
+ reactData.isActivated = true;
1118
+ };
1119
+ const handleSearchEvent = () => {
1120
+ const { modelValue, remote } = props;
1121
+ const { searchValue } = reactData;
1122
+ const remoteOpts = computeRemoteOpts.value;
1123
+ const qyMethod = remoteOpts.queryMethod || props.remoteMethod;
1124
+ if (remote && qyMethod && remoteOpts.enabled) {
1125
+ reactData.searchLoading = true;
1126
+ Promise.resolve(qyMethod({ $select: $xeSelect, searchValue, value: modelValue })).then(() => (0, import_vue.nextTick)()).catch(() => (0, import_vue.nextTick)()).finally(() => {
1127
+ reactData.searchLoading = false;
1128
+ handleOption();
1129
+ updateYData();
1130
+ });
1131
+ } else {
1126
1132
  handleOption();
1127
1133
  updateYData();
1128
- });
1129
- } else {
1130
- handleOption();
1131
- updateYData();
1132
- }
1133
- };
1134
- const triggerSearchEvent = import_xe_utils.default.debounce(handleSearchEvent, 350, { trailing: true });
1135
- const togglePanelEvent = (params) => {
1136
- const { $event } = params;
1137
- $event.preventDefault();
1138
- if (reactData.triggerFocusPanel) {
1139
- reactData.triggerFocusPanel = false;
1140
- } else {
1141
- if (reactData.visiblePanel) {
1142
- hideOptionPanel($event);
1134
+ }
1135
+ };
1136
+ const triggerSearchEvent = import_xe_utils.default.debounce(handleSearchEvent, 350, { trailing: true });
1137
+ const togglePanelEvent = (params) => {
1138
+ const { $event } = params;
1139
+ $event.preventDefault();
1140
+ if (reactData.triggerFocusPanel) {
1141
+ reactData.triggerFocusPanel = false;
1143
1142
  } else {
1144
- showOptionPanel();
1145
- }
1146
- }
1147
- };
1148
- const checkOptionDisabled = (isSelected, option) => {
1149
- if (option.disabled) {
1150
- return true;
1151
- }
1152
- const isMaximize = computeIsMaximize.value;
1153
- if (isMaximize && !isSelected) {
1154
- return true;
1155
- }
1156
- return false;
1157
- };
1158
- const updateYSpace = () => {
1159
- const { scrollYLoad } = reactData;
1160
- const { scrollYStore, afterVisibleList } = internalData;
1161
- reactData.bodyHeight = scrollYLoad ? afterVisibleList.length * scrollYStore.rowHeight : 0;
1162
- reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
1163
- };
1164
- const handleData = () => {
1165
- const { filterable, allowCreate } = props;
1166
- const { scrollYLoad, searchValue } = reactData;
1167
- const { optAddMaps, scrollYStore, afterVisibleList } = internalData;
1168
- const labelField = computeLabelField.value;
1169
- const valueField = computeValueField.value;
1170
- const restList = scrollYLoad ? afterVisibleList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : afterVisibleList.slice(0);
1171
- if (filterable && allowCreate && searchValue) {
1172
- if (!restList.some((option) => option[labelField] === searchValue)) {
1173
- const addItem = optAddMaps[searchValue] || (0, import_vue.reactive)({
1174
- [getOptKey()]: searchValue,
1175
- [labelField]: searchValue,
1176
- [valueField]: searchValue
1177
- });
1178
- optAddMaps[searchValue] = addItem;
1179
- restList.unshift(addItem);
1180
- }
1181
- }
1182
- reactData.optList = restList;
1183
- return (0, import_vue.nextTick)();
1184
- };
1185
- const updateYData = () => {
1186
- handleData();
1187
- updateYSpace();
1188
- };
1189
- const computeScrollLoad = () => {
1190
- return (0, import_vue.nextTick)().then(() => {
1191
- const { scrollYLoad } = reactData;
1192
- const { scrollYStore } = internalData;
1193
- const virtualBodyElem = refVirtualBody.value;
1194
- const virtualYOpts = computeVirtualYOpts.value;
1195
- let rowHeight = 0;
1196
- let firstItemElem;
1197
- if (virtualBodyElem) {
1198
- if (!firstItemElem) {
1199
- firstItemElem = virtualBodyElem.children[0];
1143
+ if (reactData.visiblePanel) {
1144
+ hideOptionPanel($event);
1145
+ } else {
1146
+ showOptionPanel();
1200
1147
  }
1201
1148
  }
1202
- if (firstItemElem) {
1203
- rowHeight = firstItemElem.offsetHeight;
1204
- }
1205
- rowHeight = Math.max(20, rowHeight);
1206
- scrollYStore.rowHeight = rowHeight;
1207
- if (scrollYLoad) {
1208
- const scrollBodyElem = refVirtualWrapper.value;
1209
- const visibleYSize = Math.max(8, scrollBodyElem ? Math.ceil(scrollBodyElem.clientHeight / rowHeight) : 0);
1210
- const offsetYSize = Math.max(0, Math.min(2, import_xe_utils.default.toNumber(virtualYOpts.oSize)));
1211
- scrollYStore.offsetSize = offsetYSize;
1212
- scrollYStore.visibleSize = visibleYSize;
1213
- scrollYStore.endIndex = Math.max(scrollYStore.startIndex, visibleYSize + offsetYSize, scrollYStore.endIndex);
1214
- updateYData();
1215
- } else {
1216
- updateYSpace();
1149
+ };
1150
+ const checkOptionDisabled = (isSelected, option) => {
1151
+ if (option.disabled) {
1152
+ return true;
1217
1153
  }
1218
- });
1219
- };
1220
- const handleScrollToOption = (option, isDwArrow) => {
1221
- const { optFullValMaps, scrollYStore } = internalData;
1222
- const valueField = computeValueField.value;
1223
- const cacheItem = optFullValMaps[option[valueField]];
1224
- if (cacheItem) {
1225
- const optid = cacheItem.key;
1226
- const avIndex = cacheItem._index;
1227
- if (avIndex > -1) {
1228
- const optWrapperElem = refVirtualWrapper.value;
1229
- const panelElem = refOptionPanel.value;
1230
- if (!panelElem) {
1231
- return;
1154
+ const isMaximize = computeIsMaximize.value;
1155
+ if (isMaximize && !isSelected) {
1156
+ return true;
1157
+ }
1158
+ return false;
1159
+ };
1160
+ const updateYSpace = () => {
1161
+ const { scrollYLoad } = reactData;
1162
+ const { scrollYStore, afterVisibleList } = internalData;
1163
+ reactData.bodyHeight = scrollYLoad ? afterVisibleList.length * scrollYStore.rowHeight : 0;
1164
+ reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
1165
+ };
1166
+ const handleData = () => {
1167
+ const { filterable, allowCreate } = props;
1168
+ const { scrollYLoad, searchValue } = reactData;
1169
+ const { optAddMaps, scrollYStore, afterVisibleList } = internalData;
1170
+ const labelField = computeLabelField.value;
1171
+ const valueField = computeValueField.value;
1172
+ const restList = scrollYLoad ? afterVisibleList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : afterVisibleList.slice(0);
1173
+ if (filterable && allowCreate && searchValue) {
1174
+ if (!restList.some((option) => option[labelField] === searchValue)) {
1175
+ const addItem = optAddMaps[searchValue] || (0, import_vue.reactive)({
1176
+ [getOptKey()]: searchValue,
1177
+ [labelField]: searchValue,
1178
+ [valueField]: searchValue
1179
+ });
1180
+ optAddMaps[searchValue] = addItem;
1181
+ restList.unshift(addItem);
1232
1182
  }
1233
- const optElem = panelElem.querySelector(`[optid='${optid}']`);
1234
- if (optWrapperElem) {
1235
- if (optElem) {
1236
- const wrapperHeight = optWrapperElem.offsetHeight;
1237
- const offsetPadding = 1;
1238
- if (isDwArrow) {
1239
- if (Math.ceil(optElem.offsetTop + optElem.offsetHeight - optWrapperElem.scrollTop) >= wrapperHeight) {
1240
- optWrapperElem.scrollTop = optElem.offsetTop + optElem.offsetHeight - wrapperHeight;
1241
- } else if (optElem.offsetTop + offsetPadding < optWrapperElem.scrollTop || optElem.offsetTop + offsetPadding > optWrapperElem.scrollTop + optWrapperElem.clientHeight) {
1242
- optWrapperElem.scrollTop = optElem.offsetTop - offsetPadding;
1183
+ }
1184
+ reactData.optList = restList;
1185
+ return (0, import_vue.nextTick)();
1186
+ };
1187
+ const updateYData = () => {
1188
+ handleData();
1189
+ updateYSpace();
1190
+ };
1191
+ const computeScrollLoad = () => {
1192
+ return (0, import_vue.nextTick)().then(() => {
1193
+ const { scrollYLoad } = reactData;
1194
+ const { scrollYStore } = internalData;
1195
+ const virtualBodyElem = refVirtualBody.value;
1196
+ const virtualYOpts = computeVirtualYOpts.value;
1197
+ let rowHeight = 0;
1198
+ let firstItemElem;
1199
+ if (virtualBodyElem) {
1200
+ if (!firstItemElem) {
1201
+ firstItemElem = virtualBodyElem.children[0];
1202
+ }
1203
+ }
1204
+ if (firstItemElem) {
1205
+ rowHeight = firstItemElem.offsetHeight;
1206
+ }
1207
+ rowHeight = Math.max(20, rowHeight);
1208
+ scrollYStore.rowHeight = rowHeight;
1209
+ if (scrollYLoad) {
1210
+ const scrollBodyElem = refVirtualWrapper.value;
1211
+ const visibleYSize = Math.max(8, scrollBodyElem ? Math.ceil(scrollBodyElem.clientHeight / rowHeight) : 0);
1212
+ const offsetYSize = Math.max(0, Math.min(2, import_xe_utils.default.toNumber(virtualYOpts.oSize)));
1213
+ scrollYStore.offsetSize = offsetYSize;
1214
+ scrollYStore.visibleSize = visibleYSize;
1215
+ scrollYStore.endIndex = Math.max(scrollYStore.startIndex, visibleYSize + offsetYSize, scrollYStore.endIndex);
1216
+ updateYData();
1217
+ } else {
1218
+ updateYSpace();
1219
+ }
1220
+ });
1221
+ };
1222
+ const handleScrollToOption = (option, isDwArrow) => {
1223
+ const { optFullValMaps, scrollYStore } = internalData;
1224
+ const valueField = computeValueField.value;
1225
+ const cacheItem = optFullValMaps[option[valueField]];
1226
+ if (cacheItem) {
1227
+ const optid = cacheItem.key;
1228
+ const avIndex = cacheItem._index;
1229
+ if (avIndex > -1) {
1230
+ const optWrapperElem = refVirtualWrapper.value;
1231
+ const panelElem = refOptionPanel.value;
1232
+ if (!panelElem) {
1233
+ return;
1234
+ }
1235
+ const optElem = panelElem.querySelector(`[optid='${optid}']`);
1236
+ if (optWrapperElem) {
1237
+ if (optElem) {
1238
+ const wrapperHeight = optWrapperElem.offsetHeight;
1239
+ const offsetPadding = 1;
1240
+ if (isDwArrow) {
1241
+ if (Math.ceil(optElem.offsetTop + optElem.offsetHeight - optWrapperElem.scrollTop) >= wrapperHeight) {
1242
+ optWrapperElem.scrollTop = optElem.offsetTop + optElem.offsetHeight - wrapperHeight;
1243
+ } else if (optElem.offsetTop + offsetPadding < optWrapperElem.scrollTop || optElem.offsetTop + offsetPadding > optWrapperElem.scrollTop + optWrapperElem.clientHeight) {
1244
+ optWrapperElem.scrollTop = optElem.offsetTop - offsetPadding;
1245
+ }
1246
+ } else {
1247
+ if (optElem.offsetTop + offsetPadding < optWrapperElem.scrollTop || optElem.offsetTop + offsetPadding > optWrapperElem.scrollTop + optWrapperElem.clientHeight) {
1248
+ optWrapperElem.scrollTop = optElem.offsetTop - offsetPadding;
1249
+ } else if (optElem.offsetTop + optElem.offsetHeight - optWrapperElem.scrollTop > wrapperHeight) {
1250
+ optWrapperElem.scrollTop = optElem.offsetTop + optElem.offsetHeight - wrapperHeight;
1251
+ }
1243
1252
  }
1244
1253
  } else {
1245
- if (optElem.offsetTop + offsetPadding < optWrapperElem.scrollTop || optElem.offsetTop + offsetPadding > optWrapperElem.scrollTop + optWrapperElem.clientHeight) {
1246
- optWrapperElem.scrollTop = optElem.offsetTop - offsetPadding;
1247
- } else if (optElem.offsetTop + optElem.offsetHeight - optWrapperElem.scrollTop > wrapperHeight) {
1248
- optWrapperElem.scrollTop = optElem.offsetTop + optElem.offsetHeight - wrapperHeight;
1254
+ if (isDwArrow) {
1255
+ optWrapperElem.scrollTop = avIndex * scrollYStore.rowHeight - optWrapperElem.clientHeight + scrollYStore.rowHeight;
1256
+ } else {
1257
+ optWrapperElem.scrollTop = avIndex * scrollYStore.rowHeight;
1249
1258
  }
1250
1259
  }
1251
- } else {
1252
- if (isDwArrow) {
1253
- optWrapperElem.scrollTop = avIndex * scrollYStore.rowHeight - optWrapperElem.clientHeight + scrollYStore.rowHeight;
1254
- } else {
1255
- optWrapperElem.scrollTop = avIndex * scrollYStore.rowHeight;
1256
- }
1257
1260
  }
1258
1261
  }
1259
1262
  }
1260
- }
1261
- };
1262
- const scrollTo = (scrollLeft, scrollTop) => {
1263
- const scrollBodyElem = refVirtualWrapper.value;
1264
- if (scrollBodyElem) {
1265
- if (import_xe_utils.default.isNumber(scrollLeft)) {
1266
- scrollBodyElem.scrollLeft = scrollLeft;
1267
- }
1268
- if (import_xe_utils.default.isNumber(scrollTop)) {
1269
- scrollBodyElem.scrollTop = scrollTop;
1270
- }
1271
- }
1272
- if (reactData.scrollYLoad) {
1273
- return new Promise((resolve) => {
1274
- setTimeout(() => {
1275
- (0, import_vue.nextTick)(() => {
1276
- resolve();
1277
- });
1278
- }, 50);
1279
- });
1280
- }
1281
- return (0, import_vue.nextTick)();
1282
- };
1283
- const refreshScroll = () => {
1284
- const { lastScrollLeft, lastScrollTop } = internalData;
1285
- return clearScroll().then(() => {
1286
- if (lastScrollLeft || lastScrollTop) {
1287
- internalData.lastScrollLeft = 0;
1288
- internalData.lastScrollTop = 0;
1289
- return scrollTo(lastScrollLeft, lastScrollTop);
1290
- }
1291
- });
1292
- };
1293
- const updateScrollbar = () => {
1294
- const isVScrollbar = computeIsVScrollbar.value;
1295
- if (isVScrollbar) {
1296
- return (0, import_vue.nextTick)().then(() => {
1297
- updateThumbSize();
1298
- updateThumbOffset();
1299
- });
1300
- }
1301
- return Promise.resolve();
1302
- };
1303
- const recalculate = () => {
1304
- const el = refElem.value;
1305
- if (el && el.clientWidth && el.clientHeight) {
1306
- return computeScrollLoad().then(() => {
1307
- return updateScrollbar();
1308
- });
1309
- }
1310
- return Promise.resolve();
1311
- };
1312
- const loadYData = (evnt) => {
1313
- const { scrollYStore } = internalData;
1314
- const { startIndex, endIndex, visibleSize, offsetSize, rowHeight } = scrollYStore;
1315
- const scrollBodyElem = evnt.target;
1316
- const scrollTop = scrollBodyElem.scrollTop;
1317
- const toVisibleIndex = Math.floor(scrollTop / rowHeight);
1318
- const offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize);
1319
- const offsetEndIndex = toVisibleIndex + visibleSize + offsetSize;
1320
- if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
1321
- if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
1322
- scrollYStore.startIndex = offsetStartIndex;
1323
- scrollYStore.endIndex = offsetEndIndex;
1324
- updateYData();
1325
- }
1326
- }
1327
- };
1328
- const isVMScrollProcess = () => {
1329
- const delayHover = 250;
1330
- const { lastScrollTime } = internalData;
1331
- return !!(lastScrollTime && Date.now() < lastScrollTime + delayHover);
1332
- };
1333
- const scrollEvent = (evnt) => {
1334
- const scrollBodyElem = evnt.target;
1335
- const scrollTop = scrollBodyElem.scrollTop;
1336
- const scrollLeft = scrollBodyElem.scrollLeft;
1337
- const isX = scrollLeft !== internalData.lastScrollLeft;
1338
- const isY = scrollTop !== internalData.lastScrollTop;
1339
- const isVScrollbar = computeIsVScrollbar.value;
1340
- if (isVScrollbar) {
1341
- updateThumbOffset();
1342
- }
1343
- internalData.lastScrollTop = scrollTop;
1344
- internalData.lastScrollLeft = scrollLeft;
1345
- if (reactData.scrollYLoad) {
1346
- loadYData(evnt);
1347
- }
1348
- internalData.lastScrollTime = Date.now();
1349
- dispatchEvent("scroll", { scrollLeft, scrollTop, isX, isY }, evnt);
1350
- };
1351
- const loadData = (datas) => {
1352
- cacheItemMap(datas || []);
1353
- const { multiple } = props;
1354
- const { isLoaded, fullData, scrollYStore } = internalData;
1355
- const defaultOpts = computeDefaultOpts.value;
1356
- const virtualYOpts = computeVirtualYOpts.value;
1357
- const valueField = computeValueField.value;
1358
- Object.assign(scrollYStore, {
1359
- startIndex: 0,
1360
- endIndex: 1,
1361
- visibleSize: 0
1362
- });
1363
- internalData.synchData = datas || [];
1364
- reactData.scrollYLoad = !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt <= fullData.length);
1365
- handleData();
1366
- if (!isLoaded) {
1367
- const { selectMode } = defaultOpts;
1368
- if (datas.length > 0 && import_xe_utils.default.eqNull(props.modelValue)) {
1369
- if (selectMode === "all") {
1370
- if (multiple) {
1371
- (0, import_vue.nextTick)(() => {
1372
- emitDefaultValue(datas.map((item) => item[valueField]));
1373
- });
1374
- } else {
1375
- errLog("vxe.error.notConflictProp", ["default-config.selectMode=all", "multiple=true"]);
1376
- }
1377
- } else if (selectMode === "first" || selectMode === "last") {
1378
- const selectItem = import_xe_utils.default[selectMode](datas);
1379
- if (selectItem) {
1263
+ };
1264
+ const scrollTo = (scrollLeft, scrollTop) => {
1265
+ const scrollBodyElem = refVirtualWrapper.value;
1266
+ if (scrollBodyElem) {
1267
+ if (import_xe_utils.default.isNumber(scrollLeft)) {
1268
+ scrollBodyElem.scrollLeft = scrollLeft;
1269
+ }
1270
+ if (import_xe_utils.default.isNumber(scrollTop)) {
1271
+ scrollBodyElem.scrollTop = scrollTop;
1272
+ }
1273
+ }
1274
+ if (reactData.scrollYLoad) {
1275
+ return new Promise((resolve) => {
1276
+ setTimeout(() => {
1380
1277
  (0, import_vue.nextTick)(() => {
1381
- if (import_xe_utils.default.eqNull(props.modelValue)) {
1382
- emitDefaultValue(selectItem[valueField]);
1383
- }
1278
+ resolve();
1384
1279
  });
1385
- }
1280
+ }, 50);
1281
+ });
1282
+ }
1283
+ return (0, import_vue.nextTick)();
1284
+ };
1285
+ const refreshScroll = () => {
1286
+ const { lastScrollLeft, lastScrollTop } = internalData;
1287
+ return clearScroll().then(() => {
1288
+ if (lastScrollLeft || lastScrollTop) {
1289
+ internalData.lastScrollLeft = 0;
1290
+ internalData.lastScrollTop = 0;
1291
+ return scrollTo(lastScrollLeft, lastScrollTop);
1386
1292
  }
1387
- internalData.isLoaded = true;
1293
+ });
1294
+ };
1295
+ const updateScrollbar = () => {
1296
+ const isVScrollbar = computeIsVScrollbar.value;
1297
+ if (isVScrollbar) {
1298
+ return (0, import_vue.nextTick)().then(() => {
1299
+ updateThumbSize();
1300
+ updateThumbOffset();
1301
+ });
1388
1302
  }
1389
- }
1390
- return computeScrollLoad().then(() => {
1391
- refreshScroll();
1392
- });
1393
- };
1394
- const clearScroll = () => {
1395
- const scrollBodyElem = refVirtualWrapper.value;
1396
- if (scrollBodyElem) {
1397
- scrollBodyElem.scrollTop = 0;
1398
- scrollBodyElem.scrollLeft = 0;
1399
- }
1400
- internalData.lastScrollTop = 0;
1401
- internalData.lastScrollLeft = 0;
1402
- return (0, import_vue.nextTick)();
1403
- };
1404
- const hasOptGroupById = (optid) => {
1405
- const { optGroupKeyMaps } = internalData;
1406
- return !!optGroupKeyMaps[optid];
1407
- };
1408
- const selectMethods = {
1409
- dispatchEvent,
1410
- getScrollViewElem() {
1411
- const viewEl = refVirtualWrapper.value;
1412
- return viewEl || null;
1413
- },
1414
- loadData,
1415
- reloadData(datas) {
1416
- internalData.isLoaded = false;
1417
- clearScroll();
1418
- return loadData(datas);
1419
- },
1420
- isPanelVisible() {
1421
- return reactData.visiblePanel;
1422
- },
1423
- togglePanel() {
1424
- if (reactData.visiblePanel) {
1425
- hideOptionPanel();
1426
- } else {
1427
- showOptionPanel();
1303
+ return Promise.resolve();
1304
+ };
1305
+ const recalculate = () => {
1306
+ const el = refElem.value;
1307
+ if (el && el.clientWidth && el.clientHeight) {
1308
+ return computeScrollLoad().then(() => {
1309
+ return updateScrollbar();
1310
+ });
1428
1311
  }
1429
- return (0, import_vue.nextTick)();
1430
- },
1431
- hidePanel() {
1432
- if (reactData.visiblePanel) {
1433
- hideOptionPanel();
1312
+ return Promise.resolve();
1313
+ };
1314
+ const loadYData = (evnt) => {
1315
+ const { scrollYStore } = internalData;
1316
+ const { startIndex, endIndex, visibleSize, offsetSize, rowHeight } = scrollYStore;
1317
+ const scrollBodyElem = evnt.target;
1318
+ const scrollTop = scrollBodyElem.scrollTop;
1319
+ const toVisibleIndex = Math.floor(scrollTop / rowHeight);
1320
+ const offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize);
1321
+ const offsetEndIndex = toVisibleIndex + visibleSize + offsetSize;
1322
+ if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
1323
+ if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
1324
+ scrollYStore.startIndex = offsetStartIndex;
1325
+ scrollYStore.endIndex = offsetEndIndex;
1326
+ updateYData();
1327
+ }
1434
1328
  }
1435
- return (0, import_vue.nextTick)();
1436
- },
1437
- showPanel() {
1438
- if (!reactData.visiblePanel) {
1439
- showOptionPanel();
1329
+ };
1330
+ const isVMScrollProcess = () => {
1331
+ const delayHover = 250;
1332
+ const { lastScrollTime } = internalData;
1333
+ return !!(lastScrollTime && Date.now() < lastScrollTime + delayHover);
1334
+ };
1335
+ const scrollEvent = (evnt) => {
1336
+ const scrollBodyElem = evnt.target;
1337
+ const scrollTop = scrollBodyElem.scrollTop;
1338
+ const scrollLeft = scrollBodyElem.scrollLeft;
1339
+ const isX = scrollLeft !== internalData.lastScrollLeft;
1340
+ const isY = scrollTop !== internalData.lastScrollTop;
1341
+ const isVScrollbar = computeIsVScrollbar.value;
1342
+ if (isVScrollbar) {
1343
+ updateThumbOffset();
1440
1344
  }
1441
- return (0, import_vue.nextTick)();
1442
- },
1443
- refreshOption() {
1444
- handleOption();
1445
- updateYData();
1446
- return (0, import_vue.nextTick)();
1447
- },
1448
- focus() {
1449
- const $input = refInput.value;
1450
- if ($input) {
1451
- $input.blur();
1345
+ internalData.lastScrollTop = scrollTop;
1346
+ internalData.lastScrollLeft = scrollLeft;
1347
+ if (reactData.scrollYLoad) {
1348
+ loadYData(evnt);
1452
1349
  }
1453
- reactData.isActivated = true;
1454
- return (0, import_vue.nextTick)();
1455
- },
1456
- blur() {
1457
- const $input = refInput.value;
1458
- if ($input) {
1459
- $input.blur();
1350
+ internalData.lastScrollTime = Date.now();
1351
+ dispatchEvent("scroll", { scrollLeft, scrollTop, isX, isY }, evnt);
1352
+ };
1353
+ const loadData = (datas) => {
1354
+ cacheItemMap(datas || []);
1355
+ const { multiple } = props;
1356
+ const { isLoaded, fullData, scrollYStore } = internalData;
1357
+ const defaultOpts = computeDefaultOpts.value;
1358
+ const virtualYOpts = computeVirtualYOpts.value;
1359
+ const valueField = computeValueField.value;
1360
+ Object.assign(scrollYStore, {
1361
+ startIndex: 0,
1362
+ endIndex: 1,
1363
+ visibleSize: 0
1364
+ });
1365
+ internalData.synchData = datas || [];
1366
+ reactData.scrollYLoad = !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt <= fullData.length);
1367
+ handleData();
1368
+ if (!isLoaded) {
1369
+ const { selectMode } = defaultOpts;
1370
+ if (datas.length > 0 && import_xe_utils.default.eqNull(props.modelValue)) {
1371
+ if (selectMode === "all") {
1372
+ if (multiple) {
1373
+ (0, import_vue.nextTick)(() => {
1374
+ emitDefaultValue(datas.map((item) => item[valueField]));
1375
+ });
1376
+ } else {
1377
+ errLog("vxe.error.notConflictProp", ["default-config.selectMode=all", "multiple=true"]);
1378
+ }
1379
+ } else if (selectMode === "first" || selectMode === "last") {
1380
+ const selectItem = import_xe_utils.default[selectMode](datas);
1381
+ if (selectItem) {
1382
+ (0, import_vue.nextTick)(() => {
1383
+ if (import_xe_utils.default.eqNull(props.modelValue)) {
1384
+ emitDefaultValue(selectItem[valueField]);
1385
+ }
1386
+ });
1387
+ }
1388
+ }
1389
+ internalData.isLoaded = true;
1390
+ }
1460
1391
  }
1461
- reactData.isActivated = false;
1392
+ return computeScrollLoad().then(() => {
1393
+ refreshScroll();
1394
+ });
1395
+ };
1396
+ const clearScroll = () => {
1397
+ const scrollBodyElem = refVirtualWrapper.value;
1398
+ if (scrollBodyElem) {
1399
+ scrollBodyElem.scrollTop = 0;
1400
+ scrollBodyElem.scrollLeft = 0;
1401
+ }
1402
+ internalData.lastScrollTop = 0;
1403
+ internalData.lastScrollLeft = 0;
1462
1404
  return (0, import_vue.nextTick)();
1463
- },
1464
- recalculate,
1465
- clearScroll
1466
- };
1467
- const bindScrollbarResize = () => {
1468
- const isVScrollbar = computeIsVScrollbar.value;
1469
- const { scrollObserver } = internalData;
1470
- if (isVScrollbar) {
1471
- if (!scrollObserver) {
1472
- const el = refElem.value;
1473
- const viewSpaceEl = refVirtualSpaceElem.value;
1474
- const viewInnerEl = refVirtualBody.value;
1475
- const scrollObserver2 = globalResize.create(() => {
1476
- reScrollFlag.value++;
1477
- });
1478
- if (el) {
1479
- scrollObserver2.observe(el);
1405
+ };
1406
+ const hasOptGroupById = (optid) => {
1407
+ const { optGroupKeyMaps } = internalData;
1408
+ return !!optGroupKeyMaps[optid];
1409
+ };
1410
+ const selectMethods = {
1411
+ dispatchEvent,
1412
+ getScrollViewElem() {
1413
+ const viewEl = refVirtualWrapper.value;
1414
+ return viewEl || null;
1415
+ },
1416
+ loadData,
1417
+ reloadData(datas) {
1418
+ internalData.isLoaded = false;
1419
+ clearScroll();
1420
+ return loadData(datas);
1421
+ },
1422
+ isPanelVisible() {
1423
+ return reactData.visiblePanel;
1424
+ },
1425
+ togglePanel() {
1426
+ if (reactData.visiblePanel) {
1427
+ hideOptionPanel();
1428
+ } else {
1429
+ showOptionPanel();
1480
1430
  }
1481
- if (viewSpaceEl) {
1482
- scrollObserver2.observe(viewSpaceEl);
1431
+ return (0, import_vue.nextTick)();
1432
+ },
1433
+ hidePanel() {
1434
+ if (reactData.visiblePanel) {
1435
+ hideOptionPanel();
1483
1436
  }
1484
- if (viewInnerEl) {
1485
- scrollObserver2.observe(viewInnerEl);
1437
+ return (0, import_vue.nextTick)();
1438
+ },
1439
+ showPanel() {
1440
+ if (!reactData.visiblePanel) {
1441
+ showOptionPanel();
1486
1442
  }
1487
- internalData.scrollObserver = scrollObserver2;
1488
- }
1489
- }
1490
- };
1491
- Object.assign($xeSelect, selectMethods);
1492
- const renderRadio = (option, isOptGroup, isChecked, isDisabled) => {
1493
- const radioOpts = computeRadioOpts.value;
1494
- const { showIcon, trigger } = radioOpts;
1495
- if (isOptGroup || showIcon === false) {
1496
- return renderEmptyElement($xeSelect);
1497
- }
1498
- const ons = {};
1499
- if (!trigger || trigger === "default") {
1500
- ons.onClick = (evnt) => {
1501
- if (!isDisabled && !isOptGroup) {
1502
- changeOptionEvent(evnt, option);
1443
+ return (0, import_vue.nextTick)();
1444
+ },
1445
+ refreshOption() {
1446
+ handleOption();
1447
+ updateYData();
1448
+ return (0, import_vue.nextTick)();
1449
+ },
1450
+ focus() {
1451
+ const $input = refInput.value;
1452
+ if ($input) {
1453
+ $input.blur();
1503
1454
  }
1504
- };
1505
- }
1506
- return (0, import_vue.h)(
1507
- "div",
1508
- {
1509
- key: 2,
1510
- class: [
1511
- "vxe-select-option--radio",
1512
- {
1513
- "is--checked": isChecked,
1514
- "is--disabled": isDisabled
1515
- }
1516
- ],
1517
- ...ons
1455
+ reactData.isActivated = true;
1456
+ return (0, import_vue.nextTick)();
1518
1457
  },
1519
- [
1520
- (0, import_vue.h)("span", {
1521
- class: ["vxe-radio--icon", isChecked ? getIcon().RADIO_CHECKED : isDisabled ? getIcon().RADIO_DISABLED_UNCHECKED : getIcon().RADIO_UNCHECKED]
1522
- })
1523
- ]
1524
- );
1525
- };
1526
- const renderCheckbox = (option, isOptGroup, isChecked, isDisabled) => {
1527
- const checkboxOpts = computeCheckboxOpts.value;
1528
- const { showIcon, trigger } = checkboxOpts;
1529
- if (isOptGroup || showIcon === false) {
1530
- return renderEmptyElement($xeSelect);
1531
- }
1532
- const ons = {};
1533
- if (!trigger || trigger === "default") {
1534
- ons.onClick = (evnt) => {
1535
- if (!isDisabled && !isOptGroup) {
1536
- changeOptionEvent(evnt, option);
1458
+ blur() {
1459
+ const $input = refInput.value;
1460
+ if ($input) {
1461
+ $input.blur();
1537
1462
  }
1538
- };
1539
- }
1540
- return (0, import_vue.h)(
1541
- "div",
1542
- {
1543
- key: 3,
1544
- class: [
1545
- "vxe-select-option--checkbox",
1546
- {
1547
- "is--checked": isChecked,
1548
- "is--disabled": isDisabled
1549
- }
1550
- ],
1551
- ...ons
1463
+ reactData.isActivated = false;
1464
+ return (0, import_vue.nextTick)();
1552
1465
  },
1553
- [
1554
- (0, import_vue.h)("span", {
1555
- class: ["vxe-checkbox--icon", isChecked ? getIcon().CHECKBOX_CHECKED : isDisabled ? getIcon().CHECKBOX_DISABLED_UNCHECKED : getIcon().CHECKBOX_UNCHECKED]
1556
- })
1557
- ]
1558
- );
1559
- };
1560
- const renderOption = (list) => {
1561
- const { allowCreate, optionKey, multiple, showRadio, showCheckbox } = props;
1562
- const { currentOption } = reactData;
1563
- const { optAddMaps } = internalData;
1564
- const optionOpts = computeOptionOpts.value;
1565
- const labelField = computeLabelField.value;
1566
- const valueField = computeValueField.value;
1567
- const groupLabelField = computeGroupLabelField.value;
1568
- const selectVals = computeSelectVals.value;
1569
- const radioOpts = computeRadioOpts.value;
1570
- const checkboxOpts = computeCheckboxOpts.value;
1571
- const { useKey, height } = optionOpts;
1572
- const optionSlot = slots.option;
1573
- const isCheckboxMode = showCheckbox && multiple;
1574
- const isRadioMode = showRadio && !multiple;
1575
- return list.map((option, cIndex) => {
1576
- const { slots: slots2, className } = option;
1577
- const optid = getOptId(option);
1578
- const optionValue = option[valueField];
1579
- const isOptGroup = hasOptGroupById(optid);
1580
- const isAdd = !!(allowCreate && optAddMaps[optid]);
1581
- const isSelected = !isAdd && selectVals.indexOf(optionValue) > -1;
1582
- const isVisible = isAdd || !isOptGroup || isOptionVisible(option);
1583
- const isDisabled = !isAdd && checkOptionDisabled(isSelected, option);
1584
- const defaultSlot = slots2 ? slots2.default : null;
1585
- const optSlot = defaultSlot || optionSlot;
1586
- const optParams = { option, group: isOptGroup ? option : null, $select: $xeSelect };
1587
- let optLabel = "";
1588
- const optVNs = [];
1589
- if (isCheckboxMode) {
1590
- optVNs.push(renderCheckbox(option, isOptGroup, isSelected, isDisabled));
1591
- } else if (isRadioMode) {
1592
- optVNs.push(renderRadio(option, isOptGroup, isSelected, isDisabled));
1593
- }
1594
- let otlbVNs = [];
1595
- if (optSlot) {
1596
- otlbVNs = callSlot(optSlot, optParams);
1597
- } else {
1598
- optLabel = (0, import_utils.getFuncText)(option[isOptGroup ? groupLabelField : labelField] || optionValue);
1599
- otlbVNs = [optLabel];
1600
- }
1601
- optVNs.push(
1602
- (0, import_vue.h)(
1603
- "div",
1604
- {
1605
- key: 1,
1606
- class: "vxe-select-option--label"
1607
- },
1608
- otlbVNs
1609
- )
1610
- );
1611
- const ons = {
1612
- onMousedown: (evnt) => {
1613
- const isLeftBtn = evnt.button === 0;
1614
- if (isLeftBtn) {
1615
- evnt.stopPropagation();
1466
+ recalculate,
1467
+ clearScroll
1468
+ };
1469
+ const bindScrollbarResize = () => {
1470
+ const isVScrollbar = computeIsVScrollbar.value;
1471
+ const { scrollObserver } = internalData;
1472
+ if (isVScrollbar) {
1473
+ if (!scrollObserver) {
1474
+ const el = refElem.value;
1475
+ const viewSpaceEl = refVirtualSpaceElem.value;
1476
+ const viewInnerEl = refVirtualBody.value;
1477
+ const scrollObserver2 = globalResize.create(() => {
1478
+ reScrollFlag.value++;
1479
+ });
1480
+ if (el) {
1481
+ scrollObserver2.observe(el);
1616
1482
  }
1617
- },
1618
- onMouseenter: () => {
1619
- if (!isDisabled && !isOptGroup && !isVMScrollProcess()) {
1620
- setCurrentOption(option);
1483
+ if (viewSpaceEl) {
1484
+ scrollObserver2.observe(viewSpaceEl);
1621
1485
  }
1486
+ if (viewInnerEl) {
1487
+ scrollObserver2.observe(viewInnerEl);
1488
+ }
1489
+ internalData.scrollObserver = scrollObserver2;
1622
1490
  }
1623
- };
1624
- if (isCheckboxMode ? checkboxOpts.trigger === "option" : isRadioMode ? radioOpts.trigger === "option" : true) {
1491
+ }
1492
+ };
1493
+ Object.assign($xeSelect, selectMethods);
1494
+ const renderRadio = (option, isOptGroup, isChecked, isDisabled) => {
1495
+ const radioOpts = computeRadioOpts.value;
1496
+ const { showIcon, trigger } = radioOpts;
1497
+ if (isOptGroup || showIcon === false) {
1498
+ return renderEmptyElement($xeSelect);
1499
+ }
1500
+ const ons = {};
1501
+ if (!trigger || trigger === "default") {
1625
1502
  ons.onClick = (evnt) => {
1626
1503
  if (!isDisabled && !isOptGroup) {
1627
1504
  changeOptionEvent(evnt, option);
1628
1505
  }
1629
1506
  };
1630
1507
  }
1631
- return isVisible ? (0, import_vue.h)(
1508
+ return (0, import_vue.h)(
1632
1509
  "div",
1633
1510
  {
1634
- key: useKey || optionKey ? optid : cIndex,
1511
+ key: 2,
1635
1512
  class: [
1636
- "vxe-select-option",
1637
- className ? import_xe_utils.default.isFunction(className) ? className(optParams) : className : "",
1513
+ "vxe-select-option--radio",
1638
1514
  {
1639
- "vxe-select-optgroup": isOptGroup,
1640
- "is--disabled": isDisabled,
1641
- "is--selected": isSelected,
1642
- "is--add": isAdd,
1643
- "is--hover": currentOption && getOptId(currentOption) === optid
1515
+ "is--checked": isChecked,
1516
+ "is--disabled": isDisabled
1517
+ }
1518
+ ],
1519
+ ...ons
1520
+ },
1521
+ [
1522
+ (0, import_vue.h)("span", {
1523
+ class: ["vxe-radio--icon", isChecked ? getIcon().RADIO_CHECKED : isDisabled ? getIcon().RADIO_DISABLED_UNCHECKED : getIcon().RADIO_UNCHECKED]
1524
+ })
1525
+ ]
1526
+ );
1527
+ };
1528
+ const renderCheckbox = (option, isOptGroup, isChecked, isDisabled) => {
1529
+ const checkboxOpts = computeCheckboxOpts.value;
1530
+ const { showIcon, trigger } = checkboxOpts;
1531
+ if (isOptGroup || showIcon === false) {
1532
+ return renderEmptyElement($xeSelect);
1533
+ }
1534
+ const ons = {};
1535
+ if (!trigger || trigger === "default") {
1536
+ ons.onClick = (evnt) => {
1537
+ if (!isDisabled && !isOptGroup) {
1538
+ changeOptionEvent(evnt, option);
1539
+ }
1540
+ };
1541
+ }
1542
+ return (0, import_vue.h)(
1543
+ "div",
1544
+ {
1545
+ key: 3,
1546
+ class: [
1547
+ "vxe-select-option--checkbox",
1548
+ {
1549
+ "is--checked": isChecked,
1550
+ "is--disabled": isDisabled
1644
1551
  }
1645
1552
  ],
1646
- optid,
1647
- title: optLabel || null,
1648
- style: height ? {
1649
- height: (0, import_dom.toCssUnit)(height)
1650
- } : void 0,
1651
1553
  ...ons
1652
1554
  },
1653
- allowCreate ? [
1555
+ [
1556
+ (0, import_vue.h)("span", {
1557
+ class: ["vxe-checkbox--icon", isChecked ? getIcon().CHECKBOX_CHECKED : isDisabled ? getIcon().CHECKBOX_DISABLED_UNCHECKED : getIcon().CHECKBOX_UNCHECKED]
1558
+ })
1559
+ ]
1560
+ );
1561
+ };
1562
+ const renderOption = (list) => {
1563
+ const { allowCreate, optionKey, multiple, showRadio, showCheckbox } = props;
1564
+ const { currentOption } = reactData;
1565
+ const { optAddMaps } = internalData;
1566
+ const optionOpts = computeOptionOpts.value;
1567
+ const labelField = computeLabelField.value;
1568
+ const valueField = computeValueField.value;
1569
+ const groupLabelField = computeGroupLabelField.value;
1570
+ const selectVals = computeSelectVals.value;
1571
+ const radioOpts = computeRadioOpts.value;
1572
+ const checkboxOpts = computeCheckboxOpts.value;
1573
+ const { useKey, height } = optionOpts;
1574
+ const optionSlot = slots.option;
1575
+ const isCheckboxMode = showCheckbox && multiple;
1576
+ const isRadioMode = showRadio && !multiple;
1577
+ return list.map((option, cIndex) => {
1578
+ const { slots: slots2, className } = option;
1579
+ const optid = getOptId(option);
1580
+ const optionValue = option[valueField];
1581
+ const isOptGroup = hasOptGroupById(optid);
1582
+ const isAdd = !!(allowCreate && optAddMaps[optid]);
1583
+ const isSelected = !isAdd && selectVals.indexOf(optionValue) > -1;
1584
+ const isVisible = isAdd || !isOptGroup || isOptionVisible(option);
1585
+ const isDisabled = !isAdd && checkOptionDisabled(isSelected, option);
1586
+ const defaultSlot = slots2 ? slots2.default : null;
1587
+ const optSlot = defaultSlot || optionSlot;
1588
+ const optParams = { option, group: isOptGroup ? option : null, $select: $xeSelect };
1589
+ let optLabel = "";
1590
+ const optVNs = [];
1591
+ if (isCheckboxMode) {
1592
+ optVNs.push(renderCheckbox(option, isOptGroup, isSelected, isDisabled));
1593
+ } else if (isRadioMode) {
1594
+ optVNs.push(renderRadio(option, isOptGroup, isSelected, isDisabled));
1595
+ }
1596
+ let otlbVNs = [];
1597
+ if (optSlot) {
1598
+ otlbVNs = callSlot(optSlot, optParams);
1599
+ } else {
1600
+ optLabel = (0, import_utils.getFuncText)(option[isOptGroup ? groupLabelField : labelField] || optionValue);
1601
+ otlbVNs = [optLabel];
1602
+ }
1603
+ optVNs.push(
1654
1604
  (0, import_vue.h)(
1655
1605
  "div",
1656
1606
  {
1657
1607
  key: 1,
1658
- class: "vxe-select-option--add-label"
1608
+ class: "vxe-select-option--label"
1659
1609
  },
1660
- optVNs
1661
- ),
1662
- isAdd ? (0, import_vue.h)(
1610
+ otlbVNs
1611
+ )
1612
+ );
1613
+ const ons = {
1614
+ onMousedown: (evnt) => {
1615
+ const isLeftBtn = evnt.button === 0;
1616
+ if (isLeftBtn) {
1617
+ evnt.stopPropagation();
1618
+ }
1619
+ },
1620
+ onMouseenter: () => {
1621
+ if (!isDisabled && !isOptGroup && !isVMScrollProcess()) {
1622
+ setCurrentOption(option);
1623
+ }
1624
+ }
1625
+ };
1626
+ if (isCheckboxMode ? checkboxOpts.trigger === "option" : isRadioMode ? radioOpts.trigger === "option" : true) {
1627
+ ons.onClick = (evnt) => {
1628
+ if (!isDisabled && !isOptGroup) {
1629
+ changeOptionEvent(evnt, option);
1630
+ }
1631
+ };
1632
+ }
1633
+ return isVisible ? (0, import_vue.h)(
1634
+ "div",
1635
+ {
1636
+ key: useKey || optionKey ? optid : cIndex,
1637
+ class: [
1638
+ "vxe-select-option",
1639
+ className ? import_xe_utils.default.isFunction(className) ? className(optParams) : className : "",
1640
+ {
1641
+ "vxe-select-optgroup": isOptGroup,
1642
+ "is--disabled": isDisabled,
1643
+ "is--selected": isSelected,
1644
+ "is--add": isAdd,
1645
+ "is--hover": currentOption && getOptId(currentOption) === optid
1646
+ }
1647
+ ],
1648
+ optid,
1649
+ title: optLabel || null,
1650
+ style: height ? {
1651
+ height: (0, import_dom.toCssUnit)(height)
1652
+ } : void 0,
1653
+ ...ons
1654
+ },
1655
+ allowCreate ? [
1656
+ (0, import_vue.h)(
1657
+ "div",
1658
+ {
1659
+ key: 1,
1660
+ class: "vxe-select-option--add-label"
1661
+ },
1662
+ optVNs
1663
+ ),
1664
+ isAdd ? (0, import_vue.h)(
1665
+ "div",
1666
+ {
1667
+ key: 2,
1668
+ class: "vxe-select-option--add-icon"
1669
+ },
1670
+ [
1671
+ (0, import_vue.h)("i", {
1672
+ class: getIcon().SELECT_ADD_OPTION
1673
+ })
1674
+ ]
1675
+ ) : renderEmptyElement($xeSelect)
1676
+ ] : optVNs
1677
+ ) : renderEmptyElement($xeSelect);
1678
+ });
1679
+ };
1680
+ const renderOpts = () => {
1681
+ const { optList, searchLoading } = reactData;
1682
+ if (searchLoading) {
1683
+ return [
1684
+ (0, import_vue.h)(
1663
1685
  "div",
1664
1686
  {
1665
- key: 2,
1666
- class: "vxe-select-option--add-icon"
1687
+ class: "vxe-select--search-loading"
1667
1688
  },
1668
1689
  [
1669
1690
  (0, import_vue.h)("i", {
1670
- class: getIcon().SELECT_ADD_OPTION
1671
- })
1691
+ class: ["vxe-select--search-icon", getIcon().SELECT_LOADED]
1692
+ }),
1693
+ (0, import_vue.h)(
1694
+ "span",
1695
+ {
1696
+ class: "vxe-select--search-text"
1697
+ },
1698
+ getI18n("vxe.select.loadingText")
1699
+ )
1672
1700
  ]
1673
- ) : renderEmptyElement($xeSelect)
1674
- ] : optVNs
1675
- ) : renderEmptyElement($xeSelect);
1676
- });
1677
- };
1678
- const renderOpts = () => {
1679
- const { optList, searchLoading } = reactData;
1680
- if (searchLoading) {
1701
+ )
1702
+ ];
1703
+ }
1704
+ if (optList.length) {
1705
+ return renderOption(optList);
1706
+ }
1681
1707
  return [
1682
1708
  (0, import_vue.h)(
1683
1709
  "div",
1684
1710
  {
1685
- class: "vxe-select--search-loading"
1711
+ class: "vxe-select--empty-placeholder"
1712
+ },
1713
+ props.emptyText || getI18n("vxe.select.emptyText")
1714
+ )
1715
+ ];
1716
+ };
1717
+ const renderVN = () => {
1718
+ const { className, multiple, loading, filterable, showTotalButton, showCheckedButton, showClearButton, showCloseButton, showBadge } = props;
1719
+ const { initialized, isActivated, isAniVisible, optList, visiblePanel, bodyHeight, topSpaceHeight, xThumbWidth, yThumbHeight } = reactData;
1720
+ const vSize = computeSize.value;
1721
+ const isVScrollbar = computeIsVScrollbar.value;
1722
+ const isDisabled = computeIsDisabled.value;
1723
+ const selectLabel = computeSelectLabel.value;
1724
+ const fullLabel = computeFullLabel.value;
1725
+ const btnTransfer = computeBtnTransfer.value;
1726
+ const formReadonly = computeFormReadonly.value;
1727
+ const inpPlaceholder = computeInpPlaceholder.value;
1728
+ const badgeOpts = computeBadgeOpts.value;
1729
+ const badgeLabel = computeBadgeLabel.value;
1730
+ const defaultSlot = slots.default;
1731
+ if (formReadonly) {
1732
+ return (0, import_vue.h)(
1733
+ "div",
1734
+ {
1735
+ ref: refElem,
1736
+ class: [
1737
+ "vxe-select--readonly",
1738
+ className,
1739
+ {
1740
+ "is--badge": showBadge && badgeLabel,
1741
+ "is--badge-dot": showBadge && badgeOpts.dot
1742
+ }
1743
+ ]
1686
1744
  },
1687
1745
  [
1688
- (0, import_vue.h)("i", {
1689
- class: ["vxe-select--search-icon", getIcon().SELECT_LOADED]
1690
- }),
1746
+ (0, import_vue.h)(
1747
+ "div",
1748
+ {
1749
+ class: "vxe-select-slots",
1750
+ ref: "hideOption"
1751
+ },
1752
+ defaultSlot ? defaultSlot({}) : []
1753
+ ),
1691
1754
  (0, import_vue.h)(
1692
1755
  "span",
1693
1756
  {
1694
- class: "vxe-select--search-text"
1757
+ class: "vxe-select-label",
1758
+ title: fullLabel
1695
1759
  },
1696
- getI18n("vxe.select.loadingText")
1697
- )
1760
+ selectLabel
1761
+ ),
1762
+ showBadge && badgeLabel ? (0, import_vue.h)(
1763
+ "div",
1764
+ {
1765
+ class: "vxe-badge--label"
1766
+ },
1767
+ badgeLabel
1768
+ ) : renderEmptyElement($xeSelect)
1698
1769
  ]
1699
- )
1700
- ];
1701
- }
1702
- if (optList.length) {
1703
- return renderOption(optList);
1704
- }
1705
- return [
1706
- (0, import_vue.h)(
1707
- "div",
1708
- {
1709
- class: "vxe-select--empty-placeholder"
1710
- },
1711
- props.emptyText || getI18n("vxe.select.emptyText")
1712
- )
1713
- ];
1714
- };
1715
- const renderVN = () => {
1716
- const { className, multiple, loading, filterable, showTotalButton, showCheckedButton, showClearButton, showCloseButton, showBadge } = props;
1717
- const { initialized, isActivated, isAniVisible, optList, visiblePanel, bodyHeight, topSpaceHeight, xThumbWidth, yThumbHeight } = reactData;
1718
- const vSize = computeSize.value;
1719
- const isVScrollbar = computeIsVScrollbar.value;
1720
- const isDisabled = computeIsDisabled.value;
1721
- const selectLabel = computeSelectLabel.value;
1722
- const fullLabel = computeFullLabel.value;
1723
- const btnTransfer = computeBtnTransfer.value;
1724
- const formReadonly = computeFormReadonly.value;
1725
- const inpPlaceholder = computeInpPlaceholder.value;
1726
- const badgeOpts = computeBadgeOpts.value;
1727
- const badgeLabel = computeBadgeLabel.value;
1728
- const defaultSlot = slots.default;
1729
- if (formReadonly) {
1770
+ );
1771
+ }
1772
+ const currStyle = computeCurrStyle.value;
1773
+ const selectVals = computeSelectVals.value;
1774
+ const popupWrapperStyle = computePopupWrapperStyle.value;
1775
+ const popupOpts = computePopupOpts.value;
1776
+ const headerSlot = slots.header;
1777
+ const footerSlot = slots.footer;
1778
+ const prefixSlot = slots.prefix;
1779
+ const { appendTo } = popupOpts;
1780
+ const ppClassName = popupOpts.className || props.popupClassName;
1781
+ const scrollbarOpts = computeScrollbarOpts.value;
1782
+ const scrollXVisible = computeScrollXVisible.value;
1783
+ const scrollYVisible = computeScrollYVisible.value;
1784
+ const scrollbarXToTop = computeScrollbarXToTop.value;
1785
+ const scrollbarYToLeft = computeScrollbarYToLeft.value;
1786
+ const scrollXAutoHide = computeScrollXAutoHide.value;
1787
+ const scrollYAutoHide = computeScrollYAutoHide.value;
1788
+ const scrollbarWrapperClss = computeScrollbarWrapperClss.value;
1730
1789
  return (0, import_vue.h)(
1731
1790
  "div",
1732
1791
  {
1733
1792
  ref: refElem,
1734
1793
  class: [
1735
- "vxe-select--readonly",
1736
- className,
1794
+ "vxe-select",
1795
+ className ? import_xe_utils.default.isFunction(className) ? className({ $select: $xeSelect }) : className : "",
1737
1796
  {
1797
+ [`size--${vSize}`]: vSize,
1738
1798
  "is--badge": showBadge && badgeLabel,
1739
- "is--badge-dot": showBadge && badgeOpts.dot
1799
+ "is--badge-dot": showBadge && badgeOpts.dot,
1800
+ "is--visible": visiblePanel,
1801
+ "is--disabled": isDisabled,
1802
+ "is--filter": filterable,
1803
+ "is--loading": loading,
1804
+ "is--active": isActivated
1740
1805
  }
1741
- ]
1806
+ ],
1807
+ style: currStyle
1742
1808
  },
1743
1809
  [
1744
1810
  (0, import_vue.h)(
@@ -1750,12 +1816,28 @@ var select_default = (0, import_comp.defineVxeComponent)({
1750
1816
  defaultSlot ? defaultSlot({}) : []
1751
1817
  ),
1752
1818
  (0, import_vue.h)(
1753
- "span",
1819
+ import_input.default,
1754
1820
  {
1755
- class: "vxe-select-label",
1756
- title: fullLabel
1821
+ ref: refInput,
1822
+ clearable: props.clearable,
1823
+ placeholder: inpPlaceholder,
1824
+ editable: false,
1825
+ disabled: isDisabled,
1826
+ type: "text",
1827
+ prefixIcon: props.prefixIcon,
1828
+ suffixIcon: loading ? getIcon().SELECT_LOADED : visiblePanel ? getIcon().SELECT_OPEN : getIcon().SELECT_CLOSE,
1829
+ autoFocus: false,
1830
+ title: fullLabel,
1831
+ modelValue: selectLabel,
1832
+ onClear: clearEvent,
1833
+ onClick: clickEvent,
1834
+ onFocus: focusEvent,
1835
+ onBlur: blurEvent,
1836
+ onSuffixClick: suffixClickEvent
1757
1837
  },
1758
- selectLabel
1838
+ prefixSlot ? {
1839
+ prefix: () => prefixSlot({})
1840
+ } : {}
1759
1841
  ),
1760
1842
  showBadge && badgeLabel ? (0, import_vue.h)(
1761
1843
  "div",
@@ -1763,415 +1845,351 @@ var select_default = (0, import_comp.defineVxeComponent)({
1763
1845
  class: "vxe-badge--label"
1764
1846
  },
1765
1847
  badgeLabel
1766
- ) : renderEmptyElement($xeSelect)
1767
- ]
1768
- );
1769
- }
1770
- const currStyle = computeCurrStyle.value;
1771
- const selectVals = computeSelectVals.value;
1772
- const popupWrapperStyle = computePopupWrapperStyle.value;
1773
- const popupOpts = computePopupOpts.value;
1774
- const headerSlot = slots.header;
1775
- const footerSlot = slots.footer;
1776
- const prefixSlot = slots.prefix;
1777
- const { appendTo } = popupOpts;
1778
- const ppClassName = popupOpts.className || props.popupClassName;
1779
- const scrollbarOpts = computeScrollbarOpts.value;
1780
- const scrollXVisible = computeScrollXVisible.value;
1781
- const scrollYVisible = computeScrollYVisible.value;
1782
- const scrollbarXToTop = computeScrollbarXToTop.value;
1783
- const scrollbarYToLeft = computeScrollbarYToLeft.value;
1784
- const scrollXAutoHide = computeScrollXAutoHide.value;
1785
- const scrollYAutoHide = computeScrollYAutoHide.value;
1786
- const scrollbarWrapperClss = computeScrollbarWrapperClss.value;
1787
- return (0, import_vue.h)(
1788
- "div",
1789
- {
1790
- ref: refElem,
1791
- class: [
1792
- "vxe-select",
1793
- className ? import_xe_utils.default.isFunction(className) ? className({ $select: $xeSelect }) : className : "",
1794
- {
1795
- [`size--${vSize}`]: vSize,
1796
- "is--badge": showBadge && badgeLabel,
1797
- "is--badge-dot": showBadge && badgeOpts.dot,
1798
- "is--visible": visiblePanel,
1799
- "is--disabled": isDisabled,
1800
- "is--filter": filterable,
1801
- "is--loading": loading,
1802
- "is--active": isActivated
1803
- }
1804
- ],
1805
- style: currStyle
1806
- },
1807
- [
1808
- (0, import_vue.h)(
1809
- "div",
1810
- {
1811
- class: "vxe-select-slots",
1812
- ref: "hideOption"
1813
- },
1814
- defaultSlot ? defaultSlot({}) : []
1815
- ),
1816
- (0, import_vue.h)(
1817
- import_input.default,
1818
- {
1819
- ref: refInput,
1820
- clearable: props.clearable,
1821
- placeholder: inpPlaceholder,
1822
- editable: false,
1823
- disabled: isDisabled,
1824
- type: "text",
1825
- prefixIcon: props.prefixIcon,
1826
- suffixIcon: loading ? getIcon().SELECT_LOADED : visiblePanel ? getIcon().SELECT_OPEN : getIcon().SELECT_CLOSE,
1827
- autoFocus: false,
1828
- title: fullLabel,
1829
- modelValue: selectLabel,
1830
- onClear: clearEvent,
1831
- onClick: clickEvent,
1832
- onFocus: focusEvent,
1833
- onBlur: blurEvent,
1834
- onSuffixClick: suffixClickEvent
1835
- },
1836
- prefixSlot ? {
1837
- prefix: () => prefixSlot({})
1838
- } : {}
1839
- ),
1840
- showBadge && badgeLabel ? (0, import_vue.h)(
1841
- "div",
1842
- {
1843
- class: "vxe-badge--label"
1844
- },
1845
- badgeLabel
1846
- ) : renderEmptyElement($xeSelect),
1847
- (0, import_vue.h)(
1848
- import_vue.Teleport,
1849
- {
1850
- to: (0, import_dom.getPopupContainer)(appendTo),
1851
- disabled: btnTransfer ? !initialized : true
1852
- },
1853
- [
1854
- (0, import_vue.h)(
1855
- "div",
1856
- {
1857
- ref: refOptionPanel,
1858
- class: [
1859
- "vxe-table--ignore-clear vxe-select--panel",
1860
- ppClassName ? import_xe_utils.default.isFunction(ppClassName) ? ppClassName({ $select: $xeSelect }) : ppClassName : "",
1861
- {
1862
- [`size--${vSize}`]: vSize,
1863
- "is--transfer": btnTransfer,
1864
- "ani--leave": !loading && isAniVisible,
1865
- "ani--enter": !loading && visiblePanel
1866
- }
1867
- ],
1868
- placement: reactData.panelPlacement,
1869
- style: reactData.panelStyle
1870
- },
1871
- initialized && (visiblePanel || isAniVisible) ? [
1872
- (0, import_vue.h)(
1873
- "div",
1874
- {
1875
- class: "vxe-select--panel-wrapper",
1876
- style: popupWrapperStyle
1877
- },
1878
- [
1879
- filterable ? (0, import_vue.h)(
1880
- "div",
1881
- {
1882
- class: "vxe-select--panel-search"
1883
- },
1884
- [
1885
- (0, import_vue.h)(import_input.default, {
1886
- ref: refInpSearch,
1887
- class: "vxe-select-search--input",
1888
- modelValue: reactData.searchValue,
1889
- type: "text",
1890
- clearable: true,
1891
- disabled: false,
1892
- readonly: false,
1893
- placeholder: getI18n("vxe.select.search"),
1894
- prefixIcon: getIcon().INPUT_SEARCH,
1895
- "onUpdate:modelValue": modelSearchEvent,
1896
- onFocus: focusSearchEvent,
1897
- onChange: triggerSearchEvent,
1898
- onSearch: triggerSearchEvent
1899
- })
1900
- ]
1901
- ) : renderEmptyElement($xeSelect),
1902
- showCheckedButton && multiple || showClearButton || headerSlot ? (0, import_vue.h)(
1903
- "div",
1904
- {
1905
- class: "vxe-select--panel-header"
1906
- },
1907
- headerSlot ? callSlot(headerSlot, {}) : [
1908
- (0, import_vue.h)(
1909
- "div",
1910
- {
1911
- class: "vxe-select--header-button"
1912
- },
1913
- [
1914
- (0, import_vue.h)(
1915
- "div",
1916
- {
1917
- class: "vxe-select--header-btns"
1918
- },
1919
- [
1920
- showCheckedButton && multiple ? (0, import_vue.h)(import_button.default, {
1921
- content: getI18n("vxe.select.allChecked"),
1922
- mode: "text",
1923
- onClick: allCheckedPanelEvent
1924
- }) : renderEmptyElement($xeSelect),
1925
- showClearButton ? (0, import_vue.h)(import_button.default, {
1926
- content: getI18n("vxe.select.clear"),
1927
- mode: "text",
1928
- onClick: clearCheckedPanelEvent
1929
- }) : renderEmptyElement($xeSelect)
1930
- ]
1931
- )
1932
- ]
1933
- )
1934
- ]
1935
- ) : renderEmptyElement($xeSelect),
1936
- (0, import_vue.h)(
1937
- "div",
1938
- {
1939
- class: [
1940
- "vxe-select--panel-body",
1941
- isVScrollbar ? `ov-x--${scrollXVisible === false ? "hidden" : "visible"}` : "",
1942
- isVScrollbar ? `ov-y--${scrollYVisible === false ? "hidden" : "visible"}` : "",
1943
- isVScrollbar ? `sx-pos--${scrollbarXToTop ? "top" : "bottom"}` : "",
1944
- isVScrollbar ? `sy-pos--${scrollbarYToLeft ? "left" : "right"}` : "",
1945
- {
1946
- "is--virtual-scrollbar": isVScrollbar,
1947
- "ov-padding": isVScrollbar && scrollbarOpts.padding,
1948
- "ov-x--auto-hide": isVScrollbar && scrollXAutoHide,
1949
- "ov-y--auto-hide": isVScrollbar && scrollYAutoHide,
1950
- "overflow-y": yThumbHeight,
1951
- "overflow-x": xThumbWidth
1952
- }
1848
+ ) : renderEmptyElement($xeSelect),
1849
+ (0, import_vue.h)(
1850
+ import_vue.Teleport,
1851
+ {
1852
+ to: (0, import_dom.getPopupContainer)(appendTo),
1853
+ disabled: btnTransfer ? !initialized : true
1854
+ },
1855
+ [
1856
+ (0, import_vue.h)(
1857
+ "div",
1858
+ {
1859
+ ref: refOptionPanel,
1860
+ class: [
1861
+ "vxe-table--ignore-clear vxe-select--panel",
1862
+ ppClassName ? import_xe_utils.default.isFunction(ppClassName) ? ppClassName({ $select: $xeSelect }) : ppClassName : "",
1863
+ {
1864
+ [`size--${vSize}`]: vSize,
1865
+ "is--transfer": btnTransfer,
1866
+ "ani--leave": !loading && isAniVisible,
1867
+ "ani--enter": !loading && visiblePanel
1868
+ }
1869
+ ],
1870
+ placement: reactData.panelPlacement,
1871
+ style: reactData.panelStyle
1872
+ },
1873
+ initialized && (visiblePanel || isAniVisible) ? [
1874
+ (0, import_vue.h)(
1875
+ "div",
1876
+ {
1877
+ class: "vxe-select--panel-wrapper",
1878
+ style: popupWrapperStyle
1879
+ },
1880
+ [
1881
+ filterable ? (0, import_vue.h)(
1882
+ "div",
1883
+ {
1884
+ class: "vxe-select--panel-search"
1885
+ },
1886
+ [
1887
+ (0, import_vue.h)(import_input.default, {
1888
+ ref: refInpSearch,
1889
+ class: "vxe-select-search--input",
1890
+ modelValue: reactData.searchValue,
1891
+ type: "text",
1892
+ clearable: true,
1893
+ disabled: false,
1894
+ readonly: false,
1895
+ placeholder: getI18n("vxe.select.search"),
1896
+ prefixIcon: getIcon().INPUT_SEARCH,
1897
+ "onUpdate:modelValue": modelSearchEvent,
1898
+ onFocus: focusSearchEvent,
1899
+ onChange: triggerSearchEvent,
1900
+ onSearch: triggerSearchEvent
1901
+ })
1953
1902
  ]
1954
- },
1955
- [
1956
- (0, import_vue.h)(
1957
- "div",
1958
- {
1959
- ref: refVirtualWrapper,
1960
- class: "vxe-select-option--wrapper",
1961
- onScroll: scrollEvent
1962
- },
1963
- [
1964
- (0, import_vue.h)("div", {
1965
- ref: refVirtualSpaceElem,
1966
- class: "vxe-select--y-space",
1967
- style: {
1968
- height: bodyHeight ? `${bodyHeight}px` : ""
1969
- }
1970
- }),
1971
- (0, import_vue.h)(
1972
- "div",
1973
- {
1974
- ref: refVirtualBody,
1975
- class: "vxe-select--body",
1903
+ ) : renderEmptyElement($xeSelect),
1904
+ showCheckedButton && multiple || showClearButton || headerSlot ? (0, import_vue.h)(
1905
+ "div",
1906
+ {
1907
+ class: "vxe-select--panel-header"
1908
+ },
1909
+ headerSlot ? callSlot(headerSlot, {}) : [
1910
+ (0, import_vue.h)(
1911
+ "div",
1912
+ {
1913
+ class: "vxe-select--header-button"
1914
+ },
1915
+ [
1916
+ (0, import_vue.h)(
1917
+ "div",
1918
+ {
1919
+ class: "vxe-select--header-btns"
1920
+ },
1921
+ [
1922
+ showCheckedButton && multiple ? (0, import_vue.h)(import_button.default, {
1923
+ content: getI18n("vxe.select.allChecked"),
1924
+ mode: "text",
1925
+ onClick: allCheckedPanelEvent
1926
+ }) : renderEmptyElement($xeSelect),
1927
+ showClearButton ? (0, import_vue.h)(import_button.default, {
1928
+ content: getI18n("vxe.select.clear"),
1929
+ mode: "text",
1930
+ onClick: clearCheckedPanelEvent
1931
+ }) : renderEmptyElement($xeSelect)
1932
+ ]
1933
+ )
1934
+ ]
1935
+ )
1936
+ ]
1937
+ ) : renderEmptyElement($xeSelect),
1938
+ (0, import_vue.h)(
1939
+ "div",
1940
+ {
1941
+ class: [
1942
+ "vxe-select--panel-body",
1943
+ isVScrollbar ? `ov-x--${scrollXVisible === false ? "hidden" : "visible"}` : "",
1944
+ isVScrollbar ? `ov-y--${scrollYVisible === false ? "hidden" : "visible"}` : "",
1945
+ isVScrollbar ? `sx-pos--${scrollbarXToTop ? "top" : "bottom"}` : "",
1946
+ isVScrollbar ? `sy-pos--${scrollbarYToLeft ? "left" : "right"}` : "",
1947
+ {
1948
+ "is--virtual-scrollbar": isVScrollbar,
1949
+ "ov-padding": isVScrollbar && scrollbarOpts.padding,
1950
+ "ov-x--auto-hide": isVScrollbar && scrollXAutoHide,
1951
+ "ov-y--auto-hide": isVScrollbar && scrollYAutoHide,
1952
+ "overflow-y": yThumbHeight,
1953
+ "overflow-x": xThumbWidth
1954
+ }
1955
+ ]
1956
+ },
1957
+ [
1958
+ (0, import_vue.h)(
1959
+ "div",
1960
+ {
1961
+ ref: refVirtualWrapper,
1962
+ class: "vxe-select-option--wrapper",
1963
+ onScroll: scrollEvent
1964
+ },
1965
+ [
1966
+ (0, import_vue.h)("div", {
1967
+ ref: refVirtualSpaceElem,
1968
+ class: "vxe-select--y-space",
1976
1969
  style: {
1977
- marginTop: `${topSpaceHeight}px`
1970
+ height: bodyHeight ? `${bodyHeight}px` : ""
1978
1971
  }
1979
- },
1980
- renderOpts()
1981
- )
1982
- ]
1983
- ),
1984
- /**
1985
- * 滚动条
1986
- */
1987
- isVScrollbar ? (0, import_vue.h)(
1988
- "div",
1989
- {
1990
- class: scrollbarWrapperClss
1991
- },
1992
- [
1993
- scrollXVisible === false ? renderEmptyElement($xeSelect) : (0, import_vue.h)(
1994
- "div",
1995
- {
1996
- ref: refTrackXElem,
1997
- class: "vxe-scrollbar--track-x",
1998
- onClick: clickTrackXEvent
1999
- },
2000
- [
2001
- (0, import_vue.h)("div", {
2002
- ref: refThumbXElem,
2003
- class: "vxe-scrollbar--thumb-x",
2004
- onPointerdown: pointerdownThumbXEvent,
2005
- onPointermove: pointermoveThumbXEvent,
2006
- onPointerup: cleatPointerThumbEvent,
2007
- onPointercancel: cleatPointerThumbEvent,
2008
- onLostpointercapture: cleatPointerThumbEvent
2009
- })
2010
- ]
2011
- ),
2012
- scrollYVisible === false ? renderEmptyElement($xeSelect) : (0, import_vue.h)(
2013
- "div",
2014
- {
2015
- ref: refTrackYElem,
2016
- class: "vxe-scrollbar--track-y",
2017
- onClick: clickTrackYEvent
2018
- },
2019
- [
2020
- (0, import_vue.h)("div", {
2021
- ref: refThumbYElem,
2022
- class: "vxe-scrollbar--thumb-y",
2023
- onPointerdown: pointerdownThumbYEvent,
2024
- onPointermove: pointermoveThumbYEvent,
2025
- onPointerup: cleatPointerThumbEvent,
2026
- onPointercancel: cleatPointerThumbEvent,
2027
- onLostpointercapture: cleatPointerThumbEvent
2028
- })
2029
- ]
2030
- )
2031
- ]
2032
- ) : renderEmptyElement($xeSelect)
2033
- ]
2034
- ),
2035
- footerSlot || showTotalButton || showCloseButton && multiple ? (0, import_vue.h)(
2036
- "div",
2037
- {
2038
- class: "vxe-select--panel-footer"
2039
- },
2040
- footerSlot ? callSlot(footerSlot, {}) : [
2041
- (0, import_vue.h)(
2042
- "div",
2043
- {
2044
- class: "vxe-select--footer-button"
2045
- },
2046
- [
2047
- showTotalButton ? (0, import_vue.h)(
2048
- "div",
2049
- {
2050
- class: "vxe-select--total-btns"
2051
- },
2052
- getI18n("vxe.select.total", [selectVals.length, optList.length])
2053
- ) : renderEmptyElement($xeSelect),
2054
- showCloseButton && multiple ? (0, import_vue.h)(
2055
- "div",
2056
- {
2057
- class: "vxe-select--oper-btns"
2058
- },
2059
- [
2060
- (0, import_vue.h)(import_button.default, {
2061
- content: getI18n("vxe.select.close"),
2062
- mode: "text",
2063
- onClick: closePanelEvent
2064
- })
2065
- ]
2066
- ) : renderEmptyElement($xeSelect)
2067
- ]
2068
- )
2069
- ]
2070
- ) : renderEmptyElement($xeSelect)
2071
- ]
2072
- )
2073
- ] : []
2074
- )
2075
- ]
2076
- )
2077
- ]
1972
+ }),
1973
+ (0, import_vue.h)(
1974
+ "div",
1975
+ {
1976
+ ref: refVirtualBody,
1977
+ class: "vxe-select--body",
1978
+ style: {
1979
+ marginTop: `${topSpaceHeight}px`
1980
+ }
1981
+ },
1982
+ renderOpts()
1983
+ )
1984
+ ]
1985
+ ),
1986
+ /**
1987
+ * 滚动条
1988
+ */
1989
+ isVScrollbar ? (0, import_vue.h)(
1990
+ "div",
1991
+ {
1992
+ class: scrollbarWrapperClss
1993
+ },
1994
+ [
1995
+ scrollXVisible === false ? renderEmptyElement($xeSelect) : (0, import_vue.h)(
1996
+ "div",
1997
+ {
1998
+ ref: refTrackXElem,
1999
+ class: "vxe-scrollbar--track-x",
2000
+ onClick: clickTrackXEvent
2001
+ },
2002
+ [
2003
+ (0, import_vue.h)("div", {
2004
+ ref: refThumbXElem,
2005
+ class: "vxe-scrollbar--thumb-x",
2006
+ onPointerdown: pointerdownThumbXEvent,
2007
+ onPointermove: pointermoveThumbXEvent,
2008
+ onPointerup: cleatPointerThumbEvent,
2009
+ onPointercancel: cleatPointerThumbEvent,
2010
+ onLostpointercapture: cleatPointerThumbEvent
2011
+ })
2012
+ ]
2013
+ ),
2014
+ scrollYVisible === false ? renderEmptyElement($xeSelect) : (0, import_vue.h)(
2015
+ "div",
2016
+ {
2017
+ ref: refTrackYElem,
2018
+ class: "vxe-scrollbar--track-y",
2019
+ onClick: clickTrackYEvent
2020
+ },
2021
+ [
2022
+ (0, import_vue.h)("div", {
2023
+ ref: refThumbYElem,
2024
+ class: "vxe-scrollbar--thumb-y",
2025
+ onPointerdown: pointerdownThumbYEvent,
2026
+ onPointermove: pointermoveThumbYEvent,
2027
+ onPointerup: cleatPointerThumbEvent,
2028
+ onPointercancel: cleatPointerThumbEvent,
2029
+ onLostpointercapture: cleatPointerThumbEvent
2030
+ })
2031
+ ]
2032
+ )
2033
+ ]
2034
+ ) : renderEmptyElement($xeSelect)
2035
+ ]
2036
+ ),
2037
+ footerSlot || showTotalButton || showCloseButton && multiple ? (0, import_vue.h)(
2038
+ "div",
2039
+ {
2040
+ class: "vxe-select--panel-footer"
2041
+ },
2042
+ footerSlot ? callSlot(footerSlot, {}) : [
2043
+ (0, import_vue.h)(
2044
+ "div",
2045
+ {
2046
+ class: "vxe-select--footer-button"
2047
+ },
2048
+ [
2049
+ showTotalButton ? (0, import_vue.h)(
2050
+ "div",
2051
+ {
2052
+ class: "vxe-select--total-btns"
2053
+ },
2054
+ getI18n("vxe.select.total", [selectVals.length, optList.length])
2055
+ ) : renderEmptyElement($xeSelect),
2056
+ showCloseButton && multiple ? (0, import_vue.h)(
2057
+ "div",
2058
+ {
2059
+ class: "vxe-select--oper-btns"
2060
+ },
2061
+ [
2062
+ (0, import_vue.h)(import_button.default, {
2063
+ content: getI18n("vxe.select.close"),
2064
+ mode: "text",
2065
+ onClick: closePanelEvent
2066
+ })
2067
+ ]
2068
+ ) : renderEmptyElement($xeSelect)
2069
+ ]
2070
+ )
2071
+ ]
2072
+ ) : renderEmptyElement($xeSelect)
2073
+ ]
2074
+ )
2075
+ ] : []
2076
+ )
2077
+ ]
2078
+ )
2079
+ ]
2080
+ );
2081
+ };
2082
+ (0, import_vue.watch)(
2083
+ () => reactData.staticOptions,
2084
+ (val) => {
2085
+ loadData(val);
2086
+ }
2078
2087
  );
2079
- };
2080
- (0, import_vue.watch)(() => reactData.staticOptions, (val) => {
2081
- loadData(val);
2082
- });
2083
- const refOptsFlag = (0, import_vue.ref)(0);
2084
- (0, import_vue.watch)(() => props.options, () => {
2085
- refOptsFlag.value++;
2086
- });
2087
- (0, import_vue.watch)(() => props.options ? props.options.length : -1, () => {
2088
- refOptsFlag.value++;
2089
- });
2090
- (0, import_vue.watch)(refOptsFlag, () => {
2091
- loadData(props.options || []);
2092
- });
2093
- const refOptGrpsFlag = (0, import_vue.ref)(0);
2094
- (0, import_vue.watch)(() => props.optionGroups, () => {
2095
- refOptGrpsFlag.value++;
2096
- });
2097
- (0, import_vue.watch)(() => props.optionGroups ? props.optionGroups.length : -1, () => {
2098
- refOptGrpsFlag.value++;
2099
- });
2100
- (0, import_vue.watch)(refOptGrpsFlag, () => {
2101
- loadData(props.optionGroups || []);
2102
- });
2103
- const reScrollFlag = (0, import_vue.ref)(0);
2104
- const reLayoutFlag = (0, import_vue.ref)(0);
2105
- (0, import_vue.watch)(computeIsVScrollbar, () => {
2106
- (0, import_vue.nextTick)(() => {
2107
- bindScrollbarResize();
2088
+ const refOptsFlag = (0, import_vue.ref)(0);
2089
+ (0, import_vue.watch)(
2090
+ () => props.options,
2091
+ () => {
2092
+ refOptsFlag.value++;
2093
+ }
2094
+ );
2095
+ (0, import_vue.watch)(
2096
+ () => props.options ? props.options.length : -1,
2097
+ () => {
2098
+ refOptsFlag.value++;
2099
+ }
2100
+ );
2101
+ (0, import_vue.watch)(refOptsFlag, () => {
2102
+ loadData(props.options || []);
2103
+ });
2104
+ const refOptGrpsFlag = (0, import_vue.ref)(0);
2105
+ (0, import_vue.watch)(
2106
+ () => props.optionGroups,
2107
+ () => {
2108
+ refOptGrpsFlag.value++;
2109
+ }
2110
+ );
2111
+ (0, import_vue.watch)(
2112
+ () => props.optionGroups ? props.optionGroups.length : -1,
2113
+ () => {
2114
+ refOptGrpsFlag.value++;
2115
+ }
2116
+ );
2117
+ (0, import_vue.watch)(refOptGrpsFlag, () => {
2118
+ loadData(props.optionGroups || []);
2119
+ });
2120
+ const reScrollFlag = (0, import_vue.ref)(0);
2121
+ const reLayoutFlag = (0, import_vue.ref)(0);
2122
+ (0, import_vue.watch)(computeIsVScrollbar, () => {
2108
2123
  (0, import_vue.nextTick)(() => {
2109
- reLayoutFlag.value++;
2124
+ bindScrollbarResize();
2125
+ (0, import_vue.nextTick)(() => {
2126
+ reLayoutFlag.value++;
2127
+ });
2110
2128
  });
2111
2129
  });
2112
- });
2113
- (0, import_vue.watch)(computeScrollYWidth, () => {
2114
- reLayoutFlag.value++;
2115
- });
2116
- (0, import_vue.watch)(computeScrollXHeight, () => {
2117
- reLayoutFlag.value++;
2118
- });
2119
- (0, import_vue.watch)(computeScrollXVisible, () => {
2120
- (0, import_vue.nextTick)(() => {
2130
+ (0, import_vue.watch)(computeScrollYWidth, () => {
2121
2131
  reLayoutFlag.value++;
2122
2132
  });
2123
- });
2124
- (0, import_vue.watch)(computeScrollYVisible, () => {
2125
- (0, import_vue.nextTick)(() => {
2133
+ (0, import_vue.watch)(computeScrollXHeight, () => {
2126
2134
  reLayoutFlag.value++;
2127
2135
  });
2128
- });
2129
- (0, import_vue.watch)(reLayoutFlag, () => {
2130
- recalculate().then(() => {
2131
- recalculate();
2136
+ (0, import_vue.watch)(computeScrollXVisible, () => {
2137
+ (0, import_vue.nextTick)(() => {
2138
+ reLayoutFlag.value++;
2139
+ });
2140
+ });
2141
+ (0, import_vue.watch)(computeScrollYVisible, () => {
2142
+ (0, import_vue.nextTick)(() => {
2143
+ reLayoutFlag.value++;
2144
+ });
2145
+ });
2146
+ (0, import_vue.watch)(reLayoutFlag, () => {
2147
+ recalculate().then(() => {
2148
+ recalculate();
2149
+ });
2150
+ });
2151
+ (0, import_vue.watch)(reScrollFlag, () => {
2152
+ updateScrollbar().then(() => {
2153
+ updateScrollbar();
2154
+ });
2132
2155
  });
2133
- });
2134
- (0, import_vue.watch)(reScrollFlag, () => {
2135
- updateScrollbar().then(() => {
2136
- updateScrollbar();
2156
+ (0, import_vue.onMounted)(() => {
2157
+ (0, import_vue.nextTick)(() => {
2158
+ const { options, optionGroups } = props;
2159
+ if (optionGroups) {
2160
+ loadData(optionGroups);
2161
+ } else if (options) {
2162
+ loadData(options);
2163
+ }
2164
+ });
2165
+ reLayoutFlag.value++;
2166
+ globalEvents.on($xeSelect, "mousedown", handleGlobalMousedownEvent);
2167
+ globalEvents.on($xeSelect, "keydown", handleGlobalKeydownEvent);
2168
+ globalEvents.on($xeSelect, "blur", handleGlobalBlurEvent);
2169
+ globalEvents.on($xeSelect, "resize", handleGlobalResizeEvent);
2170
+ globalEvents.on($xeSelect, "scroll", handleGlobalScrollEvent);
2137
2171
  });
2138
- });
2139
- (0, import_vue.onMounted)(() => {
2140
- (0, import_vue.nextTick)(() => {
2141
- const { options, optionGroups } = props;
2142
- if (optionGroups) {
2143
- loadData(optionGroups);
2144
- } else if (options) {
2145
- loadData(options);
2172
+ (0, import_vue.onBeforeUnmount)(() => {
2173
+ const { scrollObserver } = internalData;
2174
+ if (scrollObserver) {
2175
+ scrollObserver.disconnect();
2146
2176
  }
2147
2177
  });
2148
- reLayoutFlag.value++;
2149
- globalEvents.on($xeSelect, "mousedown", handleGlobalMousedownEvent);
2150
- globalEvents.on($xeSelect, "keydown", handleGlobalKeydownEvent);
2151
- globalEvents.on($xeSelect, "blur", handleGlobalBlurEvent);
2152
- globalEvents.on($xeSelect, "resize", handleGlobalResizeEvent);
2153
- globalEvents.on($xeSelect, "scroll", handleGlobalScrollEvent);
2154
- });
2155
- (0, import_vue.onBeforeUnmount)(() => {
2156
- const { scrollObserver } = internalData;
2157
- if (scrollObserver) {
2158
- scrollObserver.disconnect();
2159
- }
2160
- });
2161
- (0, import_vue.onUnmounted)(() => {
2162
- globalEvents.off($xeSelect, "mousedown");
2163
- globalEvents.off($xeSelect, "keydown");
2164
- globalEvents.off($xeSelect, "blur");
2165
- globalEvents.off($xeSelect, "resize");
2166
- globalEvents.off($xeSelect, "scroll");
2167
- import_xe_utils.default.assign(reactData, createReactData());
2168
- import_xe_utils.default.assign(internalData, createInternalData());
2169
- });
2170
- (0, import_vue.provide)("$xeSelect", $xeSelect);
2171
- $xeSelect.renderVN = renderVN;
2172
- return $xeSelect;
2173
- },
2174
- render() {
2175
- return this.renderVN();
2176
- }
2177
- });
2178
+ (0, import_vue.onUnmounted)(() => {
2179
+ globalEvents.off($xeSelect, "mousedown");
2180
+ globalEvents.off($xeSelect, "keydown");
2181
+ globalEvents.off($xeSelect, "blur");
2182
+ globalEvents.off($xeSelect, "resize");
2183
+ globalEvents.off($xeSelect, "scroll");
2184
+ import_xe_utils.default.assign(reactData, createReactData());
2185
+ import_xe_utils.default.assign(internalData, createInternalData());
2186
+ });
2187
+ (0, import_vue.provide)("$xeSelect", $xeSelect);
2188
+ $xeSelect.renderVN = renderVN;
2189
+ return $xeSelect;
2190
+ },
2191
+ render() {
2192
+ return this.renderVN();
2193
+ }
2194
+ })
2195
+ );