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
@@ -53,368 +53,371 @@ function createInternalData() {
53
53
  openKeyMaps: {}
54
54
  };
55
55
  }
56
- var collapse_default = (0, import_comp.defineVxeComponent)({
57
- name: "VxeCollapse",
58
- props: {
59
- modelValue: Array,
60
- options: Array,
61
- padding: {
62
- type: Boolean,
63
- default: () => getConfig().collapse.padding
64
- },
65
- border: {
66
- type: Boolean,
67
- default: () => getConfig().collapse.border
68
- },
69
- expandConfig: Object,
70
- size: {
71
- type: String,
72
- default: () => getConfig().collapse.size || getConfig().size
73
- }
74
- },
75
- emits: ["update:modelValue", "load", "change", "toggle-expand"],
76
- setup(props, context) {
77
- const { emit, slots } = context;
78
- const xID = import_xe_utils.default.uniqueId();
79
- const { computeSize } = useFns.useSize(props);
80
- const refElem = (0, import_vue.ref)();
81
- const reactData = (0, import_vue.reactive)(createReactData());
82
- const internalData = createInternalData();
83
- const refMaps = {
84
- refElem
85
- };
86
- const computeItemOptions = (0, import_vue.computed)(() => {
87
- const { options } = props;
88
- return (options || []).filter((item) => handleFilterItem(item));
89
- });
90
- const computeItemStaticOptions = (0, import_vue.computed)(() => {
91
- const { staticPanes } = reactData;
92
- return staticPanes.filter((item) => handleFilterItem(item));
93
- });
94
- const computeExpandOpts = (0, import_vue.computed)(() => {
95
- return Object.assign({}, getConfig().collapse.expandConfig, props.expandConfig);
96
- });
97
- const computeMaps = {};
98
- const $xeCollapse = {
99
- xID,
100
- props,
101
- context,
102
- reactData,
103
- internalData,
104
- getRefMaps: () => refMaps,
105
- getComputeMaps: () => computeMaps
106
- };
107
- const dispatchEvent = (type, params, evnt) => {
108
- emit(type, createEvent(evnt, { $collapse: $xeCollapse }, params));
109
- };
110
- const collapseMethods = {
111
- dispatchEvent
112
- };
113
- const emitModel = (value) => {
114
- emit("update:modelValue", value);
115
- };
116
- const handleFilterItem = (item) => {
117
- const { permissionCode } = item;
118
- if (permissionCode) {
119
- if (!permission.checkVisible(permissionCode)) {
120
- return false;
121
- }
56
+ var collapse_default = (
57
+ /* define-vxe-component start */
58
+ (0, import_comp.defineVxeComponent)({
59
+ name: "VxeCollapse",
60
+ props: {
61
+ modelValue: Array,
62
+ options: Array,
63
+ padding: {
64
+ type: Boolean,
65
+ default: () => getConfig().collapse.padding
66
+ },
67
+ border: {
68
+ type: Boolean,
69
+ default: () => getConfig().collapse.border
70
+ },
71
+ expandConfig: Object,
72
+ size: {
73
+ type: String,
74
+ default: () => getConfig().collapse.size || getConfig().size
122
75
  }
123
- return true;
124
- };
125
- const updateModel = () => {
126
- const { modelValue } = props;
127
- const { openKeyMaps } = internalData;
128
- const activeMaps = {};
129
- if (modelValue) {
130
- modelValue.forEach((name) => {
131
- if (!openKeyMaps[name]) {
132
- openKeyMaps[name] = true;
76
+ },
77
+ emits: ["update:modelValue", "load", "change", "toggle-expand"],
78
+ setup(props, context) {
79
+ const { emit, slots } = context;
80
+ const xID = import_xe_utils.default.uniqueId();
81
+ const { computeSize } = useFns.useSize(props);
82
+ const refElem = (0, import_vue.ref)();
83
+ const reactData = (0, import_vue.reactive)(createReactData());
84
+ const internalData = createInternalData();
85
+ const refMaps = {
86
+ refElem
87
+ };
88
+ const computeItemOptions = (0, import_vue.computed)(() => {
89
+ const { options } = props;
90
+ return (options || []).filter((item) => handleFilterItem(item));
91
+ });
92
+ const computeItemStaticOptions = (0, import_vue.computed)(() => {
93
+ const { staticPanes } = reactData;
94
+ return staticPanes.filter((item) => handleFilterItem(item));
95
+ });
96
+ const computeExpandOpts = (0, import_vue.computed)(() => {
97
+ return Object.assign({}, getConfig().collapse.expandConfig, props.expandConfig);
98
+ });
99
+ const computeMaps = {};
100
+ const $xeCollapse = {
101
+ xID,
102
+ props,
103
+ context,
104
+ reactData,
105
+ internalData,
106
+ getRefMaps: () => refMaps,
107
+ getComputeMaps: () => computeMaps
108
+ };
109
+ const dispatchEvent = (type, params, evnt) => {
110
+ emit(type, createEvent(evnt, { $collapse: $xeCollapse }, params));
111
+ };
112
+ const collapseMethods = {
113
+ dispatchEvent
114
+ };
115
+ const emitModel = (value) => {
116
+ emit("update:modelValue", value);
117
+ };
118
+ const handleFilterItem = (item) => {
119
+ const { permissionCode } = item;
120
+ if (permissionCode) {
121
+ if (!permission.checkVisible(permissionCode)) {
122
+ return false;
133
123
  }
134
- activeMaps[name] = true;
135
- });
136
- }
137
- internalData.activeKeyMaps = activeMaps;
138
- reactData.activeKeyFlag++;
139
- reactData.openKeyFlag++;
140
- };
141
- const handleOpen = (name) => {
142
- const { openKeyMaps } = internalData;
143
- if (name && !openKeyMaps[name]) {
144
- openKeyMaps[name] = true;
145
- dispatchEvent("load", { name }, null);
124
+ }
146
125
  return true;
147
- }
148
- return false;
149
- };
150
- const initDefaultName = (list) => {
151
- const { activeKeyMaps } = internalData;
152
- const nameMaps = {};
153
- if (list && list.length) {
154
- list.forEach((item) => {
155
- const { name, preload } = item || {};
156
- if (name) {
157
- const isActive = activeKeyMaps[name];
158
- nameMaps[name] = {
159
- height: 0,
160
- loading: false
161
- };
162
- if (isActive || preload) {
163
- handleOpen(name);
126
+ };
127
+ const updateModel = () => {
128
+ const { modelValue } = props;
129
+ const { openKeyMaps } = internalData;
130
+ const activeMaps = {};
131
+ if (modelValue) {
132
+ modelValue.forEach((name) => {
133
+ if (!openKeyMaps[name]) {
134
+ openKeyMaps[name] = true;
164
135
  }
165
- }
166
- });
167
- }
168
- reactData.cachePaneMaps = nameMaps;
169
- reactData.openKeyFlag++;
170
- };
171
- const callSlot = (slotFunc, params) => {
172
- if (slotFunc) {
173
- if (import_xe_utils.default.isString(slotFunc)) {
174
- slotFunc = slots[slotFunc] || null;
136
+ activeMaps[name] = true;
137
+ });
138
+ }
139
+ internalData.activeKeyMaps = activeMaps;
140
+ reactData.activeKeyFlag++;
141
+ reactData.openKeyFlag++;
142
+ };
143
+ const handleOpen = (name) => {
144
+ const { openKeyMaps } = internalData;
145
+ if (name && !openKeyMaps[name]) {
146
+ openKeyMaps[name] = true;
147
+ dispatchEvent("load", { name }, null);
148
+ return true;
175
149
  }
176
- if (import_xe_utils.default.isFunction(slotFunc)) {
177
- return (0, import_vn.getSlotVNs)(slotFunc(params));
150
+ return false;
151
+ };
152
+ const initDefaultName = (list) => {
153
+ const { activeKeyMaps } = internalData;
154
+ const nameMaps = {};
155
+ if (list && list.length) {
156
+ list.forEach((item) => {
157
+ const { name, preload } = item || {};
158
+ if (name) {
159
+ const isActive = activeKeyMaps[name];
160
+ nameMaps[name] = {
161
+ height: 0,
162
+ loading: false
163
+ };
164
+ if (isActive || preload) {
165
+ handleOpen(name);
166
+ }
167
+ }
168
+ });
178
169
  }
179
- }
180
- return [];
181
- };
182
- const handleClickEvent = (evnt, item) => {
183
- let { activeKeyMaps } = internalData;
184
- const { esTime } = internalData;
185
- const expandOpts = computeExpandOpts.value;
186
- const { accordion } = expandOpts;
187
- const { name } = item;
188
- if (esTime) {
189
- clearTimeout(esTime);
190
- }
191
- if (name) {
192
- const headEl = evnt.currentTarget;
193
- const bodyEl = headEl.nextElementSibling;
194
- let expanded = false;
195
- if (activeKeyMaps[name]) {
196
- delete activeKeyMaps[name];
197
- } else {
198
- if (accordion) {
199
- activeKeyMaps = {};
170
+ reactData.cachePaneMaps = nameMaps;
171
+ reactData.openKeyFlag++;
172
+ };
173
+ const callSlot = (slotFunc, params) => {
174
+ if (slotFunc) {
175
+ if (import_xe_utils.default.isString(slotFunc)) {
176
+ slotFunc = slots[slotFunc] || null;
177
+ }
178
+ if (import_xe_utils.default.isFunction(slotFunc)) {
179
+ return (0, import_vn.getSlotVNs)(slotFunc(params));
200
180
  }
201
- expanded = true;
202
- activeKeyMaps[name] = true;
203
181
  }
204
- const startAnimation = () => {
205
- const itemEl = bodyEl.firstElementChild;
206
- if (itemEl) {
207
- bodyEl.style.height = (0, import_dom.toCssUnit)(itemEl.scrollHeight);
208
- if (expanded) {
209
- internalData.esTime = setTimeout(() => {
210
- bodyEl.style.height = "";
211
- internalData.esTime = void 0;
212
- }, 200);
213
- } else {
214
- (0, import_vue.nextTick)(() => {
215
- requestAnimationFrame(() => {
182
+ return [];
183
+ };
184
+ const handleClickEvent = (evnt, item) => {
185
+ let { activeKeyMaps } = internalData;
186
+ const { esTime } = internalData;
187
+ const expandOpts = computeExpandOpts.value;
188
+ const { accordion } = expandOpts;
189
+ const { name } = item;
190
+ if (esTime) {
191
+ clearTimeout(esTime);
192
+ }
193
+ if (name) {
194
+ const headEl = evnt.currentTarget;
195
+ const bodyEl = headEl.nextElementSibling;
196
+ let expanded = false;
197
+ if (activeKeyMaps[name]) {
198
+ delete activeKeyMaps[name];
199
+ } else {
200
+ if (accordion) {
201
+ activeKeyMaps = {};
202
+ }
203
+ expanded = true;
204
+ activeKeyMaps[name] = true;
205
+ }
206
+ const startAnimation = () => {
207
+ const itemEl = bodyEl.firstElementChild;
208
+ if (itemEl) {
209
+ bodyEl.style.height = (0, import_dom.toCssUnit)(itemEl.scrollHeight);
210
+ if (expanded) {
211
+ internalData.esTime = setTimeout(() => {
216
212
  bodyEl.style.height = "";
213
+ internalData.esTime = void 0;
214
+ }, 200);
215
+ } else {
216
+ (0, import_vue.nextTick)(() => {
217
+ requestAnimationFrame(() => {
218
+ bodyEl.style.height = "";
219
+ });
217
220
  });
218
- });
221
+ }
222
+ }
223
+ };
224
+ const value = Object.keys(activeKeyMaps);
225
+ internalData.activeKeyMaps = activeKeyMaps;
226
+ handleOpen(name);
227
+ reactData.activeKeyFlag++;
228
+ reactData.openKeyFlag++;
229
+ if (bodyEl) {
230
+ const itemEl = bodyEl.firstElementChild;
231
+ if (itemEl) {
232
+ startAnimation();
233
+ } else {
234
+ bodyEl.style.height = "0";
235
+ (0, import_vue.nextTick)(startAnimation);
219
236
  }
220
237
  }
221
- };
222
- const value = Object.keys(activeKeyMaps);
223
- internalData.activeKeyMaps = activeKeyMaps;
224
- handleOpen(name);
225
- reactData.activeKeyFlag++;
226
- reactData.openKeyFlag++;
227
- if (bodyEl) {
228
- const itemEl = bodyEl.firstElementChild;
229
- if (itemEl) {
230
- startAnimation();
231
- } else {
232
- bodyEl.style.height = "0";
233
- (0, import_vue.nextTick)(startAnimation);
234
- }
238
+ emitModel(value);
239
+ dispatchEvent("change", { value, name }, evnt);
240
+ dispatchEvent("toggle-expand", { value, name, expanded }, evnt);
235
241
  }
236
- emitModel(value);
237
- dispatchEvent("change", { value, name }, evnt);
238
- dispatchEvent("toggle-expand", { value, name, expanded }, evnt);
239
- }
240
- };
241
- const collapsePrivateMethods = {};
242
- Object.assign($xeCollapse, collapseMethods, collapsePrivateMethods);
243
- const renderList = (itemList) => {
244
- const { activeKeyFlag, openKeyFlag } = reactData;
245
- const { activeKeyMaps, openKeyMaps } = internalData;
246
- const expandOpts = computeExpandOpts.value;
247
- return itemList.map((item) => {
248
- const { icon, name, title, slots: slots2 } = item;
249
- const titleSlot = slots2 ? slots2.title : null;
250
- const defaultSlot = slots2 ? slots2.default : null;
251
- const isActive = name && activeKeyFlag && activeKeyMaps[name];
242
+ };
243
+ const collapsePrivateMethods = {};
244
+ Object.assign($xeCollapse, collapseMethods, collapsePrivateMethods);
245
+ const renderList = (itemList) => {
246
+ const { activeKeyFlag, openKeyFlag } = reactData;
247
+ const { activeKeyMaps, openKeyMaps } = internalData;
248
+ const expandOpts = computeExpandOpts.value;
249
+ return itemList.map((item) => {
250
+ const { icon, name, title, slots: slots2 } = item;
251
+ const titleSlot = slots2 ? slots2.title : null;
252
+ const defaultSlot = slots2 ? slots2.default : null;
253
+ const isActive = name && activeKeyFlag && activeKeyMaps[name];
254
+ return (0, import_vue.h)(
255
+ "div",
256
+ {
257
+ class: "vxe-collapse-item"
258
+ },
259
+ [
260
+ (0, import_vue.h)(
261
+ "div",
262
+ {
263
+ class: "vxe-collapse--item-header",
264
+ onClick(evnt) {
265
+ handleClickEvent(evnt, item);
266
+ }
267
+ },
268
+ [
269
+ expandOpts.showIcon ? (0, import_vue.h)(
270
+ "span",
271
+ {
272
+ class: "vxe-collapse--item-switch"
273
+ },
274
+ [
275
+ (0, import_vue.h)("i", {
276
+ class: isActive ? getIcon().COLLAPSE_OPEN : getIcon().COLLAPSE_CLOSE
277
+ })
278
+ ]
279
+ ) : renderEmptyElement($xeCollapse),
280
+ icon ? (0, import_vue.h)(
281
+ "span",
282
+ {
283
+ class: "vxe-collapse--item-icon"
284
+ },
285
+ [
286
+ (0, import_vue.h)("i", {
287
+ class: icon
288
+ })
289
+ ]
290
+ ) : renderEmptyElement($xeCollapse),
291
+ (0, import_vue.h)(
292
+ "span",
293
+ {
294
+ class: "vxe-collapse--item-name"
295
+ },
296
+ titleSlot ? callSlot(titleSlot, { name, title }) : `${title}`
297
+ )
298
+ ]
299
+ ),
300
+ (0, import_vue.h)(
301
+ "div",
302
+ {
303
+ class: [
304
+ "vxe-collapse--item-content",
305
+ {
306
+ "is--visible": isActive,
307
+ "is--hidden": !isActive
308
+ }
309
+ ]
310
+ },
311
+ [
312
+ name && openKeyFlag && openKeyMaps[name] ? (0, import_vue.h)(
313
+ "div",
314
+ {
315
+ class: "vxe-collapse--item-inner"
316
+ },
317
+ [defaultSlot ? callSlot(defaultSlot, { name, title }) : ""]
318
+ ) : renderEmptyElement($xeCollapse)
319
+ ]
320
+ )
321
+ ]
322
+ );
323
+ });
324
+ };
325
+ const renderVN = () => {
326
+ const { padding, border } = props;
327
+ const vSize = computeSize.value;
328
+ const itemOptions = computeItemOptions.value;
329
+ const itemStaticOptions = computeItemStaticOptions.value;
330
+ const defaultSlot = slots.default;
331
+ const itemList = defaultSlot ? itemStaticOptions : itemOptions;
252
332
  return (0, import_vue.h)(
253
333
  "div",
254
334
  {
255
- class: "vxe-collapse-item"
335
+ ref: refElem,
336
+ class: [
337
+ "vxe-collapse",
338
+ {
339
+ [`size--${vSize}`]: vSize,
340
+ "is--padding": padding,
341
+ "is--border": border
342
+ }
343
+ ]
256
344
  },
257
345
  [
258
346
  (0, import_vue.h)(
259
347
  "div",
260
348
  {
261
- class: "vxe-collapse--item-header",
262
- onClick(evnt) {
263
- handleClickEvent(evnt, item);
264
- }
349
+ class: "vxe-collapse-slots"
265
350
  },
266
- [
267
- expandOpts.showIcon ? (0, import_vue.h)(
268
- "span",
269
- {
270
- class: "vxe-collapse--item-switch"
271
- },
272
- [
273
- (0, import_vue.h)("i", {
274
- class: isActive ? getIcon().COLLAPSE_OPEN : getIcon().COLLAPSE_CLOSE
275
- })
276
- ]
277
- ) : renderEmptyElement($xeCollapse),
278
- icon ? (0, import_vue.h)(
279
- "span",
280
- {
281
- class: "vxe-collapse--item-icon"
282
- },
283
- [
284
- (0, import_vue.h)("i", {
285
- class: icon
286
- })
287
- ]
288
- ) : renderEmptyElement($xeCollapse),
289
- (0, import_vue.h)(
290
- "span",
291
- {
292
- class: "vxe-collapse--item-name"
293
- },
294
- titleSlot ? callSlot(titleSlot, { name, title }) : `${title}`
295
- )
296
- ]
351
+ defaultSlot ? defaultSlot({}) : []
297
352
  ),
298
- (0, import_vue.h)(
299
- "div",
300
- {
301
- class: [
302
- "vxe-collapse--item-content",
303
- {
304
- "is--visible": isActive,
305
- "is--hidden": !isActive
306
- }
307
- ]
308
- },
309
- [
310
- name && openKeyFlag && openKeyMaps[name] ? (0, import_vue.h)(
311
- "div",
312
- {
313
- class: "vxe-collapse--item-inner"
314
- },
315
- [defaultSlot ? callSlot(defaultSlot, { name, title }) : ""]
316
- ) : renderEmptyElement($xeCollapse)
317
- ]
318
- )
353
+ renderList(itemList)
319
354
  ]
320
355
  );
356
+ };
357
+ const valFlag = (0, import_vue.ref)(0);
358
+ (0, import_vue.watch)(
359
+ () => props.modelValue ? props.modelValue.length : -1,
360
+ () => {
361
+ valFlag.value++;
362
+ }
363
+ );
364
+ (0, import_vue.watch)(
365
+ () => props.modelValue,
366
+ () => {
367
+ valFlag.value++;
368
+ }
369
+ );
370
+ (0, import_vue.watch)(valFlag, () => {
371
+ updateModel();
321
372
  });
322
- };
323
- const renderVN = () => {
324
- const { padding, border } = props;
325
- const vSize = computeSize.value;
326
- const itemOptions = computeItemOptions.value;
327
- const itemStaticOptions = computeItemStaticOptions.value;
328
- const defaultSlot = slots.default;
329
- const itemList = defaultSlot ? itemStaticOptions : itemOptions;
330
- return (0, import_vue.h)(
331
- "div",
332
- {
333
- ref: refElem,
334
- class: [
335
- "vxe-collapse",
336
- {
337
- [`size--${vSize}`]: vSize,
338
- "is--padding": padding,
339
- "is--border": border
340
- }
341
- ]
342
- },
343
- [
344
- (0, import_vue.h)(
345
- "div",
346
- {
347
- class: "vxe-collapse-slots"
348
- },
349
- defaultSlot ? defaultSlot({}) : []
350
- ),
351
- renderList(itemList)
352
- ]
373
+ const optsFlag = (0, import_vue.ref)(0);
374
+ (0, import_vue.watch)(
375
+ () => props.options ? props.options.length : -1,
376
+ () => {
377
+ optsFlag.value++;
378
+ }
353
379
  );
354
- };
355
- const valFlag = (0, import_vue.ref)(0);
356
- (0, import_vue.watch)(
357
- () => props.modelValue ? props.modelValue.length : -1,
358
- () => {
359
- valFlag.value++;
360
- }
361
- );
362
- (0, import_vue.watch)(
363
- () => props.modelValue,
364
- () => {
365
- valFlag.value++;
366
- }
367
- );
368
- (0, import_vue.watch)(valFlag, () => {
380
+ (0, import_vue.watch)(
381
+ () => props.options,
382
+ () => {
383
+ optsFlag.value++;
384
+ }
385
+ );
386
+ (0, import_vue.watch)(optsFlag, () => {
387
+ initDefaultName(props.options);
388
+ });
389
+ const stFlag = (0, import_vue.ref)(0);
390
+ (0, import_vue.watch)(
391
+ () => reactData.staticPanes ? reactData.staticPanes.length : -1,
392
+ () => {
393
+ stFlag.value++;
394
+ }
395
+ );
396
+ (0, import_vue.watch)(
397
+ () => reactData.staticPanes,
398
+ () => {
399
+ stFlag.value++;
400
+ }
401
+ );
402
+ (0, import_vue.watch)(stFlag, () => {
403
+ initDefaultName(reactData.staticPanes);
404
+ });
369
405
  updateModel();
370
- });
371
- const optsFlag = (0, import_vue.ref)(0);
372
- (0, import_vue.watch)(
373
- () => props.options ? props.options.length : -1,
374
- () => {
375
- optsFlag.value++;
376
- }
377
- );
378
- (0, import_vue.watch)(
379
- () => props.options,
380
- () => {
381
- optsFlag.value++;
382
- }
383
- );
384
- (0, import_vue.watch)(optsFlag, () => {
385
- initDefaultName(props.options);
386
- });
387
- const stFlag = (0, import_vue.ref)(0);
388
- (0, import_vue.watch)(
389
- () => reactData.staticPanes ? reactData.staticPanes.length : -1,
390
- () => {
391
- stFlag.value++;
392
- }
393
- );
394
- (0, import_vue.watch)(
395
- () => reactData.staticPanes,
396
- () => {
397
- stFlag.value++;
398
- }
399
- );
400
- (0, import_vue.watch)(stFlag, () => {
401
- initDefaultName(reactData.staticPanes);
402
- });
403
- updateModel();
404
- initDefaultName(reactData.staticPanes.length ? reactData.staticPanes : props.options);
405
- (0, import_vue.onUnmounted)(() => {
406
- const { esTime } = internalData;
407
- if (esTime) {
408
- clearTimeout(esTime);
409
- }
410
- import_xe_utils.default.assign(reactData, createReactData());
411
- import_xe_utils.default.assign(internalData, createInternalData());
412
- });
413
- (0, import_vue.provide)("$xeCollapse", $xeCollapse);
414
- $xeCollapse.renderVN = renderVN;
415
- return $xeCollapse;
416
- },
417
- render() {
418
- return this.renderVN();
419
- }
420
- });
406
+ initDefaultName(reactData.staticPanes.length ? reactData.staticPanes : props.options);
407
+ (0, import_vue.onUnmounted)(() => {
408
+ const { esTime } = internalData;
409
+ if (esTime) {
410
+ clearTimeout(esTime);
411
+ }
412
+ import_xe_utils.default.assign(reactData, createReactData());
413
+ import_xe_utils.default.assign(internalData, createInternalData());
414
+ });
415
+ (0, import_vue.provide)("$xeCollapse", $xeCollapse);
416
+ $xeCollapse.renderVN = renderVN;
417
+ return $xeCollapse;
418
+ },
419
+ render() {
420
+ return this.renderVN();
421
+ }
422
+ })
423
+ );