vxe-pc-ui 4.20.34 → 4.20.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/dist/all.esm.js +45718 -45038
  2. package/dist/all.esm.min.js +3 -3
  3. package/dist/style.css +307 -1
  4. package/dist/style.mini.css +1 -1
  5. package/es/alert/src/alert.js +117 -114
  6. package/es/anchor/src/anchor-link.js +110 -107
  7. package/es/anchor/src/anchor.js +212 -209
  8. package/es/avatar/src/avatar.js +132 -129
  9. package/es/backtop/src/backtop.js +267 -264
  10. package/es/badge/src/badge.js +102 -99
  11. package/es/breadcrumb/src/breadcrumb-item.js +104 -101
  12. package/es/breadcrumb/src/breadcrumb.js +70 -67
  13. package/es/button/src/button-group.js +88 -85
  14. package/es/calendar/src/calendar.js +1371 -1368
  15. package/es/card/src/card.js +235 -232
  16. package/es/carousel/src/carousel-item.js +78 -75
  17. package/es/carousel/src/carousel.js +392 -389
  18. package/es/cascader/src/cascader.js +1667 -1664
  19. package/es/checkbox/src/button.js +198 -195
  20. package/es/checkbox/src/checkbox.js +181 -178
  21. package/es/checkbox/src/group.js +210 -207
  22. package/es/collapse/src/collapse-pane.js +98 -95
  23. package/es/collapse/src/collapse.js +340 -337
  24. package/es/color-picker/src/color-picker.js +1116 -1113
  25. package/es/components.d.ts +1 -0
  26. package/es/components.js +3 -0
  27. package/es/context-menu/src/context-menu.js +601 -598
  28. package/es/countdown/src/countdown.js +224 -221
  29. package/es/date-panel/src/date-panel.js +1905 -1902
  30. package/es/date-picker/src/date-picker.js +1537 -1534
  31. package/es/date-range-picker/src/date-range-picker.js +1412 -1409
  32. package/es/divider/src/divider.js +80 -77
  33. package/es/drawer/src/drawer.js +778 -775
  34. package/es/empty/src/empty.js +100 -97
  35. package/es/form/src/form-group.js +74 -71
  36. package/es/form/src/form-item.js +76 -73
  37. package/es/form/src/form.js +789 -786
  38. package/es/icon/src/icon.js +59 -56
  39. package/es/icon/style.css +1 -1
  40. package/es/icon/style.mini.css +1 -1
  41. package/es/icon-picker/src/icon-picker.js +719 -716
  42. package/es/image/src/group.js +130 -127
  43. package/es/image/src/image.js +243 -240
  44. package/es/image/src/preview.js +627 -624
  45. package/es/index.esm.js +2 -0
  46. package/es/index.js +2 -0
  47. package/es/input/src/input.js +2700 -2697
  48. package/es/layout-aside/src/layout-aside.js +138 -135
  49. package/es/layout-body/src/layout-body.js +145 -142
  50. package/es/layout-container/src/layout-container.js +71 -68
  51. package/es/layout-footer/src/layout-footer.js +60 -57
  52. package/es/layout-header/src/layout-header.js +58 -55
  53. package/es/link/src/link.js +131 -128
  54. package/es/list/src/list.js +2174 -2171
  55. package/es/loading/src/loading.js +141 -138
  56. package/es/mention/src/mention.js +49 -46
  57. package/es/menu/src/menu.js +799 -796
  58. package/es/modal/src/modal.js +1519 -1527
  59. package/es/notice-bar/src/notice-bar.js +168 -165
  60. package/es/number-input/src/number-input.js +1094 -1091
  61. package/es/pager/src/pager.js +767 -764
  62. package/es/password-input/src/password-input.js +431 -428
  63. package/es/print/src/page-break.js +63 -60
  64. package/es/print/src/print.js +303 -300
  65. package/es/pulldown/src/pulldown.js +403 -400
  66. package/es/radio/src/button.js +214 -211
  67. package/es/radio/src/group.js +195 -192
  68. package/es/radio/src/radio.js +194 -191
  69. package/es/rate/src/rate.js +164 -161
  70. package/es/result/src/result.js +116 -113
  71. package/es/row/src/col.js +133 -130
  72. package/es/row/src/row.js +111 -108
  73. package/es/scrollbar/src/scrollbar.js +518 -515
  74. package/es/segmented/src/segmented.js +240 -237
  75. package/es/select/src/optgroup.js +44 -41
  76. package/es/select/src/option.js +39 -36
  77. package/es/select/src/select.js +1914 -1896
  78. package/es/slider/src/slider.js +419 -416
  79. package/es/space/src/space.js +190 -187
  80. package/es/splitter/src/splitter-panel.js +146 -143
  81. package/es/splitter/src/splitter.js +917 -914
  82. package/es/step-item/index.d.ts +76 -0
  83. package/es/step-item/index.js +17 -0
  84. package/es/steps/index.d.ts +288 -34
  85. package/es/steps/src/step-info.d.ts +6 -0
  86. package/es/steps/src/step-info.js +20 -0
  87. package/es/steps/src/step-item.d.ts +14 -0
  88. package/es/steps/src/step-item.js +39 -0
  89. package/es/steps/src/steps.d.ts +68 -8
  90. package/es/steps/src/steps.js +299 -47
  91. package/es/steps/src/util.d.ts +7 -0
  92. package/es/steps/src/util.js +44 -0
  93. package/es/steps/style.css +297 -0
  94. package/es/steps/style.mini.css +1 -0
  95. package/es/style.css +307 -1
  96. package/es/style.mini.css +1 -1
  97. package/es/switch/src/switch.js +228 -225
  98. package/es/table-select/src/table-select.js +865 -862
  99. package/es/table-transfer/src/table-transfer.js +61 -58
  100. package/es/tabs/src/tab-pane.js +102 -99
  101. package/es/tabs/src/tabs.js +936 -933
  102. package/es/tag/src/tag.js +163 -160
  103. package/es/text/src/text.js +232 -229
  104. package/es/text-ellipsis/src/text-ellipsis.js +252 -249
  105. package/es/textarea/src/textarea.js +434 -431
  106. package/es/timeline/src/timeline.js +74 -36
  107. package/es/timeline/src/util.js +7 -4
  108. package/es/tip/src/tip.js +117 -114
  109. package/es/tooltip/src/tooltip.js +552 -549
  110. package/es/tour/src/tour.js +49 -46
  111. package/es/transfer/src/transfer.js +95 -92
  112. package/es/tree/src/tree.js +3379 -3376
  113. package/es/tree-select/src/tree-select.js +969 -966
  114. package/es/ui/index.js +8 -2
  115. package/es/ui/src/log.js +1 -1
  116. package/es/upload/src/upload.js +1791 -1788
  117. package/es/vxe-icon/style.css +1 -1
  118. package/es/vxe-icon/style.mini.css +1 -1
  119. package/es/vxe-steps/style.css +297 -0
  120. package/es/vxe-steps/style.mini.css +1 -0
  121. package/es/watermark/src/watermark.js +158 -155
  122. package/lib/alert/src/alert.js +117 -114
  123. package/lib/anchor/src/anchor-link.js +110 -107
  124. package/lib/anchor/src/anchor.js +212 -209
  125. package/lib/avatar/src/avatar.js +132 -129
  126. package/lib/backtop/src/backtop.js +267 -264
  127. package/lib/badge/src/badge.js +102 -99
  128. package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
  129. package/lib/breadcrumb/src/breadcrumb.js +70 -67
  130. package/lib/button/src/button-group.js +88 -85
  131. package/lib/calendar/src/calendar.js +1371 -1368
  132. package/lib/card/src/card.js +235 -232
  133. package/lib/carousel/src/carousel-item.js +78 -75
  134. package/lib/carousel/src/carousel.js +392 -389
  135. package/lib/cascader/src/cascader.js +1665 -1662
  136. package/lib/checkbox/src/button.js +198 -195
  137. package/lib/checkbox/src/checkbox.js +181 -178
  138. package/lib/checkbox/src/group.js +210 -207
  139. package/lib/collapse/src/collapse-pane.js +98 -95
  140. package/lib/collapse/src/collapse.js +340 -337
  141. package/lib/color-picker/src/color-picker.js +1116 -1113
  142. package/lib/components.js +3 -0
  143. package/lib/context-menu/src/context-menu.js +601 -598
  144. package/lib/countdown/src/countdown.js +224 -221
  145. package/lib/date-panel/src/date-panel.js +1905 -1902
  146. package/lib/date-picker/src/date-picker.js +1537 -1534
  147. package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
  148. package/lib/divider/src/divider.js +80 -77
  149. package/lib/drawer/src/drawer.js +778 -775
  150. package/lib/empty/src/empty.js +100 -97
  151. package/lib/form/src/form-group.js +74 -71
  152. package/lib/form/src/form-item.js +76 -73
  153. package/lib/form/src/form.js +789 -786
  154. package/lib/icon/src/icon.js +59 -56
  155. package/lib/icon/style/style.css +1 -1
  156. package/lib/icon/style/style.mini.css +1 -1
  157. package/lib/icon-picker/src/icon-picker.js +719 -716
  158. package/lib/image/src/group.js +130 -127
  159. package/lib/image/src/image.js +243 -240
  160. package/lib/image/src/preview.js +627 -624
  161. package/lib/index.common.js +2 -0
  162. package/lib/index.js +2 -0
  163. package/lib/index.umd.js +47411 -46732
  164. package/lib/index.umd.min.js +3 -3
  165. package/lib/input/src/input.js +2700 -2697
  166. package/lib/layout-aside/src/layout-aside.js +138 -135
  167. package/lib/layout-body/src/layout-body.js +145 -142
  168. package/lib/layout-container/src/layout-container.js +71 -68
  169. package/lib/layout-footer/src/layout-footer.js +60 -57
  170. package/lib/layout-header/src/layout-header.js +58 -55
  171. package/lib/link/src/link.js +131 -128
  172. package/lib/list/src/list.js +2173 -2170
  173. package/lib/loading/src/loading.js +141 -138
  174. package/lib/mention/src/mention.js +49 -46
  175. package/lib/menu/src/menu.js +799 -796
  176. package/lib/modal/src/modal.js +1519 -1527
  177. package/lib/notice-bar/src/notice-bar.js +168 -165
  178. package/lib/number-input/src/number-input.js +1094 -1091
  179. package/lib/pager/src/pager.js +767 -764
  180. package/lib/password-input/src/password-input.js +431 -428
  181. package/lib/print/src/page-break.js +63 -60
  182. package/lib/print/src/print.js +303 -300
  183. package/lib/pulldown/src/pulldown.js +403 -400
  184. package/lib/radio/src/button.js +214 -211
  185. package/lib/radio/src/group.js +195 -192
  186. package/lib/radio/src/radio.js +194 -191
  187. package/lib/rate/src/rate.js +164 -161
  188. package/lib/result/src/result.js +116 -113
  189. package/lib/row/src/col.js +133 -130
  190. package/lib/row/src/row.js +111 -108
  191. package/lib/scrollbar/src/scrollbar.js +518 -515
  192. package/lib/segmented/src/segmented.js +240 -237
  193. package/lib/select/src/optgroup.js +44 -41
  194. package/lib/select/src/option.js +39 -36
  195. package/lib/select/src/select.js +1915 -1897
  196. package/lib/slider/src/slider.js +419 -416
  197. package/lib/space/src/space.js +190 -187
  198. package/lib/splitter/src/splitter-panel.js +146 -143
  199. package/lib/splitter/src/splitter.js +917 -914
  200. package/lib/step-item/index.js +47 -0
  201. package/lib/steps/src/step-info.js +49 -0
  202. package/lib/steps/src/step-item.js +59 -0
  203. package/lib/steps/src/steps.js +298 -46
  204. package/lib/steps/src/util.js +74 -0
  205. package/lib/steps/style/style.css +297 -0
  206. package/lib/steps/style/style.mini.css +1 -0
  207. package/lib/style.css +307 -1
  208. package/lib/style.mini.css +1 -1
  209. package/lib/switch/src/switch.js +228 -225
  210. package/lib/table-select/src/table-select.js +865 -862
  211. package/lib/table-transfer/src/table-transfer.js +61 -58
  212. package/lib/tabs/src/tab-pane.js +102 -99
  213. package/lib/tabs/src/tabs.js +936 -933
  214. package/lib/tag/src/tag.js +163 -160
  215. package/lib/text/src/text.js +232 -229
  216. package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
  217. package/lib/textarea/src/textarea.js +434 -431
  218. package/lib/timeline/src/timeline.js +74 -36
  219. package/lib/timeline/src/util.js +7 -4
  220. package/lib/tip/src/tip.js +117 -114
  221. package/lib/tooltip/src/tooltip.js +552 -549
  222. package/lib/tour/src/tour.js +49 -46
  223. package/lib/transfer/src/transfer.js +95 -92
  224. package/lib/tree/src/tree.js +3379 -3376
  225. package/lib/tree-select/src/tree-select.js +969 -966
  226. package/lib/ui/index.js +8 -2
  227. package/lib/ui/src/log.js +1 -1
  228. package/lib/upload/src/upload.js +1788 -1785
  229. package/lib/vxe-icon/style/style.css +1 -1
  230. package/lib/vxe-icon/style/style.mini.css +1 -1
  231. package/lib/vxe-steps/style/style.css +297 -0
  232. package/lib/vxe-steps/style/style.mini.css +1 -0
  233. package/lib/watermark/src/watermark.js +158 -155
  234. package/package.json +1 -1
  235. package/packages/alert/src/alert.ts +2 -2
  236. package/packages/anchor/src/anchor-link.ts +2 -2
  237. package/packages/anchor/src/anchor.ts +2 -2
  238. package/packages/avatar/src/avatar.ts +2 -2
  239. package/packages/backtop/src/backtop.ts +2 -2
  240. package/packages/badge/src/badge.ts +2 -2
  241. package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
  242. package/packages/breadcrumb/src/breadcrumb.ts +2 -2
  243. package/packages/button/src/button-group.ts +2 -2
  244. package/packages/calendar/src/calendar.ts +2 -2
  245. package/packages/card/src/card.ts +2 -2
  246. package/packages/carousel/src/carousel-item.ts +2 -2
  247. package/packages/carousel/src/carousel.ts +2 -2
  248. package/packages/cascader/src/cascader.ts +2 -2
  249. package/packages/checkbox/src/button.ts +3 -15
  250. package/packages/checkbox/src/checkbox.ts +2 -2
  251. package/packages/checkbox/src/group.ts +2 -2
  252. package/packages/collapse/src/collapse-pane.ts +2 -2
  253. package/packages/collapse/src/collapse.ts +2 -2
  254. package/packages/color-picker/src/color-picker.ts +2 -2
  255. package/packages/components.ts +3 -0
  256. package/packages/context-menu/src/context-menu.ts +3 -16
  257. package/packages/countdown/src/countdown.ts +2 -2
  258. package/packages/date-panel/src/date-panel.ts +2 -2
  259. package/packages/date-picker/src/date-picker.ts +2 -2
  260. package/packages/date-range-picker/src/date-range-picker.ts +2 -2
  261. package/packages/divider/src/divider.ts +2 -2
  262. package/packages/drawer/src/drawer.ts +2 -2
  263. package/packages/empty/src/empty.ts +2 -2
  264. package/packages/form/src/form-group.ts +2 -2
  265. package/packages/form/src/form-item.ts +2 -2
  266. package/packages/form/src/form.ts +2 -2
  267. package/packages/icon/src/icon.ts +2 -2
  268. package/packages/icon-picker/src/icon-picker.ts +2 -2
  269. package/packages/image/src/group.ts +2 -2
  270. package/packages/image/src/image.ts +2 -2
  271. package/packages/image/src/preview.ts +3 -16
  272. package/packages/index.ts +2 -2
  273. package/packages/input/src/input.ts +2 -2
  274. package/packages/layout-aside/src/layout-aside.ts +2 -2
  275. package/packages/layout-body/src/layout-body.ts +2 -2
  276. package/packages/layout-container/src/layout-container.ts +3 -14
  277. package/packages/layout-footer/src/layout-footer.ts +2 -2
  278. package/packages/layout-header/src/layout-header.ts +2 -2
  279. package/packages/link/src/link.ts +2 -2
  280. package/packages/list/src/list.ts +2 -2
  281. package/packages/loading/src/loading.ts +2 -2
  282. package/packages/mention/src/mention.ts +2 -2
  283. package/packages/menu/src/menu.ts +2 -2
  284. package/packages/modal/src/modal.ts +5 -20
  285. package/packages/notice-bar/src/notice-bar.ts +2 -2
  286. package/packages/number-input/src/number-input.ts +3 -17
  287. package/packages/pager/src/pager.ts +2 -2
  288. package/packages/password-input/src/password-input.ts +2 -2
  289. package/packages/print/src/page-break.ts +2 -2
  290. package/packages/print/src/print.ts +2 -2
  291. package/packages/pulldown/src/pulldown.ts +2 -2
  292. package/packages/radio/src/button.ts +3 -16
  293. package/packages/radio/src/group.ts +3 -17
  294. package/packages/radio/src/radio.ts +2 -2
  295. package/packages/rate/src/rate.ts +2 -2
  296. package/packages/result/src/result.ts +2 -2
  297. package/packages/row/src/col.ts +2 -2
  298. package/packages/row/src/row.ts +2 -2
  299. package/packages/scrollbar/src/scrollbar.ts +3 -4
  300. package/packages/segmented/src/segmented.ts +2 -2
  301. package/packages/select/src/optgroup.ts +2 -2
  302. package/packages/select/src/option.ts +2 -2
  303. package/packages/select/src/select.ts +33 -19
  304. package/packages/slider/src/slider.ts +2 -2
  305. package/packages/space/src/space.ts +2 -2
  306. package/packages/splitter/src/splitter-panel.ts +2 -2
  307. package/packages/splitter/src/splitter.ts +2 -2
  308. package/packages/step-item/index.ts +16 -0
  309. package/packages/steps/src/step-info.ts +18 -0
  310. package/packages/steps/src/step-item.ts +41 -0
  311. package/packages/steps/src/steps.ts +273 -13
  312. package/packages/steps/src/util.ts +44 -0
  313. package/packages/switch/src/switch.ts +2 -2
  314. package/packages/table-select/src/table-select.ts +2 -2
  315. package/packages/table-transfer/src/table-transfer.ts +3 -15
  316. package/packages/tabs/src/tab-pane.ts +2 -2
  317. package/packages/tabs/src/tabs.ts +2 -2
  318. package/packages/tag/src/tag.ts +2 -2
  319. package/packages/text/src/text.ts +2 -2
  320. package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
  321. package/packages/textarea/src/textarea.ts +2 -2
  322. package/packages/timeline/src/timeline-info.ts +17 -17
  323. package/packages/timeline/src/timeline.ts +93 -49
  324. package/packages/timeline/src/util.ts +44 -41
  325. package/packages/tip/src/tip.ts +2 -2
  326. package/packages/tooltip/src/tooltip.ts +2 -2
  327. package/packages/tour/src/tour.ts +2 -2
  328. package/packages/transfer/src/transfer.ts +2 -2
  329. package/packages/tree/src/tree.ts +2 -2
  330. package/packages/tree-select/src/tree-select.ts +2 -2
  331. package/packages/ui/index.ts +8 -1
  332. package/packages/upload/src/upload.ts +2 -2
  333. package/packages/watermark/src/watermark.ts +2 -2
  334. package/styles/all.scss +1 -0
  335. package/styles/components/step-item.scss +0 -0
  336. package/styles/components/steps.scss +354 -0
  337. package/styles/theme/base.scss +9 -0
  338. package/types/all.d.ts +3 -0
  339. package/types/components/gantt.d.ts +1 -3
  340. package/types/components/select.d.ts +1 -13
  341. package/types/components/step-item.d.ts +72 -0
  342. package/types/components/steps.d.ts +67 -8
  343. package/types/components/table.d.ts +7 -66
  344. package/types/handles/form-design.d.ts +1 -4
  345. package/types/ui/global-config.d.ts +2 -0
  346. package/types/ui/global-icon.d.ts +7 -0
  347. /package/dist/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  348. /package/dist/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  349. /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  350. /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  351. /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  352. /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  353. /package/es/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  354. /package/es/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  355. /package/es/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  356. /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  357. /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  358. /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  359. /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  360. /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  361. /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  362. /package/lib/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  363. /package/lib/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  364. /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  365. /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  366. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  367. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
