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
@@ -9,1173 +9,1176 @@ import { getSlotVNs } from "../../ui/src/vn";
9
9
  import { handleNumber, toFloatValueFixed } from "./util";
10
10
  const { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useFns, renderEmptyElement } = VxeUI;
11
11
  const { errLog } = createComponentLog("number-input");
12
- var number_input_default = defineVxeComponent({
13
- name: "VxeNumberInput",
14
- props: {
15
- modelValue: [String, Number],
16
- immediate: {
17
- type: Boolean,
18
- default: true
19
- },
20
- name: String,
21
- type: {
22
- type: String,
23
- default: "number"
24
- },
25
- clearable: {
26
- type: Boolean,
27
- default: () => getConfig().numberInput.clearable
28
- },
29
- readonly: {
30
- type: Boolean,
31
- default: null
32
- },
33
- disabled: {
34
- type: Boolean,
35
- default: null
36
- },
37
- placeholder: String,
38
- floatContent: {
39
- type: String,
40
- default: () => getConfig().numberInput.floatContent
41
- },
42
- floatAlign: {
43
- type: String,
44
- default: () => getConfig().numberInput.floatAlign
45
- },
46
- maxLength: {
47
- type: [String, Number],
48
- default: () => getConfig().numberInput.maxLength
49
- },
50
- autoComplete: {
51
- type: String,
52
- default: "off"
53
- },
54
- align: String,
55
- form: String,
56
- className: String,
57
- inputClassName: {
58
- type: String,
59
- default: () => getConfig().numberInput.inputClassName
60
- },
61
- width: [String, Number],
62
- size: {
63
- type: String,
64
- default: () => getConfig().numberInput.size || getConfig().size
65
- },
66
- min: {
67
- type: [String, Number],
68
- default: null
69
- },
70
- max: {
71
- type: [String, Number],
72
- default: null
73
- },
74
- step: [String, Number],
75
- exponential: {
76
- type: Boolean,
77
- default: () => getConfig().numberInput.exponential
78
- },
79
- negative: {
80
- type: Boolean,
81
- default: () => getConfig().numberInput.negative
82
- },
83
- showCurrency: {
84
- type: Boolean,
85
- default: () => getConfig().numberInput.showCurrency
86
- },
87
- currencySymbol: {
88
- type: String,
89
- default: () => getConfig().numberInput.currencySymbol
90
- },
91
- controlConfig: Object,
92
- // number、float、amount
93
- roundingMode: {
94
- type: String,
95
- default: () => getConfig().numberInput.roundingMode
96
- },
97
- // float、amount
98
- digits: {
99
- type: [String, Number],
100
- default: null
101
- },
102
- autoFill: {
103
- type: Boolean,
104
- default: () => getConfig().numberInput.autoFill
105
- },
106
- editable: {
107
- type: Boolean,
108
- default: true
109
- },
110
- plusIcon: String,
111
- minusIcon: String,
112
- prefixIcon: String,
113
- prefixConfig: Object,
114
- suffixIcon: String,
115
- suffixConfig: Object,
116
- showTooltip: {
117
- type: Boolean,
118
- default: () => getConfig().numberInput.showTooltip
119
- },
120
- tooltipConfig: Object,
121
- // 已废弃
122
- controls: {
123
- type: Boolean,
124
- default: null
12
+ var number_input_default = (
13
+ /* define-vxe-component start */
14
+ defineVxeComponent({
15
+ name: "VxeNumberInput",
16
+ props: {
17
+ modelValue: [String, Number],
18
+ immediate: {
19
+ type: Boolean,
20
+ default: true
21
+ },
22
+ name: String,
23
+ type: {
24
+ type: String,
25
+ default: "number"
26
+ },
27
+ clearable: {
28
+ type: Boolean,
29
+ default: () => getConfig().numberInput.clearable
30
+ },
31
+ readonly: {
32
+ type: Boolean,
33
+ default: null
34
+ },
35
+ disabled: {
36
+ type: Boolean,
37
+ default: null
38
+ },
39
+ placeholder: String,
40
+ floatContent: {
41
+ type: String,
42
+ default: () => getConfig().numberInput.floatContent
43
+ },
44
+ floatAlign: {
45
+ type: String,
46
+ default: () => getConfig().numberInput.floatAlign
47
+ },
48
+ maxLength: {
49
+ type: [String, Number],
50
+ default: () => getConfig().numberInput.maxLength
51
+ },
52
+ autoComplete: {
53
+ type: String,
54
+ default: "off"
55
+ },
56
+ align: String,
57
+ form: String,
58
+ className: String,
59
+ inputClassName: {
60
+ type: String,
61
+ default: () => getConfig().numberInput.inputClassName
62
+ },
63
+ width: [String, Number],
64
+ size: {
65
+ type: String,
66
+ default: () => getConfig().numberInput.size || getConfig().size
67
+ },
68
+ min: {
69
+ type: [String, Number],
70
+ default: null
71
+ },
72
+ max: {
73
+ type: [String, Number],
74
+ default: null
75
+ },
76
+ step: [String, Number],
77
+ exponential: {
78
+ type: Boolean,
79
+ default: () => getConfig().numberInput.exponential
80
+ },
81
+ negative: {
82
+ type: Boolean,
83
+ default: () => getConfig().numberInput.negative
84
+ },
85
+ showCurrency: {
86
+ type: Boolean,
87
+ default: () => getConfig().numberInput.showCurrency
88
+ },
89
+ currencySymbol: {
90
+ type: String,
91
+ default: () => getConfig().numberInput.currencySymbol
92
+ },
93
+ controlConfig: Object,
94
+ // number、float、amount
95
+ roundingMode: {
96
+ type: String,
97
+ default: () => getConfig().numberInput.roundingMode
98
+ },
99
+ // float、amount
100
+ digits: {
101
+ type: [String, Number],
102
+ default: null
103
+ },
104
+ autoFill: {
105
+ type: Boolean,
106
+ default: () => getConfig().numberInput.autoFill
107
+ },
108
+ editable: {
109
+ type: Boolean,
110
+ default: true
111
+ },
112
+ plusIcon: String,
113
+ minusIcon: String,
114
+ prefixIcon: String,
115
+ prefixConfig: Object,
116
+ suffixIcon: String,
117
+ suffixConfig: Object,
118
+ showTooltip: {
119
+ type: Boolean,
120
+ default: () => getConfig().numberInput.showTooltip
121
+ },
122
+ tooltipConfig: Object,
123
+ // 已废弃
124
+ controls: {
125
+ type: Boolean,
126
+ default: null
127
+ },
128
+ // 已废弃
129
+ maxlength: [String, Number],
130
+ // 已废弃
131
+ autocomplete: String
125
132
  },
126
- // 已废弃
127
- maxlength: [String, Number],
128
- // 已废弃
129
- autocomplete: String
130
- },
131
- emits: [
132
- "update:modelValue",
133
- "input",
134
- "change",
135
- "keydown",
136
- "keyup",
137
- "wheel",
138
- "click",
139
- "focus",
140
- "blur",
141
- "clear",
142
- "lazy-change",
143
- "plus-number",
144
- "minus-number",
145
- "prefix-click",
146
- "suffix-click",
147
- // 已废弃
148
- "prev-number",
149
- "next-number"
150
- ],
151
- setup(props, context) {
152
- const { slots, emit } = context;
153
- const $xeForm = inject("$xeForm", null);
154
- const formItemInfo = inject("xeFormItemInfo", null);
155
- const xID = XEUtils.uniqueId();
156
- const { computeSize } = useFns.useSize(props);
157
- const reactData = reactive({
158
- isFocus: false,
159
- isActivated: false,
160
- inputValue: ""
161
- });
162
- const internalData = {
163
- // dnTimeout: undefined,
164
- // ainTimeout: undefined,
165
- // isMouseDown: undefined,
166
- // isUM: undefined
167
- };
168
- const refElem = ref();
169
- const refInputTarget = ref();
170
- const refInputPanel = ref();
171
- const computeFormReadonly = computed(() => {
172
- const { readonly } = props;
173
- if (readonly === null) {
174
- if ($xeForm) {
175
- return $xeForm.props.readonly;
133
+ emits: [
134
+ "update:modelValue",
135
+ "input",
136
+ "change",
137
+ "keydown",
138
+ "keyup",
139
+ "wheel",
140
+ "click",
141
+ "focus",
142
+ "blur",
143
+ "clear",
144
+ "lazy-change",
145
+ "plus-number",
146
+ "minus-number",
147
+ "prefix-click",
148
+ "suffix-click",
149
+ // 已废弃
150
+ "prev-number",
151
+ "next-number"
152
+ ],
153
+ setup(props, context) {
154
+ const { slots, emit } = context;
155
+ const $xeForm = inject("$xeForm", null);
156
+ const formItemInfo = inject("xeFormItemInfo", null);
157
+ const xID = XEUtils.uniqueId();
158
+ const { computeSize } = useFns.useSize(props);
159
+ const reactData = reactive({
160
+ isFocus: false,
161
+ isActivated: false,
162
+ inputValue: ""
163
+ });
164
+ const internalData = {
165
+ // dnTimeout: undefined,
166
+ // ainTimeout: undefined,
167
+ // isMouseDown: undefined,
168
+ // isUM: undefined
169
+ };
170
+ const refElem = ref();
171
+ const refInputTarget = ref();
172
+ const refInputPanel = ref();
173
+ const computeFormReadonly = computed(() => {
174
+ const { readonly } = props;
175
+ if (readonly === null) {
176
+ if ($xeForm) {
177
+ return $xeForm.props.readonly;
178
+ }
179
+ return false;
176
180
  }
177
- return false;
178
- }
179
- return readonly;
180
- });
181
- const computeIsDisabled = computed(() => {
182
- const { disabled } = props;
183
- if (disabled === null) {
184
- if ($xeForm) {
185
- return $xeForm.props.disabled;
181
+ return readonly;
182
+ });
183
+ const computeIsDisabled = computed(() => {
184
+ const { disabled } = props;
185
+ if (disabled === null) {
186
+ if ($xeForm) {
187
+ return $xeForm.props.disabled;
188
+ }
189
+ return false;
186
190
  }
187
- return false;
188
- }
189
- return disabled;
190
- });
191
- const computeDigitsValue = computed(() => {
192
- const { type, digits } = props;
193
- let defDigits = digits;
194
- if (defDigits === null) {
195
- defDigits = getConfig().numberInput.digits;
191
+ return disabled;
192
+ });
193
+ const computeDigitsValue = computed(() => {
194
+ const { type, digits } = props;
195
+ let defDigits = digits;
196
196
  if (defDigits === null) {
197
- if (type === "amount") {
198
- defDigits = 2;
197
+ defDigits = getConfig().numberInput.digits;
198
+ if (defDigits === null) {
199
+ if (type === "amount") {
200
+ defDigits = 2;
201
+ }
199
202
  }
200
203
  }
201
- }
202
- return XEUtils.toInteger(defDigits) || 1;
203
- });
204
- const computeControlOpts = computed(() => {
205
- return Object.assign({}, getConfig().numberInput.controlConfig, props.controlConfig);
206
- });
207
- const computePrefixOpts = computed(() => {
208
- return Object.assign({}, getConfig().numberInput.prefixConfig, props.prefixConfig);
209
- });
210
- const computeSuffixOpts = computed(() => {
211
- return Object.assign({}, getConfig().numberInput.suffixConfig, props.suffixConfig);
212
- });
213
- const computeTooltipOpts = computed(() => {
214
- return Object.assign({}, getConfig().numberInput.tooltipConfig, props.tooltipConfig);
215
- });
216
- const computeDecimalsType = computed(() => {
217
- const { type } = props;
218
- return type === "float" || type === "amount";
219
- });
220
- const computeStepValue = computed(() => {
221
- const { type } = props;
222
- const digitsValue = computeDigitsValue.value;
223
- const decimalsType = computeDecimalsType.value;
224
- const step = props.step;
225
- if (type === "integer") {
226
- return XEUtils.toInteger(step) || 1;
227
- } else if (decimalsType) {
228
- return XEUtils.toNumber(step) || 1 / Math.pow(10, digitsValue);
229
- }
230
- return XEUtils.toNumber(step) || 1;
231
- });
232
- const computeIsClearable = computed(() => {
233
- return props.clearable;
234
- });
235
- const computeInputReadonly = computed(() => {
236
- const { editable } = props;
237
- const formReadonly = computeFormReadonly.value;
238
- return formReadonly || !editable;
239
- });
240
- const computeInpPlaceholder = computed(() => {
241
- const { placeholder } = props;
242
- if (placeholder) {
243
- return getFuncText(placeholder);
244
- }
245
- const globalPlaceholder = getConfig().numberInput.placeholder;
246
- if (globalPlaceholder) {
247
- return getFuncText(globalPlaceholder);
248
- }
249
- return getI18n("vxe.base.pleaseInput");
250
- });
251
- const computeInpMaxLength = computed(() => {
252
- const { type, maxLength, maxlength, min, max } = props;
253
- const digitsValue = computeDigitsValue.value;
254
- const maxDefLen = 16;
255
- if (!eqEmptyValue(min) && !eqEmptyValue(max)) {
256
- return `${max}`.length + (type === "integer" ? 0 : digitsValue + 1) + (XEUtils.toNumber(min) >= 0 ? 0 : 1);
257
- }
258
- if (maxLength || maxlength) {
259
- return XEUtils.toNumber(maxLength || maxlength);
260
- }
261
- return maxDefLen;
262
- });
263
- const computeInpImmediate = computed(() => {
264
- const { immediate } = props;
265
- return immediate;
266
- });
267
- const computeNumValue = computed(() => {
268
- const { type } = props;
269
- const { inputValue } = reactData;
270
- return type === "integer" ? XEUtils.toInteger(handleNumber(inputValue)) : XEUtils.toNumber(handleNumber(inputValue));
271
- });
272
- const computeNumLabel = computed(() => {
273
- const { type, roundingMode, showCurrency, currencySymbol, autoFill } = props;
274
- const { inputValue } = reactData;
275
- const digitsValue = computeDigitsValue.value;
276
- if (type === "amount") {
277
- const num = XEUtils.toNumber(inputValue);
278
- const cfyOpts = { digits: digitsValue };
279
- if (roundingMode === "floor") {
280
- cfyOpts.floor = true;
281
- } else if (roundingMode === "ceil") {
282
- cfyOpts.ceil = true;
283
- } else {
284
- cfyOpts.round = true;
285
- }
286
- let amountLabel = XEUtils.commafy(num, cfyOpts);
287
- if (!autoFill) {
288
- const [iStr, dStr] = amountLabel.split(".");
289
- if (dStr) {
290
- const dRest = dStr.replace(/0+$/, "");
291
- amountLabel = dRest ? [iStr, ".", dRest].join("") : iStr;
292
- }
204
+ return XEUtils.toInteger(defDigits) || 1;
205
+ });
206
+ const computeControlOpts = computed(() => {
207
+ return Object.assign({}, getConfig().numberInput.controlConfig, props.controlConfig);
208
+ });
209
+ const computePrefixOpts = computed(() => {
210
+ return Object.assign({}, getConfig().numberInput.prefixConfig, props.prefixConfig);
211
+ });
212
+ const computeSuffixOpts = computed(() => {
213
+ return Object.assign({}, getConfig().numberInput.suffixConfig, props.suffixConfig);
214
+ });
215
+ const computeTooltipOpts = computed(() => {
216
+ return Object.assign({}, getConfig().numberInput.tooltipConfig, props.tooltipConfig);
217
+ });
218
+ const computeDecimalsType = computed(() => {
219
+ const { type } = props;
220
+ return type === "float" || type === "amount";
221
+ });
222
+ const computeStepValue = computed(() => {
223
+ const { type } = props;
224
+ const digitsValue = computeDigitsValue.value;
225
+ const decimalsType = computeDecimalsType.value;
226
+ const step = props.step;
227
+ if (type === "integer") {
228
+ return XEUtils.toInteger(step) || 1;
229
+ } else if (decimalsType) {
230
+ return XEUtils.toNumber(step) || 1 / Math.pow(10, digitsValue);
293
231
  }
294
- if (showCurrency) {
295
- return `${currencySymbol || getI18n("vxe.numberInput.currencySymbol") || ""}${amountLabel}`;
232
+ return XEUtils.toNumber(step) || 1;
233
+ });
234
+ const computeIsClearable = computed(() => {
235
+ return props.clearable;
236
+ });
237
+ const computeInputReadonly = computed(() => {
238
+ const { editable } = props;
239
+ const formReadonly = computeFormReadonly.value;
240
+ return formReadonly || !editable;
241
+ });
242
+ const computeInpPlaceholder = computed(() => {
243
+ const { placeholder } = props;
244
+ if (placeholder) {
245
+ return getFuncText(placeholder);
296
246
  }
297
- return amountLabel;
298
- }
299
- return XEUtils.toString(inputValue);
300
- });
301
- const computeIsDisabledSubtractNumber = computed(() => {
302
- const { min } = props;
303
- const { inputValue } = reactData;
304
- const numValue = computeNumValue.value;
305
- if ((inputValue || inputValue === 0) && min !== null) {
306
- return numValue <= XEUtils.toNumber(min);
307
- }
308
- return false;
309
- });
310
- const computeIsDisabledAddNumber = computed(() => {
311
- const { max } = props;
312
- const { inputValue } = reactData;
313
- const numValue = computeNumValue.value;
314
- if ((inputValue || inputValue === 0) && max !== null) {
315
- return numValue >= XEUtils.toNumber(max);
316
- }
317
- return false;
318
- });
319
- const computeInpClassNamevalue = computed(() => {
320
- const { inputClassName } = props;
321
- return "vxe-number-input--input" + (inputClassName ? " " + inputClassName : "");
322
- });
323
- const computeCurrStyle = computed(() => {
324
- const { width } = props;
325
- const stys = {};
326
- if (width) {
327
- stys.width = toCssUnit(width);
328
- }
329
- return stys;
330
- });
331
- const refMaps = {
332
- refElem,
333
- refInput: refInputTarget
334
- };
335
- const computeMaps = {
336
- computeControlOpts
337
- };
338
- const $xeNumberInput = {
339
- xID,
340
- props,
341
- context,
342
- reactData,
343
- internalData,
344
- getRefMaps: () => refMaps,
345
- getComputeMaps: () => computeMaps
346
- };
347
- const dispatchEvent = (type, params, evnt) => {
348
- emit(type, createEvent(evnt, { $numberInput: $xeNumberInput }, params));
349
- };
350
- const handleNumberString = (val) => {
351
- if (XEUtils.eqNull(val)) {
352
- return "";
353
- }
354
- return `${val}`;
355
- };
356
- const getNumberValue = (val) => {
357
- const { type, exponential, roundingMode, autoFill } = props;
358
- const inpMaxLength = computeInpMaxLength.value;
359
- const digitsValue = computeDigitsValue.value;
360
- const decimalsType = computeDecimalsType.value;
361
- let restVal = "";
362
- if (decimalsType) {
363
- restVal = toFloatValueFixed(val, type, digitsValue, roundingMode);
364
- if (!autoFill) {
365
- restVal = handleNumberString(XEUtils.toNumber(restVal));
247
+ const globalPlaceholder = getConfig().numberInput.placeholder;
248
+ if (globalPlaceholder) {
249
+ return getFuncText(globalPlaceholder);
366
250
  }
367
- } else {
368
- restVal = handleNumberString(val);
369
- }
370
- if (exponential && (val === restVal || handleNumberString(val).toLowerCase() === XEUtils.toNumber(restVal).toExponential())) {
371
- return val;
372
- }
373
- return restVal.slice(0, inpMaxLength);
374
- };
375
- const triggerEvent = (evnt) => {
376
- const { inputValue } = reactData;
377
- dispatchEvent(evnt.type, { value: inputValue }, evnt);
378
- };
379
- const handleChange = (val, inputValue, evnt) => {
380
- const value = eqEmptyValue(val) ? null : Number(val);
381
- const isChange = value !== props.modelValue;
382
- if (isChange) {
383
- internalData.isUM = true;
384
- emit("update:modelValue", value);
385
- }
386
- if (reactData.inputValue !== inputValue) {
387
- nextTick(() => {
388
- reactData.inputValue = inputValue || "";
389
- });
390
- }
391
- dispatchEvent("input", { value }, evnt);
392
- if (isChange) {
393
- dispatchEvent("change", { value }, evnt);
394
- if ($xeForm && formItemInfo) {
395
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
251
+ return getI18n("vxe.base.pleaseInput");
252
+ });
253
+ const computeInpMaxLength = computed(() => {
254
+ const { type, maxLength, maxlength, min, max } = props;
255
+ const digitsValue = computeDigitsValue.value;
256
+ const maxDefLen = 16;
257
+ if (!eqEmptyValue(min) && !eqEmptyValue(max)) {
258
+ return `${max}`.length + (type === "integer" ? 0 : digitsValue + 1) + (XEUtils.toNumber(min) >= 0 ? 0 : 1);
396
259
  }
397
- }
398
- };
399
- const emitInputEvent = (inputValue, evnt) => {
400
- const inpImmediate = computeInpImmediate.value;
401
- const value = eqEmptyValue(inputValue) ? null : XEUtils.toNumber(inputValue);
402
- reactData.inputValue = inputValue;
403
- if (inpImmediate) {
404
- handleChange(value, inputValue, evnt);
405
- } else {
406
- dispatchEvent("input", { value }, evnt);
407
- if ($xeForm && formItemInfo) {
408
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
260
+ if (maxLength || maxlength) {
261
+ return XEUtils.toNumber(maxLength || maxlength);
409
262
  }
410
- }
411
- };
412
- const inputEvent = (evnt) => {
413
- const inputElem = evnt.target;
414
- const value = inputElem.value;
415
- emitInputEvent(value, evnt);
416
- };
417
- const changeEvent = (evnt) => {
418
- const inpImmediate = computeInpImmediate.value;
419
- if (!inpImmediate) {
420
- triggerEvent(evnt);
421
- }
422
- dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
423
- };
424
- const focusEvent = (evnt) => {
425
- const inputReadonly = computeInputReadonly.value;
426
- if (!inputReadonly) {
263
+ return maxDefLen;
264
+ });
265
+ const computeInpImmediate = computed(() => {
266
+ const { immediate } = props;
267
+ return immediate;
268
+ });
269
+ const computeNumValue = computed(() => {
270
+ const { type } = props;
427
271
  const { inputValue } = reactData;
428
- reactData.inputValue = eqEmptyValue(inputValue) ? "" : `${XEUtils.toNumber(inputValue)}`;
429
- reactData.isFocus = true;
430
- reactData.isActivated = true;
431
- triggerEvent(evnt);
432
- }
433
- };
434
- const clickPrefixEvent = (evnt) => {
435
- const isDisabled = computeIsDisabled.value;
436
- if (!isDisabled) {
272
+ return type === "integer" ? XEUtils.toInteger(handleNumber(inputValue)) : XEUtils.toNumber(handleNumber(inputValue));
273
+ });
274
+ const computeNumLabel = computed(() => {
275
+ const { type, roundingMode, showCurrency, currencySymbol, autoFill } = props;
437
276
  const { inputValue } = reactData;
438
- dispatchEvent("prefix-click", { value: inputValue }, evnt);
439
- }
440
- };
441
- const clearValueEvent = (evnt, value) => {
442
- focus();
443
- handleChange(null, "", evnt);
444
- dispatchEvent("clear", { value }, evnt);
445
- dispatchEvent("lazy-change", { value }, evnt);
446
- nextTick(() => {
447
- handleShowTip();
277
+ const digitsValue = computeDigitsValue.value;
278
+ if (type === "amount") {
279
+ const num = XEUtils.toNumber(inputValue);
280
+ const cfyOpts = { digits: digitsValue };
281
+ if (roundingMode === "floor") {
282
+ cfyOpts.floor = true;
283
+ } else if (roundingMode === "ceil") {
284
+ cfyOpts.ceil = true;
285
+ } else {
286
+ cfyOpts.round = true;
287
+ }
288
+ let amountLabel = XEUtils.commafy(num, cfyOpts);
289
+ if (!autoFill) {
290
+ const [iStr, dStr] = amountLabel.split(".");
291
+ if (dStr) {
292
+ const dRest = dStr.replace(/0+$/, "");
293
+ amountLabel = dRest ? [iStr, ".", dRest].join("") : iStr;
294
+ }
295
+ }
296
+ if (showCurrency) {
297
+ return `${currencySymbol || getI18n("vxe.numberInput.currencySymbol") || ""}${amountLabel}`;
298
+ }
299
+ return amountLabel;
300
+ }
301
+ return XEUtils.toString(inputValue);
302
+ });
303
+ const computeIsDisabledSubtractNumber = computed(() => {
304
+ const { min } = props;
305
+ const { inputValue } = reactData;
306
+ const numValue = computeNumValue.value;
307
+ if ((inputValue || inputValue === 0) && min !== null) {
308
+ return numValue <= XEUtils.toNumber(min);
309
+ }
310
+ return false;
448
311
  });
449
- };
450
- const clickSuffixEvent = (evnt) => {
451
- const isDisabled = computeIsDisabled.value;
452
- if (!isDisabled) {
312
+ const computeIsDisabledAddNumber = computed(() => {
313
+ const { max } = props;
453
314
  const { inputValue } = reactData;
454
- dispatchEvent("suffix-click", { value: inputValue }, evnt);
455
- }
456
- };
457
- const updateModel = (val) => {
458
- const { type, roundingMode, autoFill } = props;
459
- const { inputValue } = reactData;
460
- const digitsValue = computeDigitsValue.value;
461
- const decimalsType = computeDecimalsType.value;
462
- if (eqEmptyValue(val)) {
463
- reactData.inputValue = "";
464
- } else {
465
- let textValue = "" + val;
315
+ const numValue = computeNumValue.value;
316
+ if ((inputValue || inputValue === 0) && max !== null) {
317
+ return numValue >= XEUtils.toNumber(max);
318
+ }
319
+ return false;
320
+ });
321
+ const computeInpClassNamevalue = computed(() => {
322
+ const { inputClassName } = props;
323
+ return "vxe-number-input--input" + (inputClassName ? " " + inputClassName : "");
324
+ });
325
+ const computeCurrStyle = computed(() => {
326
+ const { width } = props;
327
+ const stys = {};
328
+ if (width) {
329
+ stys.width = toCssUnit(width);
330
+ }
331
+ return stys;
332
+ });
333
+ const refMaps = {
334
+ refElem,
335
+ refInput: refInputTarget
336
+ };
337
+ const computeMaps = {
338
+ computeControlOpts
339
+ };
340
+ const $xeNumberInput = {
341
+ xID,
342
+ props,
343
+ context,
344
+ reactData,
345
+ internalData,
346
+ getRefMaps: () => refMaps,
347
+ getComputeMaps: () => computeMaps
348
+ };
349
+ const dispatchEvent = (type, params, evnt) => {
350
+ emit(type, createEvent(evnt, { $numberInput: $xeNumberInput }, params));
351
+ };
352
+ const handleNumberString = (val) => {
353
+ if (XEUtils.eqNull(val)) {
354
+ return "";
355
+ }
356
+ return `${val}`;
357
+ };
358
+ const getNumberValue = (val) => {
359
+ const { type, exponential, roundingMode, autoFill } = props;
360
+ const inpMaxLength = computeInpMaxLength.value;
361
+ const digitsValue = computeDigitsValue.value;
362
+ const decimalsType = computeDecimalsType.value;
363
+ let restVal = "";
466
364
  if (decimalsType) {
467
- textValue = toFloatValueFixed(val, type, digitsValue, roundingMode);
365
+ restVal = toFloatValueFixed(val, type, digitsValue, roundingMode);
468
366
  if (!autoFill) {
469
- textValue = "" + XEUtils.toNumber(textValue);
367
+ restVal = handleNumberString(XEUtils.toNumber(restVal));
470
368
  }
369
+ } else {
370
+ restVal = handleNumberString(val);
471
371
  }
472
- if (textValue !== inputValue) {
473
- reactData.inputValue = textValue;
372
+ if (exponential && (val === restVal || handleNumberString(val).toLowerCase() === XEUtils.toNumber(restVal).toExponential())) {
373
+ return val;
474
374
  }
475
- }
476
- };
477
- const initValue = () => {
478
- const { type, roundingMode, autoFill } = props;
479
- const { inputValue } = reactData;
480
- const digitsValue = computeDigitsValue.value;
481
- const decimalsType = computeDecimalsType.value;
482
- if (decimalsType) {
483
- if (inputValue) {
484
- let textValue = "";
485
- let validValue = null;
486
- if (inputValue) {
487
- textValue = toFloatValueFixed(inputValue, type, digitsValue, roundingMode);
488
- validValue = XEUtils.toNumber(textValue);
375
+ return restVal.slice(0, inpMaxLength);
376
+ };
377
+ const triggerEvent = (evnt) => {
378
+ const { inputValue } = reactData;
379
+ dispatchEvent(evnt.type, { value: inputValue }, evnt);
380
+ };
381
+ const handleChange = (val, inputValue, evnt) => {
382
+ const value = eqEmptyValue(val) ? null : Number(val);
383
+ const isChange = value !== props.modelValue;
384
+ if (isChange) {
385
+ internalData.isUM = true;
386
+ emit("update:modelValue", value);
387
+ }
388
+ if (reactData.inputValue !== inputValue) {
389
+ nextTick(() => {
390
+ reactData.inputValue = inputValue || "";
391
+ });
392
+ }
393
+ dispatchEvent("input", { value }, evnt);
394
+ if (isChange) {
395
+ dispatchEvent("change", { value }, evnt);
396
+ if ($xeForm && formItemInfo) {
397
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
398
+ }
399
+ }
400
+ };
401
+ const emitInputEvent = (inputValue, evnt) => {
402
+ const inpImmediate = computeInpImmediate.value;
403
+ const value = eqEmptyValue(inputValue) ? null : XEUtils.toNumber(inputValue);
404
+ reactData.inputValue = inputValue;
405
+ if (inpImmediate) {
406
+ handleChange(value, inputValue, evnt);
407
+ } else {
408
+ dispatchEvent("input", { value }, evnt);
409
+ if ($xeForm && formItemInfo) {
410
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
411
+ }
412
+ }
413
+ };
414
+ const inputEvent = (evnt) => {
415
+ const inputElem = evnt.target;
416
+ const value = inputElem.value;
417
+ emitInputEvent(value, evnt);
418
+ };
419
+ const changeEvent = (evnt) => {
420
+ const inpImmediate = computeInpImmediate.value;
421
+ if (!inpImmediate) {
422
+ triggerEvent(evnt);
423
+ }
424
+ dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
425
+ };
426
+ const focusEvent = (evnt) => {
427
+ const inputReadonly = computeInputReadonly.value;
428
+ if (!inputReadonly) {
429
+ const { inputValue } = reactData;
430
+ reactData.inputValue = eqEmptyValue(inputValue) ? "" : `${XEUtils.toNumber(inputValue)}`;
431
+ reactData.isFocus = true;
432
+ reactData.isActivated = true;
433
+ triggerEvent(evnt);
434
+ }
435
+ };
436
+ const clickPrefixEvent = (evnt) => {
437
+ const isDisabled = computeIsDisabled.value;
438
+ if (!isDisabled) {
439
+ const { inputValue } = reactData;
440
+ dispatchEvent("prefix-click", { value: inputValue }, evnt);
441
+ }
442
+ };
443
+ const clearValueEvent = (evnt, value) => {
444
+ focus();
445
+ handleChange(null, "", evnt);
446
+ dispatchEvent("clear", { value }, evnt);
447
+ dispatchEvent("lazy-change", { value }, evnt);
448
+ nextTick(() => {
449
+ handleShowTip();
450
+ });
451
+ };
452
+ const clickSuffixEvent = (evnt) => {
453
+ const isDisabled = computeIsDisabled.value;
454
+ if (!isDisabled) {
455
+ const { inputValue } = reactData;
456
+ dispatchEvent("suffix-click", { value: inputValue }, evnt);
457
+ }
458
+ };
459
+ const updateModel = (val) => {
460
+ const { type, roundingMode, autoFill } = props;
461
+ const { inputValue } = reactData;
462
+ const digitsValue = computeDigitsValue.value;
463
+ const decimalsType = computeDecimalsType.value;
464
+ if (eqEmptyValue(val)) {
465
+ reactData.inputValue = "";
466
+ } else {
467
+ let textValue = "" + val;
468
+ if (decimalsType) {
469
+ textValue = toFloatValueFixed(val, type, digitsValue, roundingMode);
489
470
  if (!autoFill) {
490
- textValue = `${validValue}`;
471
+ textValue = "" + XEUtils.toNumber(textValue);
491
472
  }
492
473
  }
493
- if (inputValue !== validValue) {
494
- handleChange(validValue, textValue, { type: "init" });
495
- } else {
474
+ if (textValue !== inputValue) {
496
475
  reactData.inputValue = textValue;
497
476
  }
498
477
  }
499
- }
500
- };
501
- const validMaxNum = (num) => {
502
- return props.max === null || props.max === "" || XEUtils.toNumber(num) <= XEUtils.toNumber(props.max);
503
- };
504
- const validMinNum = (num) => {
505
- return props.min === null || props.min === "" || XEUtils.toNumber(num) >= XEUtils.toNumber(props.min);
506
- };
507
- const afterCheckValue = () => {
508
- const { type, min, max, negative, exponential, clearable } = props;
509
- const { inputValue } = reactData;
510
- const inputReadonly = computeInputReadonly.value;
511
- if (!inputReadonly) {
512
- if (eqEmptyValue(inputValue)) {
513
- if (clearable) {
514
- handleChange(null, "", { type: "check" });
515
- return;
516
- }
517
- let inpNumVal = null;
518
- let inpValue = inputValue;
519
- if (min || min === 0) {
520
- inpNumVal = XEUtils.toNumber(min);
521
- inpValue = `${inpNumVal}`;
478
+ };
479
+ const initValue = () => {
480
+ const { type, roundingMode, autoFill } = props;
481
+ const { inputValue } = reactData;
482
+ const digitsValue = computeDigitsValue.value;
483
+ const decimalsType = computeDecimalsType.value;
484
+ if (decimalsType) {
485
+ if (inputValue) {
486
+ let textValue = "";
487
+ let validValue = null;
488
+ if (inputValue) {
489
+ textValue = toFloatValueFixed(inputValue, type, digitsValue, roundingMode);
490
+ validValue = XEUtils.toNumber(textValue);
491
+ if (!autoFill) {
492
+ textValue = `${validValue}`;
493
+ }
494
+ }
495
+ if (inputValue !== validValue) {
496
+ handleChange(validValue, textValue, { type: "init" });
497
+ } else {
498
+ reactData.inputValue = textValue;
499
+ }
522
500
  }
523
- handleChange(inpNumVal, `${inpValue || ""}`, { type: "check" });
524
- return;
525
501
  }
526
- if (inputValue || min || max) {
527
- let inpNumVal = type === "integer" ? XEUtils.toInteger(handleNumber(inputValue)) : XEUtils.toNumber(handleNumber(inputValue));
528
- if (!validMinNum(inpNumVal)) {
529
- inpNumVal = min;
530
- } else if (!validMaxNum(inpNumVal)) {
531
- inpNumVal = max;
532
- }
533
- if (!negative) {
534
- inpNumVal = Math.abs(inpNumVal);
502
+ };
503
+ const validMaxNum = (num) => {
504
+ return props.max === null || props.max === "" || XEUtils.toNumber(num) <= XEUtils.toNumber(props.max);
505
+ };
506
+ const validMinNum = (num) => {
507
+ return props.min === null || props.min === "" || XEUtils.toNumber(num) >= XEUtils.toNumber(props.min);
508
+ };
509
+ const afterCheckValue = () => {
510
+ const { type, min, max, negative, exponential, clearable } = props;
511
+ const { inputValue } = reactData;
512
+ const inputReadonly = computeInputReadonly.value;
513
+ if (!inputReadonly) {
514
+ if (eqEmptyValue(inputValue)) {
515
+ if (clearable) {
516
+ handleChange(null, "", { type: "check" });
517
+ return;
518
+ }
519
+ let inpNumVal = null;
520
+ let inpValue = inputValue;
521
+ if (min || min === 0) {
522
+ inpNumVal = XEUtils.toNumber(min);
523
+ inpValue = `${inpNumVal}`;
524
+ }
525
+ handleChange(inpNumVal, `${inpValue || ""}`, { type: "check" });
526
+ return;
535
527
  }
536
- if (exponential) {
537
- const inpStringVal = handleNumberString(inputValue).toLowerCase();
538
- if (inpStringVal === XEUtils.toNumber(inpNumVal).toExponential()) {
539
- inpNumVal = inpStringVal;
528
+ if (inputValue || min || max) {
529
+ let inpNumVal = type === "integer" ? XEUtils.toInteger(handleNumber(inputValue)) : XEUtils.toNumber(handleNumber(inputValue));
530
+ if (!validMinNum(inpNumVal)) {
531
+ inpNumVal = min;
532
+ } else if (!validMaxNum(inpNumVal)) {
533
+ inpNumVal = max;
534
+ }
535
+ if (!negative) {
536
+ inpNumVal = Math.abs(inpNumVal);
540
537
  }
538
+ if (exponential) {
539
+ const inpStringVal = handleNumberString(inputValue).toLowerCase();
540
+ if (inpStringVal === XEUtils.toNumber(inpNumVal).toExponential()) {
541
+ inpNumVal = inpStringVal;
542
+ }
543
+ }
544
+ const inpValue = getNumberValue(inpNumVal);
545
+ handleChange(eqEmptyValue(inpValue) ? null : Number(inpValue), inpValue, { type: "check" });
541
546
  }
542
- const inpValue = getNumberValue(inpNumVal);
543
- handleChange(eqEmptyValue(inpValue) ? null : Number(inpValue), inpValue, { type: "check" });
544
547
  }
545
- }
546
- };
547
- const blurEvent = (evnt) => {
548
- const { inputValue } = reactData;
549
- const inpImmediate = computeInpImmediate.value;
550
- const value = inputValue ? Number(inputValue) : null;
551
- if (!inpImmediate) {
552
- handleChange(value, handleNumberString(inputValue), evnt);
553
- }
554
- afterCheckValue();
555
- reactData.isFocus = false;
556
- reactData.isActivated = false;
557
- dispatchEvent("blur", { value }, evnt);
558
- if ($xeForm && formItemInfo) {
559
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
560
- }
561
- };
562
- const mouseenterEvent = () => {
563
- handleShowTip();
564
- };
565
- const mouseleaveEvent = () => {
566
- handleHideTip();
567
- };
568
- const numberChange = (isPlus, evnt) => {
569
- const { min, max, type } = props;
570
- const { inputValue } = reactData;
571
- const stepValue = computeStepValue.value;
572
- const numValue = type === "integer" ? XEUtils.toInteger(handleNumber(inputValue)) : XEUtils.toNumber(handleNumber(inputValue));
573
- const newValue = isPlus ? XEUtils.add(numValue, stepValue) : XEUtils.subtract(numValue, stepValue);
574
- let restNum;
575
- if (!validMinNum(newValue)) {
576
- restNum = min;
577
- } else if (!validMaxNum(newValue)) {
578
- restNum = max;
579
- } else {
580
- restNum = newValue;
581
- }
582
- emitInputEvent(getNumberValue(restNum), evnt);
583
- };
584
- const numberPlusEvent = (evnt) => {
585
- const isDisabled = computeIsDisabled.value;
586
- const formReadonly = computeFormReadonly.value;
587
- const isDisabledAddNumber = computeIsDisabledAddNumber.value;
588
- if (!isDisabled && !formReadonly && !isDisabledAddNumber) {
589
- numberChange(true, evnt);
590
- }
591
- reactData.isActivated = true;
592
- handleShowTip();
593
- dispatchEvent("plus-number", { value: reactData.inputValue }, evnt);
594
- dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
595
- dispatchEvent("next-number", { value: reactData.inputValue }, evnt);
596
- };
597
- const numberMinusEvent = (evnt) => {
598
- const isDisabled = computeIsDisabled.value;
599
- const formReadonly = computeFormReadonly.value;
600
- const isDisabledSubtractNumber = computeIsDisabledSubtractNumber.value;
601
- if (!isDisabled && !formReadonly && !isDisabledSubtractNumber) {
602
- numberChange(false, evnt);
603
- }
604
- reactData.isActivated = true;
605
- handleShowTip();
606
- dispatchEvent("minus-number", { value: reactData.inputValue }, evnt);
607
- dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
608
- dispatchEvent("prev-number", { value: reactData.inputValue }, evnt);
609
- };
610
- const numberKeydownEvent = (evnt) => {
611
- const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
612
- const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
613
- if (isUpArrow || isDwArrow) {
614
- evnt.preventDefault();
615
- if (isUpArrow) {
616
- numberPlusEvent(evnt);
548
+ };
549
+ const blurEvent = (evnt) => {
550
+ const { inputValue } = reactData;
551
+ const inpImmediate = computeInpImmediate.value;
552
+ const value = inputValue ? Number(inputValue) : null;
553
+ if (!inpImmediate) {
554
+ handleChange(value, handleNumberString(inputValue), evnt);
555
+ }
556
+ afterCheckValue();
557
+ reactData.isFocus = false;
558
+ reactData.isActivated = false;
559
+ dispatchEvent("blur", { value }, evnt);
560
+ if ($xeForm && formItemInfo) {
561
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
562
+ }
563
+ };
564
+ const mouseenterEvent = () => {
565
+ handleShowTip();
566
+ };
567
+ const mouseleaveEvent = () => {
568
+ handleHideTip();
569
+ };
570
+ const numberChange = (isPlus, evnt) => {
571
+ const { min, max, type } = props;
572
+ const { inputValue } = reactData;
573
+ const stepValue = computeStepValue.value;
574
+ const numValue = type === "integer" ? XEUtils.toInteger(handleNumber(inputValue)) : XEUtils.toNumber(handleNumber(inputValue));
575
+ const newValue = isPlus ? XEUtils.add(numValue, stepValue) : XEUtils.subtract(numValue, stepValue);
576
+ let restNum;
577
+ if (!validMinNum(newValue)) {
578
+ restNum = min;
579
+ } else if (!validMaxNum(newValue)) {
580
+ restNum = max;
617
581
  } else {
618
- numberMinusEvent(evnt);
582
+ restNum = newValue;
619
583
  }
620
- }
621
- };
622
- const handleShowTip = () => {
623
- const { type, showTooltip } = props;
624
- const { inputValue } = reactData;
625
- if (showTooltip) {
626
- if (VxeUI.tooltip) {
627
- const numLabel = computeNumLabel.value;
628
- const tooltipOpts = computeTooltipOpts.value;
629
- const { contentMethod } = tooltipOpts;
630
- const inputElem = refInputTarget.value;
631
- const content = getText(
632
- contentMethod ? contentMethod({
633
- $numberInput: $xeNumberInput,
634
- type,
635
- inputValue: inputElem.value,
636
- value: inputValue || "",
637
- label: numLabel
638
- }) : numLabel
639
- );
640
- if (content) {
641
- VxeUI.tooltip.open(
642
- inputElem,
643
- Object.assign(
644
- {},
645
- {
646
- ...tooltipOpts,
647
- content
648
- },
649
- {
650
- contentMethod: void 0
651
- }
652
- )
653
- );
584
+ emitInputEvent(getNumberValue(restNum), evnt);
585
+ };
586
+ const numberPlusEvent = (evnt) => {
587
+ const isDisabled = computeIsDisabled.value;
588
+ const formReadonly = computeFormReadonly.value;
589
+ const isDisabledAddNumber = computeIsDisabledAddNumber.value;
590
+ if (!isDisabled && !formReadonly && !isDisabledAddNumber) {
591
+ numberChange(true, evnt);
592
+ }
593
+ reactData.isActivated = true;
594
+ handleShowTip();
595
+ dispatchEvent("plus-number", { value: reactData.inputValue }, evnt);
596
+ dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
597
+ dispatchEvent("next-number", { value: reactData.inputValue }, evnt);
598
+ };
599
+ const numberMinusEvent = (evnt) => {
600
+ const isDisabled = computeIsDisabled.value;
601
+ const formReadonly = computeFormReadonly.value;
602
+ const isDisabledSubtractNumber = computeIsDisabledSubtractNumber.value;
603
+ if (!isDisabled && !formReadonly && !isDisabledSubtractNumber) {
604
+ numberChange(false, evnt);
605
+ }
606
+ reactData.isActivated = true;
607
+ handleShowTip();
608
+ dispatchEvent("minus-number", { value: reactData.inputValue }, evnt);
609
+ dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
610
+ dispatchEvent("prev-number", { value: reactData.inputValue }, evnt);
611
+ };
612
+ const numberKeydownEvent = (evnt) => {
613
+ const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
614
+ const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
615
+ if (isUpArrow || isDwArrow) {
616
+ evnt.preventDefault();
617
+ if (isUpArrow) {
618
+ numberPlusEvent(evnt);
654
619
  } else {
620
+ numberMinusEvent(evnt);
621
+ }
622
+ }
623
+ };
624
+ const handleShowTip = () => {
625
+ const { type, showTooltip } = props;
626
+ const { inputValue } = reactData;
627
+ if (showTooltip) {
628
+ if (VxeUI.tooltip) {
629
+ const numLabel = computeNumLabel.value;
630
+ const tooltipOpts = computeTooltipOpts.value;
631
+ const { contentMethod } = tooltipOpts;
632
+ const inputElem = refInputTarget.value;
633
+ const content = getText(
634
+ contentMethod ? contentMethod({
635
+ $numberInput: $xeNumberInput,
636
+ type,
637
+ inputValue: inputElem.value,
638
+ value: inputValue || "",
639
+ label: numLabel
640
+ }) : numLabel
641
+ );
642
+ if (content) {
643
+ VxeUI.tooltip.open(
644
+ inputElem,
645
+ Object.assign(
646
+ {},
647
+ {
648
+ ...tooltipOpts,
649
+ content
650
+ },
651
+ {
652
+ contentMethod: void 0
653
+ }
654
+ )
655
+ );
656
+ } else {
657
+ VxeUI.tooltip.close();
658
+ }
659
+ }
660
+ }
661
+ };
662
+ const handleHideTip = () => {
663
+ const { showTooltip } = props;
664
+ if (showTooltip) {
665
+ if (VxeUI.tooltip) {
655
666
  VxeUI.tooltip.close();
656
667
  }
657
668
  }
658
- }
659
- };
660
- const handleHideTip = () => {
661
- const { showTooltip } = props;
662
- if (showTooltip) {
663
- if (VxeUI.tooltip) {
664
- VxeUI.tooltip.close();
669
+ };
670
+ const keydownEvent = (evnt) => {
671
+ const { type, negative, exponential, controls } = props;
672
+ const controlOpts = computeControlOpts.value;
673
+ const { isArrow } = controlOpts;
674
+ const inputReadonly = computeInputReadonly.value;
675
+ const isControlKey = hasControlKey(evnt);
676
+ const isShiftKey = evnt.shiftKey;
677
+ const isAltKey = evnt.altKey;
678
+ const key = evnt.key;
679
+ const keyCode = evnt.keyCode;
680
+ const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
681
+ const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
682
+ const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
683
+ if (!isControlKey && !isShiftKey && !isAltKey) {
684
+ if (globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.SPACEBAR) || !negative && key === "-" || type === "integer" && key === "." || (!exponential || keyCode !== 69) && keyCode >= 65 && keyCode <= 90 || keyCode >= 186 && keyCode <= 188 || keyCode >= 191) {
685
+ evnt.preventDefault();
686
+ }
665
687
  }
666
- }
667
- };
668
- const keydownEvent = (evnt) => {
669
- const { type, negative, exponential, controls } = props;
670
- const controlOpts = computeControlOpts.value;
671
- const { isArrow } = controlOpts;
672
- const inputReadonly = computeInputReadonly.value;
673
- const isControlKey = hasControlKey(evnt);
674
- const isShiftKey = evnt.shiftKey;
675
- const isAltKey = evnt.altKey;
676
- const key = evnt.key;
677
- const keyCode = evnt.keyCode;
678
- const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
679
- const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
680
- const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
681
- if (!isControlKey && !isShiftKey && !isAltKey) {
682
- if (globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.SPACEBAR) || !negative && key === "-" || type === "integer" && key === "." || (!exponential || keyCode !== 69) && keyCode >= 65 && keyCode <= 90 || keyCode >= 186 && keyCode <= 188 || keyCode >= 191) {
683
- evnt.preventDefault();
688
+ if (isEsc) {
689
+ afterCheckValue();
690
+ } else if (isUpArrow || isDwArrow) {
691
+ if (isEnableConf(controlOpts) && (controls === false ? controls : isArrow) && !inputReadonly) {
692
+ numberKeydownEvent(evnt);
693
+ }
684
694
  }
685
- }
686
- if (isEsc) {
687
- afterCheckValue();
688
- } else if (isUpArrow || isDwArrow) {
689
- if (isEnableConf(controlOpts) && (controls === false ? controls : isArrow) && !inputReadonly) {
690
- numberKeydownEvent(evnt);
695
+ triggerEvent(evnt);
696
+ };
697
+ const keyupEvent = (evnt) => {
698
+ handleShowTip();
699
+ triggerEvent(evnt);
700
+ };
701
+ const stopDown = () => {
702
+ const { dnTimeout } = internalData;
703
+ if (dnTimeout) {
704
+ clearTimeout(dnTimeout);
705
+ internalData.dnTimeout = void 0;
706
+ }
707
+ };
708
+ const stopAutoIncrement = () => {
709
+ const { ainTimeout } = internalData;
710
+ if (ainTimeout) {
711
+ clearTimeout(ainTimeout);
712
+ internalData.ainTimeout = void 0;
691
713
  }
692
- }
693
- triggerEvent(evnt);
694
- };
695
- const keyupEvent = (evnt) => {
696
- handleShowTip();
697
- triggerEvent(evnt);
698
- };
699
- const stopDown = () => {
700
- const { dnTimeout } = internalData;
701
- if (dnTimeout) {
702
- clearTimeout(dnTimeout);
703
- internalData.dnTimeout = void 0;
704
- }
705
- };
706
- const stopAutoIncrement = () => {
707
- const { ainTimeout } = internalData;
708
- if (ainTimeout) {
709
- clearTimeout(ainTimeout);
710
- internalData.ainTimeout = void 0;
711
- }
712
- };
713
- const numberDownMinusEvent = (evnt) => {
714
- numberStopAll();
715
- internalData.ainTimeout = setTimeout(() => {
716
- numberMinusEvent(evnt);
717
- numberDownMinusEvent(evnt);
718
- }, 60);
719
- };
720
- const numberDownPlusEvent = (evnt) => {
721
- numberStopAll();
722
- internalData.ainTimeout = setTimeout(() => {
723
- numberPlusEvent(evnt);
724
- numberDownPlusEvent(evnt);
725
- }, 60);
726
- };
727
- const numberStopAll = () => {
728
- stopDown();
729
- stopAutoIncrement();
730
- };
731
- const numberClickEvent = (evnt) => {
732
- if (internalData.isMouseDown) {
733
- internalData.isMouseDown = false;
734
- } else {
714
+ };
715
+ const numberDownMinusEvent = (evnt) => {
735
716
  numberStopAll();
736
- const isAddNumber = hasClass(evnt.currentTarget, "is--plus");
737
- if (isAddNumber) {
738
- numberPlusEvent(evnt);
739
- } else {
717
+ internalData.ainTimeout = setTimeout(() => {
740
718
  numberMinusEvent(evnt);
741
- }
742
- }
743
- };
744
- const numberMousedownEvent = (evnt) => {
745
- numberStopAll();
746
- internalData.isMouseDown = true;
747
- if (evnt.button === 0) {
748
- const isAddNumber = hasClass(evnt.currentTarget, "is--plus");
749
- if (isAddNumber) {
719
+ numberDownMinusEvent(evnt);
720
+ }, 60);
721
+ };
722
+ const numberDownPlusEvent = (evnt) => {
723
+ numberStopAll();
724
+ internalData.ainTimeout = setTimeout(() => {
750
725
  numberPlusEvent(evnt);
726
+ numberDownPlusEvent(evnt);
727
+ }, 60);
728
+ };
729
+ const numberStopAll = () => {
730
+ stopDown();
731
+ stopAutoIncrement();
732
+ };
733
+ const numberClickEvent = (evnt) => {
734
+ if (internalData.isMouseDown) {
735
+ internalData.isMouseDown = false;
751
736
  } else {
752
- numberMinusEvent(evnt);
753
- }
754
- internalData.dnTimeout = setTimeout(() => {
737
+ numberStopAll();
738
+ const isAddNumber = hasClass(evnt.currentTarget, "is--plus");
755
739
  if (isAddNumber) {
756
- numberDownPlusEvent(evnt);
740
+ numberPlusEvent(evnt);
757
741
  } else {
758
- numberDownMinusEvent(evnt);
759
- }
760
- }, 500);
761
- }
762
- };
763
- const wheelEvent = (evnt) => {
764
- const { controls } = props;
765
- const controlOpts = computeControlOpts.value;
766
- const { isWheel } = controlOpts;
767
- const inputReadonly = computeInputReadonly.value;
768
- if (isEnableConf(controlOpts) && (controls === false ? controls : isWheel) && !inputReadonly) {
769
- if (reactData.isActivated) {
770
- evnt.stopPropagation();
771
- evnt.preventDefault();
772
- const delta = evnt.deltaY;
773
- if (delta > 0) {
774
742
  numberMinusEvent(evnt);
775
- } else if (delta < 0) {
743
+ }
744
+ }
745
+ };
746
+ const numberMousedownEvent = (evnt) => {
747
+ numberStopAll();
748
+ internalData.isMouseDown = true;
749
+ if (evnt.button === 0) {
750
+ const isAddNumber = hasClass(evnt.currentTarget, "is--plus");
751
+ if (isAddNumber) {
776
752
  numberPlusEvent(evnt);
753
+ } else {
754
+ numberMinusEvent(evnt);
777
755
  }
756
+ internalData.dnTimeout = setTimeout(() => {
757
+ if (isAddNumber) {
758
+ numberDownPlusEvent(evnt);
759
+ } else {
760
+ numberDownMinusEvent(evnt);
761
+ }
762
+ }, 500);
778
763
  }
779
- }
780
- triggerEvent(evnt);
781
- };
782
- const clickEvent = (evnt) => {
783
- handleShowTip();
784
- triggerEvent(evnt);
785
- };
786
- const handleGlobalMousedownEvent = (evnt) => {
787
- const { isActivated } = reactData;
788
- const el = refElem.value;
789
- const panelElem = refInputPanel.value;
790
- const isDisabled = computeIsDisabled.value;
791
- const inputReadonly = computeInputReadonly.value;
792
- const inpImmediate = computeInpImmediate.value;
793
- if (!isDisabled && !inputReadonly && isActivated) {
794
- reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
795
- if (!reactData.isActivated) {
796
- if (!inpImmediate) {
797
- const { inputValue } = reactData;
798
- const value = inputValue ? Number(inputValue) : null;
799
- handleChange(value, handleNumberString(inputValue), evnt);
764
+ };
765
+ const wheelEvent = (evnt) => {
766
+ const { controls } = props;
767
+ const controlOpts = computeControlOpts.value;
768
+ const { isWheel } = controlOpts;
769
+ const inputReadonly = computeInputReadonly.value;
770
+ if (isEnableConf(controlOpts) && (controls === false ? controls : isWheel) && !inputReadonly) {
771
+ if (reactData.isActivated) {
772
+ evnt.stopPropagation();
773
+ evnt.preventDefault();
774
+ const delta = evnt.deltaY;
775
+ if (delta > 0) {
776
+ numberMinusEvent(evnt);
777
+ } else if (delta < 0) {
778
+ numberPlusEvent(evnt);
779
+ }
800
780
  }
801
- afterCheckValue();
802
- handleHideTip();
803
781
  }
804
- }
805
- };
806
- const handleGlobalKeydownEvent = (evnt) => {
807
- const { clearable } = props;
808
- const isDisabled = computeIsDisabled.value;
809
- const inputReadonly = computeInputReadonly.value;
810
- if (!isDisabled && !inputReadonly) {
811
- const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
812
- const isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
813
- let isActivated = reactData.isActivated;
814
- if (isTab) {
815
- if (isActivated) {
782
+ triggerEvent(evnt);
783
+ };
784
+ const clickEvent = (evnt) => {
785
+ handleShowTip();
786
+ triggerEvent(evnt);
787
+ };
788
+ const handleGlobalMousedownEvent = (evnt) => {
789
+ const { isActivated } = reactData;
790
+ const el = refElem.value;
791
+ const panelElem = refInputPanel.value;
792
+ const isDisabled = computeIsDisabled.value;
793
+ const inputReadonly = computeInputReadonly.value;
794
+ const inpImmediate = computeInpImmediate.value;
795
+ if (!isDisabled && !inputReadonly && isActivated) {
796
+ reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
797
+ if (!reactData.isActivated) {
798
+ if (!inpImmediate) {
799
+ const { inputValue } = reactData;
800
+ const value = inputValue ? Number(inputValue) : null;
801
+ handleChange(value, handleNumberString(inputValue), evnt);
802
+ }
816
803
  afterCheckValue();
804
+ handleHideTip();
817
805
  }
818
- isActivated = false;
819
- reactData.isActivated = isActivated;
820
806
  }
821
- if (isDel && clearable) {
822
- if (isActivated) {
823
- clearValueEvent(evnt, null);
807
+ };
808
+ const handleGlobalKeydownEvent = (evnt) => {
809
+ const { clearable } = props;
810
+ const isDisabled = computeIsDisabled.value;
811
+ const inputReadonly = computeInputReadonly.value;
812
+ if (!isDisabled && !inputReadonly) {
813
+ const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
814
+ const isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
815
+ let isActivated = reactData.isActivated;
816
+ if (isTab) {
817
+ if (isActivated) {
818
+ afterCheckValue();
819
+ }
820
+ isActivated = false;
821
+ reactData.isActivated = isActivated;
822
+ }
823
+ if (isDel && clearable) {
824
+ if (isActivated) {
825
+ clearValueEvent(evnt, null);
826
+ }
824
827
  }
825
828
  }
826
- }
827
- };
828
- const handleGlobalBlurEvent = () => {
829
- const { isActivated } = reactData;
830
- if (isActivated) {
831
- afterCheckValue();
832
- }
833
- };
834
- const numberInputMethods = {
835
- dispatchEvent,
836
- focus() {
837
- const inputReadonly = computeInputReadonly.value;
838
- if (!inputReadonly) {
839
- const inputElem = refInputTarget.value;
840
- reactData.isActivated = true;
841
- inputElem.focus();
829
+ };
830
+ const handleGlobalBlurEvent = () => {
831
+ const { isActivated } = reactData;
832
+ if (isActivated) {
833
+ afterCheckValue();
842
834
  }
843
- return nextTick();
844
- },
845
- blur() {
846
- const inputElem = refInputTarget.value;
847
- inputElem.blur();
848
- reactData.isActivated = false;
849
- return nextTick();
850
- },
851
- select() {
852
- const inputElem = refInputTarget.value;
853
- inputElem.select();
854
- reactData.isActivated = false;
855
- return nextTick();
856
- }
857
- };
858
- Object.assign($xeNumberInput, numberInputMethods);
859
- const renderPrefixIcon = () => {
860
- const { prefixIcon } = props;
861
- const prefixOpts = computePrefixOpts.value;
862
- const prefixSlot = slots.prefix;
863
- const preIcon = prefixIcon || prefixOpts.icon;
864
- const sufContent = prefixOpts.content;
865
- return prefixSlot || preIcon || sufContent ? h(
866
- "div",
867
- {
868
- class: "vxe-number-input--prefix",
869
- onClick: clickPrefixEvent
835
+ };
836
+ const numberInputMethods = {
837
+ dispatchEvent,
838
+ focus() {
839
+ const inputReadonly = computeInputReadonly.value;
840
+ if (!inputReadonly) {
841
+ const inputElem = refInputTarget.value;
842
+ reactData.isActivated = true;
843
+ inputElem.focus();
844
+ }
845
+ return nextTick();
870
846
  },
871
- [
872
- h(
873
- "div",
874
- {
875
- class: "vxe-number-input--prefix-icon"
876
- },
877
- prefixSlot ? getSlotVNs(prefixSlot({})) : [
878
- preIcon ? h("i", {
879
- class: preIcon
880
- }) : renderEmptyElement($xeNumberInput),
881
- sufContent ? h(
882
- "span",
883
- {
884
- class: "vxe-prefix-input--suffix-text"
885
- },
886
- `${sufContent}`
887
- ) : renderEmptyElement($xeNumberInput)
888
- ]
889
- )
890
- ]
891
- ) : renderEmptyElement($xeNumberInput);
892
- };
893
- const renderSuffixIcon = () => {
894
- const { suffixIcon } = props;
895
- const { inputValue } = reactData;
896
- const suffixSlot = slots.suffix;
897
- const suffixOpts = computeSuffixOpts.value;
898
- const isDisabled = computeIsDisabled.value;
899
- const isClearable = computeIsClearable.value;
900
- const sufIcon = suffixIcon || suffixOpts.icon;
901
- const sufContent = suffixOpts.content;
902
- return h(
903
- "div",
904
- {
905
- class: [
906
- "vxe-number-input--suffix",
907
- {
908
- "is--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
909
- }
910
- ]
847
+ blur() {
848
+ const inputElem = refInputTarget.value;
849
+ inputElem.blur();
850
+ reactData.isActivated = false;
851
+ return nextTick();
911
852
  },
912
- [
913
- isClearable ? h(
914
- "div",
915
- {
916
- class: "vxe-number-input--clear-icon",
917
- onClick: clearValueEvent
918
- },
919
- [
920
- h("i", {
921
- class: getIcon().INPUT_CLEAR
922
- })
853
+ select() {
854
+ const inputElem = refInputTarget.value;
855
+ inputElem.select();
856
+ reactData.isActivated = false;
857
+ return nextTick();
858
+ }
859
+ };
860
+ Object.assign($xeNumberInput, numberInputMethods);
861
+ const renderPrefixIcon = () => {
862
+ const { prefixIcon } = props;
863
+ const prefixOpts = computePrefixOpts.value;
864
+ const prefixSlot = slots.prefix;
865
+ const preIcon = prefixIcon || prefixOpts.icon;
866
+ const sufContent = prefixOpts.content;
867
+ return prefixSlot || preIcon || sufContent ? h(
868
+ "div",
869
+ {
870
+ class: "vxe-number-input--prefix",
871
+ onClick: clickPrefixEvent
872
+ },
873
+ [
874
+ h(
875
+ "div",
876
+ {
877
+ class: "vxe-number-input--prefix-icon"
878
+ },
879
+ prefixSlot ? getSlotVNs(prefixSlot({})) : [
880
+ preIcon ? h("i", {
881
+ class: preIcon
882
+ }) : renderEmptyElement($xeNumberInput),
883
+ sufContent ? h(
884
+ "span",
885
+ {
886
+ class: "vxe-prefix-input--suffix-text"
887
+ },
888
+ `${sufContent}`
889
+ ) : renderEmptyElement($xeNumberInput)
890
+ ]
891
+ )
892
+ ]
893
+ ) : renderEmptyElement($xeNumberInput);
894
+ };
895
+ const renderSuffixIcon = () => {
896
+ const { suffixIcon } = props;
897
+ const { inputValue } = reactData;
898
+ const suffixSlot = slots.suffix;
899
+ const suffixOpts = computeSuffixOpts.value;
900
+ const isDisabled = computeIsDisabled.value;
901
+ const isClearable = computeIsClearable.value;
902
+ const sufIcon = suffixIcon || suffixOpts.icon;
903
+ const sufContent = suffixOpts.content;
904
+ return h(
905
+ "div",
906
+ {
907
+ class: [
908
+ "vxe-number-input--suffix",
909
+ {
910
+ "is--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
911
+ }
923
912
  ]
924
- ) : renderEmptyElement($xeNumberInput),
925
- suffixSlot || sufIcon || sufContent ? h(
926
- "div",
913
+ },
914
+ [
915
+ isClearable ? h(
916
+ "div",
917
+ {
918
+ class: "vxe-number-input--clear-icon",
919
+ onClick: clearValueEvent
920
+ },
921
+ [
922
+ h("i", {
923
+ class: getIcon().INPUT_CLEAR
924
+ })
925
+ ]
926
+ ) : renderEmptyElement($xeNumberInput),
927
+ suffixSlot || sufIcon || sufContent ? h(
928
+ "div",
929
+ {
930
+ class: "vxe-number-input--suffix-icon",
931
+ onClick: clickSuffixEvent
932
+ },
933
+ suffixSlot ? getSlotVNs(suffixSlot({})) : [
934
+ sufIcon ? h("i", {
935
+ class: sufIcon
936
+ }) : renderEmptyElement($xeNumberInput),
937
+ sufContent ? h(
938
+ "span",
939
+ {
940
+ class: "vxe-number-input--suffix-text"
941
+ },
942
+ `${sufContent}`
943
+ ) : renderEmptyElement($xeNumberInput)
944
+ ]
945
+ ) : renderEmptyElement($xeNumberInput)
946
+ ]
947
+ );
948
+ };
949
+ const renderInput = () => {
950
+ const { type, name, autocomplete, autoComplete } = props;
951
+ const { inputValue, isFocus } = reactData;
952
+ const isDisabled = computeIsDisabled.value;
953
+ const numLabel = computeNumLabel.value;
954
+ const inputReadonly = computeInputReadonly.value;
955
+ const inpMaxLength = computeInpMaxLength.value;
956
+ const inpPlaceholder = computeInpPlaceholder.value;
957
+ const inpClassName = computeInpClassNamevalue.value;
958
+ return h(
959
+ "div",
960
+ {
961
+ key: "ni",
962
+ class: "vxe-number-input--input-wrapper"
963
+ },
964
+ [
965
+ renderPrefixIcon(),
966
+ h(
967
+ "div",
968
+ {
969
+ class: "vxe-number-input--input-inner"
970
+ },
971
+ [
972
+ h("input", {
973
+ ref: refInputTarget,
974
+ class: inpClassName,
975
+ name,
976
+ type: "text",
977
+ value: !isFocus && type === "amount" ? numLabel : inputValue,
978
+ placeholder: inpPlaceholder,
979
+ maxlength: inpMaxLength,
980
+ readonly: inputReadonly,
981
+ disabled: isDisabled,
982
+ autocomplete: autoComplete || autocomplete,
983
+ onKeydown: keydownEvent,
984
+ onKeyup: keyupEvent,
985
+ onClick: clickEvent,
986
+ onInput: inputEvent,
987
+ onChange: changeEvent,
988
+ onFocus: focusEvent,
989
+ onBlur: blurEvent
990
+ }),
991
+ renderFloat()
992
+ ]
993
+ ),
994
+ renderSuffixIcon()
995
+ ]
996
+ );
997
+ };
998
+ const renderMinusBtn = () => {
999
+ const { minusIcon } = props;
1000
+ const isDisabledSubtractNumber = computeIsDisabledSubtractNumber.value;
1001
+ return h(
1002
+ "button",
1003
+ {
1004
+ key: "prev",
1005
+ class: [
1006
+ "vxe-number-input--minus-btn is--minus",
1007
+ {
1008
+ "is--disabled": isDisabledSubtractNumber
1009
+ }
1010
+ ],
1011
+ type: "button",
1012
+ onClick: numberClickEvent,
1013
+ onMousedown: numberMousedownEvent,
1014
+ onMouseup: numberStopAll,
1015
+ onMouseleave: numberStopAll
1016
+ },
1017
+ [
1018
+ h("i", {
1019
+ class: minusIcon || getIcon().NUMBER_INPUT_MINUS_NUM
1020
+ })
1021
+ ]
1022
+ );
1023
+ };
1024
+ const renderPlusBtn = () => {
1025
+ const { plusIcon } = props;
1026
+ const isDisabledAddNumber = computeIsDisabledAddNumber.value;
1027
+ return h(
1028
+ "button",
1029
+ {
1030
+ key: "next",
1031
+ class: [
1032
+ "vxe-number-input--plus-btn is--plus",
1033
+ {
1034
+ "is--disabled": isDisabledAddNumber
1035
+ }
1036
+ ],
1037
+ type: "button",
1038
+ onClick: numberClickEvent,
1039
+ onMousedown: numberMousedownEvent,
1040
+ onMouseup: numberStopAll,
1041
+ onMouseleave: numberStopAll
1042
+ },
1043
+ [
1044
+ h("i", {
1045
+ class: plusIcon || getIcon().NUMBER_INPUT_PLUS_NUM
1046
+ })
1047
+ ]
1048
+ );
1049
+ };
1050
+ const renderSideControl = () => {
1051
+ return h(
1052
+ "div",
1053
+ {
1054
+ key: "cplr",
1055
+ class: "vxe-number-input--side-control"
1056
+ },
1057
+ [renderPlusBtn(), renderMinusBtn()]
1058
+ );
1059
+ };
1060
+ const renderFloat = () => {
1061
+ const { floatContent } = props;
1062
+ const floatSlot = slots.float;
1063
+ if (floatContent || floatSlot) {
1064
+ return h(
1065
+ "span",
927
1066
  {
928
- class: "vxe-number-input--suffix-icon",
929
- onClick: clickSuffixEvent
1067
+ class: "vxe-number-input--float-wrapper"
930
1068
  },
931
- suffixSlot ? getSlotVNs(suffixSlot({})) : [
932
- sufIcon ? h("i", {
933
- class: sufIcon
934
- }) : renderEmptyElement($xeNumberInput),
935
- sufContent ? h(
936
- "span",
937
- {
938
- class: "vxe-number-input--suffix-text"
939
- },
940
- `${sufContent}`
941
- ) : renderEmptyElement($xeNumberInput)
942
- ]
943
- ) : renderEmptyElement($xeNumberInput)
944
- ]
945
- );
946
- };
947
- const renderInput = () => {
948
- const { type, name, autocomplete, autoComplete } = props;
949
- const { inputValue, isFocus } = reactData;
950
- const isDisabled = computeIsDisabled.value;
951
- const numLabel = computeNumLabel.value;
952
- const inputReadonly = computeInputReadonly.value;
953
- const inpMaxLength = computeInpMaxLength.value;
954
- const inpPlaceholder = computeInpPlaceholder.value;
955
- const inpClassName = computeInpClassNamevalue.value;
956
- return h(
957
- "div",
958
- {
959
- key: "ni",
960
- class: "vxe-number-input--input-wrapper"
961
- },
962
- [
963
- renderPrefixIcon(),
964
- h(
1069
+ floatSlot ? floatSlot({}) : getText(floatContent)
1070
+ );
1071
+ }
1072
+ return renderEmptyElement($xeNumberInput);
1073
+ };
1074
+ const renderVN = () => {
1075
+ const { className, controls, type, align, prefixIcon, suffixIcon, floatContent, floatAlign } = props;
1076
+ const { inputValue, isActivated } = reactData;
1077
+ const vSize = computeSize.value;
1078
+ const controlOpts = computeControlOpts.value;
1079
+ const { layout, showButton } = controlOpts;
1080
+ const isDisabled = computeIsDisabled.value;
1081
+ const formReadonly = computeFormReadonly.value;
1082
+ const numLabel = computeNumLabel.value;
1083
+ const prefixSlot = slots.prefix;
1084
+ const suffixSlot = slots.suffix;
1085
+ if (formReadonly) {
1086
+ return h(
965
1087
  "div",
966
1088
  {
967
- class: "vxe-number-input--input-inner"
1089
+ ref: refElem,
1090
+ class: ["vxe-number-input--readonly", `type--${type}`, className]
968
1091
  },
969
- [
970
- h("input", {
971
- ref: refInputTarget,
972
- class: inpClassName,
973
- name,
974
- type: "text",
975
- value: !isFocus && type === "amount" ? numLabel : inputValue,
976
- placeholder: inpPlaceholder,
977
- maxlength: inpMaxLength,
978
- readonly: inputReadonly,
979
- disabled: isDisabled,
980
- autocomplete: autoComplete || autocomplete,
981
- onKeydown: keydownEvent,
982
- onKeyup: keyupEvent,
983
- onClick: clickEvent,
984
- onInput: inputEvent,
985
- onChange: changeEvent,
986
- onFocus: focusEvent,
987
- onBlur: blurEvent
988
- }),
989
- renderFloat()
990
- ]
991
- ),
992
- renderSuffixIcon()
993
- ]
994
- );
995
- };
996
- const renderMinusBtn = () => {
997
- const { minusIcon } = props;
998
- const isDisabledSubtractNumber = computeIsDisabledSubtractNumber.value;
999
- return h(
1000
- "button",
1001
- {
1002
- key: "prev",
1003
- class: [
1004
- "vxe-number-input--minus-btn is--minus",
1005
- {
1006
- "is--disabled": isDisabledSubtractNumber
1007
- }
1008
- ],
1009
- type: "button",
1010
- onClick: numberClickEvent,
1011
- onMousedown: numberMousedownEvent,
1012
- onMouseup: numberStopAll,
1013
- onMouseleave: numberStopAll
1014
- },
1015
- [
1016
- h("i", {
1017
- class: minusIcon || getIcon().NUMBER_INPUT_MINUS_NUM
1018
- })
1019
- ]
1020
- );
1021
- };
1022
- const renderPlusBtn = () => {
1023
- const { plusIcon } = props;
1024
- const isDisabledAddNumber = computeIsDisabledAddNumber.value;
1025
- return h(
1026
- "button",
1027
- {
1028
- key: "next",
1029
- class: [
1030
- "vxe-number-input--plus-btn is--plus",
1031
- {
1032
- "is--disabled": isDisabledAddNumber
1033
- }
1034
- ],
1035
- type: "button",
1036
- onClick: numberClickEvent,
1037
- onMousedown: numberMousedownEvent,
1038
- onMouseup: numberStopAll,
1039
- onMouseleave: numberStopAll
1040
- },
1041
- [
1042
- h("i", {
1043
- class: plusIcon || getIcon().NUMBER_INPUT_PLUS_NUM
1044
- })
1045
- ]
1046
- );
1047
- };
1048
- const renderSideControl = () => {
1049
- return h(
1050
- "div",
1051
- {
1052
- key: "cplr",
1053
- class: "vxe-number-input--side-control"
1054
- },
1055
- [renderPlusBtn(), renderMinusBtn()]
1056
- );
1057
- };
1058
- const renderFloat = () => {
1059
- const { floatContent } = props;
1060
- const floatSlot = slots.float;
1061
- if (floatContent || floatSlot) {
1062
- return h(
1063
- "span",
1064
- {
1065
- class: "vxe-number-input--float-wrapper"
1066
- },
1067
- floatSlot ? floatSlot({}) : getText(floatContent)
1068
- );
1069
- }
1070
- return renderEmptyElement($xeNumberInput);
1071
- };
1072
- const renderVN = () => {
1073
- const { className, controls, type, align, prefixIcon, suffixIcon, floatContent, floatAlign } = props;
1074
- const { inputValue, isActivated } = reactData;
1075
- const vSize = computeSize.value;
1076
- const controlOpts = computeControlOpts.value;
1077
- const { layout, showButton } = controlOpts;
1078
- const isDisabled = computeIsDisabled.value;
1079
- const formReadonly = computeFormReadonly.value;
1080
- const numLabel = computeNumLabel.value;
1081
- const prefixSlot = slots.prefix;
1082
- const suffixSlot = slots.suffix;
1083
- if (formReadonly) {
1092
+ numLabel
1093
+ );
1094
+ }
1095
+ const currStyle = computeCurrStyle.value;
1096
+ const inputReadonly = computeInputReadonly.value;
1097
+ const isClearable = computeIsClearable.value;
1098
+ const isControls = isEnableConf(controlOpts) && (controls === false ? controls : showButton);
1084
1099
  return h(
1085
1100
  "div",
1086
1101
  {
1087
1102
  ref: refElem,
1088
- class: ["vxe-number-input--readonly", `type--${type}`, className]
1103
+ class: [
1104
+ "vxe-number-input",
1105
+ `type--${type}`,
1106
+ isControls ? `ctl--${layout === "right" || layout === "left" ? layout : "default"}` : "",
1107
+ floatContent ? `fla--${floatAlign || "center"}` : "",
1108
+ className,
1109
+ {
1110
+ [`size--${vSize}`]: vSize,
1111
+ [`is--${align}`]: align,
1112
+ "is--controls": isControls && !inputReadonly,
1113
+ "is--prefix": !!prefixSlot || prefixIcon,
1114
+ "is--suffix": !!suffixSlot || suffixIcon,
1115
+ "is--disabled": isDisabled,
1116
+ "is--active": isActivated,
1117
+ "show--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
1118
+ }
1119
+ ],
1120
+ style: currStyle,
1121
+ spellcheck: false,
1122
+ onMouseenter: mouseenterEvent,
1123
+ onMouseleave: mouseleaveEvent
1089
1124
  },
1090
- numLabel
1125
+ isControls ? layout === "right" ? [renderInput(), renderSideControl()] : layout === "left" ? [renderSideControl(), renderInput()] : [renderMinusBtn(), renderInput(), renderPlusBtn()] : [renderInput()]
1091
1126
  );
1092
- }
1093
- const currStyle = computeCurrStyle.value;
1094
- const inputReadonly = computeInputReadonly.value;
1095
- const isClearable = computeIsClearable.value;
1096
- const isControls = isEnableConf(controlOpts) && (controls === false ? controls : showButton);
1097
- return h(
1098
- "div",
1099
- {
1100
- ref: refElem,
1101
- class: [
1102
- "vxe-number-input",
1103
- `type--${type}`,
1104
- isControls ? `ctl--${layout === "right" || layout === "left" ? layout : "default"}` : "",
1105
- floatContent ? `fla--${floatAlign || "center"}` : "",
1106
- className,
1107
- {
1108
- [`size--${vSize}`]: vSize,
1109
- [`is--${align}`]: align,
1110
- "is--controls": isControls && !inputReadonly,
1111
- "is--prefix": !!prefixSlot || prefixIcon,
1112
- "is--suffix": !!suffixSlot || suffixIcon,
1113
- "is--disabled": isDisabled,
1114
- "is--active": isActivated,
1115
- "show--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
1116
- }
1117
- ],
1118
- style: currStyle,
1119
- spellcheck: false,
1120
- onMouseenter: mouseenterEvent,
1121
- onMouseleave: mouseleaveEvent
1122
- },
1123
- isControls ? layout === "right" ? [renderInput(), renderSideControl()] : layout === "left" ? [renderSideControl(), renderInput()] : [renderMinusBtn(), renderInput(), renderPlusBtn()] : [renderInput()]
1127
+ };
1128
+ $xeNumberInput.renderVN = renderVN;
1129
+ watch(
1130
+ () => props.modelValue,
1131
+ (val) => {
1132
+ if (!internalData.isUM) {
1133
+ updateModel(val);
1134
+ }
1135
+ internalData.isUM = false;
1136
+ }
1124
1137
  );
1125
- };
1126
- $xeNumberInput.renderVN = renderVN;
1127
- watch(
1128
- () => props.modelValue,
1129
- (val) => {
1130
- if (!internalData.isUM) {
1131
- updateModel(val);
1138
+ watch(
1139
+ () => props.type,
1140
+ () => {
1141
+ Object.assign(reactData, {
1142
+ inputValue: props.modelValue
1143
+ });
1144
+ initValue();
1132
1145
  }
1133
- internalData.isUM = false;
1134
- }
1135
- );
1136
- watch(
1137
- () => props.type,
1138
- () => {
1139
- Object.assign(reactData, {
1140
- inputValue: props.modelValue
1141
- });
1142
- initValue();
1143
- }
1144
- );
1145
- onMounted(() => {
1146
- if (props.showTooltip) {
1147
- if (!VxeUI.tooltip) {
1148
- errLog("vxe.error.reqComp", ["vxe-tooltip"]);
1146
+ );
1147
+ onMounted(() => {
1148
+ if (props.showTooltip) {
1149
+ if (!VxeUI.tooltip) {
1150
+ errLog("vxe.error.reqComp", ["vxe-tooltip"]);
1151
+ }
1152
+ }
1153
+ updateModel(props.modelValue);
1154
+ const targetElem = refInputTarget.value;
1155
+ if (targetElem) {
1156
+ targetElem.addEventListener("wheel", wheelEvent, { passive: false });
1149
1157
  }
1150
- }
1151
- updateModel(props.modelValue);
1152
- const targetElem = refInputTarget.value;
1153
- if (targetElem) {
1154
- targetElem.addEventListener("wheel", wheelEvent, { passive: false });
1155
- }
1156
- globalEvents.on($xeNumberInput, "mousedown", handleGlobalMousedownEvent);
1157
- globalEvents.on($xeNumberInput, "keydown", handleGlobalKeydownEvent);
1158
- globalEvents.on($xeNumberInput, "blur", handleGlobalBlurEvent);
1159
- });
1160
- onBeforeUnmount(() => {
1161
- reactData.isFocus = false;
1162
- numberStopAll();
1163
- afterCheckValue();
1164
- const targetElem = refInputTarget.value;
1165
- if (targetElem) {
1166
- targetElem.removeEventListener("wheel", wheelEvent);
1167
- }
1168
- globalEvents.off($xeNumberInput, "mousedown");
1169
- globalEvents.off($xeNumberInput, "keydown");
1170
- globalEvents.off($xeNumberInput, "blur");
1171
- });
1172
- initValue();
1173
- return $xeNumberInput;
1174
- },
1175
- render() {
1176
- return this.renderVN();
1177
- }
1178
- });
1158
+ globalEvents.on($xeNumberInput, "mousedown", handleGlobalMousedownEvent);
1159
+ globalEvents.on($xeNumberInput, "keydown", handleGlobalKeydownEvent);
1160
+ globalEvents.on($xeNumberInput, "blur", handleGlobalBlurEvent);
1161
+ });
1162
+ onBeforeUnmount(() => {
1163
+ reactData.isFocus = false;
1164
+ numberStopAll();
1165
+ afterCheckValue();
1166
+ const targetElem = refInputTarget.value;
1167
+ if (targetElem) {
1168
+ targetElem.removeEventListener("wheel", wheelEvent);
1169
+ }
1170
+ globalEvents.off($xeNumberInput, "mousedown");
1171
+ globalEvents.off($xeNumberInput, "keydown");
1172
+ globalEvents.off($xeNumberInput, "blur");
1173
+ });
1174
+ initValue();
1175
+ return $xeNumberInput;
1176
+ },
1177
+ render() {
1178
+ return this.renderVN();
1179
+ }
1180
+ })
1181
+ );
1179
1182
  export {
1180
1183
  number_input_default as default
1181
1184
  };