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
@@ -3,174 +3,177 @@ import { defineVxeComponent } from "../../ui/src/comp";
3
3
  import XEUtils from "xe-utils";
4
4
  import { VxeUI } from "@vxe-ui/core";
5
5
  const { getConfig, getIcon, createEvent, useFns } = VxeUI;
6
- var rate_default = defineVxeComponent({
7
- name: "VxeRate",
8
- props: {
9
- modelValue: [Number, String],
10
- disabled: {
11
- type: Boolean,
12
- default: null
6
+ var rate_default = (
7
+ /* define-vxe-component start */
8
+ defineVxeComponent({
9
+ name: "VxeRate",
10
+ props: {
11
+ modelValue: [Number, String],
12
+ disabled: {
13
+ type: Boolean,
14
+ default: null
15
+ },
16
+ readonly: {
17
+ type: Boolean,
18
+ default: null
19
+ },
20
+ size: {
21
+ type: String,
22
+ default: () => getConfig().rate.size || getConfig().size
23
+ },
24
+ status: String
13
25
  },
14
- readonly: {
15
- type: Boolean,
16
- default: null
17
- },
18
- size: {
19
- type: String,
20
- default: () => getConfig().rate.size || getConfig().size
21
- },
22
- status: String
23
- },
24
- emits: ["update:modelValue", "change"],
25
- setup(props, context) {
26
- const { emit } = context;
27
- const $xeForm = inject("$xeForm", null);
28
- const formItemInfo = inject("xeFormItemInfo", null);
29
- const xID = XEUtils.uniqueId();
30
- const { computeSize } = useFns.useSize(props);
31
- const refElem = ref();
32
- const reactData = reactive({
33
- activeValue: null
34
- });
35
- const refMaps = {
36
- refElem
37
- };
38
- const computeIsDisabled = computed(() => {
39
- const { disabled } = props;
40
- if (disabled === null) {
41
- if ($xeForm) {
42
- return $xeForm.props.readonly || $xeForm.props.disabled;
26
+ emits: ["update:modelValue", "change"],
27
+ setup(props, context) {
28
+ const { emit } = context;
29
+ const $xeForm = inject("$xeForm", null);
30
+ const formItemInfo = inject("xeFormItemInfo", null);
31
+ const xID = XEUtils.uniqueId();
32
+ const { computeSize } = useFns.useSize(props);
33
+ const refElem = ref();
34
+ const reactData = reactive({
35
+ activeValue: null
36
+ });
37
+ const refMaps = {
38
+ refElem
39
+ };
40
+ const computeIsDisabled = computed(() => {
41
+ const { disabled } = props;
42
+ if (disabled === null) {
43
+ if ($xeForm) {
44
+ return $xeForm.props.readonly || $xeForm.props.disabled;
45
+ }
46
+ return false;
43
47
  }
44
- return false;
45
- }
46
- return disabled;
47
- });
48
- const computeIsReadonly = computed(() => {
49
- const { readonly } = props;
50
- if (readonly === null) {
51
- if ($xeForm) {
52
- return $xeForm.props.readonly || $xeForm.props.disabled;
48
+ return disabled;
49
+ });
50
+ const computeIsReadonly = computed(() => {
51
+ const { readonly } = props;
52
+ if (readonly === null) {
53
+ if ($xeForm) {
54
+ return $xeForm.props.readonly || $xeForm.props.disabled;
55
+ }
56
+ return false;
53
57
  }
54
- return false;
55
- }
56
- return readonly;
57
- });
58
- const computeNumVal = computed(() => {
59
- const { modelValue } = props;
60
- const { activeValue } = reactData;
61
- return XEUtils.toNumber(activeValue === null ? modelValue : activeValue);
62
- });
63
- const computeItemList = computed(() => {
64
- return [1, 2, 3, 4, 5].map((num) => {
65
- return {
66
- value: num,
67
- label: num
68
- };
58
+ return readonly;
69
59
  });
70
- });
71
- const computeMaps = {};
72
- const $xeRate = {
73
- xID,
74
- props,
75
- context,
76
- reactData,
77
- getRefMaps: () => refMaps,
78
- getComputeMaps: () => computeMaps
79
- };
80
- const dispatchEvent = (type, params, evnt) => {
81
- emit(type, createEvent(evnt, { $rate: $xeRate }, params));
82
- };
83
- const rateMethods = {
84
- dispatchEvent
85
- };
86
- const ratePrivateMethods = {};
87
- const emitModel = (value) => {
88
- emit("update:modelValue", value);
89
- };
90
- const mouseenterEvent = (evnt, item) => {
91
- const isDisabled = computeIsDisabled.value;
92
- const isReadonly = computeIsReadonly.value;
93
- if (!(isDisabled || isReadonly)) {
94
- const value = item.value;
95
- reactData.activeValue = value;
96
- }
97
- };
98
- const mouseleaveEvent = () => {
99
- reactData.activeValue = null;
100
- };
101
- const clickEvent = (evnt, item) => {
102
- const isDisabled = computeIsDisabled.value;
103
- const isReadonly = computeIsReadonly.value;
104
- if (!(isDisabled || isReadonly)) {
105
- const value = item.value;
106
- emitModel(value);
107
- dispatchEvent("change", { value }, evnt);
108
- if ($xeForm && formItemInfo) {
109
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
60
+ const computeNumVal = computed(() => {
61
+ const { modelValue } = props;
62
+ const { activeValue } = reactData;
63
+ return XEUtils.toNumber(activeValue === null ? modelValue : activeValue);
64
+ });
65
+ const computeItemList = computed(() => {
66
+ return [1, 2, 3, 4, 5].map((num) => {
67
+ return {
68
+ value: num,
69
+ label: num
70
+ };
71
+ });
72
+ });
73
+ const computeMaps = {};
74
+ const $xeRate = {
75
+ xID,
76
+ props,
77
+ context,
78
+ reactData,
79
+ getRefMaps: () => refMaps,
80
+ getComputeMaps: () => computeMaps
81
+ };
82
+ const dispatchEvent = (type, params, evnt) => {
83
+ emit(type, createEvent(evnt, { $rate: $xeRate }, params));
84
+ };
85
+ const rateMethods = {
86
+ dispatchEvent
87
+ };
88
+ const ratePrivateMethods = {};
89
+ const emitModel = (value) => {
90
+ emit("update:modelValue", value);
91
+ };
92
+ const mouseenterEvent = (evnt, item) => {
93
+ const isDisabled = computeIsDisabled.value;
94
+ const isReadonly = computeIsReadonly.value;
95
+ if (!(isDisabled || isReadonly)) {
96
+ const value = item.value;
97
+ reactData.activeValue = value;
110
98
  }
111
- }
112
- };
113
- Object.assign($xeRate, rateMethods, ratePrivateMethods);
114
- const renderVN = () => {
115
- const { status } = props;
116
- const isDisabled = computeIsDisabled.value;
117
- const isReadonly = computeIsReadonly.value;
118
- const itemList = computeItemList.value;
119
- const vSize = computeSize.value;
120
- const numVal = computeNumVal.value;
121
- return h(
122
- "div",
123
- {
124
- ref: refElem,
125
- class: [
126
- "vxe-rate",
127
- {
128
- [`size--${vSize}`]: vSize,
129
- [`theme--${status}`]: status,
130
- "is--disabled": isDisabled,
131
- "is--readonly": isReadonly
132
- }
133
- ]
134
- },
135
- itemList.map((item) => {
136
- const isChecked = numVal >= item.value;
137
- return h(
138
- "div",
139
- {
140
- class: [
141
- "vxe-rte--item",
142
- {
143
- "is--checked": isChecked
144
- }
145
- ],
146
- onMouseenter(evnt) {
147
- if (!(isDisabled || isReadonly)) {
148
- mouseenterEvent(evnt, item);
149
- }
150
- },
151
- onMouseleave: mouseleaveEvent,
152
- onClick(evnt) {
153
- if (!(isDisabled || isReadonly)) {
154
- clickEvent(evnt, item);
155
- }
99
+ };
100
+ const mouseleaveEvent = () => {
101
+ reactData.activeValue = null;
102
+ };
103
+ const clickEvent = (evnt, item) => {
104
+ const isDisabled = computeIsDisabled.value;
105
+ const isReadonly = computeIsReadonly.value;
106
+ if (!(isDisabled || isReadonly)) {
107
+ const value = item.value;
108
+ emitModel(value);
109
+ dispatchEvent("change", { value }, evnt);
110
+ if ($xeForm && formItemInfo) {
111
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
112
+ }
113
+ }
114
+ };
115
+ Object.assign($xeRate, rateMethods, ratePrivateMethods);
116
+ const renderVN = () => {
117
+ const { status } = props;
118
+ const isDisabled = computeIsDisabled.value;
119
+ const isReadonly = computeIsReadonly.value;
120
+ const itemList = computeItemList.value;
121
+ const vSize = computeSize.value;
122
+ const numVal = computeNumVal.value;
123
+ return h(
124
+ "div",
125
+ {
126
+ ref: refElem,
127
+ class: [
128
+ "vxe-rate",
129
+ {
130
+ [`size--${vSize}`]: vSize,
131
+ [`theme--${status}`]: status,
132
+ "is--disabled": isDisabled,
133
+ "is--readonly": isReadonly
156
134
  }
157
- },
158
- [
159
- h("i", {
160
- class: isChecked ? getIcon().RATE_CHECKED : getIcon().RATE_UNCHECKED
161
- })
162
135
  ]
163
- );
164
- })
165
- );
166
- };
167
- $xeRate.renderVN = renderVN;
168
- return $xeRate;
169
- },
170
- render() {
171
- return this.renderVN();
172
- }
173
- });
136
+ },
137
+ itemList.map((item) => {
138
+ const isChecked = numVal >= item.value;
139
+ return h(
140
+ "div",
141
+ {
142
+ class: [
143
+ "vxe-rte--item",
144
+ {
145
+ "is--checked": isChecked
146
+ }
147
+ ],
148
+ onMouseenter(evnt) {
149
+ if (!(isDisabled || isReadonly)) {
150
+ mouseenterEvent(evnt, item);
151
+ }
152
+ },
153
+ onMouseleave: mouseleaveEvent,
154
+ onClick(evnt) {
155
+ if (!(isDisabled || isReadonly)) {
156
+ clickEvent(evnt, item);
157
+ }
158
+ }
159
+ },
160
+ [
161
+ h("i", {
162
+ class: isChecked ? getIcon().RATE_CHECKED : getIcon().RATE_UNCHECKED
163
+ })
164
+ ]
165
+ );
166
+ })
167
+ );
168
+ };
169
+ $xeRate.renderVN = renderVN;
170
+ return $xeRate;
171
+ },
172
+ render() {
173
+ return this.renderVN();
174
+ }
175
+ })
176
+ );
174
177
  export {
175
178
  rate_default as default
176
179
  };
@@ -3,120 +3,123 @@ import { defineVxeComponent } from "../../ui/src/comp";
3
3
  import XEUtils from "xe-utils";
4
4
  import { VxeUI } from "@vxe-ui/core";
5
5
  const { getIcon, createEvent, renderEmptyElement } = VxeUI;
6
- var result_default = defineVxeComponent({
7
- name: "VxeResult",
8
- props: {
9
- imageUrl: String,
10
- imageStyle: Object,
11
- icon: String,
12
- type: [String, Number],
13
- status: [String, Number],
14
- title: [String, Number],
15
- content: [String, Number]
16
- },
17
- emits: [],
18
- setup(props, context) {
19
- const { emit, slots } = context;
20
- const xID = XEUtils.uniqueId();
21
- const refElem = ref();
22
- const reactData = reactive({});
23
- const refMaps = {
24
- refElem
25
- };
26
- const computeMaps = {};
27
- const $xeResult = {
28
- xID,
29
- props,
30
- context,
31
- reactData,
32
- getRefMaps: () => refMaps,
33
- getComputeMaps: () => computeMaps
34
- };
35
- const dispatchEvent = (type, params, evnt) => {
36
- emit(type, createEvent(evnt, { $result: $xeResult }, params));
37
- };
38
- const resultMethods = {
39
- dispatchEvent
40
- };
41
- const resultPrivateMethods = {};
42
- Object.assign($xeResult, resultMethods, resultPrivateMethods);
43
- const renderVN = () => {
44
- const { imageUrl, imageStyle, icon, title, type, content } = props;
45
- const status = props.status || type;
46
- const slotExtra = slots.extra;
47
- return h(
48
- "div",
49
- {
50
- ref: refElem,
51
- class: [
52
- "vxe-result",
53
- {
54
- [`theme--${status}`]: status
55
- }
56
- ]
57
- },
58
- [
59
- h(
60
- "div",
61
- {
62
- class: "vxe-result--inner"
63
- },
64
- [
65
- imageUrl ? h(
66
- "div",
67
- {
68
- class: "vxe-result--img-wrapper"
69
- },
70
- [
71
- h("img", {
72
- src: imageUrl,
73
- style: imageStyle
74
- })
75
- ]
76
- ) : h(
77
- "div",
78
- {
79
- class: "vxe-result--icon-wrapper"
80
- },
81
- [
82
- h("i", {
83
- class: [icon, type ? getIcon()[`RESULT_${type}`.toLocaleUpperCase()] : ""]
84
- })
85
- ]
86
- ),
87
- h(
88
- "div",
89
- {
90
- class: "vxe-result--title-wrapper"
91
- },
92
- `${title || ""}`
93
- ),
94
- h(
95
- "div",
96
- {
97
- class: "vxe-result--content-wrapper"
98
- },
99
- `${content || ""}`
100
- ),
101
- slotExtra ? h(
102
- "div",
103
- {
104
- class: "vxe-result--extra-wrapper"
105
- },
106
- slotExtra({})
107
- ) : renderEmptyElement($xeResult)
6
+ var result_default = (
7
+ /* define-vxe-component start */
8
+ defineVxeComponent({
9
+ name: "VxeResult",
10
+ props: {
11
+ imageUrl: String,
12
+ imageStyle: Object,
13
+ icon: String,
14
+ type: [String, Number],
15
+ status: [String, Number],
16
+ title: [String, Number],
17
+ content: [String, Number]
18
+ },
19
+ emits: [],
20
+ setup(props, context) {
21
+ const { emit, slots } = context;
22
+ const xID = XEUtils.uniqueId();
23
+ const refElem = ref();
24
+ const reactData = reactive({});
25
+ const refMaps = {
26
+ refElem
27
+ };
28
+ const computeMaps = {};
29
+ const $xeResult = {
30
+ xID,
31
+ props,
32
+ context,
33
+ reactData,
34
+ getRefMaps: () => refMaps,
35
+ getComputeMaps: () => computeMaps
36
+ };
37
+ const dispatchEvent = (type, params, evnt) => {
38
+ emit(type, createEvent(evnt, { $result: $xeResult }, params));
39
+ };
40
+ const resultMethods = {
41
+ dispatchEvent
42
+ };
43
+ const resultPrivateMethods = {};
44
+ Object.assign($xeResult, resultMethods, resultPrivateMethods);
45
+ const renderVN = () => {
46
+ const { imageUrl, imageStyle, icon, title, type, content } = props;
47
+ const status = props.status || type;
48
+ const slotExtra = slots.extra;
49
+ return h(
50
+ "div",
51
+ {
52
+ ref: refElem,
53
+ class: [
54
+ "vxe-result",
55
+ {
56
+ [`theme--${status}`]: status
57
+ }
108
58
  ]
109
- )
110
- ]
111
- );
112
- };
113
- $xeResult.renderVN = renderVN;
114
- return $xeResult;
115
- },
116
- render() {
117
- return this.renderVN();
118
- }
119
- });
59
+ },
60
+ [
61
+ h(
62
+ "div",
63
+ {
64
+ class: "vxe-result--inner"
65
+ },
66
+ [
67
+ imageUrl ? h(
68
+ "div",
69
+ {
70
+ class: "vxe-result--img-wrapper"
71
+ },
72
+ [
73
+ h("img", {
74
+ src: imageUrl,
75
+ style: imageStyle
76
+ })
77
+ ]
78
+ ) : h(
79
+ "div",
80
+ {
81
+ class: "vxe-result--icon-wrapper"
82
+ },
83
+ [
84
+ h("i", {
85
+ class: [icon, type ? getIcon()[`RESULT_${type}`.toLocaleUpperCase()] : ""]
86
+ })
87
+ ]
88
+ ),
89
+ h(
90
+ "div",
91
+ {
92
+ class: "vxe-result--title-wrapper"
93
+ },
94
+ `${title || ""}`
95
+ ),
96
+ h(
97
+ "div",
98
+ {
99
+ class: "vxe-result--content-wrapper"
100
+ },
101
+ `${content || ""}`
102
+ ),
103
+ slotExtra ? h(
104
+ "div",
105
+ {
106
+ class: "vxe-result--extra-wrapper"
107
+ },
108
+ slotExtra({})
109
+ ) : renderEmptyElement($xeResult)
110
+ ]
111
+ )
112
+ ]
113
+ );
114
+ };
115
+ $xeResult.renderVN = renderVN;
116
+ return $xeResult;
117
+ },
118
+ render() {
119
+ return this.renderVN();
120
+ }
121
+ })
122
+ );
120
123
  export {
121
124
  result_default as default
122
125
  };