vxe-pc-ui 4.20.34 → 4.20.35

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 (367) 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/src/anchor-link.js +110 -107
  7. package/es/anchor/src/anchor.js +212 -209
  8. package/es/avatar/src/avatar.js +132 -129
  9. package/es/backtop/src/backtop.js +267 -264
  10. package/es/badge/src/badge.js +102 -99
  11. package/es/breadcrumb/src/breadcrumb-item.js +104 -101
  12. package/es/breadcrumb/src/breadcrumb.js +70 -67
  13. package/es/button/src/button-group.js +88 -85
  14. package/es/calendar/src/calendar.js +1371 -1368
  15. package/es/card/src/card.js +235 -232
  16. package/es/carousel/src/carousel-item.js +78 -75
  17. package/es/carousel/src/carousel.js +392 -389
  18. package/es/cascader/src/cascader.js +1667 -1664
  19. package/es/checkbox/src/button.js +198 -195
  20. package/es/checkbox/src/checkbox.js +181 -178
  21. package/es/checkbox/src/group.js +210 -207
  22. package/es/collapse/src/collapse-pane.js +98 -95
  23. package/es/collapse/src/collapse.js +340 -337
  24. package/es/color-picker/src/color-picker.js +1116 -1113
  25. package/es/components.d.ts +1 -0
  26. package/es/components.js +3 -0
  27. package/es/context-menu/src/context-menu.js +601 -598
  28. package/es/countdown/src/countdown.js +224 -221
  29. package/es/date-panel/src/date-panel.js +1905 -1902
  30. package/es/date-picker/src/date-picker.js +1537 -1534
  31. package/es/date-range-picker/src/date-range-picker.js +1412 -1409
  32. package/es/divider/src/divider.js +80 -77
  33. package/es/drawer/src/drawer.js +778 -775
  34. package/es/empty/src/empty.js +100 -97
  35. package/es/form/src/form-group.js +74 -71
  36. package/es/form/src/form-item.js +76 -73
  37. package/es/form/src/form.js +789 -786
  38. package/es/icon/src/icon.js +59 -56
  39. package/es/icon/style.css +1 -1
  40. package/es/icon/style.mini.css +1 -1
  41. package/es/icon-picker/src/icon-picker.js +719 -716
  42. package/es/image/src/group.js +130 -127
  43. package/es/image/src/image.js +243 -240
  44. package/es/image/src/preview.js +627 -624
  45. package/es/index.esm.js +2 -0
  46. package/es/index.js +2 -0
  47. package/es/input/src/input.js +2700 -2697
  48. package/es/layout-aside/src/layout-aside.js +138 -135
  49. package/es/layout-body/src/layout-body.js +145 -142
  50. package/es/layout-container/src/layout-container.js +71 -68
  51. package/es/layout-footer/src/layout-footer.js +60 -57
  52. package/es/layout-header/src/layout-header.js +58 -55
  53. package/es/link/src/link.js +131 -128
  54. package/es/list/src/list.js +2174 -2171
  55. package/es/loading/src/loading.js +141 -138
  56. package/es/mention/src/mention.js +49 -46
  57. package/es/menu/src/menu.js +799 -796
  58. package/es/modal/src/modal.js +1519 -1527
  59. package/es/notice-bar/src/notice-bar.js +168 -165
  60. package/es/number-input/src/number-input.js +1094 -1091
  61. package/es/pager/src/pager.js +767 -764
  62. package/es/password-input/src/password-input.js +431 -428
  63. package/es/print/src/page-break.js +63 -60
  64. package/es/print/src/print.js +303 -300
  65. package/es/pulldown/src/pulldown.js +403 -400
  66. package/es/radio/src/button.js +214 -211
  67. package/es/radio/src/group.js +195 -192
  68. package/es/radio/src/radio.js +194 -191
  69. package/es/rate/src/rate.js +164 -161
  70. package/es/result/src/result.js +116 -113
  71. package/es/row/src/col.js +133 -130
  72. package/es/row/src/row.js +111 -108
  73. package/es/scrollbar/src/scrollbar.js +518 -515
  74. package/es/segmented/src/segmented.js +240 -237
  75. package/es/select/src/optgroup.js +44 -41
  76. package/es/select/src/option.js +39 -36
  77. package/es/select/src/select.js +1914 -1896
  78. package/es/slider/src/slider.js +419 -416
  79. package/es/space/src/space.js +190 -187
  80. package/es/splitter/src/splitter-panel.js +146 -143
  81. package/es/splitter/src/splitter.js +917 -914
  82. package/es/step-item/index.d.ts +76 -0
  83. package/es/step-item/index.js +17 -0
  84. package/es/steps/index.d.ts +288 -34
  85. package/es/steps/src/step-info.d.ts +6 -0
  86. package/es/steps/src/step-info.js +20 -0
  87. package/es/steps/src/step-item.d.ts +14 -0
  88. package/es/steps/src/step-item.js +39 -0
  89. package/es/steps/src/steps.d.ts +68 -8
  90. package/es/steps/src/steps.js +299 -47
  91. package/es/steps/src/util.d.ts +7 -0
  92. package/es/steps/src/util.js +44 -0
  93. package/es/steps/style.css +297 -0
  94. package/es/steps/style.mini.css +1 -0
  95. package/es/style.css +307 -1
  96. package/es/style.mini.css +1 -1
  97. package/es/switch/src/switch.js +228 -225
  98. package/es/table-select/src/table-select.js +865 -862
  99. package/es/table-transfer/src/table-transfer.js +61 -58
  100. package/es/tabs/src/tab-pane.js +102 -99
  101. package/es/tabs/src/tabs.js +936 -933
  102. package/es/tag/src/tag.js +163 -160
  103. package/es/text/src/text.js +232 -229
  104. package/es/text-ellipsis/src/text-ellipsis.js +252 -249
  105. package/es/textarea/src/textarea.js +434 -431
  106. package/es/timeline/src/timeline.js +74 -36
  107. package/es/timeline/src/util.js +7 -4
  108. package/es/tip/src/tip.js +117 -114
  109. package/es/tooltip/src/tooltip.js +552 -549
  110. package/es/tour/src/tour.js +49 -46
  111. package/es/transfer/src/transfer.js +95 -92
  112. package/es/tree/src/tree.js +3379 -3376
  113. package/es/tree-select/src/tree-select.js +969 -966
  114. package/es/ui/index.js +8 -2
  115. package/es/ui/src/log.js +1 -1
  116. package/es/upload/src/upload.js +1791 -1788
  117. package/es/vxe-icon/style.css +1 -1
  118. package/es/vxe-icon/style.mini.css +1 -1
  119. package/es/vxe-steps/style.css +297 -0
  120. package/es/vxe-steps/style.mini.css +1 -0
  121. package/es/watermark/src/watermark.js +158 -155
  122. package/lib/alert/src/alert.js +117 -114
  123. package/lib/anchor/src/anchor-link.js +110 -107
  124. package/lib/anchor/src/anchor.js +212 -209
  125. package/lib/avatar/src/avatar.js +132 -129
  126. package/lib/backtop/src/backtop.js +267 -264
  127. package/lib/badge/src/badge.js +102 -99
  128. package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
  129. package/lib/breadcrumb/src/breadcrumb.js +70 -67
  130. package/lib/button/src/button-group.js +88 -85
  131. package/lib/calendar/src/calendar.js +1371 -1368
  132. package/lib/card/src/card.js +235 -232
  133. package/lib/carousel/src/carousel-item.js +78 -75
  134. package/lib/carousel/src/carousel.js +392 -389
  135. package/lib/cascader/src/cascader.js +1665 -1662
  136. package/lib/checkbox/src/button.js +198 -195
  137. package/lib/checkbox/src/checkbox.js +181 -178
  138. package/lib/checkbox/src/group.js +210 -207
  139. package/lib/collapse/src/collapse-pane.js +98 -95
  140. package/lib/collapse/src/collapse.js +340 -337
  141. package/lib/color-picker/src/color-picker.js +1116 -1113
  142. package/lib/components.js +3 -0
  143. package/lib/context-menu/src/context-menu.js +601 -598
  144. package/lib/countdown/src/countdown.js +224 -221
  145. package/lib/date-panel/src/date-panel.js +1905 -1902
  146. package/lib/date-picker/src/date-picker.js +1537 -1534
  147. package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
  148. package/lib/divider/src/divider.js +80 -77
  149. package/lib/drawer/src/drawer.js +778 -775
  150. package/lib/empty/src/empty.js +100 -97
  151. package/lib/form/src/form-group.js +74 -71
  152. package/lib/form/src/form-item.js +76 -73
  153. package/lib/form/src/form.js +789 -786
  154. package/lib/icon/src/icon.js +59 -56
  155. package/lib/icon/style/style.css +1 -1
  156. package/lib/icon/style/style.mini.css +1 -1
  157. package/lib/icon-picker/src/icon-picker.js +719 -716
  158. package/lib/image/src/group.js +130 -127
  159. package/lib/image/src/image.js +243 -240
  160. package/lib/image/src/preview.js +627 -624
  161. package/lib/index.common.js +2 -0
  162. package/lib/index.js +2 -0
  163. package/lib/index.umd.js +47411 -46732
  164. package/lib/index.umd.min.js +3 -3
  165. package/lib/input/src/input.js +2700 -2697
  166. package/lib/layout-aside/src/layout-aside.js +138 -135
  167. package/lib/layout-body/src/layout-body.js +145 -142
  168. package/lib/layout-container/src/layout-container.js +71 -68
  169. package/lib/layout-footer/src/layout-footer.js +60 -57
  170. package/lib/layout-header/src/layout-header.js +58 -55
  171. package/lib/link/src/link.js +131 -128
  172. package/lib/list/src/list.js +2173 -2170
  173. package/lib/loading/src/loading.js +141 -138
  174. package/lib/mention/src/mention.js +49 -46
  175. package/lib/menu/src/menu.js +799 -796
  176. package/lib/modal/src/modal.js +1519 -1527
  177. package/lib/notice-bar/src/notice-bar.js +168 -165
  178. package/lib/number-input/src/number-input.js +1094 -1091
  179. package/lib/pager/src/pager.js +767 -764
  180. package/lib/password-input/src/password-input.js +431 -428
  181. package/lib/print/src/page-break.js +63 -60
  182. package/lib/print/src/print.js +303 -300
  183. package/lib/pulldown/src/pulldown.js +403 -400
  184. package/lib/radio/src/button.js +214 -211
  185. package/lib/radio/src/group.js +195 -192
  186. package/lib/radio/src/radio.js +194 -191
  187. package/lib/rate/src/rate.js +164 -161
  188. package/lib/result/src/result.js +116 -113
  189. package/lib/row/src/col.js +133 -130
  190. package/lib/row/src/row.js +111 -108
  191. package/lib/scrollbar/src/scrollbar.js +518 -515
  192. package/lib/segmented/src/segmented.js +240 -237
  193. package/lib/select/src/optgroup.js +44 -41
  194. package/lib/select/src/option.js +39 -36
  195. package/lib/select/src/select.js +1915 -1897
  196. package/lib/slider/src/slider.js +419 -416
  197. package/lib/space/src/space.js +190 -187
  198. package/lib/splitter/src/splitter-panel.js +146 -143
  199. package/lib/splitter/src/splitter.js +917 -914
  200. package/lib/step-item/index.js +47 -0
  201. package/lib/steps/src/step-info.js +49 -0
  202. package/lib/steps/src/step-item.js +59 -0
  203. package/lib/steps/src/steps.js +298 -46
  204. package/lib/steps/src/util.js +74 -0
  205. package/lib/steps/style/style.css +297 -0
  206. package/lib/steps/style/style.mini.css +1 -0
  207. package/lib/style.css +307 -1
  208. package/lib/style.mini.css +1 -1
  209. package/lib/switch/src/switch.js +228 -225
  210. package/lib/table-select/src/table-select.js +865 -862
  211. package/lib/table-transfer/src/table-transfer.js +61 -58
  212. package/lib/tabs/src/tab-pane.js +102 -99
  213. package/lib/tabs/src/tabs.js +936 -933
  214. package/lib/tag/src/tag.js +163 -160
  215. package/lib/text/src/text.js +232 -229
  216. package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
  217. package/lib/textarea/src/textarea.js +434 -431
  218. package/lib/timeline/src/timeline.js +74 -36
  219. package/lib/timeline/src/util.js +7 -4
  220. package/lib/tip/src/tip.js +117 -114
  221. package/lib/tooltip/src/tooltip.js +552 -549
  222. package/lib/tour/src/tour.js +49 -46
  223. package/lib/transfer/src/transfer.js +95 -92
  224. package/lib/tree/src/tree.js +3379 -3376
  225. package/lib/tree-select/src/tree-select.js +969 -966
  226. package/lib/ui/index.js +8 -2
  227. package/lib/ui/src/log.js +1 -1
  228. package/lib/upload/src/upload.js +1788 -1785
  229. package/lib/vxe-icon/style/style.css +1 -1
  230. package/lib/vxe-icon/style/style.mini.css +1 -1
  231. package/lib/vxe-steps/style/style.css +297 -0
  232. package/lib/vxe-steps/style/style.mini.css +1 -0
  233. package/lib/watermark/src/watermark.js +158 -155
  234. package/package.json +1 -1
  235. package/packages/alert/src/alert.ts +2 -2
  236. package/packages/anchor/src/anchor-link.ts +2 -2
  237. package/packages/anchor/src/anchor.ts +2 -2
  238. package/packages/avatar/src/avatar.ts +2 -2
  239. package/packages/backtop/src/backtop.ts +2 -2
  240. package/packages/badge/src/badge.ts +2 -2
  241. package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
  242. package/packages/breadcrumb/src/breadcrumb.ts +2 -2
  243. package/packages/button/src/button-group.ts +2 -2
  244. package/packages/calendar/src/calendar.ts +2 -2
  245. package/packages/card/src/card.ts +2 -2
  246. package/packages/carousel/src/carousel-item.ts +2 -2
  247. package/packages/carousel/src/carousel.ts +2 -2
  248. package/packages/cascader/src/cascader.ts +2 -2
  249. package/packages/checkbox/src/button.ts +3 -15
  250. package/packages/checkbox/src/checkbox.ts +2 -2
  251. package/packages/checkbox/src/group.ts +2 -2
  252. package/packages/collapse/src/collapse-pane.ts +2 -2
  253. package/packages/collapse/src/collapse.ts +2 -2
  254. package/packages/color-picker/src/color-picker.ts +2 -2
  255. package/packages/components.ts +3 -0
  256. package/packages/context-menu/src/context-menu.ts +3 -16
  257. package/packages/countdown/src/countdown.ts +2 -2
  258. package/packages/date-panel/src/date-panel.ts +2 -2
  259. package/packages/date-picker/src/date-picker.ts +2 -2
  260. package/packages/date-range-picker/src/date-range-picker.ts +2 -2
  261. package/packages/divider/src/divider.ts +2 -2
  262. package/packages/drawer/src/drawer.ts +2 -2
  263. package/packages/empty/src/empty.ts +2 -2
  264. package/packages/form/src/form-group.ts +2 -2
  265. package/packages/form/src/form-item.ts +2 -2
  266. package/packages/form/src/form.ts +2 -2
  267. package/packages/icon/src/icon.ts +2 -2
  268. package/packages/icon-picker/src/icon-picker.ts +2 -2
  269. package/packages/image/src/group.ts +2 -2
  270. package/packages/image/src/image.ts +2 -2
  271. package/packages/image/src/preview.ts +3 -16
  272. package/packages/index.ts +2 -2
  273. package/packages/input/src/input.ts +2 -2
  274. package/packages/layout-aside/src/layout-aside.ts +2 -2
  275. package/packages/layout-body/src/layout-body.ts +2 -2
  276. package/packages/layout-container/src/layout-container.ts +3 -14
  277. package/packages/layout-footer/src/layout-footer.ts +2 -2
  278. package/packages/layout-header/src/layout-header.ts +2 -2
  279. package/packages/link/src/link.ts +2 -2
  280. package/packages/list/src/list.ts +2 -2
  281. package/packages/loading/src/loading.ts +2 -2
  282. package/packages/mention/src/mention.ts +2 -2
  283. package/packages/menu/src/menu.ts +2 -2
  284. package/packages/modal/src/modal.ts +5 -20
  285. package/packages/notice-bar/src/notice-bar.ts +2 -2
  286. package/packages/number-input/src/number-input.ts +3 -17
  287. package/packages/pager/src/pager.ts +2 -2
  288. package/packages/password-input/src/password-input.ts +2 -2
  289. package/packages/print/src/page-break.ts +2 -2
  290. package/packages/print/src/print.ts +2 -2
  291. package/packages/pulldown/src/pulldown.ts +2 -2
  292. package/packages/radio/src/button.ts +3 -16
  293. package/packages/radio/src/group.ts +3 -17
  294. package/packages/radio/src/radio.ts +2 -2
  295. package/packages/rate/src/rate.ts +2 -2
  296. package/packages/result/src/result.ts +2 -2
  297. package/packages/row/src/col.ts +2 -2
  298. package/packages/row/src/row.ts +2 -2
  299. package/packages/scrollbar/src/scrollbar.ts +3 -4
  300. package/packages/segmented/src/segmented.ts +2 -2
  301. package/packages/select/src/optgroup.ts +2 -2
  302. package/packages/select/src/option.ts +2 -2
  303. package/packages/select/src/select.ts +33 -19
  304. package/packages/slider/src/slider.ts +2 -2
  305. package/packages/space/src/space.ts +2 -2
  306. package/packages/splitter/src/splitter-panel.ts +2 -2
  307. package/packages/splitter/src/splitter.ts +2 -2
  308. package/packages/step-item/index.ts +16 -0
  309. package/packages/steps/src/step-info.ts +18 -0
  310. package/packages/steps/src/step-item.ts +41 -0
  311. package/packages/steps/src/steps.ts +273 -13
  312. package/packages/steps/src/util.ts +44 -0
  313. package/packages/switch/src/switch.ts +2 -2
  314. package/packages/table-select/src/table-select.ts +2 -2
  315. package/packages/table-transfer/src/table-transfer.ts +3 -15
  316. package/packages/tabs/src/tab-pane.ts +2 -2
  317. package/packages/tabs/src/tabs.ts +2 -2
  318. package/packages/tag/src/tag.ts +2 -2
  319. package/packages/text/src/text.ts +2 -2
  320. package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
  321. package/packages/textarea/src/textarea.ts +2 -2
  322. package/packages/timeline/src/timeline-info.ts +17 -17
  323. package/packages/timeline/src/timeline.ts +93 -49
  324. package/packages/timeline/src/util.ts +44 -41
  325. package/packages/tip/src/tip.ts +2 -2
  326. package/packages/tooltip/src/tooltip.ts +2 -2
  327. package/packages/tour/src/tour.ts +2 -2
  328. package/packages/transfer/src/transfer.ts +2 -2
  329. package/packages/tree/src/tree.ts +2 -2
  330. package/packages/tree-select/src/tree-select.ts +2 -2
  331. package/packages/ui/index.ts +8 -1
  332. package/packages/upload/src/upload.ts +2 -2
  333. package/packages/watermark/src/watermark.ts +2 -2
  334. package/styles/all.scss +1 -0
  335. package/styles/components/step-item.scss +0 -0
  336. package/styles/components/steps.scss +354 -0
  337. package/styles/theme/base.scss +9 -0
  338. package/types/all.d.ts +3 -0
  339. package/types/components/gantt.d.ts +1 -3
  340. package/types/components/select.d.ts +1 -13
  341. package/types/components/step-item.d.ts +72 -0
  342. package/types/components/steps.d.ts +67 -8
  343. package/types/components/table.d.ts +7 -66
  344. package/types/handles/form-design.d.ts +1 -4
  345. package/types/ui/global-config.d.ts +2 -0
  346. package/types/ui/global-icon.d.ts +7 -0
  347. /package/dist/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  348. /package/dist/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  349. /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  350. /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  351. /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  352. /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  353. /package/es/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  354. /package/es/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  355. /package/es/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  356. /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  357. /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  358. /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  359. /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  360. /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  361. /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  362. /package/lib/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  363. /package/lib/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  364. /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  365. /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  366. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  367. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
