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
@@ -70,1643 +70,1635 @@ const msgQueue = [];
70
70
  const notifyQueue = [];
71
71
  const lockScrollAttrKey = "data-vxe-lock-scroll";
72
72
  const lockScrollCssWidthKey = "--vxe-ui-modal-lock-scroll-view-width";
73
- var modal_default = (0, import_comp.defineVxeComponent)({
74
- name: "VxeModal",
75
- props: {
76
- modelValue: Boolean,
77
- id: String,
78
- type: {
79
- type: String,
80
- default: "modal"
81
- },
82
- loading: {
83
- type: Boolean,
84
- default: null
85
- },
86
- status: String,
87
- iconStatus: String,
88
- className: String,
89
- top: {
90
- type: [Number, String],
91
- default: () => getConfig().modal.top
92
- },
93
- position: [String, Object],
94
- title: String,
95
- duration: {
96
- type: [Number, String],
97
- default: () => getConfig().modal.duration
98
- },
99
- content: [Number, String],
100
- useHtml: {
101
- type: Boolean,
102
- default: () => getConfig().modal.useHtml
103
- },
104
- showCancelButton: {
105
- type: Boolean,
106
- default: null
107
- },
108
- cancelButtonText: {
109
- type: String,
110
- default: () => getConfig().modal.cancelButtonText
111
- },
112
- showConfirmButton: {
113
- type: Boolean,
114
- default: () => getConfig().modal.showConfirmButton
115
- },
116
- confirmButtonText: {
117
- type: String,
118
- default: () => getConfig().modal.confirmButtonText
119
- },
120
- lockView: {
121
- type: Boolean,
122
- default: () => getConfig().modal.lockView
123
- },
124
- lockScroll: Boolean,
125
- mask: {
126
- type: Boolean,
127
- default: () => getConfig().modal.mask
128
- },
129
- maskClosable: {
130
- type: Boolean,
131
- default: () => getConfig().modal.maskClosable
132
- },
133
- escClosable: {
134
- type: Boolean,
135
- default: () => getConfig().modal.escClosable
136
- },
137
- cancelClosable: {
138
- type: Boolean,
139
- default: () => getConfig().modal.cancelClosable
140
- },
141
- confirmClosable: {
142
- type: Boolean,
143
- default: () => getConfig().modal.confirmClosable
144
- },
145
- resize: Boolean,
146
- border: {
147
- type: Boolean,
148
- default: () => getConfig().modal.border
149
- },
150
- showTitleBackground: {
151
- type: Boolean,
152
- default: () => getConfig().modal.showTitleBackground
153
- },
154
- showHeader: {
155
- type: Boolean,
156
- default: () => getConfig().modal.showHeader
157
- },
158
- showFooter: {
159
- type: Boolean,
160
- default: () => getConfig().modal.showFooter
161
- },
162
- preload: Boolean,
163
- showZoom: Boolean,
164
- zoomConfig: Object,
165
- showMaximize: {
166
- type: Boolean,
167
- default: () => (0, import_utils.handleBooleanDefaultValue)(getConfig().modal.showMaximize)
168
- },
169
- showMinimize: {
170
- type: Boolean,
171
- default: () => (0, import_utils.handleBooleanDefaultValue)(getConfig().modal.showMinimize)
172
- },
173
- showClose: {
174
- type: Boolean,
175
- default: () => getConfig().modal.showClose
176
- },
177
- dblclickZoom: {
178
- type: Boolean,
179
- default: () => getConfig().modal.dblclickZoom
180
- },
181
- width: {
182
- type: [Number, String],
183
- default: () => getConfig().modal.width
184
- },
185
- height: {
186
- type: [Number, String],
187
- default: () => getConfig().modal.height
188
- },
189
- minWidth: {
190
- type: [Number, String],
191
- default: () => getConfig().modal.minWidth
192
- },
193
- minHeight: {
194
- type: [Number, String],
195
- default: () => getConfig().modal.minHeight
196
- },
197
- zIndex: Number,
198
- marginSize: {
199
- type: [Number, String],
200
- default: () => getConfig().modal.marginSize
201
- },
202
- fullscreen: {
203
- type: Boolean,
204
- default: () => getConfig().modal.fullscreen
205
- },
206
- draggable: {
207
- type: Boolean,
208
- default: () => getConfig().modal.draggable
209
- },
210
- remember: {
211
- type: Boolean,
212
- default: () => getConfig().modal.remember
213
- },
214
- destroyOnClose: {
215
- type: Boolean,
216
- default: () => getConfig().modal.destroyOnClose
217
- },
218
- showTitleOverflow: {
219
- type: Boolean,
220
- default: () => getConfig().modal.showTitleOverflow
221
- },
222
- transfer: {
223
- type: Boolean,
224
- default: () => getConfig().modal.transfer
225
- },
226
- appendTo: {
227
- type: [String, Function],
228
- default: () => getConfig().modal.appendTo
229
- },
230
- isWithinAppendTo: {
231
- type: Boolean,
232
- default: () => getConfig().modal.isWithinAppendTo
233
- },
234
- storage: {
235
- type: Boolean,
236
- default: () => getConfig().modal.storage
237
- },
238
- storeDriver: {
239
- type: String,
240
- default: () => getConfig().modal.storeDriver
241
- },
242
- storageKey: {
243
- type: String,
244
- default: () => getConfig().modal.storageKey
245
- },
246
- padding: {
247
- type: Boolean,
248
- default: () => getConfig().modal.padding
249
- },
250
- size: {
251
- type: String,
252
- default: () => getConfig().modal.size || getConfig().size
253
- },
254
- beforeHideMethod: Function,
255
- slots: Object,
256
- useScrollbar: {
257
- type: Boolean,
258
- default: () => (0, import_utils.getDefaultConfig)(getConfig().modal.useScrollbar, getConfig().useScrollbar)
259
- },
260
- scrollbarConfig: Object,
261
- /**
262
- * 已废弃
263
- * @deprecated
264
- */
265
- message: [Number, String],
266
- /**
267
- * 已废弃
268
- * @deprecated
269
- */
270
- animat: {
271
- type: Boolean,
272
- default: () => getConfig().modal.animat
273
- }
274
- },
275
- emits: ["update:modelValue", "show", "hide", "before-hide", "close", "confirm", "cancel", "zoom", "resize", "move"],
276
- setup(props, context) {
277
- const { slots, emit } = context;
278
- const xID = import_xe_utils.default.uniqueId();
279
- const $xeParentModal = (0, import_vue.inject)("$xeModal", null);
280
- const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
281
- const $xeTable = (0, import_vue.inject)("$xeTable", null);
282
- const $xeForm = (0, import_vue.inject)("$xeForm", null);
283
- const { computeSize } = useFns.useSize(props);
284
- const { computeIsVScrollbar } = useFns.useVScrollbar(props);
285
- const reactData = (0, import_vue.reactive)(createReactData());
286
- const internalData = createInternalData();
287
- const refElem = (0, import_vue.ref)();
288
- const refModalBox = (0, import_vue.ref)();
289
- const refHeaderElem = (0, import_vue.ref)();
290
- const refConfirmBtn = (0, import_vue.ref)();
291
- const refCancelBtn = (0, import_vue.ref)();
292
- const refMaps = {
293
- refElem
294
- };
295
- const computeBtnTransfer = (0, import_vue.computed)(() => {
296
- const { transfer } = props;
297
- if (transfer === null) {
298
- const globalTransfer = getConfig().modal.transfer;
299
- if (import_xe_utils.default.isBoolean(globalTransfer)) {
300
- return globalTransfer;
301
- }
302
- if ($xeTable || $xeParentModal || $xeDrawer || $xeForm) {
303
- return true;
304
- }
73
+ var modal_default = (
74
+ /* define-vxe-component start */
75
+ (0, import_comp.defineVxeComponent)({
76
+ name: "VxeModal",
77
+ props: {
78
+ modelValue: Boolean,
79
+ id: String,
80
+ type: {
81
+ type: String,
82
+ default: "modal"
83
+ },
84
+ loading: {
85
+ type: Boolean,
86
+ default: null
87
+ },
88
+ status: String,
89
+ iconStatus: String,
90
+ className: String,
91
+ top: {
92
+ type: [Number, String],
93
+ default: () => getConfig().modal.top
94
+ },
95
+ position: [String, Object],
96
+ title: String,
97
+ duration: {
98
+ type: [Number, String],
99
+ default: () => getConfig().modal.duration
100
+ },
101
+ content: [Number, String],
102
+ useHtml: {
103
+ type: Boolean,
104
+ default: () => getConfig().modal.useHtml
105
+ },
106
+ showCancelButton: {
107
+ type: Boolean,
108
+ default: null
109
+ },
110
+ cancelButtonText: {
111
+ type: String,
112
+ default: () => getConfig().modal.cancelButtonText
113
+ },
114
+ showConfirmButton: {
115
+ type: Boolean,
116
+ default: () => getConfig().modal.showConfirmButton
117
+ },
118
+ confirmButtonText: {
119
+ type: String,
120
+ default: () => getConfig().modal.confirmButtonText
121
+ },
122
+ lockView: {
123
+ type: Boolean,
124
+ default: () => getConfig().modal.lockView
125
+ },
126
+ lockScroll: Boolean,
127
+ mask: {
128
+ type: Boolean,
129
+ default: () => getConfig().modal.mask
130
+ },
131
+ maskClosable: {
132
+ type: Boolean,
133
+ default: () => getConfig().modal.maskClosable
134
+ },
135
+ escClosable: {
136
+ type: Boolean,
137
+ default: () => getConfig().modal.escClosable
138
+ },
139
+ cancelClosable: {
140
+ type: Boolean,
141
+ default: () => getConfig().modal.cancelClosable
142
+ },
143
+ confirmClosable: {
144
+ type: Boolean,
145
+ default: () => getConfig().modal.confirmClosable
146
+ },
147
+ resize: Boolean,
148
+ border: {
149
+ type: Boolean,
150
+ default: () => getConfig().modal.border
151
+ },
152
+ showTitleBackground: {
153
+ type: Boolean,
154
+ default: () => getConfig().modal.showTitleBackground
155
+ },
156
+ showHeader: {
157
+ type: Boolean,
158
+ default: () => getConfig().modal.showHeader
159
+ },
160
+ showFooter: {
161
+ type: Boolean,
162
+ default: () => getConfig().modal.showFooter
163
+ },
164
+ preload: Boolean,
165
+ showZoom: Boolean,
166
+ zoomConfig: Object,
167
+ showMaximize: {
168
+ type: Boolean,
169
+ default: () => (0, import_utils.handleBooleanDefaultValue)(getConfig().modal.showMaximize)
170
+ },
171
+ showMinimize: {
172
+ type: Boolean,
173
+ default: () => (0, import_utils.handleBooleanDefaultValue)(getConfig().modal.showMinimize)
174
+ },
175
+ showClose: {
176
+ type: Boolean,
177
+ default: () => getConfig().modal.showClose
178
+ },
179
+ dblclickZoom: {
180
+ type: Boolean,
181
+ default: () => getConfig().modal.dblclickZoom
182
+ },
183
+ width: {
184
+ type: [Number, String],
185
+ default: () => getConfig().modal.width
186
+ },
187
+ height: {
188
+ type: [Number, String],
189
+ default: () => getConfig().modal.height
190
+ },
191
+ minWidth: {
192
+ type: [Number, String],
193
+ default: () => getConfig().modal.minWidth
194
+ },
195
+ minHeight: {
196
+ type: [Number, String],
197
+ default: () => getConfig().modal.minHeight
198
+ },
199
+ zIndex: Number,
200
+ marginSize: {
201
+ type: [Number, String],
202
+ default: () => getConfig().modal.marginSize
203
+ },
204
+ fullscreen: {
205
+ type: Boolean,
206
+ default: () => getConfig().modal.fullscreen
207
+ },
208
+ draggable: {
209
+ type: Boolean,
210
+ default: () => getConfig().modal.draggable
211
+ },
212
+ remember: {
213
+ type: Boolean,
214
+ default: () => getConfig().modal.remember
215
+ },
216
+ destroyOnClose: {
217
+ type: Boolean,
218
+ default: () => getConfig().modal.destroyOnClose
219
+ },
220
+ showTitleOverflow: {
221
+ type: Boolean,
222
+ default: () => getConfig().modal.showTitleOverflow
223
+ },
224
+ transfer: {
225
+ type: Boolean,
226
+ default: () => getConfig().modal.transfer
227
+ },
228
+ appendTo: {
229
+ type: [String, Function],
230
+ default: () => getConfig().modal.appendTo
231
+ },
232
+ isWithinAppendTo: {
233
+ type: Boolean,
234
+ default: () => getConfig().modal.isWithinAppendTo
235
+ },
236
+ storage: {
237
+ type: Boolean,
238
+ default: () => getConfig().modal.storage
239
+ },
240
+ storeDriver: {
241
+ type: String,
242
+ default: () => getConfig().modal.storeDriver
243
+ },
244
+ storageKey: {
245
+ type: String,
246
+ default: () => getConfig().modal.storageKey
247
+ },
248
+ padding: {
249
+ type: Boolean,
250
+ default: () => getConfig().modal.padding
251
+ },
252
+ size: {
253
+ type: String,
254
+ default: () => getConfig().modal.size || getConfig().size
255
+ },
256
+ beforeHideMethod: Function,
257
+ slots: Object,
258
+ useScrollbar: {
259
+ type: Boolean,
260
+ default: () => (0, import_utils.getDefaultConfig)(getConfig().modal.useScrollbar, getConfig().useScrollbar)
261
+ },
262
+ scrollbarConfig: Object,
263
+ /**
264
+ * 已废弃
265
+ * @deprecated
266
+ */
267
+ message: [Number, String],
268
+ /**
269
+ * 已废弃
270
+ * @deprecated
271
+ */
272
+ animat: {
273
+ type: Boolean,
274
+ default: () => getConfig().modal.animat
305
275
  }
306
- return transfer;
307
- });
308
- const computeIsMsg = (0, import_vue.computed)(() => {
309
- const { type } = props;
310
- return type === "message" || type === "notification";
311
- });
312
- const computeIsModal = (0, import_vue.computed)(() => {
313
- return props.type === "modal";
314
- });
315
- const computeIsMinimizeStatus = (0, import_vue.computed)(() => {
316
- return reactData.zoomStatus === "minimize";
317
- });
318
- const computeIsMaximizeStatus = (0, import_vue.computed)(() => {
319
- return reactData.zoomStatus === "maximize";
320
- });
321
- const computeZoomOpts = (0, import_vue.computed)(() => {
322
- return Object.assign({}, getConfig().modal.zoomConfig, props.zoomConfig);
323
- });
324
- const computeScrollbarOpts = (0, import_vue.computed)(() => {
325
- return Object.assign({}, getConfig().modal.scrollbarConfig, props.scrollbarConfig);
326
- });
327
- const computeScrollbarProps = (0, import_vue.computed)(() => {
328
- const scrollbarOpts = computeScrollbarOpts.value;
329
- const { viewClassName, viewInnerClassName } = scrollbarOpts;
330
- return {
331
- width: scrollbarOpts.width,
332
- height: scrollbarOpts.height,
333
- autoHide: scrollbarOpts.autoHide,
334
- visible: scrollbarOpts.visible,
335
- xConfig: scrollbarOpts.xConfig,
336
- yConfig: scrollbarOpts.yConfig,
337
- className: scrollbarOpts.className,
338
- viewAttrs: scrollbarOpts.viewAttrs,
339
- viewClassName: "vxe-modal--scrollbar-content-view" + (viewClassName ? " " + viewClassName : ""),
340
- viewInnerClassName: "vxe-modal--scrollbar-content-inner" + (viewClassName ? " " + viewInnerClassName : "")
276
+ },
277
+ emits: ["update:modelValue", "show", "hide", "before-hide", "close", "confirm", "cancel", "zoom", "resize", "move"],
278
+ setup(props, context) {
279
+ const { slots, emit } = context;
280
+ const xID = import_xe_utils.default.uniqueId();
281
+ const $xeParentModal = (0, import_vue.inject)("$xeModal", null);
282
+ const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
283
+ const $xeTable = (0, import_vue.inject)("$xeTable", null);
284
+ const $xeForm = (0, import_vue.inject)("$xeForm", null);
285
+ const { computeSize } = useFns.useSize(props);
286
+ const { computeIsVScrollbar } = useFns.useVScrollbar(props);
287
+ const reactData = (0, import_vue.reactive)(createReactData());
288
+ const internalData = createInternalData();
289
+ const refElem = (0, import_vue.ref)();
290
+ const refModalBox = (0, import_vue.ref)();
291
+ const refHeaderElem = (0, import_vue.ref)();
292
+ const refConfirmBtn = (0, import_vue.ref)();
293
+ const refCancelBtn = (0, import_vue.ref)();
294
+ const refMaps = {
295
+ refElem
341
296
  };
342
- });
343
- const computeMaps = {
344
- computeSize,
345
- computeZoomOpts
346
- };
347
- const $xeModal = {
348
- xID,
349
- props,
350
- context,
351
- reactData,
352
- internalData,
353
- getRefMaps: () => refMaps,
354
- getComputeMaps: () => computeMaps
355
- };
356
- const posStoreDB = dbUtils.createStore(props.storageKey, {
357
- driver: props.storeDriver
358
- });
359
- const getBox = () => {
360
- const boxElem = refModalBox.value;
361
- return boxElem;
362
- };
363
- const recalculate = () => {
364
- const { width, height, minWidth, minHeight } = props;
365
- const isMsg = computeIsMsg.value;
366
- const isMinimizeStatus = computeIsMinimizeStatus.value;
367
- const boxElem = getBox();
368
- if (boxElem) {
369
- boxElem.style.width = width ? (0, import_dom.toCssUnit)(width) : "";
370
- boxElem.style.height = height ? (0, import_dom.toCssUnit)(height) : "";
371
- boxElem.style.minWidth = !isMsg && !isMinimizeStatus && minWidth ? (0, import_dom.isScale)(minWidth) ? minWidth : (0, import_dom.toCssUnit)(minWidth) : "";
372
- boxElem.style.minHeight = !isMsg && !isMinimizeStatus && minHeight ? (0, import_dom.isScale)(minHeight) ? minHeight : (0, import_dom.toCssUnit)(minHeight) : "";
373
- }
374
- return (0, import_vue.nextTick)();
375
- };
376
- const updateZindex = () => {
377
- const { zIndex } = props;
378
- const { modalZindex } = reactData;
379
- if (zIndex) {
380
- reactData.modalZindex = zIndex;
381
- } else {
382
- const isMsg = computeIsMsg.value;
383
- if (isMsg) {
384
- if (modalZindex < (0, import_utils.getSubLastZIndex)()) {
385
- reactData.modalZindex = (0, import_utils.nextSubZIndex)();
297
+ const computeBtnTransfer = (0, import_vue.computed)(() => {
298
+ const { transfer } = props;
299
+ if (transfer === null) {
300
+ const globalTransfer = getConfig().modal.transfer;
301
+ if (import_xe_utils.default.isBoolean(globalTransfer)) {
302
+ return globalTransfer;
386
303
  }
387
- } else {
388
- if (modalZindex < (0, import_utils.getLastZIndex)()) {
389
- reactData.modalZindex = (0, import_utils.nextZIndex)();
304
+ if ($xeTable || $xeParentModal || $xeDrawer || $xeForm) {
305
+ return true;
390
306
  }
391
307
  }
392
- }
393
- };
394
- const updatePosition = () => {
395
- return (0, import_vue.nextTick)().then(() => {
396
- const { position, isWithinAppendTo } = props;
397
- const el = refElem.value;
398
- const boxElem = getBox();
399
- if (!boxElem) {
400
- return;
401
- }
402
- const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
403
- if (!parentWrapperEl) {
404
- return;
405
- }
406
- const clientVisibleWidth = parentWrapperEl.clientWidth;
407
- const clientVisibleHeight = parentWrapperEl.clientHeight;
408
- const marginSize = import_xe_utils.default.toNumber(props.marginSize);
409
- const isPosCenter = position === "center";
410
- const { top, left } = import_xe_utils.default.isString(position) ? { top: position, left: position } : Object.assign({}, position);
411
- const topCenter = isPosCenter || top === "center";
412
- const leftCenter = isPosCenter || left === "center";
413
- let posTop = "";
414
- let posLeft = "";
415
- if (left && !leftCenter) {
416
- posLeft = (0, import_dom.toCssUnit)(left);
417
- } else {
418
- posLeft = `${Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2)}px`;
419
- }
420
- if (top && !topCenter) {
421
- posTop = (0, import_dom.toCssUnit)(top);
422
- } else {
423
- posTop = `${Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2)}px`;
424
- }
425
- boxElem.style.top = posTop;
426
- boxElem.style.left = posLeft;
308
+ return transfer;
427
309
  });
428
- };
429
- const updateStyle = () => {
430
- (0, import_vue.nextTick)(() => {
310
+ const computeIsMsg = (0, import_vue.computed)(() => {
431
311
  const { type } = props;
432
- const queueList = type === "notification" ? notifyQueue : msgQueue;
433
- let offsetTop = 0;
434
- queueList.forEach((comp) => {
435
- const boxElem = comp.getBox();
436
- if (boxElem) {
437
- offsetTop += import_xe_utils.default.toNumber(comp.props.top);
438
- comp.reactData.modalTop = offsetTop;
439
- offsetTop += boxElem.clientHeight;
440
- }
441
- });
312
+ return type === "message" || type === "notification";
442
313
  });
443
- };
444
- const removeActiveQueue = () => {
445
- if (import_store.allActiveModals.indexOf($xeModal) > -1) {
446
- import_xe_utils.default.remove(import_store.allActiveModals, (item) => item === $xeModal);
447
- }
448
- };
449
- const removeMsgQueue = () => {
450
- const { type } = props;
451
- const queueList = type === "notification" ? notifyQueue : msgQueue;
452
- if (queueList.indexOf($xeModal) > -1) {
453
- import_xe_utils.default.remove(queueList, (comp) => comp === $xeModal);
454
- }
455
- updateStyle();
456
- };
457
- const closeModal = (type) => {
458
- const { remember } = props;
459
- const { visible } = reactData;
460
- const isMsg = computeIsMsg.value;
461
- const beforeHideFn = props.beforeHideMethod || getConfig().modal.beforeHideMethod;
462
- const params = { type };
463
- if (visible) {
464
- Promise.resolve(beforeHideFn ? beforeHideFn(params) : null).then((rest) => {
465
- if (!import_xe_utils.default.isError(rest)) {
466
- const el = refElem.value;
467
- if (el) {
468
- el.setAttribute("data-effect", "y");
469
- }
470
- if (isMsg) {
471
- removeMsgQueue();
314
+ const computeIsModal = (0, import_vue.computed)(() => {
315
+ return props.type === "modal";
316
+ });
317
+ const computeIsMinimizeStatus = (0, import_vue.computed)(() => {
318
+ return reactData.zoomStatus === "minimize";
319
+ });
320
+ const computeIsMaximizeStatus = (0, import_vue.computed)(() => {
321
+ return reactData.zoomStatus === "maximize";
322
+ });
323
+ const computeZoomOpts = (0, import_vue.computed)(() => {
324
+ return Object.assign({}, getConfig().modal.zoomConfig, props.zoomConfig);
325
+ });
326
+ const computeScrollbarOpts = (0, import_vue.computed)(() => {
327
+ return Object.assign({}, getConfig().modal.scrollbarConfig, props.scrollbarConfig);
328
+ });
329
+ const computeScrollbarProps = (0, import_vue.computed)(() => {
330
+ const scrollbarOpts = computeScrollbarOpts.value;
331
+ const { viewClassName, viewInnerClassName } = scrollbarOpts;
332
+ return {
333
+ width: scrollbarOpts.width,
334
+ height: scrollbarOpts.height,
335
+ autoHide: scrollbarOpts.autoHide,
336
+ visible: scrollbarOpts.visible,
337
+ xConfig: scrollbarOpts.xConfig,
338
+ yConfig: scrollbarOpts.yConfig,
339
+ className: scrollbarOpts.className,
340
+ viewAttrs: scrollbarOpts.viewAttrs,
341
+ viewClassName: "vxe-modal--scrollbar-content-view" + (viewClassName ? " " + viewClassName : ""),
342
+ viewInnerClassName: "vxe-modal--scrollbar-content-inner" + (viewClassName ? " " + viewInnerClassName : "")
343
+ };
344
+ });
345
+ const computeMaps = {
346
+ computeSize,
347
+ computeZoomOpts
348
+ };
349
+ const $xeModal = {
350
+ xID,
351
+ props,
352
+ context,
353
+ reactData,
354
+ internalData,
355
+ getRefMaps: () => refMaps,
356
+ getComputeMaps: () => computeMaps
357
+ };
358
+ const posStoreDB = dbUtils.createStore(props.storageKey, {
359
+ driver: props.storeDriver
360
+ });
361
+ const getBox = () => {
362
+ const boxElem = refModalBox.value;
363
+ return boxElem;
364
+ };
365
+ const recalculate = () => {
366
+ const { width, height, minWidth, minHeight } = props;
367
+ const isMsg = computeIsMsg.value;
368
+ const isMinimizeStatus = computeIsMinimizeStatus.value;
369
+ const boxElem = getBox();
370
+ if (boxElem) {
371
+ boxElem.style.width = width ? (0, import_dom.toCssUnit)(width) : "";
372
+ boxElem.style.height = height ? (0, import_dom.toCssUnit)(height) : "";
373
+ boxElem.style.minWidth = !isMsg && !isMinimizeStatus && minWidth ? (0, import_dom.isScale)(minWidth) ? minWidth : (0, import_dom.toCssUnit)(minWidth) : "";
374
+ boxElem.style.minHeight = !isMsg && !isMinimizeStatus && minHeight ? (0, import_dom.isScale)(minHeight) ? minHeight : (0, import_dom.toCssUnit)(minHeight) : "";
375
+ }
376
+ return (0, import_vue.nextTick)();
377
+ };
378
+ const updateZindex = () => {
379
+ const { zIndex } = props;
380
+ const { modalZindex } = reactData;
381
+ if (zIndex) {
382
+ reactData.modalZindex = zIndex;
383
+ } else {
384
+ const isMsg = computeIsMsg.value;
385
+ if (isMsg) {
386
+ if (modalZindex < (0, import_utils.getSubLastZIndex)()) {
387
+ reactData.modalZindex = (0, import_utils.nextSubZIndex)();
472
388
  }
473
- reactData.contentVisible = false;
474
- if (!remember) {
475
- handleRevert();
389
+ } else {
390
+ if (modalZindex < (0, import_utils.getLastZIndex)()) {
391
+ reactData.modalZindex = (0, import_utils.nextZIndex)();
476
392
  }
477
- removeActiveQueue();
478
- dispatchEvent("before-hide", params, null);
479
- setTimeout(() => {
480
- reactData.visible = false;
481
- emitModel(false);
482
- dispatchEvent("hide", params, null);
483
- }, 200);
484
- removeBodyLockScroll();
485
- setTimeout(() => {
486
- const el2 = refElem.value;
487
- if (el2) {
488
- el2.removeAttribute("data-effect");
489
- }
490
- }, 350);
491
393
  }
492
- }).catch((e) => e);
493
- }
494
- return (0, import_vue.nextTick)();
495
- };
496
- const closeEvent = (evnt) => {
497
- const type = "close";
498
- dispatchEvent(type, { type }, evnt);
499
- closeModal(type);
500
- };
501
- const confirmEvent = (evnt) => {
502
- const { confirmClosable } = props;
503
- const type = "confirm";
504
- dispatchEvent(type, { type }, evnt);
505
- if (confirmClosable) {
506
- closeModal(type);
507
- }
508
- };
509
- const cancelEvent = (evnt) => {
510
- const { cancelClosable } = props;
511
- const type = "cancel";
512
- dispatchEvent(type, { type }, evnt);
513
- if (cancelClosable) {
514
- closeModal(type);
515
- }
516
- };
517
- const getStorageMap = (key, id) => {
518
- return posStoreDB.getById(id).then((dbRest) => dbRest ? dbRest.data : "");
519
- };
520
- const saveStorageMap = (id, posStorage) => {
521
- return posStoreDB.updateById(id, posStorage);
522
- };
523
- const restorePosStorage = (posStorage) => {
524
- if (posStorage) {
525
- const boxElem = getBox();
526
- const [left, top, width, height, zoomLeft, zoomTop, zoomWidth, zoomHeight] = posStorage.split(",");
527
- if (boxElem) {
528
- if (left) {
529
- boxElem.style.left = `${left}px`;
394
+ }
395
+ };
396
+ const updatePosition = () => {
397
+ return (0, import_vue.nextTick)().then(() => {
398
+ const { position, isWithinAppendTo } = props;
399
+ const el = refElem.value;
400
+ const boxElem = getBox();
401
+ if (!boxElem) {
402
+ return;
530
403
  }
531
- if (top) {
532
- boxElem.style.top = `${top}px`;
404
+ const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
405
+ if (!parentWrapperEl) {
406
+ return;
533
407
  }
534
- if (width) {
535
- boxElem.style.width = `${width}px`;
408
+ const clientVisibleWidth = parentWrapperEl.clientWidth;
409
+ const clientVisibleHeight = parentWrapperEl.clientHeight;
410
+ const marginSize = import_xe_utils.default.toNumber(props.marginSize);
411
+ const isPosCenter = position === "center";
412
+ const { top, left } = import_xe_utils.default.isString(position) ? { top: position, left: position } : Object.assign({}, position);
413
+ const topCenter = isPosCenter || top === "center";
414
+ const leftCenter = isPosCenter || left === "center";
415
+ let posTop = "";
416
+ let posLeft = "";
417
+ if (left && !leftCenter) {
418
+ posLeft = (0, import_dom.toCssUnit)(left);
419
+ } else {
420
+ posLeft = `${Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2)}px`;
536
421
  }
537
- if (height) {
538
- boxElem.style.height = `${height}px`;
422
+ if (top && !topCenter) {
423
+ posTop = (0, import_dom.toCssUnit)(top);
424
+ } else {
425
+ posTop = `${Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2)}px`;
539
426
  }
427
+ boxElem.style.top = posTop;
428
+ boxElem.style.left = posLeft;
429
+ });
430
+ };
431
+ const updateStyle = () => {
432
+ (0, import_vue.nextTick)(() => {
433
+ const { type } = props;
434
+ const queueList = type === "notification" ? notifyQueue : msgQueue;
435
+ let offsetTop = 0;
436
+ queueList.forEach((comp) => {
437
+ const boxElem = comp.getBox();
438
+ if (boxElem) {
439
+ offsetTop += import_xe_utils.default.toNumber(comp.props.top);
440
+ comp.reactData.modalTop = offsetTop;
441
+ offsetTop += boxElem.clientHeight;
442
+ }
443
+ });
444
+ });
445
+ };
446
+ const removeActiveQueue = () => {
447
+ if (import_store.allActiveModals.indexOf($xeModal) > -1) {
448
+ import_xe_utils.default.remove(import_store.allActiveModals, (item) => item === $xeModal);
540
449
  }
541
- if (zoomLeft && zoomTop) {
542
- reactData.revertLocat = {
543
- left: import_xe_utils.default.toNumber(zoomLeft),
544
- top: import_xe_utils.default.toNumber(zoomTop),
545
- width: import_xe_utils.default.toNumber(zoomWidth),
546
- height: import_xe_utils.default.toNumber(zoomHeight)
547
- };
450
+ };
451
+ const removeMsgQueue = () => {
452
+ const { type } = props;
453
+ const queueList = type === "notification" ? notifyQueue : msgQueue;
454
+ if (queueList.indexOf($xeModal) > -1) {
455
+ import_xe_utils.default.remove(queueList, (comp) => comp === $xeModal);
548
456
  }
549
- }
550
- };
551
- const addMsgQueue = () => {
552
- const { type } = props;
553
- const queueList = type === "notification" ? notifyQueue : msgQueue;
554
- if (queueList.indexOf($xeModal) === -1) {
555
- queueList.push($xeModal);
556
- }
557
- updateStyle();
558
- };
559
- const savePosStorage = () => {
560
- const { id, storage } = props;
561
- const { zoomStatus, revertLocat } = reactData;
562
- if (zoomStatus) {
563
- return;
564
- }
565
- if (id && storage) {
566
- const boxElem = getBox();
567
- if (!boxElem) {
568
- return;
457
+ updateStyle();
458
+ };
459
+ const closeModal = (type) => {
460
+ const { remember } = props;
461
+ const { visible } = reactData;
462
+ const isMsg = computeIsMsg.value;
463
+ const beforeHideFn = props.beforeHideMethod || getConfig().modal.beforeHideMethod;
464
+ const params = { type };
465
+ if (visible) {
466
+ Promise.resolve(beforeHideFn ? beforeHideFn(params) : null).then((rest) => {
467
+ if (!import_xe_utils.default.isError(rest)) {
468
+ const el = refElem.value;
469
+ if (el) {
470
+ el.setAttribute("data-effect", "y");
471
+ }
472
+ if (isMsg) {
473
+ removeMsgQueue();
474
+ }
475
+ reactData.contentVisible = false;
476
+ if (!remember) {
477
+ handleRevert();
478
+ }
479
+ removeActiveQueue();
480
+ dispatchEvent("before-hide", params, null);
481
+ setTimeout(() => {
482
+ reactData.visible = false;
483
+ emitModel(false);
484
+ dispatchEvent("hide", params, null);
485
+ }, 200);
486
+ removeBodyLockScroll();
487
+ setTimeout(() => {
488
+ const el2 = refElem.value;
489
+ if (el2) {
490
+ el2.removeAttribute("data-effect");
491
+ }
492
+ }, 350);
493
+ }
494
+ }).catch((e) => e);
569
495
  }
570
- const posStorage = [
571
- boxElem.style.left,
572
- boxElem.style.top,
573
- boxElem.clientWidth,
574
- boxElem.clientHeight,
575
- ...revertLocat ? [
576
- revertLocat.left,
577
- revertLocat.top,
578
- revertLocat.width,
579
- revertLocat.height
580
- ] : []
581
- ].map((val) => val ? import_xe_utils.default.toNumber(val) : "").join(",");
582
- saveStorageMap(id, posStorage);
583
- }
584
- };
585
- const handleMinimize = () => {
586
- const { isWithinAppendTo } = props;
587
- const zoomOpts = computeZoomOpts.value;
588
- const { minimizeLayout, minimizeMaxSize, minimizeHorizontalOffset, minimizeVerticalOffset, minimizeOffsetMethod } = zoomOpts;
589
- const isHorizontalLayout = minimizeLayout === "horizontal";
590
- const prevZoomStatus = reactData.zoomStatus;
591
- const hlMList = [];
592
- const vlMList = [];
593
- import_store.allActiveModals.forEach((item) => {
594
- if (item.xID !== $xeModal.xID && item.props.type === "modal" && item.reactData.zoomStatus === "minimize") {
595
- const itemZoomOpts = item.getComputeMaps().computeZoomOpts.value;
596
- if (itemZoomOpts.minimizeLayout === "horizontal") {
597
- hlMList.push(item);
598
- } else {
599
- vlMList.push(item);
600
- }
496
+ return (0, import_vue.nextTick)();
497
+ };
498
+ const closeEvent = (evnt) => {
499
+ const type = "close";
500
+ dispatchEvent(type, { type }, evnt);
501
+ closeModal(type);
502
+ };
503
+ const confirmEvent = (evnt) => {
504
+ const { confirmClosable } = props;
505
+ const type = "confirm";
506
+ dispatchEvent(type, { type }, evnt);
507
+ if (confirmClosable) {
508
+ closeModal(type);
601
509
  }
602
- });
603
- const mList = isHorizontalLayout ? hlMList : vlMList;
604
- if (minimizeMaxSize && mList.length >= minimizeMaxSize) {
605
- if (import_core.VxeUI.modal) {
606
- import_core.VxeUI.modal.message({
607
- status: "error",
608
- content: getI18n("vxe.modal.miniMaxSize", [minimizeMaxSize])
609
- });
510
+ };
511
+ const cancelEvent = (evnt) => {
512
+ const { cancelClosable } = props;
513
+ const type = "cancel";
514
+ dispatchEvent(type, { type }, evnt);
515
+ if (cancelClosable) {
516
+ closeModal(type);
610
517
  }
611
- return Promise.resolve({
612
- status: false
613
- });
614
- }
615
- reactData.prevZoomStatus = prevZoomStatus;
616
- reactData.zoomStatus = "minimize";
617
- return (0, import_vue.nextTick)().then(() => {
618
- const el = refElem.value;
619
- const boxElem = getBox();
620
- if (!boxElem) {
621
- return {
622
- status: false
623
- };
518
+ };
519
+ const getStorageMap = (key, id) => {
520
+ return posStoreDB.getById(id).then((dbRest) => dbRest ? dbRest.data : "");
521
+ };
522
+ const saveStorageMap = (id, posStorage) => {
523
+ return posStoreDB.updateById(id, posStorage);
524
+ };
525
+ const restorePosStorage = (posStorage) => {
526
+ if (posStorage) {
527
+ const boxElem = getBox();
528
+ const [left, top, width, height, zoomLeft, zoomTop, zoomWidth, zoomHeight] = posStorage.split(",");
529
+ if (boxElem) {
530
+ if (left) {
531
+ boxElem.style.left = `${left}px`;
532
+ }
533
+ if (top) {
534
+ boxElem.style.top = `${top}px`;
535
+ }
536
+ if (width) {
537
+ boxElem.style.width = `${width}px`;
538
+ }
539
+ if (height) {
540
+ boxElem.style.height = `${height}px`;
541
+ }
542
+ }
543
+ if (zoomLeft && zoomTop) {
544
+ reactData.revertLocat = {
545
+ left: import_xe_utils.default.toNumber(zoomLeft),
546
+ top: import_xe_utils.default.toNumber(zoomTop),
547
+ width: import_xe_utils.default.toNumber(zoomWidth),
548
+ height: import_xe_utils.default.toNumber(zoomHeight)
549
+ };
550
+ }
624
551
  }
625
- const headerEl = refHeaderElem.value;
626
- if (!headerEl) {
627
- return {
628
- status: false
629
- };
552
+ };
553
+ const addMsgQueue = () => {
554
+ const { type } = props;
555
+ const queueList = type === "notification" ? notifyQueue : msgQueue;
556
+ if (queueList.indexOf($xeModal) === -1) {
557
+ queueList.push($xeModal);
630
558
  }
631
- const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
632
- if (!parentWrapperEl) {
633
- return {
634
- status: false
635
- };
559
+ updateStyle();
560
+ };
561
+ const savePosStorage = () => {
562
+ const { id, storage } = props;
563
+ const { zoomStatus, revertLocat } = reactData;
564
+ if (zoomStatus) {
565
+ return;
636
566
  }
637
- const visibleHeight = parentWrapperEl.clientHeight;
638
- if (!prevZoomStatus) {
639
- reactData.revertLocat = {
640
- top: boxElem.offsetTop,
641
- left: boxElem.offsetLeft,
642
- width: boxElem.offsetWidth + (boxElem.style.width ? 0 : 1),
643
- height: boxElem.offsetHeight + (boxElem.style.height ? 0 : 1)
644
- };
567
+ if (id && storage) {
568
+ const boxElem = getBox();
569
+ if (!boxElem) {
570
+ return;
571
+ }
572
+ const posStorage = [boxElem.style.left, boxElem.style.top, boxElem.clientWidth, boxElem.clientHeight, ...revertLocat ? [revertLocat.left, revertLocat.top, revertLocat.width, revertLocat.height] : []].map((val) => val ? import_xe_utils.default.toNumber(val) : "").join(",");
573
+ saveStorageMap(id, posStorage);
645
574
  }
646
- const targetModal = import_xe_utils.default[isHorizontalLayout ? "max" : "min"](mList, ($modal) => {
647
- const boxElem2 = $modal.getBox();
648
- return boxElem2 ? import_xe_utils.default.toNumber(boxElem2.style[isHorizontalLayout ? "left" : "top"]) : 0;
649
- });
650
- let targetTop = visibleHeight - headerEl.offsetHeight - 16;
651
- let targetLeft = 16;
652
- if (targetModal) {
653
- const minBoxElem = targetModal.getBox();
654
- if (minBoxElem) {
655
- const boxLeft = import_xe_utils.default.toNumber(minBoxElem.style.left);
656
- const boxTop = import_xe_utils.default.toNumber(minBoxElem.style.top);
657
- let offsetObj = {};
658
- if (isHorizontalLayout) {
659
- offsetObj = Object.assign({}, minimizeHorizontalOffset);
575
+ };
576
+ const handleMinimize = () => {
577
+ const { isWithinAppendTo } = props;
578
+ const zoomOpts = computeZoomOpts.value;
579
+ const { minimizeLayout, minimizeMaxSize, minimizeHorizontalOffset, minimizeVerticalOffset, minimizeOffsetMethod } = zoomOpts;
580
+ const isHorizontalLayout = minimizeLayout === "horizontal";
581
+ const prevZoomStatus = reactData.zoomStatus;
582
+ const hlMList = [];
583
+ const vlMList = [];
584
+ import_store.allActiveModals.forEach((item) => {
585
+ if (item.xID !== $xeModal.xID && item.props.type === "modal" && item.reactData.zoomStatus === "minimize") {
586
+ const itemZoomOpts = item.getComputeMaps().computeZoomOpts.value;
587
+ if (itemZoomOpts.minimizeLayout === "horizontal") {
588
+ hlMList.push(item);
660
589
  } else {
661
- offsetObj = Object.assign({}, minimizeVerticalOffset);
662
- }
663
- targetLeft = boxLeft + import_xe_utils.default.toNumber(offsetObj.left);
664
- targetTop = boxTop + import_xe_utils.default.toNumber(offsetObj.top);
665
- if (minimizeOffsetMethod) {
666
- offsetObj = minimizeOffsetMethod({
667
- $modal: $xeModal,
668
- left: targetLeft,
669
- top: targetTop
670
- });
671
- targetLeft = import_xe_utils.default.toNumber(offsetObj.left);
672
- targetTop = import_xe_utils.default.toNumber(offsetObj.top);
590
+ vlMList.push(item);
673
591
  }
674
592
  }
675
- }
676
- Object.assign(boxElem.style, {
677
- top: `${targetTop}px`,
678
- left: `${targetLeft}px`,
679
- width: "200px",
680
- height: `${headerEl.offsetHeight}px`,
681
- minHeight: "",
682
- minWidth: ""
683
593
  });
684
- savePosStorage();
685
- return {
686
- status: true
687
- };
688
- });
689
- };
690
- const handleMaximize = () => {
691
- const { isWithinAppendTo } = props;
692
- const prevZoomStatus = reactData.zoomStatus;
693
- reactData.prevZoomStatus = prevZoomStatus;
694
- reactData.zoomStatus = "maximize";
695
- return (0, import_vue.nextTick)().then(() => {
696
- const boxElem = getBox();
697
- if (boxElem) {
594
+ const mList = isHorizontalLayout ? hlMList : vlMList;
595
+ if (minimizeMaxSize && mList.length >= minimizeMaxSize) {
596
+ if (import_core.VxeUI.modal) {
597
+ import_core.VxeUI.modal.message({
598
+ status: "error",
599
+ content: getI18n("vxe.modal.miniMaxSize", [minimizeMaxSize])
600
+ });
601
+ }
602
+ return Promise.resolve({
603
+ status: false
604
+ });
605
+ }
606
+ reactData.prevZoomStatus = prevZoomStatus;
607
+ reactData.zoomStatus = "minimize";
608
+ return (0, import_vue.nextTick)().then(() => {
609
+ const el = refElem.value;
610
+ const boxElem = getBox();
611
+ if (!boxElem) {
612
+ return {
613
+ status: false
614
+ };
615
+ }
616
+ const headerEl = refHeaderElem.value;
617
+ if (!headerEl) {
618
+ return {
619
+ status: false
620
+ };
621
+ }
622
+ const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
623
+ if (!parentWrapperEl) {
624
+ return {
625
+ status: false
626
+ };
627
+ }
628
+ const visibleHeight = parentWrapperEl.clientHeight;
698
629
  if (!prevZoomStatus) {
699
- const el = refElem.value;
700
- const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
701
- if (!parentWrapperEl) {
702
- return {
703
- status: false
704
- };
705
- }
706
- const clientVisibleWidth = parentWrapperEl.clientWidth;
707
- const clientVisibleHeight = parentWrapperEl.clientHeight;
708
- const marginSize = import_xe_utils.default.toNumber(props.marginSize);
709
630
  reactData.revertLocat = {
710
- top: Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2),
711
- left: Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2),
631
+ top: boxElem.offsetTop,
632
+ left: boxElem.offsetLeft,
712
633
  width: boxElem.offsetWidth + (boxElem.style.width ? 0 : 1),
713
634
  height: boxElem.offsetHeight + (boxElem.style.height ? 0 : 1)
714
635
  };
715
636
  }
637
+ const targetModal = import_xe_utils.default[isHorizontalLayout ? "max" : "min"](mList, ($modal) => {
638
+ const boxElem2 = $modal.getBox();
639
+ return boxElem2 ? import_xe_utils.default.toNumber(boxElem2.style[isHorizontalLayout ? "left" : "top"]) : 0;
640
+ });
641
+ let targetTop = visibleHeight - headerEl.offsetHeight - 16;
642
+ let targetLeft = 16;
643
+ if (targetModal) {
644
+ const minBoxElem = targetModal.getBox();
645
+ if (minBoxElem) {
646
+ const boxLeft = import_xe_utils.default.toNumber(minBoxElem.style.left);
647
+ const boxTop = import_xe_utils.default.toNumber(minBoxElem.style.top);
648
+ let offsetObj = {};
649
+ if (isHorizontalLayout) {
650
+ offsetObj = Object.assign({}, minimizeHorizontalOffset);
651
+ } else {
652
+ offsetObj = Object.assign({}, minimizeVerticalOffset);
653
+ }
654
+ targetLeft = boxLeft + import_xe_utils.default.toNumber(offsetObj.left);
655
+ targetTop = boxTop + import_xe_utils.default.toNumber(offsetObj.top);
656
+ if (minimizeOffsetMethod) {
657
+ offsetObj = minimizeOffsetMethod({
658
+ $modal: $xeModal,
659
+ left: targetLeft,
660
+ top: targetTop
661
+ });
662
+ targetLeft = import_xe_utils.default.toNumber(offsetObj.left);
663
+ targetTop = import_xe_utils.default.toNumber(offsetObj.top);
664
+ }
665
+ }
666
+ }
716
667
  Object.assign(boxElem.style, {
717
- top: "0",
718
- left: "0",
719
- width: "100%",
720
- height: "100%",
668
+ top: `${targetTop}px`,
669
+ left: `${targetLeft}px`,
670
+ width: "200px",
671
+ height: `${headerEl.offsetHeight}px`,
721
672
  minHeight: "",
722
673
  minWidth: ""
723
674
  });
675
+ savePosStorage();
676
+ return {
677
+ status: true
678
+ };
679
+ });
680
+ };
681
+ const handleMaximize = () => {
682
+ const { isWithinAppendTo } = props;
683
+ const prevZoomStatus = reactData.zoomStatus;
684
+ reactData.prevZoomStatus = prevZoomStatus;
685
+ reactData.zoomStatus = "maximize";
686
+ return (0, import_vue.nextTick)().then(() => {
687
+ const boxElem = getBox();
688
+ if (boxElem) {
689
+ if (!prevZoomStatus) {
690
+ const el = refElem.value;
691
+ const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
692
+ if (!parentWrapperEl) {
693
+ return {
694
+ status: false
695
+ };
696
+ }
697
+ const clientVisibleWidth = parentWrapperEl.clientWidth;
698
+ const clientVisibleHeight = parentWrapperEl.clientHeight;
699
+ const marginSize = import_xe_utils.default.toNumber(props.marginSize);
700
+ reactData.revertLocat = {
701
+ top: Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2),
702
+ left: Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2),
703
+ width: boxElem.offsetWidth + (boxElem.style.width ? 0 : 1),
704
+ height: boxElem.offsetHeight + (boxElem.style.height ? 0 : 1)
705
+ };
706
+ }
707
+ Object.assign(boxElem.style, {
708
+ top: "0",
709
+ left: "0",
710
+ width: "100%",
711
+ height: "100%",
712
+ minHeight: "",
713
+ minWidth: ""
714
+ });
715
+ }
716
+ savePosStorage();
717
+ return {
718
+ status: true
719
+ };
720
+ });
721
+ };
722
+ const handleMsgAutoClose = () => {
723
+ const { duration } = props;
724
+ if (duration !== -1) {
725
+ internalData.msgTimeout = setTimeout(() => closeModal("close"), import_xe_utils.default.toNumber(duration));
724
726
  }
725
- savePosStorage();
726
- return {
727
- status: true
728
- };
729
- });
730
- };
731
- const handleMsgAutoClose = () => {
732
- const { duration } = props;
733
- if (duration !== -1) {
734
- internalData.msgTimeout = setTimeout(() => closeModal("close"), import_xe_utils.default.toNumber(duration));
735
- }
736
- };
737
- const removeBodyLockScroll = () => {
738
- const htmlElem = document.documentElement;
739
- const lockData = htmlElem.getAttribute(lockScrollAttrKey);
740
- if (lockData) {
741
- const lockList = lockData.split(",").filter((key) => key !== xID);
742
- if (lockList.length) {
743
- htmlElem.setAttribute(lockScrollAttrKey, lockList.join(","));
744
- } else {
745
- htmlElem.removeAttribute(lockScrollAttrKey);
746
- htmlElem.style.removeProperty(lockScrollCssWidthKey);
747
- }
748
- }
749
- };
750
- const addBodyLockScroll = () => {
751
- const { lockScroll } = props;
752
- const isMsg = computeIsMsg.value;
753
- if (lockScroll && !isMsg) {
727
+ };
728
+ const removeBodyLockScroll = () => {
754
729
  const htmlElem = document.documentElement;
755
- const clientWidth = document.body.clientWidth;
756
730
  const lockData = htmlElem.getAttribute(lockScrollAttrKey);
757
- const lockList = lockData ? lockData.split(",") : [];
758
- if (!lockList.includes(xID)) {
759
- lockList.push(xID);
760
- htmlElem.setAttribute(lockScrollAttrKey, lockList.join(","));
731
+ if (lockData) {
732
+ const lockList = lockData.split(",").filter((key) => key !== xID);
733
+ if (lockList.length) {
734
+ htmlElem.setAttribute(lockScrollAttrKey, lockList.join(","));
735
+ } else {
736
+ htmlElem.removeAttribute(lockScrollAttrKey);
737
+ htmlElem.style.removeProperty(lockScrollCssWidthKey);
738
+ }
761
739
  }
762
- htmlElem.style.setProperty(lockScrollCssWidthKey, `${clientWidth}px`);
763
- }
764
- };
765
- const openModal = () => {
766
- const { storageKey, id, remember, showFooter, fullscreen } = props;
767
- const { initialized, visible } = reactData;
768
- const isMsg = computeIsMsg.value;
769
- const isModal = computeIsModal.value;
770
- if (!initialized) {
771
- reactData.initialized = true;
772
- }
773
- if (!visible) {
774
- addBodyLockScroll();
775
- internalData.isMoveStatus = false;
776
- reactData.visible = true;
777
- reactData.contentVisible = false;
778
- updateZindex();
779
- import_store.allActiveModals.push($xeModal);
780
- setTimeout(() => {
781
- reactData.contentVisible = true;
782
- (0, import_vue.nextTick)(() => {
783
- if (!(isModal && fullscreen)) {
784
- recalculate();
785
- }
786
- if (showFooter) {
787
- const confirmBtn = refConfirmBtn.value;
788
- const cancelBtn = refCancelBtn.value;
789
- const operBtn = confirmBtn || cancelBtn;
790
- if (operBtn) {
791
- operBtn.focus();
740
+ };
741
+ const addBodyLockScroll = () => {
742
+ const { lockScroll } = props;
743
+ const isMsg = computeIsMsg.value;
744
+ if (lockScroll && !isMsg) {
745
+ const htmlElem = document.documentElement;
746
+ const clientWidth = document.body.clientWidth;
747
+ const lockData = htmlElem.getAttribute(lockScrollAttrKey);
748
+ const lockList = lockData ? lockData.split(",") : [];
749
+ if (!lockList.includes(xID)) {
750
+ lockList.push(xID);
751
+ htmlElem.setAttribute(lockScrollAttrKey, lockList.join(","));
752
+ }
753
+ htmlElem.style.setProperty(lockScrollCssWidthKey, `${clientWidth}px`);
754
+ }
755
+ };
756
+ const openModal = () => {
757
+ const { storageKey, id, remember, showFooter, fullscreen } = props;
758
+ const { initialized, visible } = reactData;
759
+ const isMsg = computeIsMsg.value;
760
+ const isModal = computeIsModal.value;
761
+ if (!initialized) {
762
+ reactData.initialized = true;
763
+ }
764
+ if (!visible) {
765
+ addBodyLockScroll();
766
+ internalData.isMoveStatus = false;
767
+ reactData.visible = true;
768
+ reactData.contentVisible = false;
769
+ updateZindex();
770
+ import_store.allActiveModals.push($xeModal);
771
+ setTimeout(() => {
772
+ reactData.contentVisible = true;
773
+ (0, import_vue.nextTick)(() => {
774
+ if (!(isModal && fullscreen)) {
775
+ recalculate();
792
776
  }
793
- }
794
- const type = "";
795
- const params = { type };
796
- emitModel(true);
797
- dispatchEvent("show", params, null);
798
- });
799
- }, 10);
800
- if (isMsg) {
801
- addMsgQueue();
802
- handleMsgAutoClose();
803
- } else {
804
- (0, import_vue.nextTick)(() => {
805
- const { firstOpen } = reactData;
806
- const el = refElem.value;
807
- if (el) {
808
- el.setAttribute("data-effect", "y");
809
- }
810
- if (firstOpen) {
811
- reactData.firstOpen = false;
812
- if (storageKey && id) {
813
- getStorageMap(storageKey, id).then((posStorage) => {
814
- if (posStorage) {
815
- restorePosStorage(posStorage);
816
- } else {
817
- if (isModal && fullscreen) {
818
- (0, import_vue.nextTick)(() => handleMaximize());
777
+ if (showFooter) {
778
+ const confirmBtn = refConfirmBtn.value;
779
+ const cancelBtn = refCancelBtn.value;
780
+ const operBtn = confirmBtn || cancelBtn;
781
+ if (operBtn) {
782
+ operBtn.focus();
783
+ }
784
+ }
785
+ const type = "";
786
+ const params = { type };
787
+ emitModel(true);
788
+ dispatchEvent("show", params, null);
789
+ });
790
+ }, 10);
791
+ if (isMsg) {
792
+ addMsgQueue();
793
+ handleMsgAutoClose();
794
+ } else {
795
+ (0, import_vue.nextTick)(() => {
796
+ const { firstOpen } = reactData;
797
+ const el = refElem.value;
798
+ if (el) {
799
+ el.setAttribute("data-effect", "y");
800
+ }
801
+ if (firstOpen) {
802
+ reactData.firstOpen = false;
803
+ if (storageKey && id) {
804
+ getStorageMap(storageKey, id).then((posStorage) => {
805
+ if (posStorage) {
806
+ restorePosStorage(posStorage);
819
807
  } else {
820
- recalculate();
821
- updatePosition().then(() => {
822
- setTimeout(() => updatePosition(), 20);
823
- });
808
+ if (isModal && fullscreen) {
809
+ (0, import_vue.nextTick)(() => handleMaximize());
810
+ } else {
811
+ recalculate();
812
+ updatePosition().then(() => {
813
+ setTimeout(() => updatePosition(), 20);
814
+ });
815
+ }
824
816
  }
817
+ });
818
+ } else {
819
+ if (isModal && fullscreen) {
820
+ (0, import_vue.nextTick)(() => handleMaximize());
821
+ } else {
822
+ recalculate();
823
+ updatePosition().then(() => {
824
+ setTimeout(() => updatePosition(), 20);
825
+ });
825
826
  }
826
- });
827
+ }
827
828
  } else {
828
- if (isModal && fullscreen) {
829
- (0, import_vue.nextTick)(() => handleMaximize());
830
- } else {
829
+ if (!remember) {
831
830
  recalculate();
832
831
  updatePosition().then(() => {
833
832
  setTimeout(() => updatePosition(), 20);
834
833
  });
835
834
  }
836
835
  }
837
- } else {
838
- if (!remember) {
839
- recalculate();
840
- updatePosition().then(() => {
841
- setTimeout(() => updatePosition(), 20);
842
- });
836
+ });
837
+ setTimeout(() => {
838
+ const el = refElem.value;
839
+ if (el) {
840
+ el.removeAttribute("data-effect");
843
841
  }
844
- }
845
- });
846
- setTimeout(() => {
847
- const el = refElem.value;
848
- if (el) {
849
- el.removeAttribute("data-effect");
850
- }
851
- }, 350);
842
+ }, 350);
843
+ }
844
+ }
845
+ return (0, import_vue.nextTick)();
846
+ };
847
+ const selfClickEvent = (evnt) => {
848
+ const el = refElem.value;
849
+ if (props.maskClosable && evnt.target === el) {
850
+ const type = "mask";
851
+ closeModal(type);
852
+ }
853
+ };
854
+ const selfMouseoverEvent = () => {
855
+ const { msgTimeout } = internalData;
856
+ if (!msgTimeout) {
857
+ return;
852
858
  }
853
- }
854
- return (0, import_vue.nextTick)();
855
- };
856
- const selfClickEvent = (evnt) => {
857
- const el = refElem.value;
858
- if (props.maskClosable && evnt.target === el) {
859
- const type = "mask";
860
- closeModal(type);
861
- }
862
- };
863
- const selfMouseoverEvent = () => {
864
- const { msgTimeout } = internalData;
865
- if (!msgTimeout) {
866
- return;
867
- }
868
- const isMsg = computeIsMsg.value;
869
- if (isMsg) {
870
- clearTimeout(msgTimeout);
871
- internalData.msgTimeout = void 0;
872
- }
873
- };
874
- const selfMouseoutEvent = () => {
875
- const { msgTimeout } = internalData;
876
- if (!msgTimeout) {
877
859
  const isMsg = computeIsMsg.value;
878
860
  if (isMsg) {
879
- handleMsgAutoClose();
861
+ clearTimeout(msgTimeout);
862
+ internalData.msgTimeout = void 0;
880
863
  }
881
- }
882
- };
883
- const handleGlobalKeydownEvent = (evnt) => {
884
- const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
885
- if (isEsc) {
886
- const lastModal = import_xe_utils.default.max(
887
- import_store.allActiveModals.filter((item) => item.reactData.zoomStatus !== "minimize"),
888
- (item) => item.reactData.modalZindex
889
- );
890
- if (lastModal) {
891
- setTimeout(() => {
892
- if (lastModal === $xeModal && lastModal.props.escClosable) {
893
- const type = "exit";
894
- dispatchEvent("close", { type }, evnt);
895
- closeModal(type);
896
- }
897
- }, 10);
864
+ };
865
+ const selfMouseoutEvent = () => {
866
+ const { msgTimeout } = internalData;
867
+ if (!msgTimeout) {
868
+ const isMsg = computeIsMsg.value;
869
+ if (isMsg) {
870
+ handleMsgAutoClose();
871
+ }
898
872
  }
899
- }
900
- };
901
- const handleGlobalResizeEvent = () => {
902
- if (!internalData.isMoveStatus) {
903
- updatePosition();
904
- }
905
- };
906
- const isMinimized = () => {
907
- return reactData.zoomStatus === "minimize";
908
- };
909
- const isMaximized = () => {
910
- return reactData.zoomStatus === "maximize";
911
- };
912
- const handleRevert = () => {
913
- reactData.prevZoomStatus = reactData.zoomStatus;
914
- reactData.zoomStatus = "";
915
- return (0, import_vue.nextTick)().then(() => {
916
- const { revertLocat } = reactData;
917
- if (revertLocat) {
918
- const boxElem = getBox();
919
- reactData.revertLocat = null;
920
- if (boxElem) {
921
- Object.assign(boxElem.style, {
922
- top: `${revertLocat.top}px`,
923
- left: `${revertLocat.left}px`,
924
- width: `${revertLocat.width}px`,
925
- height: `${revertLocat.height}px`
873
+ };
874
+ const handleGlobalKeydownEvent = (evnt) => {
875
+ const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
876
+ if (isEsc) {
877
+ const lastModal = import_xe_utils.default.max(
878
+ import_store.allActiveModals.filter((item) => item.reactData.zoomStatus !== "minimize"),
879
+ (item) => item.reactData.modalZindex
880
+ );
881
+ if (lastModal) {
882
+ setTimeout(() => {
883
+ if (lastModal === $xeModal && lastModal.props.escClosable) {
884
+ const type = "exit";
885
+ dispatchEvent("close", { type }, evnt);
886
+ closeModal(type);
887
+ }
888
+ }, 10);
889
+ }
890
+ }
891
+ };
892
+ const handleGlobalResizeEvent = () => {
893
+ if (!internalData.isMoveStatus) {
894
+ updatePosition();
895
+ }
896
+ };
897
+ const isMinimized = () => {
898
+ return reactData.zoomStatus === "minimize";
899
+ };
900
+ const isMaximized = () => {
901
+ return reactData.zoomStatus === "maximize";
902
+ };
903
+ const handleRevert = () => {
904
+ reactData.prevZoomStatus = reactData.zoomStatus;
905
+ reactData.zoomStatus = "";
906
+ return (0, import_vue.nextTick)().then(() => {
907
+ const { revertLocat } = reactData;
908
+ if (revertLocat) {
909
+ const boxElem = getBox();
910
+ reactData.revertLocat = null;
911
+ if (boxElem) {
912
+ Object.assign(boxElem.style, {
913
+ top: `${revertLocat.top}px`,
914
+ left: `${revertLocat.left}px`,
915
+ width: `${revertLocat.width}px`,
916
+ height: `${revertLocat.height}px`
917
+ });
918
+ }
919
+ savePosStorage();
920
+ return (0, import_vue.nextTick)().then(() => {
921
+ return {
922
+ status: true
923
+ };
926
924
  });
927
925
  }
928
- savePosStorage();
929
- return (0, import_vue.nextTick)().then(() => {
926
+ return {
927
+ status: false
928
+ };
929
+ });
930
+ };
931
+ const handleZoom = (type) => {
932
+ const { zoomStatus } = reactData;
933
+ return new Promise((resolve) => {
934
+ if (type) {
935
+ if (type === "maximize") {
936
+ resolve(handleMaximize());
937
+ return;
938
+ }
939
+ if (type === "minimize") {
940
+ resolve(handleMinimize());
941
+ return;
942
+ }
943
+ resolve(handleRevert());
944
+ return;
945
+ }
946
+ resolve(zoomStatus ? handleRevert() : handleMaximize());
947
+ }).then(() => {
948
+ return reactData.zoomStatus || "revert";
949
+ });
950
+ };
951
+ const toggleZoomMinEvent = (evnt) => {
952
+ const { zoomStatus, prevZoomStatus } = reactData;
953
+ return handleZoom(zoomStatus === "minimize" ? prevZoomStatus || "revert" : "minimize").then((type) => {
954
+ const params = { type };
955
+ dispatchEvent("zoom", params, evnt);
956
+ });
957
+ };
958
+ const toggleZoomMaxEvent = (evnt) => {
959
+ return handleZoom().then((type) => {
960
+ const params = { type };
961
+ dispatchEvent("zoom", params, evnt);
962
+ });
963
+ };
964
+ const getPosition = () => {
965
+ const isMsg = computeIsMsg.value;
966
+ if (!isMsg) {
967
+ const boxElem = getBox();
968
+ if (boxElem) {
930
969
  return {
931
- status: true
970
+ top: boxElem.offsetTop,
971
+ left: boxElem.offsetLeft
932
972
  };
933
- });
973
+ }
934
974
  }
935
- return {
936
- status: false
937
- };
938
- });
939
- };
940
- const handleZoom = (type) => {
941
- const { zoomStatus } = reactData;
942
- return new Promise((resolve) => {
943
- if (type) {
944
- if (type === "maximize") {
945
- resolve(handleMaximize());
946
- return;
975
+ return null;
976
+ };
977
+ const setPosition = (top, left) => {
978
+ const isMsg = computeIsMsg.value;
979
+ if (!isMsg) {
980
+ const boxElem = getBox();
981
+ if (boxElem) {
982
+ if (import_xe_utils.default.isNumber(top)) {
983
+ boxElem.style.top = `${top}px`;
984
+ }
985
+ if (import_xe_utils.default.isNumber(left)) {
986
+ boxElem.style.left = `${left}px`;
987
+ }
947
988
  }
948
- if (type === "minimize") {
949
- resolve(handleMinimize());
989
+ }
990
+ return (0, import_vue.nextTick)();
991
+ };
992
+ const boxMousedownEvent = () => {
993
+ const { modalZindex } = reactData;
994
+ if (import_store.allActiveModals.some((comp) => comp.reactData.visible && comp.reactData.modalZindex > modalZindex)) {
995
+ updateZindex();
996
+ }
997
+ };
998
+ const mousedownEvent = (evnt) => {
999
+ const { storage, isWithinAppendTo } = props;
1000
+ const { zoomStatus } = reactData;
1001
+ const marginSize = import_xe_utils.default.toNumber(props.marginSize);
1002
+ const boxElem = getBox();
1003
+ if (!boxElem) {
1004
+ return;
1005
+ }
1006
+ if (zoomStatus !== "maximize" && evnt.button === 0 && !(0, import_dom.getEventTargetNode)(evnt, boxElem, "trigger--btn").flag) {
1007
+ evnt.preventDefault();
1008
+ const el = refElem.value;
1009
+ const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
1010
+ if (!parentWrapperEl) {
950
1011
  return;
951
1012
  }
952
- resolve(handleRevert());
1013
+ const visibleWidth = parentWrapperEl.clientWidth;
1014
+ const visibleHeight = parentWrapperEl.clientHeight;
1015
+ const disX = evnt.clientX - boxElem.offsetLeft;
1016
+ const disY = evnt.clientY - boxElem.offsetTop;
1017
+ document.onmousemove = (evnt2) => {
1018
+ evnt2.preventDefault();
1019
+ const offsetWidth = boxElem.offsetWidth;
1020
+ const offsetHeight = boxElem.offsetHeight;
1021
+ const minX = marginSize;
1022
+ const maxX = visibleWidth - offsetWidth - marginSize - 1;
1023
+ const minY = marginSize;
1024
+ const maxY = visibleHeight - offsetHeight - marginSize - 1;
1025
+ let left = evnt2.clientX - disX;
1026
+ let top = evnt2.clientY - disY;
1027
+ if (left > maxX) {
1028
+ left = maxX;
1029
+ }
1030
+ if (left < minX) {
1031
+ left = minX;
1032
+ }
1033
+ if (top > maxY) {
1034
+ top = maxY;
1035
+ }
1036
+ if (top < minY) {
1037
+ top = minY;
1038
+ }
1039
+ boxElem.style.left = `${left}px`;
1040
+ boxElem.style.top = `${top}px`;
1041
+ boxElem.className = boxElem.className.replace(/\s?is--drag/, "") + " is--drag";
1042
+ dispatchEvent("move", { type: "move" }, evnt2);
1043
+ internalData.isMoveStatus = true;
1044
+ reactData.resizeFlag++;
1045
+ };
1046
+ document.onmouseup = () => {
1047
+ document.onmousemove = null;
1048
+ document.onmouseup = null;
1049
+ if (storage) {
1050
+ (0, import_vue.nextTick)(() => {
1051
+ savePosStorage();
1052
+ });
1053
+ }
1054
+ reactData.resizeFlag++;
1055
+ setTimeout(() => {
1056
+ boxElem.className = boxElem.className.replace(/\s?is--drag/, "");
1057
+ }, 50);
1058
+ };
1059
+ }
1060
+ };
1061
+ const dragEvent = (evnt) => {
1062
+ evnt.preventDefault();
1063
+ const { minWidth, minHeight, storage, isWithinAppendTo } = props;
1064
+ const el = refElem.value;
1065
+ const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
1066
+ if (!parentWrapperEl) {
953
1067
  return;
954
1068
  }
955
- resolve(zoomStatus ? handleRevert() : handleMaximize());
956
- }).then(() => {
957
- return reactData.zoomStatus || "revert";
958
- });
959
- };
960
- const toggleZoomMinEvent = (evnt) => {
961
- const { zoomStatus, prevZoomStatus } = reactData;
962
- return handleZoom(zoomStatus === "minimize" ? prevZoomStatus || "revert" : "minimize").then((type) => {
963
- const params = { type };
964
- dispatchEvent("zoom", params, evnt);
965
- });
966
- };
967
- const toggleZoomMaxEvent = (evnt) => {
968
- return handleZoom().then((type) => {
969
- const params = { type };
970
- dispatchEvent("zoom", params, evnt);
971
- });
972
- };
973
- const getPosition = () => {
974
- const isMsg = computeIsMsg.value;
975
- if (!isMsg) {
1069
+ const visibleWidth = parentWrapperEl.clientWidth;
1070
+ const visibleHeight = parentWrapperEl.clientHeight;
1071
+ const marginSize = import_xe_utils.default.toNumber(props.marginSize);
1072
+ const targetElem = evnt.target;
1073
+ const type = targetElem.getAttribute("data-type");
1074
+ const dragMinWidth = (0, import_dom.isScale)(minWidth) ? import_xe_utils.default.toNumber(minWidth) * visibleWidth / 100 : import_xe_utils.default.toNumber(minWidth);
1075
+ const dragMinHeight = (0, import_dom.isScale)(minHeight) ? import_xe_utils.default.toNumber(minHeight) * visibleHeight / 100 : import_xe_utils.default.toNumber(minHeight);
1076
+ const maxWidth = visibleWidth;
1077
+ const maxHeight = visibleHeight;
976
1078
  const boxElem = getBox();
977
- if (boxElem) {
978
- return {
979
- top: boxElem.offsetTop,
980
- left: boxElem.offsetLeft
981
- };
1079
+ const clientWidth = boxElem.clientWidth;
1080
+ const clientHeight = boxElem.clientHeight;
1081
+ const disX = evnt.clientX;
1082
+ const disY = evnt.clientY;
1083
+ const offsetTop = boxElem.offsetTop;
1084
+ const offsetLeft = boxElem.offsetLeft;
1085
+ const params = { type: "resize" };
1086
+ document.onmousemove = (evnt2) => {
1087
+ evnt2.preventDefault();
1088
+ let dragLeft;
1089
+ let dragTop;
1090
+ let width;
1091
+ let height;
1092
+ switch (type) {
1093
+ case "wl":
1094
+ dragLeft = disX - evnt2.clientX;
1095
+ width = dragLeft + clientWidth;
1096
+ if (offsetLeft - dragLeft > marginSize) {
1097
+ if (width > dragMinWidth) {
1098
+ boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1099
+ boxElem.style.left = `${offsetLeft - dragLeft}px`;
1100
+ }
1101
+ }
1102
+ break;
1103
+ case "swst":
1104
+ dragLeft = disX - evnt2.clientX;
1105
+ dragTop = disY - evnt2.clientY;
1106
+ width = dragLeft + clientWidth;
1107
+ height = dragTop + clientHeight;
1108
+ if (offsetLeft - dragLeft > marginSize) {
1109
+ if (width > dragMinWidth) {
1110
+ boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1111
+ boxElem.style.left = `${offsetLeft - dragLeft}px`;
1112
+ }
1113
+ }
1114
+ if (offsetTop - dragTop > marginSize) {
1115
+ if (height > dragMinHeight) {
1116
+ boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1117
+ boxElem.style.top = `${offsetTop - dragTop}px`;
1118
+ }
1119
+ }
1120
+ break;
1121
+ case "swlb":
1122
+ dragLeft = disX - evnt2.clientX;
1123
+ dragTop = evnt2.clientY - disY;
1124
+ width = dragLeft + clientWidth;
1125
+ height = dragTop + clientHeight;
1126
+ if (offsetLeft - dragLeft > marginSize) {
1127
+ if (width > dragMinWidth) {
1128
+ boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1129
+ boxElem.style.left = `${offsetLeft - dragLeft}px`;
1130
+ }
1131
+ }
1132
+ if (offsetTop + height + marginSize < visibleHeight) {
1133
+ if (height > dragMinHeight) {
1134
+ boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1135
+ }
1136
+ }
1137
+ break;
1138
+ case "st":
1139
+ dragTop = disY - evnt2.clientY;
1140
+ height = clientHeight + dragTop;
1141
+ if (offsetTop - dragTop > marginSize) {
1142
+ if (height > dragMinHeight) {
1143
+ boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1144
+ boxElem.style.top = `${offsetTop - dragTop}px`;
1145
+ }
1146
+ }
1147
+ break;
1148
+ case "wr":
1149
+ dragLeft = evnt2.clientX - disX;
1150
+ width = dragLeft + clientWidth;
1151
+ if (offsetLeft + width + marginSize < visibleWidth) {
1152
+ if (width > dragMinWidth) {
1153
+ boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1154
+ }
1155
+ }
1156
+ break;
1157
+ case "sest":
1158
+ dragLeft = evnt2.clientX - disX;
1159
+ dragTop = disY - evnt2.clientY;
1160
+ width = dragLeft + clientWidth;
1161
+ height = dragTop + clientHeight;
1162
+ if (offsetLeft + width + marginSize < visibleWidth) {
1163
+ if (width > dragMinWidth) {
1164
+ boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1165
+ }
1166
+ }
1167
+ if (offsetTop - dragTop > marginSize) {
1168
+ if (height > dragMinHeight) {
1169
+ boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1170
+ boxElem.style.top = `${offsetTop - dragTop}px`;
1171
+ }
1172
+ }
1173
+ break;
1174
+ case "selb":
1175
+ dragLeft = evnt2.clientX - disX;
1176
+ dragTop = evnt2.clientY - disY;
1177
+ width = dragLeft + clientWidth;
1178
+ height = dragTop + clientHeight;
1179
+ if (offsetLeft + width + marginSize < visibleWidth) {
1180
+ if (width > dragMinWidth) {
1181
+ boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1182
+ }
1183
+ }
1184
+ if (offsetTop + height + marginSize < visibleHeight) {
1185
+ if (height > dragMinHeight) {
1186
+ boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1187
+ }
1188
+ }
1189
+ break;
1190
+ case "sb":
1191
+ dragTop = evnt2.clientY - disY;
1192
+ height = dragTop + clientHeight;
1193
+ if (offsetTop + height + marginSize < visibleHeight) {
1194
+ if (height > dragMinHeight) {
1195
+ boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1196
+ }
1197
+ }
1198
+ break;
1199
+ }
1200
+ boxElem.className = boxElem.className.replace(/\s?is--drag/, "") + " is--drag";
1201
+ if (storage) {
1202
+ savePosStorage();
1203
+ }
1204
+ dispatchEvent("resize", params, evnt2);
1205
+ };
1206
+ document.onmouseup = () => {
1207
+ reactData.revertLocat = null;
1208
+ document.onmousemove = null;
1209
+ document.onmouseup = null;
1210
+ setTimeout(() => {
1211
+ boxElem.className = boxElem.className.replace(/\s?is--drag/, "");
1212
+ }, 50);
1213
+ };
1214
+ };
1215
+ const dispatchEvent = (type, params, evnt) => {
1216
+ emit(type, createEvent(evnt, { $modal: $xeModal }, params));
1217
+ };
1218
+ const emitModel = (value) => {
1219
+ emit("update:modelValue", value);
1220
+ };
1221
+ const modalMethods = {
1222
+ dispatchEvent,
1223
+ open: openModal,
1224
+ close() {
1225
+ return closeModal("close");
1226
+ },
1227
+ getBox,
1228
+ getPosition,
1229
+ setPosition,
1230
+ isMinimized,
1231
+ isMaximized,
1232
+ zoom() {
1233
+ return handleZoom();
1234
+ },
1235
+ minimize() {
1236
+ const { visible } = reactData;
1237
+ const isModal = computeIsModal.value;
1238
+ if (!isModal || !visible) {
1239
+ return Promise.resolve({
1240
+ status: false
1241
+ });
1242
+ }
1243
+ return handleMinimize();
1244
+ },
1245
+ maximize() {
1246
+ const { visible } = reactData;
1247
+ const isModal = computeIsModal.value;
1248
+ if (!isModal || !visible) {
1249
+ return Promise.resolve({
1250
+ status: false
1251
+ });
1252
+ }
1253
+ return handleMaximize();
1254
+ },
1255
+ revert() {
1256
+ const { visible } = reactData;
1257
+ const isModal = computeIsModal.value;
1258
+ if (!isModal || !visible) {
1259
+ return Promise.resolve({
1260
+ status: false
1261
+ });
1262
+ }
1263
+ return handleRevert();
982
1264
  }
983
- }
984
- return null;
985
- };
986
- const setPosition = (top, left) => {
987
- const isMsg = computeIsMsg.value;
988
- if (!isMsg) {
989
- const boxElem = getBox();
990
- if (boxElem) {
991
- if (import_xe_utils.default.isNumber(top)) {
992
- boxElem.style.top = `${top}px`;
1265
+ };
1266
+ Object.assign($xeModal, modalMethods);
1267
+ const renderTitles = () => {
1268
+ const { slots: propSlots = {}, showClose, showZoom, showMaximize, showMinimize, title } = props;
1269
+ const { zoomStatus } = reactData;
1270
+ const titleSlot = slots.title || propSlots.title;
1271
+ const cornerSlot = slots.corner || propSlots.corner;
1272
+ const isMinimizeStatus = computeIsMinimizeStatus.value;
1273
+ const isMaximizeStatus = computeIsMaximizeStatus.value;
1274
+ return [
1275
+ (0, import_vue.h)(
1276
+ "div",
1277
+ {
1278
+ class: "vxe-modal--header-title"
1279
+ },
1280
+ titleSlot ? (0, import_vn.getSlotVNs)(
1281
+ titleSlot({
1282
+ $modal: $xeModal,
1283
+ minimized: isMinimizeStatus,
1284
+ maximized: isMaximizeStatus
1285
+ })
1286
+ ) : title ? (0, import_utils.getFuncText)(title) : getI18n("vxe.alert.title")
1287
+ ),
1288
+ (0, import_vue.h)(
1289
+ "div",
1290
+ {
1291
+ class: "vxe-modal--header-right"
1292
+ },
1293
+ [
1294
+ cornerSlot && !isMinimizeStatus ? (0, import_vue.h)(
1295
+ "div",
1296
+ {
1297
+ class: "vxe-modal--corner-wrapper"
1298
+ },
1299
+ (0, import_vn.getSlotVNs)(cornerSlot({ $modal: $xeModal }))
1300
+ ) : renderEmptyElement($xeModal),
1301
+ (import_xe_utils.default.isBoolean(showMinimize) ? showMinimize : showZoom) ? (0, import_vue.h)(
1302
+ "div",
1303
+ {
1304
+ class: ["vxe-modal--zoom-btn", "trigger--btn"],
1305
+ title: getI18n(`vxe.modal.zoom${zoomStatus === "minimize" ? "Out" : "Min"}`),
1306
+ onClick: toggleZoomMinEvent
1307
+ },
1308
+ [
1309
+ (0, import_vue.h)("i", {
1310
+ class: zoomStatus === "minimize" ? getIcon().MODAL_ZOOM_REVERT : getIcon().MODAL_ZOOM_MIN
1311
+ })
1312
+ ]
1313
+ ) : renderEmptyElement($xeModal),
1314
+ (import_xe_utils.default.isBoolean(showMaximize) ? showMaximize : showZoom) && zoomStatus !== "minimize" ? (0, import_vue.h)(
1315
+ "div",
1316
+ {
1317
+ class: ["vxe-modal--zoom-btn", "trigger--btn"],
1318
+ title: getI18n(`vxe.modal.zoom${zoomStatus === "maximize" ? "Out" : "In"}`),
1319
+ onClick: toggleZoomMaxEvent
1320
+ },
1321
+ [
1322
+ (0, import_vue.h)("i", {
1323
+ class: zoomStatus === "maximize" ? getIcon().MODAL_ZOOM_OUT : getIcon().MODAL_ZOOM_IN
1324
+ })
1325
+ ]
1326
+ ) : renderEmptyElement($xeModal),
1327
+ showClose ? (0, import_vue.h)(
1328
+ "div",
1329
+ {
1330
+ class: ["vxe-modal--close-btn", "trigger--btn"],
1331
+ title: getI18n("vxe.modal.close"),
1332
+ onClick: closeEvent
1333
+ },
1334
+ [
1335
+ (0, import_vue.h)("i", {
1336
+ class: getIcon().MODAL_CLOSE
1337
+ })
1338
+ ]
1339
+ ) : renderEmptyElement($xeModal)
1340
+ ]
1341
+ )
1342
+ ];
1343
+ };
1344
+ const renderHeader = () => {
1345
+ const { slots: propSlots = {}, showZoom, showMaximize, draggable } = props;
1346
+ const headerSlot = slots.header || propSlots.header;
1347
+ if (props.showHeader) {
1348
+ const headerOns = {};
1349
+ if (draggable) {
1350
+ headerOns.onMousedown = mousedownEvent;
993
1351
  }
994
- if (import_xe_utils.default.isNumber(left)) {
995
- boxElem.style.left = `${left}px`;
1352
+ if ((import_xe_utils.default.isBoolean(showMaximize) ? showMaximize : showZoom) && props.dblclickZoom && props.type === "modal") {
1353
+ headerOns.onDblclick = toggleZoomMaxEvent;
996
1354
  }
1355
+ return (0, import_vue.h)(
1356
+ "div",
1357
+ {
1358
+ ref: refHeaderElem,
1359
+ class: [
1360
+ "vxe-modal--header",
1361
+ {
1362
+ "is--ellipsis": props.showTitleOverflow
1363
+ }
1364
+ ],
1365
+ ...headerOns
1366
+ },
1367
+ headerSlot ? (0, import_vn.getSlotVNs)(headerSlot({ $modal: $xeModal })) : renderTitles()
1368
+ );
997
1369
  }
998
- }
999
- return (0, import_vue.nextTick)();
1000
- };
1001
- const boxMousedownEvent = () => {
1002
- const { modalZindex } = reactData;
1003
- if (import_store.allActiveModals.some((comp) => comp.reactData.visible && comp.reactData.modalZindex > modalZindex)) {
1004
- updateZindex();
1005
- }
1006
- };
1007
- const mousedownEvent = (evnt) => {
1008
- const { storage, isWithinAppendTo } = props;
1009
- const { zoomStatus } = reactData;
1010
- const marginSize = import_xe_utils.default.toNumber(props.marginSize);
1011
- const boxElem = getBox();
1012
- if (!boxElem) {
1013
- return;
1014
- }
1015
- if (zoomStatus !== "maximize" && evnt.button === 0 && !(0, import_dom.getEventTargetNode)(evnt, boxElem, "trigger--btn").flag) {
1016
- evnt.preventDefault();
1017
- const el = refElem.value;
1018
- const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
1019
- if (!parentWrapperEl) {
1020
- return;
1370
+ return renderEmptyElement($xeModal);
1371
+ };
1372
+ const renderBody = () => {
1373
+ const { slots: propSlots = {}, status, message, iconStatus, useHtml } = props;
1374
+ const content = props.content || message;
1375
+ const isVScrollbar = computeIsVScrollbar.value;
1376
+ const isMsg = computeIsMsg.value;
1377
+ const scrollbarProps = computeScrollbarProps.value;
1378
+ const defaultSlot = slots.default || propSlots.default;
1379
+ const leftSlot = slots.left || propSlots.left;
1380
+ const rightSlot = slots.right || propSlots.right;
1381
+ const contVNs = [];
1382
+ if (!isMsg && (status || iconStatus)) {
1383
+ contVNs.push(
1384
+ (0, import_vue.h)(
1385
+ "div",
1386
+ {
1387
+ class: "vxe-modal--status-wrapper"
1388
+ },
1389
+ [
1390
+ (0, import_vue.h)("i", {
1391
+ class: ["vxe-modal--status-icon", iconStatus || getIcon()[`MODAL_${status}`.toLocaleUpperCase()]]
1392
+ })
1393
+ ]
1394
+ )
1395
+ );
1021
1396
  }
1022
- const visibleWidth = parentWrapperEl.clientWidth;
1023
- const visibleHeight = parentWrapperEl.clientHeight;
1024
- const disX = evnt.clientX - boxElem.offsetLeft;
1025
- const disY = evnt.clientY - boxElem.offsetTop;
1026
- document.onmousemove = (evnt2) => {
1027
- evnt2.preventDefault();
1028
- const offsetWidth = boxElem.offsetWidth;
1029
- const offsetHeight = boxElem.offsetHeight;
1030
- const minX = marginSize;
1031
- const maxX = visibleWidth - offsetWidth - marginSize - 1;
1032
- const minY = marginSize;
1033
- const maxY = visibleHeight - offsetHeight - marginSize - 1;
1034
- let left = evnt2.clientX - disX;
1035
- let top = evnt2.clientY - disY;
1036
- if (left > maxX) {
1037
- left = maxX;
1038
- }
1039
- if (left < minX) {
1040
- left = minX;
1041
- }
1042
- if (top > maxY) {
1043
- top = maxY;
1044
- }
1045
- if (top < minY) {
1046
- top = minY;
1047
- }
1048
- boxElem.style.left = `${left}px`;
1049
- boxElem.style.top = `${top}px`;
1050
- boxElem.className = boxElem.className.replace(/\s?is--drag/, "") + " is--drag";
1051
- dispatchEvent("move", { type: "move" }, evnt2);
1052
- internalData.isMoveStatus = true;
1053
- reactData.resizeFlag++;
1054
- };
1055
- document.onmouseup = () => {
1056
- document.onmousemove = null;
1057
- document.onmouseup = null;
1058
- if (storage) {
1059
- (0, import_vue.nextTick)(() => {
1060
- savePosStorage();
1061
- });
1062
- }
1063
- reactData.resizeFlag++;
1064
- setTimeout(() => {
1065
- boxElem.className = boxElem.className.replace(/\s?is--drag/, "");
1066
- }, 50);
1067
- };
1068
- }
1069
- };
1070
- const dragEvent = (evnt) => {
1071
- evnt.preventDefault();
1072
- const { minWidth, minHeight, storage, isWithinAppendTo } = props;
1073
- const el = refElem.value;
1074
- const parentWrapperEl = (0, import_dom.getPopupWrapperElement)(isWithinAppendTo ? el : document.body);
1075
- if (!parentWrapperEl) {
1076
- return;
1077
- }
1078
- const visibleWidth = parentWrapperEl.clientWidth;
1079
- const visibleHeight = parentWrapperEl.clientHeight;
1080
- const marginSize = import_xe_utils.default.toNumber(props.marginSize);
1081
- const targetElem = evnt.target;
1082
- const type = targetElem.getAttribute("data-type");
1083
- const dragMinWidth = (0, import_dom.isScale)(minWidth) ? import_xe_utils.default.toNumber(minWidth) * visibleWidth / 100 : import_xe_utils.default.toNumber(minWidth);
1084
- const dragMinHeight = (0, import_dom.isScale)(minHeight) ? import_xe_utils.default.toNumber(minHeight) * visibleHeight / 100 : import_xe_utils.default.toNumber(minHeight);
1085
- const maxWidth = visibleWidth;
1086
- const maxHeight = visibleHeight;
1087
- const boxElem = getBox();
1088
- const clientWidth = boxElem.clientWidth;
1089
- const clientHeight = boxElem.clientHeight;
1090
- const disX = evnt.clientX;
1091
- const disY = evnt.clientY;
1092
- const offsetTop = boxElem.offsetTop;
1093
- const offsetLeft = boxElem.offsetLeft;
1094
- const params = { type: "resize" };
1095
- document.onmousemove = (evnt2) => {
1096
- evnt2.preventDefault();
1097
- let dragLeft;
1098
- let dragTop;
1099
- let width;
1100
- let height;
1101
- switch (type) {
1102
- case "wl":
1103
- dragLeft = disX - evnt2.clientX;
1104
- width = dragLeft + clientWidth;
1105
- if (offsetLeft - dragLeft > marginSize) {
1106
- if (width > dragMinWidth) {
1107
- boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1108
- boxElem.style.left = `${offsetLeft - dragLeft}px`;
1109
- }
1110
- }
1111
- break;
1112
- case "swst":
1113
- dragLeft = disX - evnt2.clientX;
1114
- dragTop = disY - evnt2.clientY;
1115
- width = dragLeft + clientWidth;
1116
- height = dragTop + clientHeight;
1117
- if (offsetLeft - dragLeft > marginSize) {
1118
- if (width > dragMinWidth) {
1119
- boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1120
- boxElem.style.left = `${offsetLeft - dragLeft}px`;
1121
- }
1122
- }
1123
- if (offsetTop - dragTop > marginSize) {
1124
- if (height > dragMinHeight) {
1125
- boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1126
- boxElem.style.top = `${offsetTop - dragTop}px`;
1127
- }
1128
- }
1129
- break;
1130
- case "swlb":
1131
- dragLeft = disX - evnt2.clientX;
1132
- dragTop = evnt2.clientY - disY;
1133
- width = dragLeft + clientWidth;
1134
- height = dragTop + clientHeight;
1135
- if (offsetLeft - dragLeft > marginSize) {
1136
- if (width > dragMinWidth) {
1137
- boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1138
- boxElem.style.left = `${offsetLeft - dragLeft}px`;
1139
- }
1140
- }
1141
- if (offsetTop + height + marginSize < visibleHeight) {
1142
- if (height > dragMinHeight) {
1143
- boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1144
- }
1145
- }
1146
- break;
1147
- case "st":
1148
- dragTop = disY - evnt2.clientY;
1149
- height = clientHeight + dragTop;
1150
- if (offsetTop - dragTop > marginSize) {
1151
- if (height > dragMinHeight) {
1152
- boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1153
- boxElem.style.top = `${offsetTop - dragTop}px`;
1154
- }
1155
- }
1156
- break;
1157
- case "wr":
1158
- dragLeft = evnt2.clientX - disX;
1159
- width = dragLeft + clientWidth;
1160
- if (offsetLeft + width + marginSize < visibleWidth) {
1161
- if (width > dragMinWidth) {
1162
- boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1163
- }
1164
- }
1165
- break;
1166
- case "sest":
1167
- dragLeft = evnt2.clientX - disX;
1168
- dragTop = disY - evnt2.clientY;
1169
- width = dragLeft + clientWidth;
1170
- height = dragTop + clientHeight;
1171
- if (offsetLeft + width + marginSize < visibleWidth) {
1172
- if (width > dragMinWidth) {
1173
- boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1174
- }
1175
- }
1176
- if (offsetTop - dragTop > marginSize) {
1177
- if (height > dragMinHeight) {
1178
- boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1179
- boxElem.style.top = `${offsetTop - dragTop}px`;
1180
- }
1181
- }
1182
- break;
1183
- case "selb":
1184
- dragLeft = evnt2.clientX - disX;
1185
- dragTop = evnt2.clientY - disY;
1186
- width = dragLeft + clientWidth;
1187
- height = dragTop + clientHeight;
1188
- if (offsetLeft + width + marginSize < visibleWidth) {
1189
- if (width > dragMinWidth) {
1190
- boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
1191
- }
1192
- }
1193
- if (offsetTop + height + marginSize < visibleHeight) {
1194
- if (height > dragMinHeight) {
1195
- boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1397
+ if (useHtml && !defaultSlot) {
1398
+ contVNs.push(
1399
+ isVScrollbar ? (0, import_vue.h)(
1400
+ import_scrollbar.default,
1401
+ {
1402
+ key: "shc",
1403
+ class: "vxe-modal--scrollbar-content",
1404
+ ...scrollbarProps
1405
+ },
1406
+ {
1407
+ default() {
1408
+ return [
1409
+ (0, import_vue.h)("div", {
1410
+ class: "vxe-modal--scrollbar-content-html",
1411
+ innerHTML: (0, import_utils.getFuncText)(content)
1412
+ })
1413
+ ];
1414
+ }
1196
1415
  }
1197
- }
1198
- break;
1199
- case "sb":
1200
- dragTop = evnt2.clientY - disY;
1201
- height = dragTop + clientHeight;
1202
- if (offsetTop + height + marginSize < visibleHeight) {
1203
- if (height > dragMinHeight) {
1204
- boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
1416
+ ) : (0, import_vue.h)("div", {
1417
+ key: "hc",
1418
+ class: "vxe-modal--content",
1419
+ innerHTML: (0, import_utils.getFuncText)(content)
1420
+ })
1421
+ );
1422
+ } else {
1423
+ contVNs.push(
1424
+ isVScrollbar ? (0, import_vue.h)(
1425
+ import_scrollbar.default,
1426
+ {
1427
+ key: "sdc",
1428
+ class: "vxe-modal--scrollbar-content",
1429
+ ...scrollbarProps
1430
+ },
1431
+ {
1432
+ default: () => defaultSlot ? (0, import_vn.getSlotVNs)(defaultSlot({ $modal: $xeModal })) : (0, import_utils.getFuncText)(content)
1205
1433
  }
1206
- }
1207
- break;
1208
- }
1209
- boxElem.className = boxElem.className.replace(/\s?is--drag/, "") + " is--drag";
1210
- if (storage) {
1211
- savePosStorage();
1212
- }
1213
- dispatchEvent("resize", params, evnt2);
1214
- };
1215
- document.onmouseup = () => {
1216
- reactData.revertLocat = null;
1217
- document.onmousemove = null;
1218
- document.onmouseup = null;
1219
- setTimeout(() => {
1220
- boxElem.className = boxElem.className.replace(/\s?is--drag/, "");
1221
- }, 50);
1222
- };
1223
- };
1224
- const dispatchEvent = (type, params, evnt) => {
1225
- emit(type, createEvent(evnt, { $modal: $xeModal }, params));
1226
- };
1227
- const emitModel = (value) => {
1228
- emit("update:modelValue", value);
1229
- };
1230
- const modalMethods = {
1231
- dispatchEvent,
1232
- open: openModal,
1233
- close() {
1234
- return closeModal("close");
1235
- },
1236
- getBox,
1237
- getPosition,
1238
- setPosition,
1239
- isMinimized,
1240
- isMaximized,
1241
- zoom() {
1242
- return handleZoom();
1243
- },
1244
- minimize() {
1245
- const { visible } = reactData;
1246
- const isModal = computeIsModal.value;
1247
- if (!isModal || !visible) {
1248
- return Promise.resolve({
1249
- status: false
1250
- });
1251
- }
1252
- return handleMinimize();
1253
- },
1254
- maximize() {
1255
- const { visible } = reactData;
1256
- const isModal = computeIsModal.value;
1257
- if (!isModal || !visible) {
1258
- return Promise.resolve({
1259
- status: false
1260
- });
1261
- }
1262
- return handleMaximize();
1263
- },
1264
- revert() {
1265
- const { visible } = reactData;
1266
- const isModal = computeIsModal.value;
1267
- if (!isModal || !visible) {
1268
- return Promise.resolve({
1269
- status: false
1270
- });
1434
+ ) : (0, import_vue.h)(
1435
+ "div",
1436
+ {
1437
+ key: "dc",
1438
+ class: "vxe-modal--content"
1439
+ },
1440
+ defaultSlot ? (0, import_vn.getSlotVNs)(defaultSlot({ $modal: $xeModal })) : (0, import_utils.getFuncText)(content)
1441
+ )
1442
+ );
1271
1443
  }
1272
- return handleRevert();
1273
- }
1274
- };
1275
- Object.assign($xeModal, modalMethods);
1276
- const renderTitles = () => {
1277
- const { slots: propSlots = {}, showClose, showZoom, showMaximize, showMinimize, title } = props;
1278
- const { zoomStatus } = reactData;
1279
- const titleSlot = slots.title || propSlots.title;
1280
- const cornerSlot = slots.corner || propSlots.corner;
1281
- const isMinimizeStatus = computeIsMinimizeStatus.value;
1282
- const isMaximizeStatus = computeIsMaximizeStatus.value;
1283
- return [
1284
- (0, import_vue.h)(
1285
- "div",
1286
- {
1287
- class: "vxe-modal--header-title"
1288
- },
1289
- titleSlot ? (0, import_vn.getSlotVNs)(
1290
- titleSlot({
1291
- $modal: $xeModal,
1292
- minimized: isMinimizeStatus,
1293
- maximized: isMaximizeStatus
1294
- })
1295
- ) : title ? (0, import_utils.getFuncText)(title) : getI18n("vxe.alert.title")
1296
- ),
1297
- (0, import_vue.h)(
1444
+ return (0, import_vue.h)(
1298
1445
  "div",
1299
1446
  {
1300
- class: "vxe-modal--header-right"
1447
+ class: "vxe-modal--body"
1301
1448
  },
1302
1449
  [
1303
- cornerSlot && !isMinimizeStatus ? (0, import_vue.h)(
1450
+ leftSlot ? (0, import_vue.h)(
1304
1451
  "div",
1305
1452
  {
1306
- class: "vxe-modal--corner-wrapper"
1453
+ class: "vxe-modal--body-left"
1307
1454
  },
1308
- (0, import_vn.getSlotVNs)(cornerSlot({ $modal: $xeModal }))
1455
+ (0, import_vn.getSlotVNs)(leftSlot({ $modal: $xeModal }))
1309
1456
  ) : renderEmptyElement($xeModal),
1310
- (import_xe_utils.default.isBoolean(showMinimize) ? showMinimize : showZoom) ? (0, import_vue.h)(
1457
+ (0, import_vue.h)(
1311
1458
  "div",
1312
1459
  {
1313
- class: ["vxe-modal--zoom-btn", "trigger--btn"],
1314
- title: getI18n(`vxe.modal.zoom${zoomStatus === "minimize" ? "Out" : "Min"}`),
1315
- onClick: toggleZoomMinEvent
1460
+ class: "vxe-modal--body-default"
1316
1461
  },
1317
- [
1318
- (0, import_vue.h)("i", {
1319
- class: zoomStatus === "minimize" ? getIcon().MODAL_ZOOM_REVERT : getIcon().MODAL_ZOOM_MIN
1320
- })
1321
- ]
1322
- ) : renderEmptyElement($xeModal),
1323
- (import_xe_utils.default.isBoolean(showMaximize) ? showMaximize : showZoom) && zoomStatus !== "minimize" ? (0, import_vue.h)(
1462
+ contVNs
1463
+ ),
1464
+ rightSlot ? (0, import_vue.h)(
1324
1465
  "div",
1325
1466
  {
1326
- class: ["vxe-modal--zoom-btn", "trigger--btn"],
1327
- title: getI18n(`vxe.modal.zoom${zoomStatus === "maximize" ? "Out" : "In"}`),
1328
- onClick: toggleZoomMaxEvent
1467
+ class: "vxe-modal--body-right"
1329
1468
  },
1330
- [
1331
- (0, import_vue.h)("i", {
1332
- class: zoomStatus === "maximize" ? getIcon().MODAL_ZOOM_OUT : getIcon().MODAL_ZOOM_IN
1333
- })
1334
- ]
1469
+ (0, import_vn.getSlotVNs)(rightSlot({ $modal: $xeModal }))
1335
1470
  ) : renderEmptyElement($xeModal),
1336
- showClose ? (0, import_vue.h)(
1337
- "div",
1338
- {
1339
- class: ["vxe-modal--close-btn", "trigger--btn"],
1340
- title: getI18n("vxe.modal.close"),
1341
- onClick: closeEvent
1342
- },
1343
- [
1344
- (0, import_vue.h)("i", {
1345
- class: getIcon().MODAL_CLOSE
1346
- })
1347
- ]
1348
- ) : renderEmptyElement($xeModal)
1471
+ isMsg ? renderEmptyElement($xeModal) : (0, import_vue.h)(import_loading.default, {
1472
+ class: "vxe-modal--loading",
1473
+ modelValue: props.loading
1474
+ })
1349
1475
  ]
1350
- )
1351
- ];
1352
- };
1353
- const renderHeader = () => {
1354
- const { slots: propSlots = {}, showZoom, showMaximize, draggable } = props;
1355
- const headerSlot = slots.header || propSlots.header;
1356
- if (props.showHeader) {
1357
- const headerOns = {};
1358
- if (draggable) {
1359
- headerOns.onMousedown = mousedownEvent;
1476
+ );
1477
+ };
1478
+ const renderDefaultFooter = () => {
1479
+ const { slots: propSlots = {}, showCancelButton, showConfirmButton, type, loading } = props;
1480
+ const lfSlot = slots.leftfoot || propSlots.leftfoot;
1481
+ const rfSlot = slots.rightfoot || propSlots.rightfoot;
1482
+ const btnVNs = [];
1483
+ if (import_xe_utils.default.isBoolean(showCancelButton) ? showCancelButton : type === "confirm") {
1484
+ btnVNs.push(
1485
+ (0, import_vue.h)(import_button.default, {
1486
+ key: 1,
1487
+ ref: refCancelBtn,
1488
+ content: props.cancelButtonText || getI18n("vxe.button.cancel"),
1489
+ onClick: cancelEvent
1490
+ })
1491
+ );
1360
1492
  }
1361
- if ((import_xe_utils.default.isBoolean(showMaximize) ? showMaximize : showZoom) && props.dblclickZoom && props.type === "modal") {
1362
- headerOns.onDblclick = toggleZoomMaxEvent;
1493
+ if (import_xe_utils.default.isBoolean(showConfirmButton) ? showConfirmButton : type === "confirm" || type === "alert") {
1494
+ btnVNs.push(
1495
+ (0, import_vue.h)(import_button.default, {
1496
+ key: 2,
1497
+ ref: refConfirmBtn,
1498
+ loading,
1499
+ status: "primary",
1500
+ content: props.confirmButtonText || getI18n("vxe.button.confirm"),
1501
+ onClick: confirmEvent
1502
+ })
1503
+ );
1363
1504
  }
1364
1505
  return (0, import_vue.h)(
1365
1506
  "div",
1366
1507
  {
1367
- ref: refHeaderElem,
1368
- class: [
1369
- "vxe-modal--header",
1370
- {
1371
- "is--ellipsis": props.showTitleOverflow
1372
- }
1373
- ],
1374
- ...headerOns
1508
+ class: "vxe-modal--footer-wrapper"
1375
1509
  },
1376
- headerSlot ? (0, import_vn.getSlotVNs)(headerSlot({ $modal: $xeModal })) : renderTitles()
1377
- );
1378
- }
1379
- return renderEmptyElement($xeModal);
1380
- };
1381
- const renderBody = () => {
1382
- const { slots: propSlots = {}, status, message, iconStatus, useHtml } = props;
1383
- const content = props.content || message;
1384
- const isVScrollbar = computeIsVScrollbar.value;
1385
- const isMsg = computeIsMsg.value;
1386
- const scrollbarProps = computeScrollbarProps.value;
1387
- const defaultSlot = slots.default || propSlots.default;
1388
- const leftSlot = slots.left || propSlots.left;
1389
- const rightSlot = slots.right || propSlots.right;
1390
- const contVNs = [];
1391
- if (!isMsg && (status || iconStatus)) {
1392
- contVNs.push(
1393
- (0, import_vue.h)(
1394
- "div",
1395
- {
1396
- class: "vxe-modal--status-wrapper"
1397
- },
1398
- [
1399
- (0, import_vue.h)("i", {
1400
- class: ["vxe-modal--status-icon", iconStatus || getIcon()[`MODAL_${status}`.toLocaleUpperCase()]]
1401
- })
1402
- ]
1403
- )
1404
- );
1405
- }
1406
- if (useHtml && !defaultSlot) {
1407
- contVNs.push(
1408
- isVScrollbar ? (0, import_vue.h)(
1409
- import_scrollbar.default,
1410
- {
1411
- key: "shc",
1412
- class: "vxe-modal--scrollbar-content",
1413
- ...scrollbarProps
1414
- },
1415
- {
1416
- default() {
1417
- return [
1418
- (0, import_vue.h)("div", {
1419
- class: "vxe-modal--scrollbar-content-html",
1420
- innerHTML: (0, import_utils.getFuncText)(content)
1421
- })
1422
- ];
1423
- }
1424
- }
1425
- ) : (0, import_vue.h)("div", {
1426
- key: "hc",
1427
- class: "vxe-modal--content",
1428
- innerHTML: (0, import_utils.getFuncText)(content)
1429
- })
1430
- );
1431
- } else {
1432
- contVNs.push(
1433
- isVScrollbar ? (0, import_vue.h)(
1434
- import_scrollbar.default,
1435
- {
1436
- key: "sdc",
1437
- class: "vxe-modal--scrollbar-content",
1438
- ...scrollbarProps
1439
- },
1440
- {
1441
- default: () => defaultSlot ? (0, import_vn.getSlotVNs)(defaultSlot({ $modal: $xeModal })) : (0, import_utils.getFuncText)(content)
1442
- }
1443
- ) : (0, import_vue.h)(
1444
- "div",
1445
- {
1446
- key: "dc",
1447
- class: "vxe-modal--content"
1448
- },
1449
- defaultSlot ? (0, import_vn.getSlotVNs)(defaultSlot({ $modal: $xeModal })) : (0, import_utils.getFuncText)(content)
1450
- )
1451
- );
1452
- }
1453
- return (0, import_vue.h)(
1454
- "div",
1455
- {
1456
- class: "vxe-modal--body"
1457
- },
1458
- [
1459
- leftSlot ? (0, import_vue.h)(
1460
- "div",
1461
- {
1462
- class: "vxe-modal--body-left"
1463
- },
1464
- (0, import_vn.getSlotVNs)(leftSlot({ $modal: $xeModal }))
1465
- ) : renderEmptyElement($xeModal),
1466
- (0, import_vue.h)(
1467
- "div",
1468
- {
1469
- class: "vxe-modal--body-default"
1470
- },
1471
- contVNs
1472
- ),
1473
- rightSlot ? (0, import_vue.h)(
1474
- "div",
1475
- {
1476
- class: "vxe-modal--body-right"
1477
- },
1478
- (0, import_vn.getSlotVNs)(rightSlot({ $modal: $xeModal }))
1479
- ) : renderEmptyElement($xeModal),
1480
- isMsg ? renderEmptyElement($xeModal) : (0, import_vue.h)(import_loading.default, {
1481
- class: "vxe-modal--loading",
1482
- modelValue: props.loading
1483
- })
1484
- ]
1485
- );
1486
- };
1487
- const renderDefaultFooter = () => {
1488
- const { slots: propSlots = {}, showCancelButton, showConfirmButton, type, loading } = props;
1489
- const lfSlot = slots.leftfoot || propSlots.leftfoot;
1490
- const rfSlot = slots.rightfoot || propSlots.rightfoot;
1491
- const btnVNs = [];
1492
- if (import_xe_utils.default.isBoolean(showCancelButton) ? showCancelButton : type === "confirm") {
1493
- btnVNs.push(
1494
- (0, import_vue.h)(import_button.default, {
1495
- key: 1,
1496
- ref: refCancelBtn,
1497
- content: props.cancelButtonText || getI18n("vxe.button.cancel"),
1498
- onClick: cancelEvent
1499
- })
1500
- );
1501
- }
1502
- if (import_xe_utils.default.isBoolean(showConfirmButton) ? showConfirmButton : type === "confirm" || type === "alert") {
1503
- btnVNs.push(
1504
- (0, import_vue.h)(import_button.default, {
1505
- key: 2,
1506
- ref: refConfirmBtn,
1507
- loading,
1508
- status: "primary",
1509
- content: props.confirmButtonText || getI18n("vxe.button.confirm"),
1510
- onClick: confirmEvent
1511
- })
1510
+ [
1511
+ (0, import_vue.h)(
1512
+ "div",
1513
+ {
1514
+ class: "vxe-modal--footer-left"
1515
+ },
1516
+ lfSlot ? (0, import_vn.getSlotVNs)(lfSlot({ $modal: $xeModal })) : []
1517
+ ),
1518
+ (0, import_vue.h)(
1519
+ "div",
1520
+ {
1521
+ class: "vxe-modal--footer-right"
1522
+ },
1523
+ rfSlot ? (0, import_vn.getSlotVNs)(rfSlot({ $modal: $xeModal })) : btnVNs
1524
+ )
1525
+ ]
1512
1526
  );
1513
- }
1514
- return (0, import_vue.h)(
1515
- "div",
1516
- {
1517
- class: "vxe-modal--footer-wrapper"
1518
- },
1519
- [
1520
- (0, import_vue.h)(
1521
- "div",
1522
- {
1523
- class: "vxe-modal--footer-left"
1524
- },
1525
- lfSlot ? (0, import_vn.getSlotVNs)(lfSlot({ $modal: $xeModal })) : []
1526
- ),
1527
- (0, import_vue.h)(
1527
+ };
1528
+ const renderFooter = () => {
1529
+ const { slots: propSlots = {} } = props;
1530
+ const footerSlot = slots.footer || propSlots.footer;
1531
+ if (props.showFooter) {
1532
+ return (0, import_vue.h)(
1528
1533
  "div",
1529
1534
  {
1530
- class: "vxe-modal--footer-right"
1535
+ class: "vxe-modal--footer"
1531
1536
  },
1532
- rfSlot ? (0, import_vn.getSlotVNs)(rfSlot({ $modal: $xeModal })) : btnVNs
1533
- )
1534
- ]
1535
- );
1536
- };
1537
- const renderFooter = () => {
1538
- const { slots: propSlots = {} } = props;
1539
- const footerSlot = slots.footer || propSlots.footer;
1540
- if (props.showFooter) {
1537
+ footerSlot ? (0, import_vn.getSlotVNs)(footerSlot({ $modal: $xeModal })) : [renderDefaultFooter()]
1538
+ );
1539
+ }
1540
+ return renderEmptyElement($xeModal);
1541
+ };
1542
+ const renderVN = () => {
1543
+ const { border, showTitleBackground, slots: propSlots = {}, className, type, animat, draggable, iconStatus, position, loading, destroyOnClose, status, lockScroll, padding, lockView, mask, resize, appendTo, isWithinAppendTo } = props;
1544
+ const { initialized, modalTop, contentVisible, visible, zoomStatus } = reactData;
1545
+ const asideSlot = slots.aside || propSlots.aside;
1546
+ const vSize = computeSize.value;
1547
+ const isMsg = computeIsMsg.value;
1548
+ const isMinimizeStatus = computeIsMinimizeStatus.value;
1549
+ const btnTransfer = computeBtnTransfer.value;
1550
+ const ons = {};
1551
+ if (isMsg) {
1552
+ ons.onMouseover = selfMouseoverEvent;
1553
+ ons.onMouseout = selfMouseoutEvent;
1554
+ }
1541
1555
  return (0, import_vue.h)(
1542
- "div",
1556
+ import_vue.Teleport,
1543
1557
  {
1544
- class: "vxe-modal--footer"
1558
+ to: (0, import_dom.getPopupContainer)(appendTo),
1559
+ disabled: btnTransfer ? !initialized : true
1545
1560
  },
1546
- footerSlot ? (0, import_vn.getSlotVNs)(footerSlot({ $modal: $xeModal })) : [renderDefaultFooter()]
1547
- );
1548
- }
1549
- return renderEmptyElement($xeModal);
1550
- };
1551
- const renderVN = () => {
1552
- const { border, showTitleBackground, slots: propSlots = {}, className, type, animat, draggable, iconStatus, position, loading, destroyOnClose, status, lockScroll, padding, lockView, mask, resize, appendTo, isWithinAppendTo } = props;
1553
- const { initialized, modalTop, contentVisible, visible, zoomStatus } = reactData;
1554
- const asideSlot = slots.aside || propSlots.aside;
1555
- const vSize = computeSize.value;
1556
- const isMsg = computeIsMsg.value;
1557
- const isMinimizeStatus = computeIsMinimizeStatus.value;
1558
- const btnTransfer = computeBtnTransfer.value;
1559
- const ons = {};
1560
- if (isMsg) {
1561
- ons.onMouseover = selfMouseoverEvent;
1562
- ons.onMouseout = selfMouseoutEvent;
1563
- }
1564
- return (0, import_vue.h)(
1565
- import_vue.Teleport,
1566
- {
1567
- to: (0, import_dom.getPopupContainer)(appendTo),
1568
- disabled: btnTransfer ? !initialized : true
1569
- },
1570
- [
1571
- (0, import_vue.h)(
1572
- "div",
1573
- {
1574
- ref: refElem,
1575
- class: [
1576
- "vxe-modal--wrapper",
1577
- `type--${type}`,
1578
- `zoom--${zoomStatus || "revert"}`,
1579
- position ? `pos--${position}` : "",
1580
- isWithinAppendTo ? "ctx--within" : "ctx--free",
1581
- className || "",
1582
- {
1583
- [`size--${vSize}`]: vSize,
1584
- [`status--${status}`]: status,
1585
- "is--padding": padding,
1586
- "is--border": border,
1587
- "is--title-bg": showTitleBackground,
1588
- "is--animat": animat,
1589
- "lock--scroll": lockScroll,
1590
- "lock--view": lockView,
1591
- "is--draggable": draggable,
1592
- "is--resize": resize,
1593
- "is--mask": mask,
1594
- "is--visible": contentVisible,
1595
- "is--active": visible,
1596
- "is--loading": loading
1597
- }
1598
- ],
1599
- style: {
1600
- zIndex: reactData.modalZindex,
1601
- top: modalTop ? `${modalTop}px` : null
1602
- },
1603
- onClick: selfClickEvent,
1604
- ...ons
1605
- },
1606
- [
1607
- (0, import_vue.h)(
1608
- "div",
1609
- {
1610
- ref: refModalBox,
1611
- class: "vxe-modal--box",
1612
- onMousedown: boxMousedownEvent
1561
+ [
1562
+ (0, import_vue.h)(
1563
+ "div",
1564
+ {
1565
+ ref: refElem,
1566
+ class: [
1567
+ "vxe-modal--wrapper",
1568
+ `type--${type}`,
1569
+ `zoom--${zoomStatus || "revert"}`,
1570
+ position ? `pos--${position}` : "",
1571
+ isWithinAppendTo ? "ctx--within" : "ctx--free",
1572
+ className || "",
1573
+ {
1574
+ [`size--${vSize}`]: vSize,
1575
+ [`status--${status}`]: status,
1576
+ "is--padding": padding,
1577
+ "is--border": border,
1578
+ "is--title-bg": showTitleBackground,
1579
+ "is--animat": animat,
1580
+ "lock--scroll": lockScroll,
1581
+ "lock--view": lockView,
1582
+ "is--draggable": draggable,
1583
+ "is--resize": resize,
1584
+ "is--mask": mask,
1585
+ "is--visible": contentVisible,
1586
+ "is--active": visible,
1587
+ "is--loading": loading
1588
+ }
1589
+ ],
1590
+ style: {
1591
+ zIndex: reactData.modalZindex,
1592
+ top: modalTop ? `${modalTop}px` : null
1613
1593
  },
1614
- [
1615
- (isMsg || asideSlot) && !isMinimizeStatus ? (0, import_vue.h)(
1616
- "div",
1617
- {
1618
- class: "vxe-modal--aside"
1619
- },
1620
- asideSlot ? (0, import_vn.getSlotVNs)(asideSlot({ $modal: $xeModal })) : [
1621
- status || iconStatus ? (0, import_vue.h)(
1622
- "div",
1623
- {
1624
- class: "vxe-modal--status-wrapper"
1625
- },
1626
- [
1627
- (0, import_vue.h)("i", {
1628
- class: ["vxe-modal--status-icon", iconStatus || getIcon()[`MODAL_${status}`.toLocaleUpperCase()]]
1594
+ onClick: selfClickEvent,
1595
+ ...ons
1596
+ },
1597
+ [
1598
+ (0, import_vue.h)(
1599
+ "div",
1600
+ {
1601
+ ref: refModalBox,
1602
+ class: "vxe-modal--box",
1603
+ onMousedown: boxMousedownEvent
1604
+ },
1605
+ [
1606
+ (isMsg || asideSlot) && !isMinimizeStatus ? (0, import_vue.h)(
1607
+ "div",
1608
+ {
1609
+ class: "vxe-modal--aside"
1610
+ },
1611
+ asideSlot ? (0, import_vn.getSlotVNs)(asideSlot({ $modal: $xeModal })) : [
1612
+ status || iconStatus ? (0, import_vue.h)(
1613
+ "div",
1614
+ {
1615
+ class: "vxe-modal--status-wrapper"
1616
+ },
1617
+ [
1618
+ (0, import_vue.h)("i", {
1619
+ class: ["vxe-modal--status-icon", iconStatus || getIcon()[`MODAL_${status}`.toLocaleUpperCase()]]
1620
+ })
1621
+ ]
1622
+ ) : renderEmptyElement($xeModal)
1623
+ ]
1624
+ ) : renderEmptyElement($xeModal),
1625
+ (0, import_vue.h)(
1626
+ "div",
1627
+ {
1628
+ class: "vxe-modal--container"
1629
+ },
1630
+ !reactData.initialized || destroyOnClose && !reactData.visible ? [] : [
1631
+ renderHeader(),
1632
+ renderBody(),
1633
+ renderFooter(),
1634
+ !isMsg && resize ? (0, import_vue.h)(
1635
+ "span",
1636
+ {
1637
+ class: "vxe-modal--resize"
1638
+ },
1639
+ ["wl", "wr", "swst", "sest", "st", "swlb", "selb", "sb"].map((type2) => {
1640
+ return (0, import_vue.h)("span", {
1641
+ class: `${type2}-resize`,
1642
+ "data-type": type2,
1643
+ onMousedown: dragEvent
1644
+ });
1629
1645
  })
1630
- ]
1631
- ) : renderEmptyElement($xeModal)
1632
- ]
1633
- ) : renderEmptyElement($xeModal),
1634
- (0, import_vue.h)(
1635
- "div",
1636
- {
1637
- class: "vxe-modal--container"
1638
- },
1639
- !reactData.initialized || destroyOnClose && !reactData.visible ? [] : [
1640
- renderHeader(),
1641
- renderBody(),
1642
- renderFooter(),
1643
- !isMsg && resize ? (0, import_vue.h)(
1644
- "span",
1645
- {
1646
- class: "vxe-modal--resize"
1647
- },
1648
- ["wl", "wr", "swst", "sest", "st", "swlb", "selb", "sb"].map((type2) => {
1649
- return (0, import_vue.h)("span", {
1650
- class: `${type2}-resize`,
1651
- "data-type": type2,
1652
- onMousedown: dragEvent
1653
- });
1654
- })
1655
- ) : renderEmptyElement($xeModal)
1656
- ]
1657
- )
1658
- ]
1659
- )
1660
- ]
1661
- )
1662
- ]
1663
- );
1664
- };
1665
- $xeModal.renderVN = renderVN;
1666
- (0, import_vue.watch)(() => props.width, recalculate);
1667
- (0, import_vue.watch)(() => props.height, recalculate);
1668
- (0, import_vue.watch)(
1669
- () => props.modelValue,
1670
- (value) => {
1671
- if (value) {
1672
- openModal();
1673
- } else {
1674
- closeModal("model");
1646
+ ) : renderEmptyElement($xeModal)
1647
+ ]
1648
+ )
1649
+ ]
1650
+ )
1651
+ ]
1652
+ )
1653
+ ]
1654
+ );
1655
+ };
1656
+ $xeModal.renderVN = renderVN;
1657
+ (0, import_vue.watch)(() => props.width, recalculate);
1658
+ (0, import_vue.watch)(() => props.height, recalculate);
1659
+ (0, import_vue.watch)(
1660
+ () => props.modelValue,
1661
+ (value) => {
1662
+ if (value) {
1663
+ openModal();
1664
+ } else {
1665
+ closeModal("model");
1666
+ }
1675
1667
  }
1676
- }
1677
- );
1678
- (0, import_vue.onMounted)(() => {
1679
- if (props.type === "modal" && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
1680
- warnLog("vxe.modal.footPropErr");
1681
- }
1682
- reactData.initialized = !!props.preload;
1683
- (0, import_vue.nextTick)(() => {
1684
- if (props.storage && !props.id) {
1685
- errLog("vxe.error.reqProp", ["id"]);
1668
+ );
1669
+ (0, import_vue.onMounted)(() => {
1670
+ if (props.type === "modal" && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
1671
+ warnLog("vxe.modal.footPropErr");
1686
1672
  }
1687
- if (props.modelValue) {
1688
- openModal();
1673
+ reactData.initialized = !!props.preload;
1674
+ (0, import_vue.nextTick)(() => {
1675
+ if (props.storage && !props.id) {
1676
+ errLog("vxe.error.reqProp", ["id"]);
1677
+ }
1678
+ if (props.modelValue) {
1679
+ openModal();
1680
+ }
1681
+ recalculate();
1682
+ });
1683
+ if (props.escClosable) {
1684
+ globalEvents.on($xeModal, "keydown", handleGlobalKeydownEvent);
1689
1685
  }
1690
- recalculate();
1686
+ globalEvents.on($xeModal, "resize", handleGlobalResizeEvent);
1691
1687
  });
1692
- if (props.escClosable) {
1693
- globalEvents.on($xeModal, "keydown", handleGlobalKeydownEvent);
1694
- }
1695
- globalEvents.on($xeModal, "resize", handleGlobalResizeEvent);
1696
- });
1697
- (0, import_vue.onUnmounted)(() => {
1698
- globalEvents.off($xeModal, "keydown");
1699
- globalEvents.off($xeModal, "resize");
1700
- removeMsgQueue();
1701
- removeActiveQueue();
1702
- removeBodyLockScroll();
1703
- import_xe_utils.default.assign(reactData, createReactData());
1704
- import_xe_utils.default.assign(internalData, createInternalData());
1705
- });
1706
- (0, import_vue.provide)("$xeModal", $xeModal);
1707
- return $xeModal;
1708
- },
1709
- render() {
1710
- return this.renderVN();
1711
- }
1712
- });
1688
+ (0, import_vue.onUnmounted)(() => {
1689
+ globalEvents.off($xeModal, "keydown");
1690
+ globalEvents.off($xeModal, "resize");
1691
+ removeMsgQueue();
1692
+ removeActiveQueue();
1693
+ removeBodyLockScroll();
1694
+ import_xe_utils.default.assign(reactData, createReactData());
1695
+ import_xe_utils.default.assign(internalData, createInternalData());
1696
+ });
1697
+ (0, import_vue.provide)("$xeModal", $xeModal);
1698
+ return $xeModal;
1699
+ },
1700
+ render() {
1701
+ return this.renderVN();
1702
+ }
1703
+ })
1704
+ );