@@ -17,318 +17,340 @@ function createInternalData() {
17
17
  function createReactData() {
18
18
  return {};
19
19
  }
20
- var slider_default = defineVxeComponent({
21
- name: "VxeSlider",
22
- props: {
23
- modelValue: [String, Number, Array],
24
- startValue: [String, Number],
25
- endValue: [String, Number],
26
- vertical: Boolean,
27
- max: {
28
- type: [String, Number],
29
- default: () => getConfig().slider.max
20
+ var slider_default = (
21
+ /* define-vxe-component start */
22
+ defineVxeComponent({
23
+ name: "VxeSlider",
24
+ props: {
25
+ modelValue: [String, Number, Array],
26
+ startValue: [String, Number],
27
+ endValue: [String, Number],
28
+ vertical: Boolean,
29
+ max: {
30
+ type: [String, Number],
31
+ default: () => getConfig().slider.max
32
+ },
33
+ min: {
34
+ type: [String, Number],
35
+ default: () => getConfig().slider.min
36
+ },
37
+ step: {
38
+ type: [String, Number],
39
+ default: () => getConfig().slider.step
40
+ },
41
+ size: {
42
+ type: String,
43
+ default: () => getConfig().slider.size || getConfig().size
44
+ },
45
+ range: {
46
+ type: Boolean,
47
+ default: () => getConfig().slider.range
48
+ },
49
+ readonly: {
50
+ type: Boolean,
51
+ default: null
52
+ },
53
+ disabled: {
54
+ type: Boolean,
55
+ default: null
56
+ },
57
+ status: {
58
+ type: String,
59
+ default: () => getConfig().slider.status
60
+ },
61
+ immediate: {
62
+ type: Boolean,
63
+ default: () => getConfig().slider.immediate
64
+ },
65
+ showTooltip: {
66
+ type: Boolean,
67
+ default: () => getConfig().slider.showTooltip
68
+ },
69
+ tooltipConfig: Object
30
70
  },
31
- min: {
32
- type: [String, Number],
33
- default: () => getConfig().slider.min
34
- },
35
- step: {
36
- type: [String, Number],
37
- default: () => getConfig().slider.step
38
- },
39
- size: {
40
- type: String,
41
- default: () => getConfig().slider.size || getConfig().size
42
- },
43
- range: {
44
- type: Boolean,
45
- default: () => getConfig().slider.range
46
- },
47
- readonly: {
48
- type: Boolean,
49
- default: null
50
- },
51
- disabled: {
52
- type: Boolean,
53
- default: null
54
- },
55
- status: {
56
- type: String,
57
- default: () => getConfig().slider.status
58
- },
59
- immediate: {
60
- type: Boolean,
61
- default: () => getConfig().slider.immediate
62
- },
63
- showTooltip: {
64
- type: Boolean,
65
- default: () => getConfig().slider.showTooltip
66
- },
67
- tooltipConfig: Object
68
- },
69
- emits: ["update:modelValue", "update:startValue", "update:endValue", "change", "track-dragstart", "track-dragover", "track-dragend"],
70
- setup(props, context) {
71
- const { emit } = context;
72
- const $xeForm = inject("$xeForm", null);
73
- const formItemInfo = inject("xeFormItemInfo", null);
74
- const xID = XEUtils.uniqueId();
75
- const { computeSize } = useFns.useSize(props);
76
- const refElem = ref();
77
- const refBarElem = ref();
78
- const refTrackElem = ref();
79
- const refStartBtnElem = ref();
80
- const refEndBtnElem = ref();
81
- const reactData = reactive(createReactData());
82
- const internalData = createInternalData();
83
- const refMaps = {
84
- refElem
85
- };
86
- const computeFormReadonly = computed(() => {
87
- const { readonly } = props;
88
- if (readonly === null) {
89
- if ($xeForm) {
90
- return $xeForm.props.readonly;
71
+ emits: ["update:modelValue", "update:startValue", "update:endValue", "change", "track-dragstart", "track-dragover", "track-dragend"],
72
+ setup(props, context) {
73
+ const { emit } = context;
74
+ const $xeForm = inject("$xeForm", null);
75
+ const formItemInfo = inject("xeFormItemInfo", null);
76
+ const xID = XEUtils.uniqueId();
77
+ const { computeSize } = useFns.useSize(props);
78
+ const refElem = ref();
79
+ const refBarElem = ref();
80
+ const refTrackElem = ref();
81
+ const refStartBtnElem = ref();
82
+ const refEndBtnElem = ref();
83
+ const reactData = reactive(createReactData());
84
+ const internalData = createInternalData();
85
+ const refMaps = {
86
+ refElem
87
+ };
88
+ const computeFormReadonly = computed(() => {
89
+ const { readonly } = props;
90
+ if (readonly === null) {
91
+ if ($xeForm) {
92
+ return $xeForm.props.readonly;
93
+ }
94
+ return false;
91
95
  }
92
- return false;
93
- }
94
- return readonly;
95
- });
96
- const computeIsDisabled = computed(() => {
97
- const { disabled } = props;
98
- if (disabled === null) {
99
- if ($xeForm) {
100
- return $xeForm.props.disabled;
96
+ return readonly;
97
+ });
98
+ const computeIsDisabled = computed(() => {
99
+ const { disabled } = props;
100
+ if (disabled === null) {
101
+ if ($xeForm) {
102
+ return $xeForm.props.disabled;
103
+ }
104
+ return false;
101
105
  }
102
- return false;
103
- }
104
- return disabled;
105
- });
106
- const computeMaxNum = computed(() => {
107
- return XEUtils.toNumber(props.max || 0);
108
- });
109
- const computeMinNum = computed(() => {
110
- return XEUtils.toNumber(props.min || 0);
111
- });
112
- const computeMVal = computed(() => {
113
- const { range, startValue, endValue } = props;
114
- return range ? `${startValue || ""}${endValue || ""}` : "";
115
- });
116
- const computeTooltipOpts = computed(() => {
117
- return Object.assign({}, getConfig().slider.tooltipConfig, props.tooltipConfig);
118
- });
119
- const computeMaps = {};
120
- const $xeSlider = {
121
- xID,
122
- props,
123
- context,
124
- reactData,
125
- getRefMaps: () => refMaps,
126
- getComputeMaps: () => computeMaps
127
- };
128
- const emitModel = (value) => {
129
- internalData._isUp = true;
130
- emit("update:modelValue", value);
131
- };
132
- const dispatchEvent = (type, params, evnt) => {
133
- emit(type, createEvent(evnt, { $slider: $xeSlider }, params));
134
- };
135
- const collapsePaneMethods = {
136
- dispatchEvent
137
- };
138
- const getBarPercent = (currValue) => {
139
- const maxNum = computeMaxNum.value;
140
- const minNum = computeMinNum.value;
141
- if (maxNum === minNum) {
142
- return 0;
143
- }
144
- if (currValue < minNum) {
145
- currValue = minNum;
146
- }
147
- if (currValue > maxNum) {
148
- currValue = maxNum;
149
- }
150
- return (currValue - minNum) / (maxNum - minNum) * 100;
151
- };
152
- const parseFields = (startValue, endValue) => {
153
- const [sVal, eVal] = XEUtils.orderBy([XEUtils.toNumber(startValue), XEUtils.toNumber(endValue)]);
154
- const currValue = XEUtils.floor(XEUtils.toNumber(sVal || 0));
155
- internalData.currValue = currValue;
156
- internalData.startValue = currValue;
157
- internalData.endValue = XEUtils.floor(XEUtils.toNumber(eVal || 0));
158
- };
159
- const parseArrs = (arrVals) => {
160
- const [sVal, eVal] = XEUtils.orderBy(arrVals);
161
- const currValue = XEUtils.floor(XEUtils.toNumber(sVal || 0));
162
- internalData.currValue = currValue;
163
- internalData.startValue = currValue;
164
- internalData.endValue = XEUtils.floor(XEUtils.toNumber(eVal || 0));
165
- };
166
- const parseNum = (val) => {
167
- const currValue = XEUtils.floor(XEUtils.toNumber(val || 0));
168
- internalData.currValue = currValue;
169
- internalData.startValue = 0;
170
- internalData.endValue = currValue;
171
- };
172
- const updateModelValue = (umType) => {
173
- const { range, modelValue, startValue, endValue } = props;
174
- if (!umType) {
175
- if (range) {
176
- if (XEUtils.eqNull(modelValue)) {
177
- if (startValue || endValue) {
178
- parseFields(startValue, endValue);
179
- }
180
- } else {
181
- if (XEUtils.isArray(modelValue)) {
182
- parseArrs(modelValue.map((num) => XEUtils.toNumber(num)));
106
+ return disabled;
107
+ });
108
+ const computeMaxNum = computed(() => {
109
+ return XEUtils.toNumber(props.max || 0);
110
+ });
111
+ const computeMinNum = computed(() => {
112
+ return XEUtils.toNumber(props.min || 0);
113
+ });
114
+ const computeMVal = computed(() => {
115
+ const { range, startValue, endValue } = props;
116
+ return range ? `${startValue || ""}${endValue || ""}` : "";
117
+ });
118
+ const computeTooltipOpts = computed(() => {
119
+ return Object.assign({}, getConfig().slider.tooltipConfig, props.tooltipConfig);
120
+ });
121
+ const computeMaps = {};
122
+ const $xeSlider = {
123
+ xID,
124
+ props,
125
+ context,
126
+ reactData,
127
+ getRefMaps: () => refMaps,
128
+ getComputeMaps: () => computeMaps
129
+ };
130
+ const emitModel = (value) => {
131
+ internalData._isUp = true;
132
+ emit("update:modelValue", value);
133
+ };
134
+ const dispatchEvent = (type, params, evnt) => {
135
+ emit(type, createEvent(evnt, { $slider: $xeSlider }, params));
136
+ };
137
+ const collapsePaneMethods = {
138
+ dispatchEvent
139
+ };
140
+ const getBarPercent = (currValue) => {
141
+ const maxNum = computeMaxNum.value;
142
+ const minNum = computeMinNum.value;
143
+ if (maxNum === minNum) {
144
+ return 0;
145
+ }
146
+ if (currValue < minNum) {
147
+ currValue = minNum;
148
+ }
149
+ if (currValue > maxNum) {
150
+ currValue = maxNum;
151
+ }
152
+ return (currValue - minNum) / (maxNum - minNum) * 100;
153
+ };
154
+ const parseFields = (startValue, endValue) => {
155
+ const [sVal, eVal] = XEUtils.orderBy([XEUtils.toNumber(startValue), XEUtils.toNumber(endValue)]);
156
+ const currValue = XEUtils.floor(XEUtils.toNumber(sVal || 0));
157
+ internalData.currValue = currValue;
158
+ internalData.startValue = currValue;
159
+ internalData.endValue = XEUtils.floor(XEUtils.toNumber(eVal || 0));
160
+ };
161
+ const parseArrs = (arrVals) => {
162
+ const [sVal, eVal] = XEUtils.orderBy(arrVals);
163
+ const currValue = XEUtils.floor(XEUtils.toNumber(sVal || 0));
164
+ internalData.currValue = currValue;
165
+ internalData.startValue = currValue;
166
+ internalData.endValue = XEUtils.floor(XEUtils.toNumber(eVal || 0));
167
+ };
168
+ const parseNum = (val) => {
169
+ const currValue = XEUtils.floor(XEUtils.toNumber(val || 0));
170
+ internalData.currValue = currValue;
171
+ internalData.startValue = 0;
172
+ internalData.endValue = currValue;
173
+ };
174
+ const updateModelValue = (umType) => {
175
+ const { range, modelValue, startValue, endValue } = props;
176
+ if (!umType) {
177
+ if (range) {
178
+ if (XEUtils.eqNull(modelValue)) {
179
+ if (startValue || endValue) {
180
+ parseFields(startValue, endValue);
181
+ }
183
182
  } else {
184
- parseNum(modelValue);
183
+ if (XEUtils.isArray(modelValue)) {
184
+ parseArrs(modelValue.map((num) => XEUtils.toNumber(num)));
185
+ } else {
186
+ parseNum(modelValue);
187
+ }
185
188
  }
189
+ } else {
190
+ parseNum(modelValue);
186
191
  }
192
+ } else if (range && umType === 2) {
193
+ parseFields(startValue, endValue);
187
194
  } else {
188
- parseNum(modelValue);
195
+ if (XEUtils.isArray(modelValue)) {
196
+ parseArrs(modelValue.map((num) => XEUtils.toNumber(num)));
197
+ } else {
198
+ parseNum(modelValue);
199
+ }
189
200
  }
190
- } else if (range && umType === 2) {
191
- parseFields(startValue, endValue);
192
- } else {
193
- if (XEUtils.isArray(modelValue)) {
194
- parseArrs(modelValue.map((num) => XEUtils.toNumber(num)));
201
+ updateBarStyle();
202
+ updateTrackStyle();
203
+ };
204
+ const updateBarStyle = () => {
205
+ const { range } = props;
206
+ const { currValue, startValue, endValue } = internalData;
207
+ const startBtnElem = refStartBtnElem.value;
208
+ const endBtnElem = refEndBtnElem.value;
209
+ if (range) {
210
+ const [sVal, eVal] = XEUtils.orderBy([startValue, endValue]);
211
+ if (startBtnElem) {
212
+ startBtnElem.style.left = getBarPercent(sVal) + "%";
213
+ }
214
+ if (endBtnElem) {
215
+ endBtnElem.style.left = getBarPercent(eVal) + "%";
216
+ }
195
217
  } else {
196
- parseNum(modelValue);
218
+ if (endBtnElem) {
219
+ endBtnElem.style.left = getBarPercent(currValue) + "%";
220
+ }
197
221
  }
198
- }
199
- updateBarStyle();
200
- updateTrackStyle();
201
- };
202
- const updateBarStyle = () => {
203
- const { range } = props;
204
- const { currValue, startValue, endValue } = internalData;
205
- const startBtnElem = refStartBtnElem.value;
206
- const endBtnElem = refEndBtnElem.value;
207
- if (range) {
208
- const [sVal, eVal] = XEUtils.orderBy([startValue, endValue]);
209
- if (startBtnElem) {
210
- startBtnElem.style.left = getBarPercent(sVal) + "%";
222
+ };
223
+ const updateTrackStyle = () => {
224
+ const { range } = props;
225
+ const { currValue, startValue, endValue } = internalData;
226
+ const trackElem = refTrackElem.value;
227
+ if (trackElem) {
228
+ if (range) {
229
+ const [sVal, eVal] = XEUtils.orderBy([startValue, endValue]);
230
+ trackElem.style.left = getBarPercent(sVal) + "%";
231
+ trackElem.style.width = getBarPercent(eVal - sVal) + "%";
232
+ } else {
233
+ trackElem.style.left = "0";
234
+ trackElem.style.width = getBarPercent(currValue) + "%";
235
+ }
211
236
  }
212
- if (endBtnElem) {
213
- endBtnElem.style.left = getBarPercent(eVal) + "%";
237
+ };
238
+ const changeEvent = (evnt) => {
239
+ const { range } = props;
240
+ const { currValue, startValue, endValue } = internalData;
241
+ const vals = range ? XEUtils.orderBy([startValue, endValue]) : [];
242
+ const value = range ? vals : currValue;
243
+ emitModel(value);
244
+ if (range) {
245
+ emit("update:startValue", vals[0] || 0);
246
+ emit("update:endValue", vals[1] || 0);
214
247
  }
215
- } else {
216
- if (endBtnElem) {
217
- endBtnElem.style.left = getBarPercent(currValue) + "%";
248
+ dispatchEvent("change", { value }, evnt);
249
+ if ($xeForm && formItemInfo) {
250
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
218
251
  }
219
- }
220
- };
221
- const updateTrackStyle = () => {
222
- const { range } = props;
223
- const { currValue, startValue, endValue } = internalData;
224
- const trackElem = refTrackElem.value;
225
- if (trackElem) {
226
- if (range) {
227
- const [sVal, eVal] = XEUtils.orderBy([startValue, endValue]);
228
- trackElem.style.left = getBarPercent(sVal) + "%";
229
- trackElem.style.width = getBarPercent(eVal - sVal) + "%";
230
- } else {
231
- trackElem.style.left = "0";
232
- trackElem.style.width = getBarPercent(currValue) + "%";
252
+ };
253
+ const getValueByLeft = (offsetLeft, barWidth) => {
254
+ const maxNum = computeMaxNum.value;
255
+ const minNum = computeMinNum.value;
256
+ if (barWidth === 0) {
257
+ return minNum;
233
258
  }
234
- }
235
- };
236
- const changeEvent = (evnt) => {
237
- const { range } = props;
238
- const { currValue, startValue, endValue } = internalData;
239
- const vals = range ? XEUtils.orderBy([startValue, endValue]) : [];
240
- const value = range ? vals : currValue;
241
- emitModel(value);
242
- if (range) {
243
- emit("update:startValue", vals[0] || 0);
244
- emit("update:endValue", vals[1] || 0);
245
- }
246
- dispatchEvent("change", { value }, evnt);
247
- if ($xeForm && formItemInfo) {
248
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
249
- }
250
- };
251
- const getValueByLeft = (offsetLeft, barWidth) => {
252
- const maxNum = computeMaxNum.value;
253
- const minNum = computeMinNum.value;
254
- if (barWidth === 0) {
255
- return minNum;
256
- }
257
- const clamped = Math.max(0, Math.min(barWidth, offsetLeft));
258
- const ratio = clamped / barWidth;
259
- const raw = minNum + ratio * (maxNum - minNum);
260
- return Math.floor(raw);
261
- };
262
- const handleShowTip = (btnElem) => {
263
- const { showTooltip } = props;
264
- if (showTooltip) {
265
- if (VxeUI.tooltip) {
266
- const { currValue } = internalData;
267
- const tooltipOpts = computeTooltipOpts.value;
268
- const { contentMethod } = tooltipOpts;
269
- const content = getText(
270
- contentMethod ? contentMethod({
271
- $slider: $xeSlider,
272
- value: currValue
273
- }) : "" + currValue
274
- );
275
- if (content) {
276
- VxeUI.tooltip.open(
277
- btnElem,
278
- Object.assign(
279
- {},
280
- {
281
- ...tooltipOpts,
282
- content
283
- },
284
- {
285
- contentMethod: void 0
286
- }
287
- )
259
+ const clamped = Math.max(0, Math.min(barWidth, offsetLeft));
260
+ const ratio = clamped / barWidth;
261
+ const raw = minNum + ratio * (maxNum - minNum);
262
+ return Math.floor(raw);
263
+ };
264
+ const handleShowTip = (btnElem) => {
265
+ const { showTooltip } = props;
266
+ if (showTooltip) {
267
+ if (VxeUI.tooltip) {
268
+ const { currValue } = internalData;
269
+ const tooltipOpts = computeTooltipOpts.value;
270
+ const { contentMethod } = tooltipOpts;
271
+ const content = getText(
272
+ contentMethod ? contentMethod({
273
+ $slider: $xeSlider,
274
+ value: currValue
275
+ }) : "" + currValue
288
276
  );
289
- } else {
290
- VxeUI.tooltip.close();
277
+ if (content) {
278
+ VxeUI.tooltip.open(
279
+ btnElem,
280
+ Object.assign(
281
+ {},
282
+ {
283
+ ...tooltipOpts,
284
+ content
285
+ },
286
+ {
287
+ contentMethod: void 0
288
+ }
289
+ )
290
+ );
291
+ } else {
292
+ VxeUI.tooltip.close();
293
+ }
291
294
  }
292
295
  }
293
- }
294
- };
295
- const handleHideTip = () => {
296
- const { showTooltip } = props;
297
- if (showTooltip) {
298
- if (VxeUI.tooltip) {
299
- VxeUI.tooltip.close();
296
+ };
297
+ const handleHideTip = () => {
298
+ const { showTooltip } = props;
299
+ if (showTooltip) {
300
+ if (VxeUI.tooltip) {
301
+ VxeUI.tooltip.close();
302
+ }
300
303
  }
301
- }
302
- };
303
- const handleBtnMousedownEvent = (evnt) => {
304
- const { range, immediate } = props;
305
- const btnElem = evnt.currentTarget;
306
- const formReadonly = computeFormReadonly.value;
307
- const isDisabled = computeIsDisabled.value;
308
- if (!(formReadonly || isDisabled)) {
309
- evnt.preventDefault();
310
- document.onmousemove = (evnt2) => {
311
- evnt2.preventDefault();
312
- const el = refElem.value;
313
- const barElem = refBarElem.value;
314
- internalData.isDragStatus = true;
315
- if (el && barElem) {
316
- const btnType = btnElem.getAttribute("data-type");
317
- const barRect = barElem.getBoundingClientRect();
318
- const barWidth = barRect.width;
319
- const offsetLeft = Math.min(barWidth, Math.max(0, evnt2.clientX - barRect.left));
320
- const currValue = getValueByLeft(offsetLeft, barWidth);
321
- if (range) {
322
- if (btnType === "1") {
323
- internalData.startValue = currValue;
324
- } else {
325
- internalData.endValue = currValue;
304
+ };
305
+ const handleBtnMousedownEvent = (evnt) => {
306
+ const { range, immediate } = props;
307
+ const btnElem = evnt.currentTarget;
308
+ const formReadonly = computeFormReadonly.value;
309
+ const isDisabled = computeIsDisabled.value;
310
+ if (!(formReadonly || isDisabled)) {
311
+ evnt.preventDefault();
312
+ document.onmousemove = (evnt2) => {
313
+ evnt2.preventDefault();
314
+ const el = refElem.value;
315
+ const barElem = refBarElem.value;
316
+ internalData.isDragStatus = true;
317
+ if (el && barElem) {
318
+ const btnType = btnElem.getAttribute("data-type");
319
+ const barRect = barElem.getBoundingClientRect();
320
+ const barWidth = barRect.width;
321
+ const offsetLeft = Math.min(barWidth, Math.max(0, evnt2.clientX - barRect.left));
322
+ const currValue = getValueByLeft(offsetLeft, barWidth);
323
+ if (range) {
324
+ if (btnType === "1") {
325
+ internalData.startValue = currValue;
326
+ } else {
327
+ internalData.endValue = currValue;
328
+ }
326
329
  }
330
+ internalData.currValue = currValue;
331
+ btnElem.style.left = getBarPercent(currValue) + "%";
332
+ dispatchEvent(
333
+ "track-dragover",
334
+ {
335
+ currentValue: internalData.currValue,
336
+ startValue: internalData.startValue,
337
+ endValue: internalData.endValue
338
+ },
339
+ evnt2
340
+ );
327
341
  }
328
- internalData.currValue = currValue;
329
- btnElem.style.left = getBarPercent(currValue) + "%";
342
+ if (immediate) {
343
+ changeEvent(evnt2);
344
+ }
345
+ updateTrackStyle();
346
+ handleShowTip(btnElem);
347
+ };
348
+ document.onmouseup = (evnt2) => {
349
+ document.onmousemove = null;
350
+ document.onmouseup = null;
351
+ internalData.isDragStatus = false;
330
352
  dispatchEvent(
331
- "track-dragover",
353
+ "track-dragend",
332
354
  {
333
355
  currentValue: internalData.currValue,
334
356
  startValue: internalData.startValue,
@@ -336,146 +358,127 @@ var slider_default = defineVxeComponent({
336
358
  },
337
359
  evnt2
338
360
  );
339
- }
340
- if (immediate) {
341
361
  changeEvent(evnt2);
342
- }
343
- updateTrackStyle();
344
- handleShowTip(btnElem);
345
- };
346
- document.onmouseup = (evnt2) => {
347
- document.onmousemove = null;
348
- document.onmouseup = null;
349
- internalData.isDragStatus = false;
362
+ updateTrackStyle();
363
+ if (!internalData.isBtnActive) {
364
+ handleHideTip();
365
+ }
366
+ };
350
367
  dispatchEvent(
351
- "track-dragend",
368
+ "track-dragstart",
352
369
  {
353
370
  currentValue: internalData.currValue,
354
371
  startValue: internalData.startValue,
355
372
  endValue: internalData.endValue
356
373
  },
357
- evnt2
374
+ evnt
358
375
  );
359
- changeEvent(evnt2);
360
- updateTrackStyle();
361
- if (!internalData.isBtnActive) {
362
- handleHideTip();
363
- }
364
- };
365
- dispatchEvent(
366
- "track-dragstart",
376
+ internalData.isDragStatus = false;
377
+ }
378
+ };
379
+ const handleBtnMouseenterEvent = (evnt) => {
380
+ const { startValue, endValue } = internalData;
381
+ const btnElem = evnt.currentTarget;
382
+ const btnType = btnElem.getAttribute("data-type");
383
+ internalData.currValue = btnType === "1" ? startValue : endValue;
384
+ internalData.isBtnActive = true;
385
+ handleShowTip(btnElem);
386
+ };
387
+ const handleBtnMouseleaveEvent = () => {
388
+ const { isDragStatus } = internalData;
389
+ internalData.isBtnActive = false;
390
+ if (!isDragStatus) {
391
+ handleHideTip();
392
+ }
393
+ };
394
+ const collapsePanePrivateMethods = {};
395
+ Object.assign($xeSlider, collapsePaneMethods, collapsePanePrivateMethods);
396
+ const renderVN = () => {
397
+ const { status, vertical, range } = props;
398
+ const vSize = computeSize.value;
399
+ const formReadonly = computeFormReadonly.value;
400
+ const isDisabled = computeIsDisabled.value;
401
+ return h(
402
+ "div",
367
403
  {
368
- currentValue: internalData.currValue,
369
- startValue: internalData.startValue,
370
- endValue: internalData.endValue
404
+ ref: refElem,
405
+ class: [
406
+ "vxe-slider",
407
+ {
408
+ [`size--${vSize}`]: vSize,
409
+ [`theme--${status}`]: status,
410
+ "is--vertical": vertical,
411
+ "is--readonly": formReadonly,
412
+ "is--disabled": isDisabled
413
+ }
414
+ ]
371
415
  },
372
- evnt
373
- );
374
- internalData.isDragStatus = false;
375
- }
376
- };
377
- const handleBtnMouseenterEvent = (evnt) => {
378
- const { startValue, endValue } = internalData;
379
- const btnElem = evnt.currentTarget;
380
- const btnType = btnElem.getAttribute("data-type");
381
- internalData.currValue = btnType === "1" ? startValue : endValue;
382
- internalData.isBtnActive = true;
383
- handleShowTip(btnElem);
384
- };
385
- const handleBtnMouseleaveEvent = () => {
386
- const { isDragStatus } = internalData;
387
- internalData.isBtnActive = false;
388
- if (!isDragStatus) {
389
- handleHideTip();
390
- }
391
- };
392
- const collapsePanePrivateMethods = {};
393
- Object.assign($xeSlider, collapsePaneMethods, collapsePanePrivateMethods);
394
- const renderVN = () => {
395
- const { status, vertical, range } = props;
396
- const vSize = computeSize.value;
397
- const formReadonly = computeFormReadonly.value;
398
- const isDisabled = computeIsDisabled.value;
399
- return h(
400
- "div",
401
- {
402
- ref: refElem,
403
- class: [
404
- "vxe-slider",
405
- {
406
- [`size--${vSize}`]: vSize,
407
- [`theme--${status}`]: status,
408
- "is--vertical": vertical,
409
- "is--readonly": formReadonly,
410
- "is--disabled": isDisabled
411
- }
416
+ [
417
+ h(
418
+ "div",
419
+ {
420
+ class: "vxe-slider--inner"
421
+ },
422
+ [
423
+ h("div", {
424
+ ref: refBarElem,
425
+ class: "vxe-slider--bar-wrapper"
426
+ }),
427
+ h("div", {
428
+ ref: refTrackElem,
429
+ class: "vxe-slider--bar-track"
430
+ }),
431
+ formReadonly || !range ? renderEmptyElement($xeSlider) : h("div", {
432
+ ref: refStartBtnElem,
433
+ class: "vxe-slider--bar-btn",
434
+ "data-type": "1",
435
+ onMouseenter: handleBtnMouseenterEvent,
436
+ onMouseleave: handleBtnMouseleaveEvent,
437
+ onMousedown: handleBtnMousedownEvent
438
+ }),
439
+ formReadonly ? renderEmptyElement($xeSlider) : h("div", {
440
+ ref: refEndBtnElem,
441
+ class: "vxe-slider--bar-btn",
442
+ "data-type": "2",
443
+ onMouseenter: handleBtnMouseenterEvent,
444
+ onMouseleave: handleBtnMouseleaveEvent,
445
+ onMousedown: handleBtnMousedownEvent
446
+ })
447
+ ]
448
+ )
412
449
  ]
413
- },
414
- [
415
- h(
416
- "div",
417
- {
418
- class: "vxe-slider--inner"
419
- },
420
- [
421
- h("div", {
422
- ref: refBarElem,
423
- class: "vxe-slider--bar-wrapper"
424
- }),
425
- h("div", {
426
- ref: refTrackElem,
427
- class: "vxe-slider--bar-track"
428
- }),
429
- formReadonly || !range ? renderEmptyElement($xeSlider) : h("div", {
430
- ref: refStartBtnElem,
431
- class: "vxe-slider--bar-btn",
432
- "data-type": "1",
433
- onMouseenter: handleBtnMouseenterEvent,
434
- onMouseleave: handleBtnMouseleaveEvent,
435
- onMousedown: handleBtnMousedownEvent
436
- }),
437
- formReadonly ? renderEmptyElement($xeSlider) : h("div", {
438
- ref: refEndBtnElem,
439
- class: "vxe-slider--bar-btn",
440
- "data-type": "2",
441
- onMouseenter: handleBtnMouseenterEvent,
442
- onMouseleave: handleBtnMouseleaveEvent,
443
- onMousedown: handleBtnMousedownEvent
444
- })
445
- ]
446
- )
447
- ]
450
+ );
451
+ };
452
+ watch(
453
+ () => props.modelValue,
454
+ () => {
455
+ if (!internalData._isUp) {
456
+ updateModelValue(1);
457
+ }
458
+ internalData._isUp = false;
459
+ }
448
460
  );
449
- };
450
- watch(
451
- () => props.modelValue,
452
- () => {
461
+ watch(computeMVal, () => {
453
462
  if (!internalData._isUp) {
454
- updateModelValue(1);
463
+ updateModelValue(2);
455
464
  }
456
465
  internalData._isUp = false;
457
- }
458
- );
459
- watch(computeMVal, () => {
460
- if (!internalData._isUp) {
461
- updateModelValue(2);
462
- }
463
- internalData._isUp = false;
464
- });
465
- onMounted(() => {
466
- updateModelValue();
467
- });
468
- onBeforeUnmount(() => {
469
- XEUtils.assign(reactData, createReactData());
470
- XEUtils.assign(internalData, createInternalData());
471
- });
472
- $xeSlider.renderVN = renderVN;
473
- return $xeSlider;
474
- },
475
- render() {
476
- return this.renderVN();
477
- }
478
- });
466
+ });
467
+ onMounted(() => {
468
+ updateModelValue();
469
+ });
470
+ onBeforeUnmount(() => {
471
+ XEUtils.assign(reactData, createReactData());
472
+ XEUtils.assign(internalData, createInternalData());
473
+ });
474
+ $xeSlider.renderVN = renderVN;
475
+ return $xeSlider;
476
+ },
477
+ render() {
478
+ return this.renderVN();
479
+ }
480
+ })
481
+ );
479
482
  export {
480
483
  slider_default as default
481
484
  };