@@ -71,924 +71,927 @@ function createInternalData() {
71
71
  fullValMaps: {}
72
72
  };
73
73
  }
74
- var table_select_default = (0, import_comp.defineVxeComponent)({
75
- name: "VxeTableSelect",
76
- props: {
77
- modelValue: [String, Number, Array],
78
- clearable: {
79
- type: Boolean,
80
- default: () => getConfig().tableSelect.clearable
81
- },
82
- placeholder: {
83
- type: String,
84
- default: () => import_xe_utils.default.eqNull(getConfig().tableSelect.placeholder) ? getI18n("vxe.base.pleaseSelect") : getConfig().tableSelect.placeholder
85
- },
86
- readonly: {
87
- type: Boolean,
88
- default: null
89
- },
90
- loading: Boolean,
91
- disabled: {
92
- type: Boolean,
93
- default: null
94
- },
95
- multiple: Boolean,
96
- className: [String, Function],
97
- prefixIcon: String,
98
- placement: String,
99
- columns: Array,
100
- options: Array,
101
- optionProps: Object,
102
- lazyOptions: Array,
103
- filterable: {
104
- type: Boolean,
105
- default: () => getConfig().tableSelect.filterable
106
- },
107
- filterConfig: Object,
108
- remote: Boolean,
109
- remoteConfig: Object,
110
- /**
111
- * 已废弃,请使用 popupConfig.zIndex
112
- * @deprecated
113
- */
114
- zIndex: Number,
115
- size: {
116
- type: String,
117
- default: () => getConfig().tableSelect.size || getConfig().size
118
- },
119
- popupConfig: Object,
120
- gridConfig: Object,
121
- transfer: {
122
- type: Boolean,
123
- default: null
124
- }
125
- },
126
- emits: [
127
- "update:modelValue",
128
- "change",
129
- "clear",
130
- "blur",
131
- "focus",
132
- "click",
133
- "form-submit",
134
- "form-reset",
135
- "form-collapse",
136
- "page-change"
137
- ],
138
- setup(props, context) {
139
- const { emit, slots } = context;
140
- const VxeTableGridComponent = import_core.VxeUI.getComponent("vxe-grid");
141
- const $xeModal = (0, import_vue.inject)("$xeModal", null);
142
- const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
143
- const $xeTable = (0, import_vue.inject)("$xeTable", null);
144
- const $xeForm = (0, import_vue.inject)("$xeForm", null);
145
- const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
146
- const xID = import_xe_utils.default.uniqueId();
147
- const { computeSize } = useFns.useSize(props);
148
- const refElem = (0, import_vue.ref)();
149
- const refInput = (0, import_vue.ref)();
150
- const refGridWrapper = (0, import_vue.ref)();
151
- const refOptionPanel = (0, import_vue.ref)();
152
- const refInpSearch = (0, import_vue.ref)();
153
- const refGrid = (0, import_vue.ref)();
154
- const reactData = (0, import_vue.reactive)(createReactData());
155
- const internalData = createInternalData();
156
- const refMaps = {
157
- refElem
158
- };
159
- const computeFormReadonly = (0, import_vue.computed)(() => {
160
- const { readonly } = props;
161
- if (readonly === null) {
162
- if ($xeForm) {
163
- return $xeForm.props.readonly;
164
- }
165
- return false;
166
- }
167
- return readonly;
168
- });
169
- const computeIsDisabled = (0, import_vue.computed)(() => {
170
- const { disabled } = props;
171
- if (disabled === null) {
172
- if ($xeForm) {
173
- return $xeForm.props.disabled;
174
- }
175
- return false;
74
+ var table_select_default = (
75
+ /* define-vxe-component start */
76
+ (0, import_comp.defineVxeComponent)({
77
+ name: "VxeTableSelect",
78
+ props: {
79
+ modelValue: [String, Number, Array],
80
+ clearable: {
81
+ type: Boolean,
82
+ default: () => getConfig().tableSelect.clearable
83
+ },
84
+ placeholder: {
85
+ type: String,
86
+ default: () => import_xe_utils.default.eqNull(getConfig().tableSelect.placeholder) ? getI18n("vxe.base.pleaseSelect") : getConfig().tableSelect.placeholder
87
+ },
88
+ readonly: {
89
+ type: Boolean,
90
+ default: null
91
+ },
92
+ loading: Boolean,
93
+ disabled: {
94
+ type: Boolean,
95
+ default: null
96
+ },
97
+ multiple: Boolean,
98
+ className: [String, Function],
99
+ prefixIcon: String,
100
+ placement: String,
101
+ columns: Array,
102
+ options: Array,
103
+ optionProps: Object,
104
+ lazyOptions: Array,
105
+ filterable: {
106
+ type: Boolean,
107
+ default: () => getConfig().tableSelect.filterable
108
+ },
109
+ filterConfig: Object,
110
+ remote: Boolean,
111
+ remoteConfig: Object,
112
+ /**
113
+ * 已废弃,请使用 popupConfig.zIndex
114
+ * @deprecated
115
+ */
116
+ zIndex: Number,
117
+ size: {
118
+ type: String,
119
+ default: () => getConfig().tableSelect.size || getConfig().size
120
+ },
121
+ popupConfig: Object,
122
+ gridConfig: Object,
123
+ transfer: {
124
+ type: Boolean,
125
+ default: null
176
126
  }
177
- return disabled;
178
- });
179
- const computeBtnTransfer = (0, import_vue.computed)(() => {
180
- const { transfer } = props;
181
- const popupOpts = computePopupOpts.value;
182
- if (import_xe_utils.default.isBoolean(popupOpts.transfer)) {
183
- return popupOpts.transfer;
184
- }
185
- if (transfer === null) {
186
- const globalTransfer = getConfig().tableSelect.transfer;
187
- if (import_xe_utils.default.isBoolean(globalTransfer)) {
188
- return globalTransfer;
189
- }
190
- if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
191
- return true;
127
+ },
128
+ emits: [
129
+ "update:modelValue",
130
+ "change",
131
+ "clear",
132
+ "blur",
133
+ "focus",
134
+ "click",
135
+ "form-submit",
136
+ "form-reset",
137
+ "form-collapse",
138
+ "page-change"
139
+ ],
140
+ setup(props, context) {
141
+ const { emit, slots } = context;
142
+ const VxeTableGridComponent = import_core.VxeUI.getComponent("vxe-grid");
143
+ const $xeModal = (0, import_vue.inject)("$xeModal", null);
144
+ const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
145
+ const $xeTable = (0, import_vue.inject)("$xeTable", null);
146
+ const $xeForm = (0, import_vue.inject)("$xeForm", null);
147
+ const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
148
+ const xID = import_xe_utils.default.uniqueId();
149
+ const { computeSize } = useFns.useSize(props);
150
+ const refElem = (0, import_vue.ref)();
151
+ const refInput = (0, import_vue.ref)();
152
+ const refGridWrapper = (0, import_vue.ref)();
153
+ const refOptionPanel = (0, import_vue.ref)();
154
+ const refInpSearch = (0, import_vue.ref)();
155
+ const refGrid = (0, import_vue.ref)();
156
+ const reactData = (0, import_vue.reactive)(createReactData());
157
+ const internalData = createInternalData();
158
+ const refMaps = {
159
+ refElem
160
+ };
161
+ const computeFormReadonly = (0, import_vue.computed)(() => {
162
+ const { readonly } = props;
163
+ if (readonly === null) {
164
+ if ($xeForm) {
165
+ return $xeForm.props.readonly;
166
+ }
167
+ return false;
192
168
  }
193
- }
194
- return transfer;
195
- });
196
- const computePropsOpts = (0, import_vue.computed)(() => {
197
- return props.optionProps || {};
198
- });
199
- const computeCheckboxOpts = (0, import_vue.computed)(() => {
200
- const { multiple } = props;
201
- const gridOpts = computeGridOpts.value;
202
- return Object.assign(
203
- {
204
- reserve: multiple,
205
- showReserveStatus: multiple
206
- },
207
- getConfig().table.checkboxConfig,
208
- gridOpts.checkboxConfig
209
- );
210
- });
211
- const computeRowOpts = (0, import_vue.computed)(() => {
212
- const { multiple } = props;
213
- const gridOpts = computeGridOpts.value;
214
- const valueField = computeValueField.value;
215
- return Object.assign(
216
- {
217
- isCurrent: true
218
- },
219
- multiple ? { keyField: valueField } : {},
220
- getConfig().table.rowConfig,
221
- gridOpts.rowConfig
222
- );
223
- });
224
- const computeRowKeyField = (0, import_vue.computed)(() => {
225
- const rowOpts = computeRowOpts.value;
226
- return rowOpts.keyField || "_X_ROW_KEY";
227
- });
228
- const computeLabelField = (0, import_vue.computed)(() => {
229
- const propsOpts = computePropsOpts.value;
230
- return propsOpts.label || "label";
231
- });
232
- const computeValueField = (0, import_vue.computed)(() => {
233
- const propsOpts = computePropsOpts.value;
234
- return propsOpts.value || "value";
235
- });
236
- const computePopupOpts = (0, import_vue.computed)(() => {
237
- return Object.assign({}, getConfig().tableSelect.popupConfig, props.popupConfig);
238
- });
239
- const computeGridOpts = (0, import_vue.computed)(() => {
240
- return Object.assign({}, getConfig().tableSelect.gridConfig, props.gridConfig, {
241
- data: void 0
169
+ return readonly;
242
170
  });
243
- });
244
- const computeRemoteOpts = (0, import_vue.computed)(() => {
245
- return Object.assign({}, getConfig().tableSelect.remoteConfig, props.remoteConfig);
246
- });
247
- const computeFilterOpts = (0, import_vue.computed)(() => {
248
- return Object.assign({}, getConfig().tableSelect.filterConfig, props.filterConfig);
249
- });
250
- const computeSelectGridOpts = (0, import_vue.computed)(() => {
251
- const gridOpts = computeGridOpts.value;
252
- const checkboxOpts = computeCheckboxOpts.value;
253
- const { pagerConfig, proxyConfig } = gridOpts;
254
- if (proxyConfig) {
255
- const proxyAjax = proxyConfig.ajax;
256
- if (proxyAjax && proxyAjax.query) {
257
- const newProxyConfig = import_xe_utils.default.clone(proxyConfig, true);
258
- const ajaxMethods = proxyAjax.query;
259
- if (ajaxMethods) {
260
- const resConfigs = proxyConfig.response || proxyConfig.props || {};
261
- Object.assign(newProxyConfig.ajax, {
262
- query(params, ...args) {
263
- return Promise.resolve(ajaxMethods(params, ...args)).then((rest) => {
264
- let currData = [];
265
- if (pagerConfig) {
266
- const resultProp = resConfigs.result;
267
- currData = (import_xe_utils.default.isFunction(resultProp) ? resultProp({ data: rest, $table: null, $grid: null, $gantt: null }) : import_xe_utils.default.get(rest, resultProp || "result")) || [];
268
- } else {
269
- const listProp = resConfigs.list;
270
- currData = (listProp ? import_xe_utils.default.isFunction(listProp) ? listProp({ data: rest, $table: null, $grid: null, $gantt: null }) : import_xe_utils.default.get(rest, listProp) : rest) || [];
271
- }
272
- cacheDataMap(currData || []);
273
- return rest;
274
- });
275
- }
276
- });
171
+ const computeIsDisabled = (0, import_vue.computed)(() => {
172
+ const { disabled } = props;
173
+ if (disabled === null) {
174
+ if ($xeForm) {
175
+ return $xeForm.props.disabled;
277
176
  }
278
- return Object.assign({}, gridOpts, { checkboxConfig: checkboxOpts, proxyConfig: newProxyConfig });
177
+ return false;
279
178
  }
280
- }
281
- return Object.assign({}, gridOpts, { checkboxConfig: checkboxOpts });
282
- });
283
- const computeSelectLabel = (0, import_vue.computed)(() => {
284
- const { modelValue, lazyOptions } = props;
285
- const { fullValMaps, fullData } = internalData;
286
- const valueField = computeValueField.value;
287
- const labelField = computeLabelField.value;
288
- if (!fullData) {
289
- return "";
290
- }
291
- return (import_xe_utils.default.isArray(modelValue) ? modelValue : [modelValue]).map((val) => {
292
- const cacheItem = fullValMaps[val];
293
- if (cacheItem) {
294
- return cacheItem.item[labelField];
295
- }
296
- if (lazyOptions) {
297
- const lazyItem = lazyOptions.find((item) => item[valueField] === val);
298
- if (lazyItem) {
299
- return lazyItem[labelField];
179
+ return disabled;
180
+ });
181
+ const computeBtnTransfer = (0, import_vue.computed)(() => {
182
+ const { transfer } = props;
183
+ const popupOpts = computePopupOpts.value;
184
+ if (import_xe_utils.default.isBoolean(popupOpts.transfer)) {
185
+ return popupOpts.transfer;
186
+ }
187
+ if (transfer === null) {
188
+ const globalTransfer = getConfig().tableSelect.transfer;
189
+ if (import_xe_utils.default.isBoolean(globalTransfer)) {
190
+ return globalTransfer;
191
+ }
192
+ if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
193
+ return true;
300
194
  }
301
195
  }
302
- return val;
303
- }).join(", ");
304
- });
305
- const computePopupWrapperStyle = (0, import_vue.computed)(() => {
306
- const popupOpts = computePopupOpts.value;
307
- const { height, width } = popupOpts;
308
- const stys = {};
309
- if (width) {
310
- stys.width = (0, import_dom.toCssUnit)(width);
311
- }
312
- if (height) {
313
- stys.height = (0, import_dom.toCssUnit)(height);
314
- }
315
- return stys;
316
- });
317
- const computeMaps = {};
318
- const $xeTableSelect = {
319
- xID,
320
- props,
321
- context,
322
- reactData,
323
- getRefMaps: () => refMaps,
324
- getComputeMaps: () => computeMaps
325
- };
326
- const gridEventKeys = ["form-submit", "form-reset", "form-collapse", "page-change"];
327
- const gridEvents = {};
328
- gridEventKeys.forEach((name) => {
329
- gridEvents[(0, import_vn.getOnName)(import_xe_utils.default.camelCase(name))] = (params) => {
330
- dispatchEvent(name, params, params.$event);
331
- };
332
- });
333
- const dispatchEvent = (type, params, evnt) => {
334
- emit(type, createEvent(evnt, { $tableSelect: $xeTableSelect }, params));
335
- };
336
- const emitModel = (value) => {
337
- emit("update:modelValue", value);
338
- };
339
- const tableSelectMethods = {
340
- dispatchEvent
341
- };
342
- const tableSelectPrivateMethods = {};
343
- const getRowid = (option) => {
344
- const rowKeyField = computeRowKeyField.value;
345
- const rowid = option[rowKeyField];
346
- return rowid ? encodeURIComponent(rowid) : "";
347
- };
348
- const getRowsByValue = (modelValue) => {
349
- const { fullValMaps } = internalData;
350
- const checkboxOpts = computeCheckboxOpts.value;
351
- const rowKeyField = computeRowKeyField.value;
352
- const valueField = computeValueField.value;
353
- const labelField = computeLabelField.value;
354
- const rows = [];
355
- const vals = import_xe_utils.default.eqNull(modelValue) ? [] : import_xe_utils.default.isArray(modelValue) ? modelValue : [modelValue];
356
- if (checkboxOpts.reserve) {
357
- vals.forEach((val) => {
358
- const cacheItem = fullValMaps[val];
359
- rows.push(
360
- cacheItem ? cacheItem.item : {
361
- [rowKeyField]: val,
362
- [valueField]: val,
363
- [labelField]: val
364
- }
365
- );
196
+ return transfer;
197
+ });
198
+ const computePropsOpts = (0, import_vue.computed)(() => {
199
+ return props.optionProps || {};
200
+ });
201
+ const computeCheckboxOpts = (0, import_vue.computed)(() => {
202
+ const { multiple } = props;
203
+ const gridOpts = computeGridOpts.value;
204
+ return Object.assign(
205
+ {
206
+ reserve: multiple,
207
+ showReserveStatus: multiple
208
+ },
209
+ getConfig().table.checkboxConfig,
210
+ gridOpts.checkboxConfig
211
+ );
212
+ });
213
+ const computeRowOpts = (0, import_vue.computed)(() => {
214
+ const { multiple } = props;
215
+ const gridOpts = computeGridOpts.value;
216
+ const valueField = computeValueField.value;
217
+ return Object.assign(
218
+ {
219
+ isCurrent: true
220
+ },
221
+ multiple ? { keyField: valueField } : {},
222
+ getConfig().table.rowConfig,
223
+ gridOpts.rowConfig
224
+ );
225
+ });
226
+ const computeRowKeyField = (0, import_vue.computed)(() => {
227
+ const rowOpts = computeRowOpts.value;
228
+ return rowOpts.keyField || "_X_ROW_KEY";
229
+ });
230
+ const computeLabelField = (0, import_vue.computed)(() => {
231
+ const propsOpts = computePropsOpts.value;
232
+ return propsOpts.label || "label";
233
+ });
234
+ const computeValueField = (0, import_vue.computed)(() => {
235
+ const propsOpts = computePropsOpts.value;
236
+ return propsOpts.value || "value";
237
+ });
238
+ const computePopupOpts = (0, import_vue.computed)(() => {
239
+ return Object.assign({}, getConfig().tableSelect.popupConfig, props.popupConfig);
240
+ });
241
+ const computeGridOpts = (0, import_vue.computed)(() => {
242
+ return Object.assign({}, getConfig().tableSelect.gridConfig, props.gridConfig, {
243
+ data: void 0
366
244
  });
367
- } else {
368
- vals.forEach((val) => {
245
+ });
246
+ const computeRemoteOpts = (0, import_vue.computed)(() => {
247
+ return Object.assign({}, getConfig().tableSelect.remoteConfig, props.remoteConfig);
248
+ });
249
+ const computeFilterOpts = (0, import_vue.computed)(() => {
250
+ return Object.assign({}, getConfig().tableSelect.filterConfig, props.filterConfig);
251
+ });
252
+ const computeSelectGridOpts = (0, import_vue.computed)(() => {
253
+ const gridOpts = computeGridOpts.value;
254
+ const checkboxOpts = computeCheckboxOpts.value;
255
+ const { pagerConfig, proxyConfig } = gridOpts;
256
+ if (proxyConfig) {
257
+ const proxyAjax = proxyConfig.ajax;
258
+ if (proxyAjax && proxyAjax.query) {
259
+ const newProxyConfig = import_xe_utils.default.clone(proxyConfig, true);
260
+ const ajaxMethods = proxyAjax.query;
261
+ if (ajaxMethods) {
262
+ const resConfigs = proxyConfig.response || proxyConfig.props || {};
263
+ Object.assign(newProxyConfig.ajax, {
264
+ query(params, ...args) {
265
+ return Promise.resolve(ajaxMethods(params, ...args)).then((rest) => {
266
+ let currData = [];
267
+ if (pagerConfig) {
268
+ const resultProp = resConfigs.result;
269
+ currData = (import_xe_utils.default.isFunction(resultProp) ? resultProp({ data: rest, $table: null, $grid: null, $gantt: null }) : import_xe_utils.default.get(rest, resultProp || "result")) || [];
270
+ } else {
271
+ const listProp = resConfigs.list;
272
+ currData = (listProp ? import_xe_utils.default.isFunction(listProp) ? listProp({ data: rest, $table: null, $grid: null, $gantt: null }) : import_xe_utils.default.get(rest, listProp) : rest) || [];
273
+ }
274
+ cacheDataMap(currData || []);
275
+ return rest;
276
+ });
277
+ }
278
+ });
279
+ }
280
+ return Object.assign({}, gridOpts, { checkboxConfig: checkboxOpts, proxyConfig: newProxyConfig });
281
+ }
282
+ }
283
+ return Object.assign({}, gridOpts, { checkboxConfig: checkboxOpts });
284
+ });
285
+ const computeSelectLabel = (0, import_vue.computed)(() => {
286
+ const { modelValue, lazyOptions } = props;
287
+ const { fullValMaps, fullData } = internalData;
288
+ const valueField = computeValueField.value;
289
+ const labelField = computeLabelField.value;
290
+ if (!fullData) {
291
+ return "";
292
+ }
293
+ return (import_xe_utils.default.isArray(modelValue) ? modelValue : [modelValue]).map((val) => {
369
294
  const cacheItem = fullValMaps[val];
370
295
  if (cacheItem) {
371
- rows.push(cacheItem.item);
296
+ return cacheItem.item[labelField];
372
297
  }
373
- });
374
- }
375
- return rows;
376
- };
377
- const updateModel = (modelValue) => {
378
- const { multiple } = props;
379
- (0, import_vue.nextTick)(() => {
380
- const $grid = refGrid.value;
381
- if ($grid) {
382
- const selectList = getRowsByValue(modelValue);
383
- if (selectList.length) {
384
- if (multiple) {
385
- $grid.setCheckboxRow(selectList, true);
386
- } else {
387
- $grid.setRadioRow(selectList[0]);
298
+ if (lazyOptions) {
299
+ const lazyItem = lazyOptions.find((item) => item[valueField] === val);
300
+ if (lazyItem) {
301
+ return lazyItem[labelField];
388
302
  }
389
303
  }
304
+ return val;
305
+ }).join(", ");
306
+ });
307
+ const computePopupWrapperStyle = (0, import_vue.computed)(() => {
308
+ const popupOpts = computePopupOpts.value;
309
+ const { height, width } = popupOpts;
310
+ const stys = {};
311
+ if (width) {
312
+ stys.width = (0, import_dom.toCssUnit)(width);
313
+ }
314
+ if (height) {
315
+ stys.height = (0, import_dom.toCssUnit)(height);
390
316
  }
317
+ return stys;
391
318
  });
392
- };
393
- const loadData = (data) => {
394
- cacheDataMap(data);
395
- handleData();
396
- };
397
- const loadColumn = (columns) => {
398
- if (!columns || !columns.length) {
399
- return;
400
- }
401
- const { multiple } = props;
402
- const tableCols = [];
403
- let hasRadioCol = false;
404
- let hasCheckboxCol = false;
405
- columns.forEach((column) => {
406
- if (!hasRadioCol && column.type === "radio") {
407
- hasRadioCol = true;
408
- } else if (!hasCheckboxCol && column.type === "checkbox") {
409
- hasCheckboxCol = true;
410
- }
411
- tableCols.push(column);
319
+ const computeMaps = {};
320
+ const $xeTableSelect = {
321
+ xID,
322
+ props,
323
+ context,
324
+ reactData,
325
+ getRefMaps: () => refMaps,
326
+ getComputeMaps: () => computeMaps
327
+ };
328
+ const gridEventKeys = ["form-submit", "form-reset", "form-collapse", "page-change"];
329
+ const gridEvents = {};
330
+ gridEventKeys.forEach((name) => {
331
+ gridEvents[(0, import_vn.getOnName)(import_xe_utils.default.camelCase(name))] = (params) => {
332
+ dispatchEvent(name, params, params.$event);
333
+ };
412
334
  });
413
- if (multiple) {
414
- if (!hasCheckboxCol) {
415
- tableCols.unshift({
416
- type: "checkbox",
417
- width: 70
335
+ const dispatchEvent = (type, params, evnt) => {
336
+ emit(type, createEvent(evnt, { $tableSelect: $xeTableSelect }, params));
337
+ };
338
+ const emitModel = (value) => {
339
+ emit("update:modelValue", value);
340
+ };
341
+ const tableSelectMethods = {
342
+ dispatchEvent
343
+ };
344
+ const tableSelectPrivateMethods = {};
345
+ const getRowid = (option) => {
346
+ const rowKeyField = computeRowKeyField.value;
347
+ const rowid = option[rowKeyField];
348
+ return rowid ? encodeURIComponent(rowid) : "";
349
+ };
350
+ const getRowsByValue = (modelValue) => {
351
+ const { fullValMaps } = internalData;
352
+ const checkboxOpts = computeCheckboxOpts.value;
353
+ const rowKeyField = computeRowKeyField.value;
354
+ const valueField = computeValueField.value;
355
+ const labelField = computeLabelField.value;
356
+ const rows = [];
357
+ const vals = import_xe_utils.default.eqNull(modelValue) ? [] : import_xe_utils.default.isArray(modelValue) ? modelValue : [modelValue];
358
+ if (checkboxOpts.reserve) {
359
+ vals.forEach((val) => {
360
+ const cacheItem = fullValMaps[val];
361
+ rows.push(
362
+ cacheItem ? cacheItem.item : {
363
+ [rowKeyField]: val,
364
+ [valueField]: val,
365
+ [labelField]: val
366
+ }
367
+ );
418
368
  });
419
- }
420
- } else {
421
- if (!hasRadioCol) {
422
- tableCols.unshift({
423
- type: "radio",
424
- width: 70
369
+ } else {
370
+ vals.forEach((val) => {
371
+ const cacheItem = fullValMaps[val];
372
+ if (cacheItem) {
373
+ rows.push(cacheItem.item);
374
+ }
425
375
  });
426
376
  }
427
- }
428
- reactData.tableColumns = tableCols;
429
- };
430
- const cacheDataMap = (dataList) => {
431
- const { options } = props;
432
- const rowKeyField = computeRowKeyField.value;
433
- const valueField = computeValueField.value;
434
- const gridOpts = computeGridOpts.value;
435
- const { treeConfig, pagerConfig } = gridOpts;
436
- const rowMaps = {};
437
- const keyMaps = {};
438
- if (treeConfig) {
439
- } else {
440
- import_xe_utils.default.arrayEach(dataList || options || [], (item, index, items) => {
441
- let rowid = getRowid(item);
442
- if (!rowid) {
443
- rowid = getRowUniqueId();
444
- }
445
- if (keyMaps[rowid]) {
446
- errLog("vxe.error.repeatKey", [rowKeyField, rowid]);
377
+ return rows;
378
+ };
379
+ const updateModel = (modelValue) => {
380
+ const { multiple } = props;
381
+ (0, import_vue.nextTick)(() => {
382
+ const $grid = refGrid.value;
383
+ if ($grid) {
384
+ const selectList = getRowsByValue(modelValue);
385
+ if (selectList.length) {
386
+ if (multiple) {
387
+ $grid.setCheckboxRow(selectList, true);
388
+ } else {
389
+ $grid.setRadioRow(selectList[0]);
390
+ }
391
+ }
447
392
  }
448
- keyMaps[rowid] = true;
449
- const value = item[valueField];
450
- if (rowMaps[value]) {
451
- errLog("vxe.error.repeatKey", [valueField, value]);
393
+ });
394
+ };
395
+ const loadData = (data) => {
396
+ cacheDataMap(data);
397
+ handleData();
398
+ };
399
+ const loadColumn = (columns) => {
400
+ if (!columns || !columns.length) {
401
+ return;
402
+ }
403
+ const { multiple } = props;
404
+ const tableCols = [];
405
+ let hasRadioCol = false;
406
+ let hasCheckboxCol = false;
407
+ columns.forEach((column) => {
408
+ if (!hasRadioCol && column.type === "radio") {
409
+ hasRadioCol = true;
410
+ } else if (!hasCheckboxCol && column.type === "checkbox") {
411
+ hasCheckboxCol = true;
452
412
  }
453
- rowMaps[value] = { item, index, _index: index, items, parent: null, nodes: [] };
413
+ tableCols.push(column);
454
414
  });
455
- }
456
- internalData.fullData = dataList || options || [];
457
- internalData.fullValMaps = pagerConfig ? Object.assign({}, internalData.fullValMaps, rowMaps) : rowMaps;
458
- handleOptList();
459
- updateModel(props.modelValue);
460
- };
461
- const handleOptList = () => {
462
- const { remote, modelValue, filterable } = props;
463
- const { searchValue } = reactData;
464
- const { fullData, fullValMaps } = internalData;
465
- const valueField = computeValueField.value;
466
- const labelField = computeLabelField.value;
467
- const filterOpts = computeFilterOpts.value;
468
- const frMethod = filterOpts.filterMethod;
469
- const searchStr = `${searchValue || ""}`.toLowerCase();
470
- let avList = [];
471
- if (remote) {
472
- avList = fullData;
473
- } else {
474
- if (filterable && frMethod) {
475
- avList = searchStr ? fullData.filter(
476
- (row) => frMethod({
477
- $tableSelect: $xeTableSelect,
478
- row,
479
- filterValue: searchValue,
480
- value: modelValue
481
- })
482
- ) : fullData;
483
- } else if (filterable) {
484
- avList = searchStr ? fullData.filter((row) => `${row[labelField] || row[valueField]}`.toLowerCase().indexOf(searchStr) > -1) : fullData;
415
+ if (multiple) {
416
+ if (!hasCheckboxCol) {
417
+ tableCols.unshift({
418
+ type: "checkbox",
419
+ width: 70
420
+ });
421
+ }
485
422
  } else {
486
- avList = fullData;
423
+ if (!hasRadioCol) {
424
+ tableCols.unshift({
425
+ type: "radio",
426
+ width: 70
427
+ });
428
+ }
487
429
  }
488
- }
489
- avList.forEach((item, index) => {
490
- const cacheItem = fullValMaps[item[valueField]];
491
- if (cacheItem) {
492
- cacheItem._index = index;
430
+ reactData.tableColumns = tableCols;
431
+ };
432
+ const cacheDataMap = (dataList) => {
433
+ const { options } = props;
434
+ const rowKeyField = computeRowKeyField.value;
435
+ const valueField = computeValueField.value;
436
+ const gridOpts = computeGridOpts.value;
437
+ const { treeConfig, pagerConfig } = gridOpts;
438
+ const rowMaps = {};
439
+ const keyMaps = {};
440
+ if (treeConfig) {
441
+ } else {
442
+ import_xe_utils.default.arrayEach(dataList || options || [], (item, index, items) => {
443
+ let rowid = getRowid(item);
444
+ if (!rowid) {
445
+ rowid = getRowUniqueId();
446
+ }
447
+ if (keyMaps[rowid]) {
448
+ errLog("vxe.error.repeatKey", [rowKeyField, rowid]);
449
+ }
450
+ keyMaps[rowid] = true;
451
+ const value = item[valueField];
452
+ if (rowMaps[value]) {
453
+ errLog("vxe.error.repeatKey", [valueField, value]);
454
+ }
455
+ rowMaps[value] = { item, index, _index: index, items, parent: null, nodes: [] };
456
+ });
493
457
  }
494
- });
495
- internalData.afterVisibleList = avList;
496
- return (0, import_vue.nextTick)();
497
- };
498
- const updateZindex = () => {
499
- const popupOpts = computePopupOpts.value;
500
- const customZIndex = popupOpts.zIndex || props.zIndex;
501
- if (customZIndex) {
502
- reactData.panelIndex = import_xe_utils.default.toNumber(customZIndex);
503
- } else if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
504
- reactData.panelIndex = (0, import_utils.nextZIndex)();
505
- }
506
- };
507
- const updatePlacement = () => {
508
- const { placement } = props;
509
- const { panelIndex } = reactData;
510
- const targetElem = refElem.value;
511
- const panelElem = refOptionPanel.value;
512
- const btnTransfer = computeBtnTransfer.value;
513
- const popupOpts = computePopupOpts.value;
514
- const handleStyle = () => {
515
- const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
516
- placement: popupOpts.placement || placement,
517
- defaultPlacement: popupOpts.defaultPlacement,
518
- appendTo: popupOpts.appendTo,
519
- teleportTo: btnTransfer
520
- });
521
- const panelStyle = Object.assign(ppObj.style, {
522
- zIndex: panelIndex
458
+ internalData.fullData = dataList || options || [];
459
+ internalData.fullValMaps = pagerConfig ? Object.assign({}, internalData.fullValMaps, rowMaps) : rowMaps;
460
+ handleOptList();
461
+ updateModel(props.modelValue);
462
+ };
463
+ const handleOptList = () => {
464
+ const { remote, modelValue, filterable } = props;
465
+ const { searchValue } = reactData;
466
+ const { fullData, fullValMaps } = internalData;
467
+ const valueField = computeValueField.value;
468
+ const labelField = computeLabelField.value;
469
+ const filterOpts = computeFilterOpts.value;
470
+ const frMethod = filterOpts.filterMethod;
471
+ const searchStr = `${searchValue || ""}`.toLowerCase();
472
+ let avList = [];
473
+ if (remote) {
474
+ avList = fullData;
475
+ } else {
476
+ if (filterable && frMethod) {
477
+ avList = searchStr ? fullData.filter(
478
+ (row) => frMethod({
479
+ $tableSelect: $xeTableSelect,
480
+ row,
481
+ filterValue: searchValue,
482
+ value: modelValue
483
+ })
484
+ ) : fullData;
485
+ } else if (filterable) {
486
+ avList = searchStr ? fullData.filter((row) => `${row[labelField] || row[valueField]}`.toLowerCase().indexOf(searchStr) > -1) : fullData;
487
+ } else {
488
+ avList = fullData;
489
+ }
490
+ }
491
+ avList.forEach((item, index) => {
492
+ const cacheItem = fullValMaps[item[valueField]];
493
+ if (cacheItem) {
494
+ cacheItem._index = index;
495
+ }
523
496
  });
524
- reactData.panelStyle = panelStyle;
525
- reactData.panelPlacement = ppObj.placement;
526
- };
527
- handleStyle();
528
- return (0, import_vue.nextTick)().then(handleStyle);
529
- };
530
- const showOptionPanel = () => {
531
- const { loading, remote, filterable } = props;
532
- const { fullData } = internalData;
533
- const isDisabled = computeIsDisabled.value;
534
- const remoteOpts = computeRemoteOpts.value;
535
- if (!loading && !isDisabled) {
497
+ internalData.afterVisibleList = avList;
498
+ return (0, import_vue.nextTick)();
499
+ };
500
+ const updateZindex = () => {
501
+ const popupOpts = computePopupOpts.value;
502
+ const customZIndex = popupOpts.zIndex || props.zIndex;
503
+ if (customZIndex) {
504
+ reactData.panelIndex = import_xe_utils.default.toNumber(customZIndex);
505
+ } else if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
506
+ reactData.panelIndex = (0, import_utils.nextZIndex)();
507
+ }
508
+ };
509
+ const updatePlacement = () => {
510
+ const { placement } = props;
511
+ const { panelIndex } = reactData;
512
+ const targetElem = refElem.value;
513
+ const panelElem = refOptionPanel.value;
514
+ const btnTransfer = computeBtnTransfer.value;
515
+ const popupOpts = computePopupOpts.value;
516
+ const handleStyle = () => {
517
+ const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
518
+ placement: popupOpts.placement || placement,
519
+ defaultPlacement: popupOpts.defaultPlacement,
520
+ appendTo: popupOpts.appendTo,
521
+ teleportTo: btnTransfer
522
+ });
523
+ const panelStyle = Object.assign(ppObj.style, {
524
+ zIndex: panelIndex
525
+ });
526
+ reactData.panelStyle = panelStyle;
527
+ reactData.panelPlacement = ppObj.placement;
528
+ };
529
+ handleStyle();
530
+ return (0, import_vue.nextTick)().then(handleStyle);
531
+ };
532
+ const showOptionPanel = () => {
533
+ const { loading, remote, filterable } = props;
534
+ const { fullData } = internalData;
535
+ const isDisabled = computeIsDisabled.value;
536
+ const remoteOpts = computeRemoteOpts.value;
537
+ if (!loading && !isDisabled) {
538
+ if (internalData.vpTimeout) {
539
+ clearTimeout(internalData.vpTimeout);
540
+ }
541
+ if (internalData.hpTimeout) {
542
+ clearTimeout(internalData.hpTimeout);
543
+ }
544
+ if (!reactData.initialized) {
545
+ reactData.initialized = true;
546
+ }
547
+ if (filterable) {
548
+ if (remote && remoteOpts.enabled && remoteOpts.autoLoad && !fullData.length) {
549
+ handleSearchEvent();
550
+ }
551
+ }
552
+ reactData.isActivated = true;
553
+ reactData.isAniVisible = true;
554
+ internalData.vpTimeout = setTimeout(() => {
555
+ reactData.visiblePanel = true;
556
+ updateModel(props.modelValue);
557
+ internalData.vpTimeout = void 0;
558
+ handleFocusSearch();
559
+ updatePlacement();
560
+ }, 10);
561
+ updateZindex();
562
+ updatePlacement();
563
+ }
564
+ };
565
+ const hideOptionPanel = () => {
566
+ const { filterable } = props;
567
+ const filterOpts = computeFilterOpts.value;
568
+ reactData.visiblePanel = false;
569
+ if (filterable) {
570
+ if (filterOpts.clearOnClose) {
571
+ reactData.searchValue = "";
572
+ }
573
+ }
536
574
  if (internalData.vpTimeout) {
537
575
  clearTimeout(internalData.vpTimeout);
538
576
  }
539
577
  if (internalData.hpTimeout) {
540
578
  clearTimeout(internalData.hpTimeout);
541
579
  }
542
- if (!reactData.initialized) {
543
- reactData.initialized = true;
580
+ internalData.hpTimeout = setTimeout(() => {
581
+ reactData.isAniVisible = false;
582
+ internalData.hpTimeout = void 0;
583
+ }, 350);
584
+ };
585
+ const handleData = () => {
586
+ const { afterVisibleList } = internalData;
587
+ reactData.tableData = afterVisibleList;
588
+ return (0, import_vue.nextTick)();
589
+ };
590
+ const modelSearchEvent = (value) => {
591
+ reactData.searchValue = value;
592
+ };
593
+ const focusSearchEvent = () => {
594
+ reactData.isActivated = true;
595
+ };
596
+ const handleSearchEvent = () => {
597
+ const { modelValue, remote } = props;
598
+ const { searchValue } = reactData;
599
+ const remoteOpts = computeRemoteOpts.value;
600
+ const queryMethod = remoteOpts.queryMethod;
601
+ if (remote && queryMethod && remoteOpts.enabled) {
602
+ reactData.searchLoading = true;
603
+ Promise.resolve(queryMethod({ $tableSelect: $xeTableSelect, searchValue, value: modelValue })).then(() => (0, import_vue.nextTick)()).catch(() => (0, import_vue.nextTick)()).finally(() => {
604
+ reactData.searchLoading = false;
605
+ });
606
+ } else {
607
+ handleOptList();
608
+ handleData();
544
609
  }
545
- if (filterable) {
546
- if (remote && remoteOpts.enabled && remoteOpts.autoLoad && !fullData.length) {
547
- handleSearchEvent();
610
+ };
611
+ const triggerSearchEvent = import_xe_utils.default.debounce(handleSearchEvent, 350, { trailing: true });
612
+ const changeEvent = (evnt, selectValue, row) => {
613
+ emitModel(selectValue);
614
+ if (selectValue !== props.modelValue) {
615
+ dispatchEvent("change", { value: selectValue, row, option: row }, evnt);
616
+ if ($xeForm && formItemInfo) {
617
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
548
618
  }
549
619
  }
550
- reactData.isActivated = true;
551
- reactData.isAniVisible = true;
552
- internalData.vpTimeout = setTimeout(() => {
553
- reactData.visiblePanel = true;
554
- updateModel(props.modelValue);
555
- internalData.vpTimeout = void 0;
556
- handleFocusSearch();
557
- updatePlacement();
558
- }, 10);
559
- updateZindex();
560
- updatePlacement();
561
- }
562
- };
563
- const hideOptionPanel = () => {
564
- const { filterable } = props;
565
- const filterOpts = computeFilterOpts.value;
566
- reactData.visiblePanel = false;
567
- if (filterable) {
568
- if (filterOpts.clearOnClose) {
569
- reactData.searchValue = "";
620
+ };
621
+ const clearValueEvent = (evnt, selectValue) => {
622
+ changeEvent(evnt, selectValue, null);
623
+ dispatchEvent("clear", { value: selectValue }, evnt);
624
+ };
625
+ const clearEvent = (params, evnt) => {
626
+ const $grid = refGrid.value;
627
+ if ($grid) {
628
+ $grid.clearRadioRow();
629
+ $grid.clearCheckboxRow();
570
630
  }
571
- }
572
- if (internalData.vpTimeout) {
573
- clearTimeout(internalData.vpTimeout);
574
- }
575
- if (internalData.hpTimeout) {
576
- clearTimeout(internalData.hpTimeout);
577
- }
578
- internalData.hpTimeout = setTimeout(() => {
579
- reactData.isAniVisible = false;
580
- internalData.hpTimeout = void 0;
581
- }, 350);
582
- };
583
- const handleData = () => {
584
- const { afterVisibleList } = internalData;
585
- reactData.tableData = afterVisibleList;
586
- return (0, import_vue.nextTick)();
587
- };
588
- const modelSearchEvent = (value) => {
589
- reactData.searchValue = value;
590
- };
591
- const focusSearchEvent = () => {
592
- reactData.isActivated = true;
593
- };
594
- const handleSearchEvent = () => {
595
- const { modelValue, remote } = props;
596
- const { searchValue } = reactData;
597
- const remoteOpts = computeRemoteOpts.value;
598
- const queryMethod = remoteOpts.queryMethod;
599
- if (remote && queryMethod && remoteOpts.enabled) {
600
- reactData.searchLoading = true;
601
- Promise.resolve(queryMethod({ $tableSelect: $xeTableSelect, searchValue, value: modelValue })).then(() => (0, import_vue.nextTick)()).catch(() => (0, import_vue.nextTick)()).finally(() => {
602
- reactData.searchLoading = false;
603
- });
604
- } else {
605
- handleOptList();
606
- handleData();
607
- }
608
- };
609
- const triggerSearchEvent = import_xe_utils.default.debounce(handleSearchEvent, 350, { trailing: true });
610
- const changeEvent = (evnt, selectValue, row) => {
611
- emitModel(selectValue);
612
- if (selectValue !== props.modelValue) {
613
- dispatchEvent("change", { value: selectValue, row, option: row }, evnt);
614
- if ($xeForm && formItemInfo) {
615
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
631
+ clearValueEvent(evnt, null);
632
+ hideOptionPanel();
633
+ };
634
+ const handleGlobalMousedownEvent = (evnt) => {
635
+ const { visiblePanel } = reactData;
636
+ const isDisabled = computeIsDisabled.value;
637
+ if (!isDisabled) {
638
+ const el = refElem.value;
639
+ const panelElem = refOptionPanel.value;
640
+ reactData.isActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelElem).flag;
641
+ if (visiblePanel && !reactData.isActivated) {
642
+ hideOptionPanel();
643
+ }
616
644
  }
617
- }
618
- };
619
- const clearValueEvent = (evnt, selectValue) => {
620
- changeEvent(evnt, selectValue, null);
621
- dispatchEvent("clear", { value: selectValue }, evnt);
622
- };
623
- const clearEvent = (params, evnt) => {
624
- const $grid = refGrid.value;
625
- if ($grid) {
626
- $grid.clearRadioRow();
627
- $grid.clearCheckboxRow();
628
- }
629
- clearValueEvent(evnt, null);
630
- hideOptionPanel();
631
- };
632
- const handleGlobalMousedownEvent = (evnt) => {
633
- const { visiblePanel } = reactData;
634
- const isDisabled = computeIsDisabled.value;
635
- if (!isDisabled) {
636
- const el = refElem.value;
637
- const panelElem = refOptionPanel.value;
638
- reactData.isActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelElem).flag;
639
- if (visiblePanel && !reactData.isActivated) {
645
+ };
646
+ const handleGlobalBlurEvent = () => {
647
+ const { visiblePanel, isActivated } = reactData;
648
+ if (visiblePanel) {
640
649
  hideOptionPanel();
641
650
  }
642
- }
643
- };
644
- const handleGlobalBlurEvent = () => {
645
- const { visiblePanel, isActivated } = reactData;
646
- if (visiblePanel) {
647
- hideOptionPanel();
648
- }
649
- if (isActivated) {
650
- reactData.isActivated = false;
651
- }
652
- if (visiblePanel || isActivated) {
653
- const $input = refInput.value;
654
- if ($input) {
655
- $input.blur();
651
+ if (isActivated) {
652
+ reactData.isActivated = false;
656
653
  }
657
- }
658
- };
659
- const handleGlobalResizeEvent = () => {
660
- const { visiblePanel } = reactData;
661
- if (visiblePanel) {
662
- updatePlacement();
663
- }
664
- };
665
- const handleGlobalScrollEvent = () => {
666
- const { visiblePanel } = reactData;
667
- if (visiblePanel) {
668
- updatePlacement();
669
- }
670
- };
671
- const handleFocusSearch = () => {
672
- if (props.filterable) {
673
- (0, import_vue.nextTick)(() => {
674
- const inpSearch = refInpSearch.value;
675
- if (inpSearch) {
676
- inpSearch.focus();
654
+ if (visiblePanel || isActivated) {
655
+ const $input = refInput.value;
656
+ if ($input) {
657
+ $input.blur();
677
658
  }
678
- });
679
- }
680
- };
681
- const focusEvent = (evnt) => {
682
- const isDisabled = computeIsDisabled.value;
683
- if (!isDisabled) {
684
- if (!reactData.visiblePanel) {
685
- reactData.triggerFocusPanel = true;
686
- showOptionPanel();
687
- setTimeout(() => {
688
- reactData.triggerFocusPanel = false;
689
- }, 150);
690
659
  }
691
- }
692
- dispatchEvent("focus", {}, evnt);
693
- };
694
- const clickEvent = (evnt) => {
695
- togglePanelEvent(evnt);
696
- dispatchEvent("click", {}, evnt);
697
- };
698
- const blurEvent = (evnt) => {
699
- reactData.isActivated = false;
700
- dispatchEvent("blur", {}, evnt);
701
- };
702
- const togglePanelEvent = (params) => {
703
- const { $event } = params;
704
- $event.preventDefault();
705
- if (reactData.triggerFocusPanel) {
706
- reactData.triggerFocusPanel = false;
707
- } else {
708
- if (reactData.visiblePanel) {
709
- hideOptionPanel();
710
- } else {
711
- showOptionPanel();
660
+ };
661
+ const handleGlobalResizeEvent = () => {
662
+ const { visiblePanel } = reactData;
663
+ if (visiblePanel) {
664
+ updatePlacement();
712
665
  }
713
- }
714
- };
715
- const radioChangeEvent = (params) => {
716
- const { $event, row } = params;
717
- const valueField = computeValueField.value;
718
- const value = row[valueField];
719
- changeEvent($event, value, row);
720
- hideOptionPanel();
721
- };
722
- const checkboxChangeEvent = (params) => {
723
- const { $grid, $event, row } = params;
724
- const checkboxOpts = computeCheckboxOpts.value;
725
- const valueField = computeValueField.value;
726
- if ($grid) {
727
- const checkboxRecords = $grid.getCheckboxRecords();
728
- if (checkboxOpts.reserve) {
729
- checkboxRecords.push(...$grid.getCheckboxReserveRecords());
666
+ };
667
+ const handleGlobalScrollEvent = () => {
668
+ const { visiblePanel } = reactData;
669
+ if (visiblePanel) {
670
+ updatePlacement();
730
671
  }
731
- const value = checkboxRecords.map((row2) => {
732
- return row2[valueField];
733
- });
672
+ };
673
+ const handleFocusSearch = () => {
674
+ if (props.filterable) {
675
+ (0, import_vue.nextTick)(() => {
676
+ const inpSearch = refInpSearch.value;
677
+ if (inpSearch) {
678
+ inpSearch.focus();
679
+ }
680
+ });
681
+ }
682
+ };
683
+ const focusEvent = (evnt) => {
684
+ const isDisabled = computeIsDisabled.value;
685
+ if (!isDisabled) {
686
+ if (!reactData.visiblePanel) {
687
+ reactData.triggerFocusPanel = true;
688
+ showOptionPanel();
689
+ setTimeout(() => {
690
+ reactData.triggerFocusPanel = false;
691
+ }, 150);
692
+ }
693
+ }
694
+ dispatchEvent("focus", {}, evnt);
695
+ };
696
+ const clickEvent = (evnt) => {
697
+ togglePanelEvent(evnt);
698
+ dispatchEvent("click", {}, evnt);
699
+ };
700
+ const blurEvent = (evnt) => {
701
+ reactData.isActivated = false;
702
+ dispatchEvent("blur", {}, evnt);
703
+ };
704
+ const togglePanelEvent = (params) => {
705
+ const { $event } = params;
706
+ $event.preventDefault();
707
+ if (reactData.triggerFocusPanel) {
708
+ reactData.triggerFocusPanel = false;
709
+ } else {
710
+ if (reactData.visiblePanel) {
711
+ hideOptionPanel();
712
+ } else {
713
+ showOptionPanel();
714
+ }
715
+ }
716
+ };
717
+ const radioChangeEvent = (params) => {
718
+ const { $event, row } = params;
719
+ const valueField = computeValueField.value;
720
+ const value = row[valueField];
734
721
  changeEvent($event, value, row);
735
- }
736
- };
737
- const checkboxAllEvent = (params) => {
738
- checkboxChangeEvent(params);
739
- };
740
- Object.assign($xeTableSelect, tableSelectMethods, tableSelectPrivateMethods);
741
- const renderVN = () => {
742
- const { className, loading, filterable, remote } = props;
743
- const { initialized, isActivated, isAniVisible, visiblePanel, tableColumns, searchValue, tableData, searchLoading } = reactData;
744
- const vSize = computeSize.value;
745
- const isDisabled = computeIsDisabled.value;
746
- const selectLabel = computeSelectLabel.value;
747
- const btnTransfer = computeBtnTransfer.value;
748
- const formReadonly = computeFormReadonly.value;
749
- const popupOpts = computePopupOpts.value;
750
- const selectGridOpts = computeSelectGridOpts.value;
751
- const rowOpts = computeRowOpts.value;
752
- const filterOpts = computeFilterOpts.value;
753
- const popupWrapperStyle = computePopupWrapperStyle.value;
754
- const { appendTo } = popupOpts;
755
- const headerSlot = slots.header;
756
- const footerSlot = slots.footer;
757
- const prefixSlot = slots.prefix;
758
- const ppClassName = popupOpts.className;
759
- if (formReadonly) {
722
+ hideOptionPanel();
723
+ };
724
+ const checkboxChangeEvent = (params) => {
725
+ const { $grid, $event, row } = params;
726
+ const checkboxOpts = computeCheckboxOpts.value;
727
+ const valueField = computeValueField.value;
728
+ if ($grid) {
729
+ const checkboxRecords = $grid.getCheckboxRecords();
730
+ if (checkboxOpts.reserve) {
731
+ checkboxRecords.push(...$grid.getCheckboxReserveRecords());
732
+ }
733
+ const value = checkboxRecords.map((row2) => {
734
+ return row2[valueField];
735
+ });
736
+ changeEvent($event, value, row);
737
+ }
738
+ };
739
+ const checkboxAllEvent = (params) => {
740
+ checkboxChangeEvent(params);
741
+ };
742
+ Object.assign($xeTableSelect, tableSelectMethods, tableSelectPrivateMethods);
743
+ const renderVN = () => {
744
+ const { className, loading, filterable, remote } = props;
745
+ const { initialized, isActivated, isAniVisible, visiblePanel, tableColumns, searchValue, tableData, searchLoading } = reactData;
746
+ const vSize = computeSize.value;
747
+ const isDisabled = computeIsDisabled.value;
748
+ const selectLabel = computeSelectLabel.value;
749
+ const btnTransfer = computeBtnTransfer.value;
750
+ const formReadonly = computeFormReadonly.value;
751
+ const popupOpts = computePopupOpts.value;
752
+ const selectGridOpts = computeSelectGridOpts.value;
753
+ const rowOpts = computeRowOpts.value;
754
+ const filterOpts = computeFilterOpts.value;
755
+ const popupWrapperStyle = computePopupWrapperStyle.value;
756
+ const { appendTo } = popupOpts;
757
+ const headerSlot = slots.header;
758
+ const footerSlot = slots.footer;
759
+ const prefixSlot = slots.prefix;
760
+ const ppClassName = popupOpts.className;
761
+ if (formReadonly) {
762
+ return (0, import_vue.h)(
763
+ "div",
764
+ {
765
+ ref: refElem,
766
+ class: ["vxe-table-select--readonly", className]
767
+ },
768
+ [
769
+ (0, import_vue.h)(
770
+ "span",
771
+ {
772
+ class: "vxe-table-select-label"
773
+ },
774
+ selectLabel
775
+ )
776
+ ]
777
+ );
778
+ }
760
779
  return (0, import_vue.h)(
761
780
  "div",
762
781
  {
763
782
  ref: refElem,
764
- class: ["vxe-table-select--readonly", className]
783
+ class: [
784
+ "vxe-table-select",
785
+ className ? import_xe_utils.default.isFunction(className) ? className({ $tableSelect: $xeTableSelect }) : className : "",
786
+ {
787
+ [`size--${vSize}`]: vSize,
788
+ "is--filterable": filterable,
789
+ "is--visible": visiblePanel,
790
+ "is--disabled": isDisabled,
791
+ "is--loading": loading,
792
+ "is--active": isActivated
793
+ }
794
+ ]
765
795
  },
766
796
  [
767
797
  (0, import_vue.h)(
768
- "span",
798
+ import_input.default,
769
799
  {
770
- class: "vxe-table-select-label"
800
+ ref: refInput,
801
+ clearable: props.clearable,
802
+ placeholder: loading ? getI18n("vxe.select.loadingText") : props.placeholder,
803
+ editable: false,
804
+ disabled: isDisabled,
805
+ type: "text",
806
+ prefixIcon: props.prefixIcon,
807
+ suffixIcon: loading ? getIcon().TABLE_SELECT_LOADED : visiblePanel ? getIcon().TABLE_SELECT_OPEN : getIcon().TABLE_SELECT_CLOSE,
808
+ modelValue: loading ? "" : selectLabel,
809
+ onClear: clearEvent,
810
+ onClick: clickEvent,
811
+ onFocus: focusEvent,
812
+ onBlur: blurEvent,
813
+ onSuffixClick: togglePanelEvent
771
814
  },
772
- selectLabel
815
+ prefixSlot ? {
816
+ prefix: () => prefixSlot({})
817
+ } : {}
818
+ ),
819
+ (0, import_vue.h)(
820
+ import_vue.Teleport,
821
+ {
822
+ to: (0, import_dom.getPopupContainer)(appendTo),
823
+ disabled: btnTransfer ? !initialized : true
824
+ },
825
+ [
826
+ (0, import_vue.h)(
827
+ "div",
828
+ {
829
+ ref: refOptionPanel,
830
+ class: [
831
+ "vxe-table--ignore-clear vxe-table-select--panel",
832
+ ppClassName ? import_xe_utils.default.isFunction(ppClassName) ? ppClassName({ $tableSelect: $xeTableSelect }) : ppClassName : "",
833
+ {
834
+ [`size--${vSize}`]: vSize,
835
+ "is--transfer": btnTransfer,
836
+ "ani--leave": !loading && isAniVisible,
837
+ "ani--enter": !loading && visiblePanel
838
+ }
839
+ ],
840
+ placement: reactData.panelPlacement,
841
+ style: reactData.panelStyle
842
+ },
843
+ initialized ? [
844
+ (0, import_vue.h)(
845
+ "div",
846
+ {
847
+ class: "vxe-table-select--panel-wrapper"
848
+ },
849
+ [
850
+ filterable ? (0, import_vue.h)(
851
+ "div",
852
+ {
853
+ class: "vxe-table-select--panel-search"
854
+ },
855
+ [
856
+ (0, import_vue.h)(import_input.default, {
857
+ ref: refInpSearch,
858
+ class: "vxe-table-select-search--input",
859
+ modelValue: searchValue,
860
+ clearable: true,
861
+ disabled: false,
862
+ readonly: false,
863
+ placeholder: getI18n("vxe.treeSelect.search"),
864
+ prefixIcon: getIcon().INPUT_SEARCH,
865
+ "onUpdate:modelValue": modelSearchEvent,
866
+ onFocus: focusSearchEvent,
867
+ onChange: triggerSearchEvent,
868
+ onSearch: triggerSearchEvent
869
+ })
870
+ ]
871
+ ) : renderEmptyElement($xeTableSelect),
872
+ headerSlot ? (0, import_vue.h)(
873
+ "div",
874
+ {
875
+ class: "vxe-table-select--panel-header"
876
+ },
877
+ headerSlot({})
878
+ ) : renderEmptyElement($xeTableSelect),
879
+ (0, import_vue.h)(
880
+ "div",
881
+ {
882
+ class: "vxe-table-select--panel-body"
883
+ },
884
+ [
885
+ (0, import_vue.h)(
886
+ "div",
887
+ {
888
+ ref: refGridWrapper,
889
+ class: "vxe-table-select-grid--wrapper",
890
+ style: popupWrapperStyle
891
+ },
892
+ [
893
+ VxeTableGridComponent ? (0, import_vue.h)(
894
+ VxeTableGridComponent,
895
+ {
896
+ ...selectGridOpts,
897
+ ...gridEvents,
898
+ class: "vxe-table-select--grid",
899
+ ref: refGrid,
900
+ loading: remote && searchLoading,
901
+ rowConfig: rowOpts,
902
+ data: tableData,
903
+ columns: tableColumns.length ? tableColumns : selectGridOpts.columns,
904
+ height: "100%",
905
+ autoResize: true,
906
+ onRadioChange: radioChangeEvent,
907
+ onCheckboxChange: checkboxChangeEvent,
908
+ onCheckboxAll: checkboxAllEvent
909
+ },
910
+ Object.assign({}, slots, {
911
+ header: void 0,
912
+ footer: void 0,
913
+ prefixSlot: void 0
914
+ })
915
+ ) : renderEmptyElement($xeTableSelect)
916
+ ]
917
+ )
918
+ ]
919
+ ),
920
+ footerSlot || filterable && searchValue && !remote && filterOpts.showResultCount ? (0, import_vue.h)(
921
+ "div",
922
+ {
923
+ class: "vxe-table-select--panel-footer"
924
+ },
925
+ footerSlot ? footerSlot({}) : [
926
+ (0, import_vue.h)(
927
+ "div",
928
+ {
929
+ class: "vxe-table-select--search-count"
930
+ },
931
+ searchLoading ? "" : getI18n("vxe.tableSelect.filterCount", [tableData.length])
932
+ )
933
+ ]
934
+ ) : renderEmptyElement($xeTableSelect)
935
+ ]
936
+ )
937
+ ] : []
938
+ )
939
+ ]
773
940
  )
774
941
  ]
775
942
  );
776
- }
777
- return (0, import_vue.h)(
778
- "div",
779
- {
780
- ref: refElem,
781
- class: [
782
- "vxe-table-select",
783
- className ? import_xe_utils.default.isFunction(className) ? className({ $tableSelect: $xeTableSelect }) : className : "",
784
- {
785
- [`size--${vSize}`]: vSize,
786
- "is--filterable": filterable,
787
- "is--visible": visiblePanel,
788
- "is--disabled": isDisabled,
789
- "is--loading": loading,
790
- "is--active": isActivated
791
- }
792
- ]
793
- },
794
- [
795
- (0, import_vue.h)(
796
- import_input.default,
797
- {
798
- ref: refInput,
799
- clearable: props.clearable,
800
- placeholder: loading ? getI18n("vxe.select.loadingText") : props.placeholder,
801
- editable: false,
802
- disabled: isDisabled,
803
- type: "text",
804
- prefixIcon: props.prefixIcon,
805
- suffixIcon: loading ? getIcon().TABLE_SELECT_LOADED : visiblePanel ? getIcon().TABLE_SELECT_OPEN : getIcon().TABLE_SELECT_CLOSE,
806
- modelValue: loading ? "" : selectLabel,
807
- onClear: clearEvent,
808
- onClick: clickEvent,
809
- onFocus: focusEvent,
810
- onBlur: blurEvent,
811
- onSuffixClick: togglePanelEvent
812
- },
813
- prefixSlot ? {
814
- prefix: () => prefixSlot({})
815
- } : {}
816
- ),
817
- (0, import_vue.h)(
818
- import_vue.Teleport,
819
- {
820
- to: (0, import_dom.getPopupContainer)(appendTo),
821
- disabled: btnTransfer ? !initialized : true
822
- },
823
- [
824
- (0, import_vue.h)(
825
- "div",
826
- {
827
- ref: refOptionPanel,
828
- class: [
829
- "vxe-table--ignore-clear vxe-table-select--panel",
830
- ppClassName ? import_xe_utils.default.isFunction(ppClassName) ? ppClassName({ $tableSelect: $xeTableSelect }) : ppClassName : "",
831
- {
832
- [`size--${vSize}`]: vSize,
833
- "is--transfer": btnTransfer,
834
- "ani--leave": !loading && isAniVisible,
835
- "ani--enter": !loading && visiblePanel
836
- }
837
- ],
838
- placement: reactData.panelPlacement,
839
- style: reactData.panelStyle
840
- },
841
- initialized ? [
842
- (0, import_vue.h)(
843
- "div",
844
- {
845
- class: "vxe-table-select--panel-wrapper"
846
- },
847
- [
848
- filterable ? (0, import_vue.h)(
849
- "div",
850
- {
851
- class: "vxe-table-select--panel-search"
852
- },
853
- [
854
- (0, import_vue.h)(import_input.default, {
855
- ref: refInpSearch,
856
- class: "vxe-table-select-search--input",
857
- modelValue: searchValue,
858
- clearable: true,
859
- disabled: false,
860
- readonly: false,
861
- placeholder: getI18n("vxe.treeSelect.search"),
862
- prefixIcon: getIcon().INPUT_SEARCH,
863
- "onUpdate:modelValue": modelSearchEvent,
864
- onFocus: focusSearchEvent,
865
- onChange: triggerSearchEvent,
866
- onSearch: triggerSearchEvent
867
- })
868
- ]
869
- ) : renderEmptyElement($xeTableSelect),
870
- headerSlot ? (0, import_vue.h)(
871
- "div",
872
- {
873
- class: "vxe-table-select--panel-header"
874
- },
875
- headerSlot({})
876
- ) : renderEmptyElement($xeTableSelect),
877
- (0, import_vue.h)(
878
- "div",
879
- {
880
- class: "vxe-table-select--panel-body"
881
- },
882
- [
883
- (0, import_vue.h)(
884
- "div",
885
- {
886
- ref: refGridWrapper,
887
- class: "vxe-table-select-grid--wrapper",
888
- style: popupWrapperStyle
889
- },
890
- [
891
- VxeTableGridComponent ? (0, import_vue.h)(
892
- VxeTableGridComponent,
893
- {
894
- ...selectGridOpts,
895
- ...gridEvents,
896
- class: "vxe-table-select--grid",
897
- ref: refGrid,
898
- loading: remote && searchLoading,
899
- rowConfig: rowOpts,
900
- data: tableData,
901
- columns: tableColumns.length ? tableColumns : selectGridOpts.columns,
902
- height: "100%",
903
- autoResize: true,
904
- onRadioChange: radioChangeEvent,
905
- onCheckboxChange: checkboxChangeEvent,
906
- onCheckboxAll: checkboxAllEvent
907
- },
908
- Object.assign({}, slots, {
909
- header: void 0,
910
- footer: void 0,
911
- prefixSlot: void 0
912
- })
913
- ) : renderEmptyElement($xeTableSelect)
914
- ]
915
- )
916
- ]
917
- ),
918
- footerSlot || filterable && searchValue && !remote && filterOpts.showResultCount ? (0, import_vue.h)(
919
- "div",
920
- {
921
- class: "vxe-table-select--panel-footer"
922
- },
923
- footerSlot ? footerSlot({}) : [
924
- (0, import_vue.h)(
925
- "div",
926
- {
927
- class: "vxe-table-select--search-count"
928
- },
929
- searchLoading ? "" : getI18n("vxe.tableSelect.filterCount", [tableData.length])
930
- )
931
- ]
932
- ) : renderEmptyElement($xeTableSelect)
933
- ]
934
- )
935
- ] : []
936
- )
937
- ]
938
- )
939
- ]
943
+ };
944
+ (0, import_vue.watch)(
945
+ () => props.options,
946
+ (val) => {
947
+ loadData(val || []);
948
+ }
940
949
  );
941
- };
942
- (0, import_vue.watch)(
943
- () => props.options,
944
- (val) => {
945
- loadData(val || []);
946
- }
947
- );
948
- (0, import_vue.watch)(
949
- () => props.columns,
950
- (val) => {
951
- loadColumn(val);
952
- }
953
- );
954
- (0, import_vue.watch)(
955
- () => props.modelValue,
956
- (val) => {
957
- updateModel(val);
958
- }
959
- );
960
- loadColumn(props.columns);
961
- loadData(props.options || []);
962
- (0, import_vue.onMounted)(() => {
963
- const { gridConfig } = props;
964
- if (gridConfig && gridConfig.proxyConfig) {
965
- if (gridConfig.proxyConfig.autoLoad !== false) {
966
- reactData.initialized = true;
950
+ (0, import_vue.watch)(
951
+ () => props.columns,
952
+ (val) => {
953
+ loadColumn(val);
967
954
  }
968
- }
969
- globalEvents.on($xeTableSelect, "mousedown", handleGlobalMousedownEvent);
970
- globalEvents.on($xeTableSelect, "blur", handleGlobalBlurEvent);
971
- globalEvents.on($xeTableSelect, "resize", handleGlobalResizeEvent);
972
- globalEvents.on($xeTableSelect, "scroll", handleGlobalScrollEvent);
973
- });
974
- (0, import_vue.onUnmounted)(() => {
975
- globalEvents.off($xeTableSelect, "mousedown");
976
- globalEvents.off($xeTableSelect, "blur");
977
- globalEvents.off($xeTableSelect, "resize");
978
- globalEvents.off($xeTableSelect, "scroll");
979
- import_xe_utils.default.assign(reactData, createReactData());
980
- import_xe_utils.default.assign(internalData, createInternalData());
981
- });
982
- (0, import_vue.nextTick)(() => {
983
- if (!VxeTableGridComponent) {
984
- errLog("vxe.error.reqComp", ["vxe-grid"]);
985
- }
986
- });
987
- (0, import_vue.provide)("$xeTableSelect", $xeTableSelect);
988
- $xeTableSelect.renderVN = renderVN;
989
- return $xeTableSelect;
990
- },
991
- render() {
992
- return this.renderVN();
993
- }
994
- });
955
+ );
956
+ (0, import_vue.watch)(
957
+ () => props.modelValue,
958
+ (val) => {
959
+ updateModel(val);
960
+ }
961
+ );
962
+ loadColumn(props.columns);
963
+ loadData(props.options || []);
964
+ (0, import_vue.onMounted)(() => {
965
+ const { gridConfig } = props;
966
+ if (gridConfig && gridConfig.proxyConfig) {
967
+ if (gridConfig.proxyConfig.autoLoad !== false) {
968
+ reactData.initialized = true;
969
+ }
970
+ }
971
+ globalEvents.on($xeTableSelect, "mousedown", handleGlobalMousedownEvent);
972
+ globalEvents.on($xeTableSelect, "blur", handleGlobalBlurEvent);
973
+ globalEvents.on($xeTableSelect, "resize", handleGlobalResizeEvent);
974
+ globalEvents.on($xeTableSelect, "scroll", handleGlobalScrollEvent);
975
+ });
976
+ (0, import_vue.onUnmounted)(() => {
977
+ globalEvents.off($xeTableSelect, "mousedown");
978
+ globalEvents.off($xeTableSelect, "blur");
979
+ globalEvents.off($xeTableSelect, "resize");
980
+ globalEvents.off($xeTableSelect, "scroll");
981
+ import_xe_utils.default.assign(reactData, createReactData());
982
+ import_xe_utils.default.assign(internalData, createInternalData());
983
+ });
984
+ (0, import_vue.nextTick)(() => {
985
+ if (!VxeTableGridComponent) {
986
+ errLog("vxe.error.reqComp", ["vxe-grid"]);
987
+ }
988
+ });
989
+ (0, import_vue.provide)("$xeTableSelect", $xeTableSelect);
990
+ $xeTableSelect.renderVN = renderVN;
991
+ return $xeTableSelect;
992
+ },
993
+ render() {
994
+ return this.renderVN();
995
+ }
996
+ })
997
+ );