@element-plus/nightly 0.0.20260608 → 0.0.20260610

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 (507) hide show
  1. package/README.md +10 -0
  2. package/dist/index.full.js +24 -16
  3. package/dist/index.full.min.js +3 -3
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +9 -9
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +24 -16
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hi.js +1 -1
  93. package/dist/locale/hi.min.js +1 -1
  94. package/dist/locale/hi.min.mjs +1 -1
  95. package/dist/locale/hi.mjs +1 -1
  96. package/dist/locale/hr.js +1 -1
  97. package/dist/locale/hr.min.js +1 -1
  98. package/dist/locale/hr.min.mjs +1 -1
  99. package/dist/locale/hr.mjs +1 -1
  100. package/dist/locale/hu.js +1 -1
  101. package/dist/locale/hu.min.js +1 -1
  102. package/dist/locale/hu.min.mjs +1 -1
  103. package/dist/locale/hu.mjs +1 -1
  104. package/dist/locale/hy-am.js +1 -1
  105. package/dist/locale/hy-am.min.js +1 -1
  106. package/dist/locale/hy-am.min.mjs +1 -1
  107. package/dist/locale/hy-am.mjs +1 -1
  108. package/dist/locale/id.js +1 -1
  109. package/dist/locale/id.min.js +1 -1
  110. package/dist/locale/id.min.mjs +1 -1
  111. package/dist/locale/id.mjs +1 -1
  112. package/dist/locale/it.js +1 -1
  113. package/dist/locale/it.min.js +1 -1
  114. package/dist/locale/it.min.mjs +1 -1
  115. package/dist/locale/it.mjs +1 -1
  116. package/dist/locale/ja.js +1 -1
  117. package/dist/locale/ja.min.js +1 -1
  118. package/dist/locale/ja.min.mjs +1 -1
  119. package/dist/locale/ja.mjs +1 -1
  120. package/dist/locale/kk.js +1 -1
  121. package/dist/locale/kk.min.js +1 -1
  122. package/dist/locale/kk.min.mjs +1 -1
  123. package/dist/locale/kk.mjs +1 -1
  124. package/dist/locale/km.js +1 -1
  125. package/dist/locale/km.min.js +1 -1
  126. package/dist/locale/km.min.mjs +1 -1
  127. package/dist/locale/km.mjs +1 -1
  128. package/dist/locale/ko.js +1 -1
  129. package/dist/locale/ko.min.js +1 -1
  130. package/dist/locale/ko.min.mjs +1 -1
  131. package/dist/locale/ko.mjs +1 -1
  132. package/dist/locale/ku.js +1 -1
  133. package/dist/locale/ku.min.js +1 -1
  134. package/dist/locale/ku.min.mjs +1 -1
  135. package/dist/locale/ku.mjs +1 -1
  136. package/dist/locale/ky.js +1 -1
  137. package/dist/locale/ky.min.js +1 -1
  138. package/dist/locale/ky.min.mjs +1 -1
  139. package/dist/locale/ky.mjs +1 -1
  140. package/dist/locale/lo.js +1 -1
  141. package/dist/locale/lo.min.js +1 -1
  142. package/dist/locale/lo.min.mjs +1 -1
  143. package/dist/locale/lo.mjs +1 -1
  144. package/dist/locale/lt.js +1 -1
  145. package/dist/locale/lt.min.js +1 -1
  146. package/dist/locale/lt.min.mjs +1 -1
  147. package/dist/locale/lt.mjs +1 -1
  148. package/dist/locale/lv.js +1 -1
  149. package/dist/locale/lv.min.js +1 -1
  150. package/dist/locale/lv.min.mjs +1 -1
  151. package/dist/locale/lv.mjs +1 -1
  152. package/dist/locale/mg.js +1 -1
  153. package/dist/locale/mg.min.js +1 -1
  154. package/dist/locale/mg.min.mjs +1 -1
  155. package/dist/locale/mg.mjs +1 -1
  156. package/dist/locale/mn.js +1 -1
  157. package/dist/locale/mn.min.js +1 -1
  158. package/dist/locale/mn.min.mjs +1 -1
  159. package/dist/locale/mn.mjs +1 -1
  160. package/dist/locale/ms.js +1 -1
  161. package/dist/locale/ms.min.js +1 -1
  162. package/dist/locale/ms.min.mjs +1 -1
  163. package/dist/locale/ms.mjs +1 -1
  164. package/dist/locale/my.js +1 -1
  165. package/dist/locale/my.min.js +1 -1
  166. package/dist/locale/my.min.mjs +1 -1
  167. package/dist/locale/my.mjs +1 -1
  168. package/dist/locale/nb-no.js +1 -1
  169. package/dist/locale/nb-no.min.js +1 -1
  170. package/dist/locale/nb-no.min.mjs +1 -1
  171. package/dist/locale/nb-no.mjs +1 -1
  172. package/dist/locale/nl.js +1 -1
  173. package/dist/locale/nl.min.js +1 -1
  174. package/dist/locale/nl.min.mjs +1 -1
  175. package/dist/locale/nl.mjs +1 -1
  176. package/dist/locale/no.js +1 -1
  177. package/dist/locale/no.min.js +1 -1
  178. package/dist/locale/no.min.mjs +1 -1
  179. package/dist/locale/no.mjs +1 -1
  180. package/dist/locale/pa.js +1 -1
  181. package/dist/locale/pa.min.js +1 -1
  182. package/dist/locale/pa.min.mjs +1 -1
  183. package/dist/locale/pa.mjs +1 -1
  184. package/dist/locale/pl.js +1 -1
  185. package/dist/locale/pl.min.js +1 -1
  186. package/dist/locale/pl.min.mjs +1 -1
  187. package/dist/locale/pl.mjs +1 -1
  188. package/dist/locale/pt-br.js +1 -1
  189. package/dist/locale/pt-br.min.js +1 -1
  190. package/dist/locale/pt-br.min.mjs +1 -1
  191. package/dist/locale/pt-br.mjs +1 -1
  192. package/dist/locale/pt.js +1 -1
  193. package/dist/locale/pt.min.js +1 -1
  194. package/dist/locale/pt.min.mjs +1 -1
  195. package/dist/locale/pt.mjs +1 -1
  196. package/dist/locale/ro.js +1 -1
  197. package/dist/locale/ro.min.js +1 -1
  198. package/dist/locale/ro.min.mjs +1 -1
  199. package/dist/locale/ro.mjs +1 -1
  200. package/dist/locale/ru.js +1 -1
  201. package/dist/locale/ru.min.js +1 -1
  202. package/dist/locale/ru.min.mjs +1 -1
  203. package/dist/locale/ru.mjs +1 -1
  204. package/dist/locale/sk.js +1 -1
  205. package/dist/locale/sk.min.js +1 -1
  206. package/dist/locale/sk.min.mjs +1 -1
  207. package/dist/locale/sk.mjs +1 -1
  208. package/dist/locale/sl.js +1 -1
  209. package/dist/locale/sl.min.js +1 -1
  210. package/dist/locale/sl.min.mjs +1 -1
  211. package/dist/locale/sl.mjs +1 -1
  212. package/dist/locale/sr.js +1 -1
  213. package/dist/locale/sr.min.js +1 -1
  214. package/dist/locale/sr.min.mjs +1 -1
  215. package/dist/locale/sr.mjs +1 -1
  216. package/dist/locale/sv.js +1 -1
  217. package/dist/locale/sv.min.js +1 -1
  218. package/dist/locale/sv.min.mjs +1 -1
  219. package/dist/locale/sv.mjs +1 -1
  220. package/dist/locale/sw.js +1 -1
  221. package/dist/locale/sw.min.js +1 -1
  222. package/dist/locale/sw.min.mjs +1 -1
  223. package/dist/locale/sw.mjs +1 -1
  224. package/dist/locale/ta.js +1 -1
  225. package/dist/locale/ta.min.js +1 -1
  226. package/dist/locale/ta.min.mjs +1 -1
  227. package/dist/locale/ta.mjs +1 -1
  228. package/dist/locale/te.js +1 -1
  229. package/dist/locale/te.min.js +1 -1
  230. package/dist/locale/te.min.mjs +1 -1
  231. package/dist/locale/te.mjs +1 -1
  232. package/dist/locale/th.js +1 -1
  233. package/dist/locale/th.min.js +1 -1
  234. package/dist/locale/th.min.mjs +1 -1
  235. package/dist/locale/th.mjs +1 -1
  236. package/dist/locale/tk.js +1 -1
  237. package/dist/locale/tk.min.js +1 -1
  238. package/dist/locale/tk.min.mjs +1 -1
  239. package/dist/locale/tk.mjs +1 -1
  240. package/dist/locale/tr.js +1 -1
  241. package/dist/locale/tr.min.js +1 -1
  242. package/dist/locale/tr.min.mjs +1 -1
  243. package/dist/locale/tr.mjs +1 -1
  244. package/dist/locale/ug-cn.js +1 -1
  245. package/dist/locale/ug-cn.min.js +1 -1
  246. package/dist/locale/ug-cn.min.mjs +1 -1
  247. package/dist/locale/ug-cn.mjs +1 -1
  248. package/dist/locale/uk.js +1 -1
  249. package/dist/locale/uk.min.js +1 -1
  250. package/dist/locale/uk.min.mjs +1 -1
  251. package/dist/locale/uk.mjs +1 -1
  252. package/dist/locale/uz-uz.js +1 -1
  253. package/dist/locale/uz-uz.min.js +1 -1
  254. package/dist/locale/uz-uz.min.mjs +1 -1
  255. package/dist/locale/uz-uz.mjs +1 -1
  256. package/dist/locale/vi.js +1 -1
  257. package/dist/locale/vi.min.js +1 -1
  258. package/dist/locale/vi.min.mjs +1 -1
  259. package/dist/locale/vi.mjs +1 -1
  260. package/dist/locale/zh-cn.js +1 -1
  261. package/dist/locale/zh-cn.min.js +1 -1
  262. package/dist/locale/zh-cn.min.mjs +1 -1
  263. package/dist/locale/zh-cn.mjs +1 -1
  264. package/dist/locale/zh-hk.js +1 -1
  265. package/dist/locale/zh-hk.min.js +1 -1
  266. package/dist/locale/zh-hk.min.mjs +1 -1
  267. package/dist/locale/zh-hk.mjs +1 -1
  268. package/dist/locale/zh-mo.js +1 -1
  269. package/dist/locale/zh-mo.min.js +1 -1
  270. package/dist/locale/zh-mo.min.mjs +1 -1
  271. package/dist/locale/zh-mo.mjs +1 -1
  272. package/dist/locale/zh-tw.js +1 -1
  273. package/dist/locale/zh-tw.min.js +1 -1
  274. package/dist/locale/zh-tw.min.mjs +1 -1
  275. package/dist/locale/zh-tw.mjs +1 -1
  276. package/es/components/affix/src/affix.vue.d.ts +1 -1
  277. package/es/components/alert/src/alert.d.ts +1 -1
  278. package/es/components/alert/src/alert.vue.d.ts +1 -1
  279. package/es/components/avatar/src/avatar.d.ts +1 -1
  280. package/es/components/badge/src/badge.d.ts +1 -1
  281. package/es/components/button/src/button-group.d.ts +1 -1
  282. package/es/components/button/src/button-group.vue.d.ts +1 -1
  283. package/es/components/button/src/button.d.ts +1 -1
  284. package/es/components/button/src/button.vue.d.ts +3 -3
  285. package/es/components/button/src/use-button.d.ts +1 -1
  286. package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
  287. package/es/components/cascader/src/cascader.d.ts +1 -1
  288. package/es/components/cascader/src/cascader.vue.d.ts +9 -9
  289. package/es/components/cascader-panel/src/index.vue.d.ts +1 -1
  290. package/es/components/check-tag/src/check-tag.d.ts +1 -1
  291. package/es/components/checkbox/src/checkbox-button.vue.d.ts +3 -3
  292. package/es/components/checkbox/src/checkbox-group.vue.d.ts +3 -3
  293. package/es/components/checkbox/src/checkbox.vue.d.ts +3 -3
  294. package/es/components/col/src/col.vue.d.ts +1 -1
  295. package/es/components/color-picker/src/color-picker.vue.d.ts +3 -3
  296. package/es/components/countdown/src/countdown.vue.d.ts +2 -2
  297. package/es/components/date-picker/src/date-picker.d.ts +16 -16
  298. package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  299. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +2 -2
  300. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +3 -3
  301. package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
  302. package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
  303. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +5 -5
  304. package/es/components/date-picker-panel/src/panel-utils.d.ts +21 -21
  305. package/es/components/descriptions/src/description-item.d.ts +2 -2
  306. package/es/components/divider/src/divider.vue.d.ts +1 -1
  307. package/es/components/drawer/src/drawer.vue.d.ts +1 -1
  308. package/es/components/dropdown/src/dropdown.d.ts +1 -1
  309. package/es/components/dropdown/src/dropdown.vue.d.ts +34 -34
  310. package/es/components/image/src/image.d.ts +1 -1
  311. package/es/components/image/src/image.vue.d.ts +4 -4
  312. package/es/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
  313. package/es/components/input/src/input.vue.d.ts +2 -2
  314. package/es/components/input-number/src/input-number.vue.d.ts +5 -5
  315. package/es/components/input-otp/src/input-otp.vue.d.ts +4 -4
  316. package/es/components/input-tag/src/input-tag.d.ts +1 -1
  317. package/es/components/input-tag/src/input-tag.vue.d.ts +6 -6
  318. package/es/components/link/src/link.d.ts +1 -1
  319. package/es/components/message/src/message.d.ts +1 -1
  320. package/es/components/message/src/message.vue.d.ts +5 -5
  321. package/es/components/message-box/src/index.vue.d.ts +20 -20
  322. package/es/components/notification/src/notification.d.ts +1 -1
  323. package/es/components/notification/src/notification.vue.d.ts +4 -4
  324. package/es/components/pagination/src/pagination.d.ts +3 -3
  325. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  326. package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
  327. package/es/components/popover/src/popover.vue.d.ts +4 -4
  328. package/es/components/popper/src/content.vue.d.ts +2 -2
  329. package/es/components/progress/src/progress.vue.d.ts +3 -3
  330. package/es/components/radio/src/radio-button.vue.d.ts +2 -2
  331. package/es/components/radio/src/radio-group.vue.d.ts +4 -4
  332. package/es/components/radio/src/radio.vue.d.ts +2 -2
  333. package/es/components/result/src/result.d.ts +1 -1
  334. package/es/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  335. package/es/components/select/src/select.d.ts +1 -1
  336. package/es/components/select/src/select.vue.d.ts +35 -35
  337. package/es/components/select-v2/src/defaults.d.ts +1 -1
  338. package/es/components/select-v2/src/select.vue.d.ts +30 -30
  339. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  340. package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
  341. package/es/components/slider/src/slider.vue.d.ts +3 -3
  342. package/es/components/space/src/space.d.ts +2 -2
  343. package/es/components/switch/src/switch.vue.d.ts +1 -1
  344. package/es/components/table/src/filter-panel.vue.d.ts +33 -33
  345. package/es/components/table/src/store/helper.d.ts +1 -1
  346. package/es/components/table/src/store/index.d.ts +2 -2
  347. package/es/components/table/src/table-header/index.d.ts +9 -9
  348. package/es/components/table/src/table.vue.d.ts +3 -3
  349. package/es/components/tabs/src/tab-nav.d.ts +1 -1
  350. package/es/components/tabs/src/tabs.d.ts +3 -3
  351. package/es/components/tag/src/tag.d.ts +1 -1
  352. package/es/components/text/src/text.d.ts +1 -1
  353. package/es/components/text/src/text.vue.d.ts +1 -1
  354. package/es/components/time-picker/src/common/picker.vue.d.ts +16 -16
  355. package/es/components/time-picker/src/time-picker.d.ts +16 -16
  356. package/es/components/time-select/src/time-select.vue.d.ts +6 -6
  357. package/es/components/timeline/src/timeline-item.d.ts +1 -1
  358. package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
  359. package/es/components/tooltip/src/content.vue.d.ts +3 -3
  360. package/es/components/tooltip/src/tooltip.vue.d.ts +3 -3
  361. package/es/components/tour/src/helper.d.ts +0 -1
  362. package/es/components/tour/src/helper.mjs.map +1 -1
  363. package/es/components/tour/src/step.vue.d.ts +1 -1
  364. package/es/components/tour/src/step.vue_vue_type_script_setup_true_lang.mjs +1 -3
  365. package/es/components/tour/src/step.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  366. package/es/components/tour/src/step2.mjs.map +1 -1
  367. package/es/components/tour/src/tour.d.ts +6 -1
  368. package/es/components/tour/src/tour.mjs +1 -4
  369. package/es/components/tour/src/tour.mjs.map +1 -1
  370. package/es/components/tour/src/tour.vue.d.ts +2 -3
  371. package/es/components/tour/src/tour.vue_vue_type_script_setup_true_lang.mjs +21 -9
  372. package/es/components/tour/src/tour.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  373. package/es/components/tour/src/tour2.mjs.map +1 -1
  374. package/es/components/tree/src/tree-node.vue.d.ts +10 -10
  375. package/es/components/tree/src/tree.vue.d.ts +21 -21
  376. package/es/components/tree-select/src/tree-select.vue.d.ts +28 -28
  377. package/es/components/tree-v2/src/composables/useTree.d.ts +2 -2
  378. package/es/components/tree-v2/src/tree-node.vue.d.ts +3 -3
  379. package/es/components/tree-v2/src/tree.vue.d.ts +8 -8
  380. package/es/components/upload/src/upload-content.vue.d.ts +1 -1
  381. package/es/components/upload/src/upload.vue.d.ts +1 -1
  382. package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
  383. package/es/components/virtual-list/src/builders/build-list.d.ts +1 -1
  384. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  385. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
  386. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  387. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
  388. package/es/version.d.ts +1 -1
  389. package/es/version.mjs +1 -1
  390. package/es/version.mjs.map +1 -1
  391. package/lib/components/affix/src/affix.vue.d.ts +1 -1
  392. package/lib/components/alert/src/alert.d.ts +1 -1
  393. package/lib/components/alert/src/alert.vue.d.ts +1 -1
  394. package/lib/components/avatar/src/avatar.d.ts +1 -1
  395. package/lib/components/badge/src/badge.d.ts +1 -1
  396. package/lib/components/button/src/button-group.d.ts +1 -1
  397. package/lib/components/button/src/button-group.vue.d.ts +1 -1
  398. package/lib/components/button/src/button.d.ts +1 -1
  399. package/lib/components/button/src/button.vue.d.ts +3 -3
  400. package/lib/components/button/src/use-button.d.ts +1 -1
  401. package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
  402. package/lib/components/cascader/src/cascader.d.ts +1 -1
  403. package/lib/components/cascader/src/cascader.vue.d.ts +9 -9
  404. package/lib/components/cascader-panel/src/index.vue.d.ts +1 -1
  405. package/lib/components/check-tag/src/check-tag.d.ts +1 -1
  406. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +3 -3
  407. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +3 -3
  408. package/lib/components/checkbox/src/checkbox.vue.d.ts +3 -3
  409. package/lib/components/col/src/col.vue.d.ts +1 -1
  410. package/lib/components/color-picker/src/color-picker.vue.d.ts +3 -3
  411. package/lib/components/countdown/src/countdown.vue.d.ts +2 -2
  412. package/lib/components/date-picker/src/date-picker.d.ts +16 -16
  413. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  414. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +2 -2
  415. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +3 -3
  416. package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
  417. package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
  418. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +5 -5
  419. package/lib/components/date-picker-panel/src/panel-utils.d.ts +21 -21
  420. package/lib/components/descriptions/src/description-item.d.ts +2 -2
  421. package/lib/components/divider/src/divider.vue.d.ts +1 -1
  422. package/lib/components/drawer/src/drawer.vue.d.ts +1 -1
  423. package/lib/components/dropdown/src/dropdown.d.ts +1 -1
  424. package/lib/components/dropdown/src/dropdown.vue.d.ts +34 -34
  425. package/lib/components/image/src/image.d.ts +1 -1
  426. package/lib/components/image/src/image.vue.d.ts +4 -4
  427. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
  428. package/lib/components/input/src/input.vue.d.ts +2 -2
  429. package/lib/components/input-number/src/input-number.vue.d.ts +5 -5
  430. package/lib/components/input-otp/src/input-otp.vue.d.ts +4 -4
  431. package/lib/components/input-tag/src/input-tag.d.ts +1 -1
  432. package/lib/components/input-tag/src/input-tag.vue.d.ts +6 -6
  433. package/lib/components/link/src/link.d.ts +1 -1
  434. package/lib/components/message/src/message.d.ts +1 -1
  435. package/lib/components/message/src/message.vue.d.ts +5 -5
  436. package/lib/components/message-box/src/index.vue.d.ts +20 -20
  437. package/lib/components/notification/src/notification.d.ts +1 -1
  438. package/lib/components/notification/src/notification.vue.d.ts +4 -4
  439. package/lib/components/pagination/src/pagination.d.ts +3 -3
  440. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  441. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
  442. package/lib/components/popover/src/popover.vue.d.ts +4 -4
  443. package/lib/components/popper/src/content.vue.d.ts +2 -2
  444. package/lib/components/progress/src/progress.vue.d.ts +3 -3
  445. package/lib/components/radio/src/radio-button.vue.d.ts +2 -2
  446. package/lib/components/radio/src/radio-group.vue.d.ts +4 -4
  447. package/lib/components/radio/src/radio.vue.d.ts +2 -2
  448. package/lib/components/result/src/result.d.ts +1 -1
  449. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  450. package/lib/components/select/src/select.d.ts +1 -1
  451. package/lib/components/select/src/select.vue.d.ts +35 -35
  452. package/lib/components/select-v2/src/defaults.d.ts +1 -1
  453. package/lib/components/select-v2/src/select.vue.d.ts +30 -30
  454. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  455. package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
  456. package/lib/components/slider/src/slider.vue.d.ts +3 -3
  457. package/lib/components/space/src/space.d.ts +2 -2
  458. package/lib/components/switch/src/switch.vue.d.ts +1 -1
  459. package/lib/components/table/src/filter-panel.vue.d.ts +33 -33
  460. package/lib/components/table/src/store/helper.d.ts +1 -1
  461. package/lib/components/table/src/store/index.d.ts +2 -2
  462. package/lib/components/table/src/table-header/index.d.ts +9 -9
  463. package/lib/components/table/src/table.vue.d.ts +3 -3
  464. package/lib/components/tabs/src/tab-nav.d.ts +1 -1
  465. package/lib/components/tabs/src/tabs.d.ts +3 -3
  466. package/lib/components/tag/src/tag.d.ts +1 -1
  467. package/lib/components/text/src/text.d.ts +1 -1
  468. package/lib/components/text/src/text.vue.d.ts +1 -1
  469. package/lib/components/time-picker/src/common/picker.vue.d.ts +16 -16
  470. package/lib/components/time-picker/src/time-picker.d.ts +16 -16
  471. package/lib/components/time-select/src/time-select.vue.d.ts +6 -6
  472. package/lib/components/timeline/src/timeline-item.d.ts +1 -1
  473. package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
  474. package/lib/components/tooltip/src/content.vue.d.ts +3 -3
  475. package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -3
  476. package/lib/components/tour/src/helper.d.ts +0 -1
  477. package/lib/components/tour/src/helper.js.map +1 -1
  478. package/lib/components/tour/src/step.vue.d.ts +1 -1
  479. package/lib/components/tour/src/step.vue_vue_type_script_setup_true_lang.js +1 -3
  480. package/lib/components/tour/src/step.vue_vue_type_script_setup_true_lang.js.map +1 -1
  481. package/lib/components/tour/src/step2.js.map +1 -1
  482. package/lib/components/tour/src/tour.d.ts +6 -1
  483. package/lib/components/tour/src/tour.js +1 -4
  484. package/lib/components/tour/src/tour.js.map +1 -1
  485. package/lib/components/tour/src/tour.vue.d.ts +2 -3
  486. package/lib/components/tour/src/tour.vue_vue_type_script_setup_true_lang.js +20 -8
  487. package/lib/components/tour/src/tour.vue_vue_type_script_setup_true_lang.js.map +1 -1
  488. package/lib/components/tour/src/tour2.js.map +1 -1
  489. package/lib/components/tree/src/tree-node.vue.d.ts +10 -10
  490. package/lib/components/tree/src/tree.vue.d.ts +21 -21
  491. package/lib/components/tree-select/src/tree-select.vue.d.ts +28 -28
  492. package/lib/components/tree-v2/src/composables/useTree.d.ts +2 -2
  493. package/lib/components/tree-v2/src/tree-node.vue.d.ts +3 -3
  494. package/lib/components/tree-v2/src/tree.vue.d.ts +8 -8
  495. package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
  496. package/lib/components/upload/src/upload.vue.d.ts +1 -1
  497. package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
  498. package/lib/components/virtual-list/src/builders/build-list.d.ts +1 -1
  499. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  500. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
  501. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  502. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
  503. package/lib/version.d.ts +1 -1
  504. package/lib/version.js +1 -1
  505. package/lib/version.js.map +1 -1
  506. package/package.json +2 -2
  507. package/web-types.json +1 -1
@@ -8,8 +8,8 @@ type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_9) => any;
9
9
  };
10
10
  declare const __VLS_base: _$vue.DefineComponent<TextProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<TextProps> & Readonly<{}>, {
11
- size: ComponentSize;
12
11
  type: "primary" | "success" | "info" | "warning" | "danger" | "";
12
+ size: ComponentSize;
13
13
  tag: string;
14
14
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -474,34 +474,34 @@ declare const __VLS_base: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
474
474
  "onPanel-change"?: ((...args: any[]) => any) | undefined;
475
475
  "onVisible-change"?: ((...args: any[]) => any) | undefined;
476
476
  }>, {
477
- readonly disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
478
477
  readonly type: string;
478
+ readonly disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
479
479
  readonly placeholder: string;
480
+ readonly valueOnClear: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown>;
480
481
  readonly modelValue: EpPropMergeType<(new (...args: any[]) => string | number | Date | string[] | number[] | Date[]) | (() => ModelValueType | null) | (((new (...args: any[]) => string | number | Date | string[] | number[] | Date[]) | (() => ModelValueType | null)) | null)[], unknown, unknown>;
481
- readonly shortcuts: unknown[];
482
- readonly showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
482
+ readonly readonly: boolean;
483
483
  readonly clearable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
484
- readonly editable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
485
- readonly arrowControl: boolean;
486
- readonly unlinkPanels: boolean;
487
- readonly showConfirm: EpPropMergeType<BooleanConstructor, unknown, unknown>;
488
- readonly showFooter: EpPropMergeType<BooleanConstructor, unknown, unknown>;
489
- readonly showWeekNumber: boolean;
490
- readonly isRange: boolean;
491
- readonly valueOnClear: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown>;
484
+ readonly clearIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
485
+ readonly prefixIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
492
486
  readonly tabindex: EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown>;
487
+ readonly validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
493
488
  readonly popperStyle: _$vue.StyleValue;
494
489
  readonly fallbackPlacements: Placement$1[];
495
490
  readonly placement: EpPropMergeType<(new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement$1) | (((new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement$1)) | null)[], Placement$1, unknown>;
496
491
  readonly popperOptions: Partial<Options>;
497
- readonly readonly: boolean;
498
- readonly clearIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
499
- readonly prefixIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
500
- readonly validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
501
- readonly saveOnBlur: EpPropMergeType<BooleanConstructor, unknown, unknown>;
502
492
  readonly automaticDropdown: EpPropMergeType<BooleanConstructor, unknown, unknown>;
493
+ readonly editable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
494
+ readonly saveOnBlur: EpPropMergeType<BooleanConstructor, unknown, unknown>;
503
495
  readonly rangeSeparator: string;
496
+ readonly shortcuts: unknown[];
497
+ readonly showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
498
+ readonly showConfirm: EpPropMergeType<BooleanConstructor, unknown, unknown>;
499
+ readonly showFooter: EpPropMergeType<BooleanConstructor, unknown, unknown>;
500
+ readonly showWeekNumber: boolean;
501
+ readonly arrowControl: boolean;
502
+ readonly unlinkPanels: boolean;
504
503
  readonly singlePanel: boolean;
504
+ readonly isRange: boolean;
505
505
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
506
506
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
507
507
  declare const _default: typeof __VLS_export;
@@ -412,34 +412,34 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
412
412
  }>> & Readonly<{
413
413
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
414
414
  }>, {
415
- disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
416
415
  type: string;
416
+ disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
417
417
  placeholder: string;
418
+ valueOnClear: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown>;
418
419
  modelValue: EpPropMergeType<(new (...args: any[]) => string | number | Date | string[] | number[] | Date[]) | (() => ModelValueType | null) | (((new (...args: any[]) => string | number | Date | string[] | number[] | Date[]) | (() => ModelValueType | null)) | null)[], unknown, unknown>;
419
- shortcuts: unknown[];
420
- showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
420
+ readonly: boolean;
421
421
  clearable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
422
- editable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
423
- arrowControl: boolean;
424
- unlinkPanels: boolean;
425
- showConfirm: EpPropMergeType<BooleanConstructor, unknown, unknown>;
426
- showFooter: EpPropMergeType<BooleanConstructor, unknown, unknown>;
427
- showWeekNumber: boolean;
428
- isRange: boolean;
429
- valueOnClear: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown>;
422
+ clearIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
423
+ prefixIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
430
424
  tabindex: EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown>;
425
+ validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
431
426
  popperStyle: _$vue.StyleValue;
432
427
  fallbackPlacements: Placement[];
433
428
  placement: EpPropMergeType<(new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown>;
434
429
  popperOptions: Partial<Options>;
435
- readonly: boolean;
436
- clearIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
437
- prefixIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
438
- validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
439
- saveOnBlur: EpPropMergeType<BooleanConstructor, unknown, unknown>;
440
430
  automaticDropdown: EpPropMergeType<BooleanConstructor, unknown, unknown>;
431
+ editable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
432
+ saveOnBlur: EpPropMergeType<BooleanConstructor, unknown, unknown>;
441
433
  rangeSeparator: string;
434
+ shortcuts: unknown[];
435
+ showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
436
+ showConfirm: EpPropMergeType<BooleanConstructor, unknown, unknown>;
437
+ showFooter: EpPropMergeType<BooleanConstructor, unknown, unknown>;
438
+ showWeekNumber: boolean;
439
+ arrowControl: boolean;
440
+ unlinkPanels: boolean;
442
441
  singlePanel: boolean;
442
+ isRange: boolean;
443
443
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
444
444
  //#endregion
445
445
  export { _default as default };
@@ -26,19 +26,19 @@ declare const __VLS_export: _$vue.DefineComponent<TimeSelectProps, {
26
26
  onFocus?: ((...args: any[]) => any) | undefined;
27
27
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
28
28
  }>, {
29
- disabled: boolean;
30
29
  end: string;
31
30
  start: string;
32
- clearable: boolean;
33
- editable: boolean;
31
+ disabled: boolean;
34
32
  valueOnClear: string | number | boolean | Function | null;
35
33
  effect: PopperEffect;
36
- popperClass: string;
37
- popperStyle: string | _$vue.CSSProperties;
34
+ clearable: boolean;
38
35
  clearIcon: IconPropType;
39
36
  prefixIcon: IconPropType;
40
- step: string;
37
+ popperClass: string;
38
+ popperStyle: string | _$vue.CSSProperties;
39
+ editable: boolean;
41
40
  format: string;
41
+ step: string;
42
42
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
43
43
  declare const _default: typeof __VLS_export;
44
44
  //#endregion
@@ -51,7 +51,7 @@ declare const timelineItemProps: {
51
51
  readonly hideTimestamp: BooleanConstructor;
52
52
  readonly center: BooleanConstructor;
53
53
  readonly placement: EpPropFinalized<StringConstructor, "bottom" | "top", unknown, "bottom", boolean>;
54
- readonly type: EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
54
+ readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown, "", boolean>;
55
55
  readonly color: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
56
56
  readonly size: EpPropFinalized<StringConstructor, "normal" | "large", unknown, "normal", boolean>;
57
57
  readonly icon: {
@@ -9,8 +9,8 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_14) => any;
10
10
  };
11
11
  declare const __VLS_base: _$vue.DefineComponent<TimelineItemProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
12
- size: "normal" | "large";
13
12
  type: "primary" | "success" | "warning" | "danger" | "info" | "";
13
+ size: "normal" | "large";
14
14
  color: string;
15
15
  placement: "top" | "bottom";
16
16
  timestamp: string;
@@ -19,9 +19,11 @@ declare const __VLS_base: _$vue.DefineComponent<ElTooltipContentProps, {
19
19
  */
20
20
  isFocusInsideContent: (event?: FocusEvent) => boolean | undefined;
21
21
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ElTooltipContentProps> & Readonly<{}>, {
22
- visible: boolean | null;
23
22
  style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
23
+ visible: boolean | null;
24
24
  content: string;
25
+ offset: number;
26
+ teleported: boolean;
25
27
  effect: PopperEffect;
26
28
  enterable: boolean;
27
29
  pure: boolean;
@@ -33,12 +35,10 @@ declare const __VLS_base: _$vue.DefineComponent<ElTooltipContentProps, {
33
35
  loop: boolean;
34
36
  boundariesPadding: number;
35
37
  gpuAcceleration: boolean;
36
- offset: number;
37
38
  placement: Placement;
38
39
  popperOptions: Partial<Options>;
39
40
  strategy: "absolute" | "fixed";
40
41
  arrowOffset: number;
41
- teleported: boolean;
42
42
  showAfter: number;
43
43
  hideAfter: number;
44
44
  autoClose: number;
@@ -59,10 +59,12 @@ declare const __VLS_base: _$vue.DefineComponent<UseTooltipProps, {
59
59
  "onBefore-show"?: ((...args: any[]) => any) | undefined;
60
60
  "onBefore-hide"?: ((...args: any[]) => any) | undefined;
61
61
  }>, {
62
- visible: boolean | null;
63
62
  style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
63
+ visible: boolean | null;
64
64
  content: string;
65
65
  role: typeof roleTypes[number];
66
+ offset: number;
67
+ teleported: boolean;
66
68
  effect: PopperEffect;
67
69
  enterable: boolean;
68
70
  pure: boolean;
@@ -74,13 +76,11 @@ declare const __VLS_base: _$vue.DefineComponent<UseTooltipProps, {
74
76
  loop: boolean;
75
77
  boundariesPadding: number;
76
78
  gpuAcceleration: boolean;
77
- offset: number;
78
79
  placement: Placement;
79
80
  popperOptions: Partial<Options>;
80
81
  strategy: "absolute" | "fixed";
81
82
  arrowOffset: number;
82
83
  showArrow: boolean;
83
- teleported: boolean;
84
84
  showAfter: number;
85
85
  hideAfter: number;
86
86
  autoClose: number;
@@ -30,7 +30,6 @@ interface TourContext {
30
30
  updateModelValue(modelValue: boolean): void;
31
31
  onClose(): void;
32
32
  onFinish(): void;
33
- onChange(): void;
34
33
  }
35
34
  declare const tourKey: InjectionKey<TourContext>;
36
35
  declare const useFloating: (referenceRef: Ref<HTMLElement | VirtualElement | null>, contentRef: Ref<HTMLElement | null>, arrowRef: Ref<HTMLElement | null>, placement: Ref<Placement | undefined>, strategy: Ref<Strategy>, offset: Ref<number>, zIndex: Ref<number>, showArrow: Ref<boolean>) => {
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","names":["isClient"],"sources":["../../../../../../packages/components/tour/src/helper.ts"],"sourcesContent":["import {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n detectOverflow,\n flip,\n offset as offsetMiddleware,\n shift,\n} from '@floating-ui/dom'\nimport {\n isArray,\n isClient,\n isFunction,\n isString,\n keysOf,\n} from '@element-plus/utils'\n\nimport type {\n CSSProperties,\n Component,\n InjectionKey,\n Ref,\n SetupContext,\n} from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { PosInfo, TourGap, TourMask } from './types'\nimport type {\n ComputePositionReturn,\n Middleware,\n Placement,\n Strategy,\n VirtualElement,\n} from '@floating-ui/dom'\nimport type { TourStepProps } from './step'\n\nexport const useTarget = (\n target: Ref<\n string | HTMLElement | (() => HTMLElement | null) | null | undefined\n >,\n open: Ref<boolean>,\n gap: Ref<TourGap>,\n mergedMask: Ref<TourMask>,\n scrollIntoViewOptions: Ref<boolean | ScrollIntoViewOptions>\n) => {\n const posInfo: Ref<PosInfo | null> = ref(null)\n\n const getTargetEl = () => {\n let targetEl: HTMLElement | null | undefined\n if (isString(target.value)) {\n targetEl = document.querySelector<HTMLElement>(target.value)\n } else if (isFunction(target.value)) {\n targetEl = target.value()\n } else {\n targetEl = target.value\n }\n return targetEl\n }\n\n const updatePosInfo = () => {\n const targetEl = getTargetEl()\n if (!targetEl || !open.value) {\n posInfo.value = null\n return\n }\n if (!isInViewPort(targetEl)) {\n targetEl.scrollIntoView(scrollIntoViewOptions.value)\n }\n const { left, top, width, height } = targetEl.getBoundingClientRect()\n posInfo.value = {\n left,\n top,\n width,\n height,\n radius: 0,\n }\n }\n\n onMounted(() => {\n watch(\n [open, target],\n () => {\n updatePosInfo()\n },\n {\n immediate: true,\n }\n )\n window.addEventListener('resize', updatePosInfo)\n })\n\n onBeforeUnmount(() => {\n window.removeEventListener('resize', updatePosInfo)\n })\n\n const getGapOffset = (index: number) =>\n (isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ??\n 6\n\n const mergedPosInfo = computed(() => {\n if (!posInfo.value) return posInfo.value\n\n const gapOffsetX = getGapOffset(0)\n const gapOffsetY = getGapOffset(1)\n const gapRadius = gap.value?.radius || 2\n\n return {\n left: posInfo.value.left - gapOffsetX,\n top: posInfo.value.top - gapOffsetY,\n width: posInfo.value.width + gapOffsetX * 2,\n height: posInfo.value.height + gapOffsetY * 2,\n radius: gapRadius,\n }\n })\n\n const triggerTarget = computed(() => {\n const targetEl = getTargetEl()\n if (!mergedMask.value || !targetEl || !window.DOMRect) {\n return targetEl || undefined\n }\n\n return {\n getBoundingClientRect() {\n return window.DOMRect.fromRect({\n width: mergedPosInfo.value?.width || 0,\n height: mergedPosInfo.value?.height || 0,\n x: mergedPosInfo.value?.left || 0,\n y: mergedPosInfo.value?.top || 0,\n })\n },\n }\n })\n\n return {\n mergedPosInfo,\n triggerTarget,\n }\n}\n\nexport interface TourContext {\n currentStep: Ref<TourStepProps | undefined>\n current: Ref<number>\n total: Ref<number>\n showClose: Ref<boolean>\n closeIcon: Ref<string | Component | undefined>\n mergedType: Ref<'default' | 'primary' | undefined>\n ns: UseNamespaceReturn\n slots: SetupContext['slots']\n updateModelValue(modelValue: boolean): void\n onClose(): void\n onFinish(): void\n onChange(): void\n}\n\nexport const tourKey: InjectionKey<TourContext> = Symbol('ElTour')\n\nfunction isInViewPort(element: HTMLElement) {\n const viewWidth = window.innerWidth || document.documentElement.clientWidth\n const viewHeight = window.innerHeight || document.documentElement.clientHeight\n const { top, right, bottom, left } = element.getBoundingClientRect()\n\n return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight\n}\n\nexport const useFloating = (\n referenceRef: Ref<HTMLElement | VirtualElement | null>,\n contentRef: Ref<HTMLElement | null>,\n arrowRef: Ref<HTMLElement | null>,\n placement: Ref<Placement | undefined>,\n strategy: Ref<Strategy>,\n offset: Ref<number>,\n zIndex: Ref<number>,\n showArrow: Ref<boolean>\n) => {\n const x = ref<number>()\n const y = ref<number>()\n const middlewareData = ref<ComputePositionReturn['middlewareData']>({})\n\n const states = {\n x,\n y,\n placement,\n strategy,\n middlewareData,\n } as const\n\n const middleware = computed(() => {\n const _middleware: Middleware[] = [\n offsetMiddleware(unref(offset)),\n flip(),\n shift(),\n overflowMiddleware(),\n ]\n\n if (unref(showArrow) && unref(arrowRef)) {\n _middleware.push(\n arrow({\n element: unref(arrowRef)!,\n })\n )\n }\n return _middleware\n })\n\n const update = async () => {\n if (!isClient) return\n\n const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (!referenceEl || !contentEl) return\n\n const data = await computePosition(referenceEl, contentEl, {\n placement: unref(placement),\n strategy: unref(strategy),\n middleware: unref(middleware),\n })\n\n keysOf(states).forEach((key) => {\n states[key].value = data[key]\n })\n }\n\n const contentStyle = computed<CSSProperties>(() => {\n if (!unref(referenceRef)) {\n return {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate3d(-50%, -50%, 0)',\n maxWidth: '100vw',\n zIndex: unref(zIndex),\n }\n }\n\n const { overflow } = unref(middlewareData)\n\n return {\n position: unref(strategy),\n zIndex: unref(zIndex),\n top: unref(y) != null ? `${unref(y)}px` : '',\n left: unref(x) != null ? `${unref(x)}px` : '',\n maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : '',\n }\n })\n\n const arrowStyle = computed<CSSProperties>(() => {\n if (!unref(showArrow)) return {}\n\n const { arrow } = unref(middlewareData)\n return {\n left: arrow?.x != null ? `${arrow?.x}px` : '',\n top: arrow?.y != null ? `${arrow?.y}px` : '',\n }\n })\n\n let cleanup: any\n onMounted(() => {\n const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (referenceEl && contentEl) {\n cleanup = autoUpdate(referenceEl, contentEl, update)\n }\n\n watchEffect(() => {\n update()\n })\n })\n\n onBeforeUnmount(() => {\n cleanup && cleanup()\n })\n\n return {\n update,\n contentStyle,\n arrowStyle,\n }\n}\n\nconst overflowMiddleware = (): Middleware => {\n return {\n name: 'overflow',\n async fn(state) {\n const overflow = await detectOverflow(state)\n let overWidth = 0\n if (overflow.left > 0) overWidth = overflow.left\n if (overflow.right > 0) overWidth = overflow.right\n const floatingWidth = state.rects.floating.width\n return {\n data: {\n maxWidth: floatingWidth - overWid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EAAE,MAAM;GAC3C,KAAK,OAAO,KAAK,OAAO,GAAG,OAAO,EAAE,MAAM;GAC3C;GACD;CAEF,IAAI;CACJ,CAAA,GAAA,IAAA,iBAAgB;EACd,MAAM,eAAA,GAAA,IAAA,OAAoB,aAAa;EACvC,MAAM,aAAA,GAAA,IAAA,OAAkB,WAAW;EACnC,IAAI,eAAe,WACjB,WAAA,GAAA,iBAAA,YAAqB,aAAa,WAAW,OAAO;EAGtD,CAAA,GAAA,IAAA,mBAAkB;GAChB,QAAQ;IACR;GACF;CAEF,CAAA,GAAA,IAAA,uBAAsB;EACpB,WAAW,SAAS;GACpB;CAEF,OAAO;EACL;EACA;EACA;EACD;;AAGH,MAAM,2BAAuC;CAC3C,OAAO;EACL,MAAM;EACN,MAAM,GAAG,OAAO;GACd,MAAM,WAAW,OAAA,GAAA,iBAAA,gBAAqB,MAAM;GAC5C,IAAI,YAAY;GAChB,IAAI,SAAS,OAAO,GAAG,YAAY,SAAS;GAC5C,IAAI,SAAS,QAAQ,GAAG,YAAY,SAAS;GAE7C,OAAO,EACL,MAAM,EACJ,UAHkB,MAAM,MAAM,SAAS,QAGb,WAC3B,EACF;;EAEJ"}
1
+ {"version":3,"file":"helper.js","names":["isClient"],"sources":["../../../../../../packages/components/tour/src/helper.ts"],"sourcesContent":["import {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n detectOverflow,\n flip,\n offset as offsetMiddleware,\n shift,\n} from '@floating-ui/dom'\nimport {\n isArray,\n isClient,\n isFunction,\n isString,\n keysOf,\n} from '@element-plus/utils'\n\nimport type {\n CSSProperties,\n Component,\n InjectionKey,\n Ref,\n SetupContext,\n} from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { PosInfo, TourGap, TourMask } from './types'\nimport type {\n ComputePositionReturn,\n Middleware,\n Placement,\n Strategy,\n VirtualElement,\n} from '@floating-ui/dom'\nimport type { TourStepProps } from './step'\n\nexport const useTarget = (\n target: Ref<\n string | HTMLElement | (() => HTMLElement | null) | null | undefined\n >,\n open: Ref<boolean>,\n gap: Ref<TourGap>,\n mergedMask: Ref<TourMask>,\n scrollIntoViewOptions: Ref<boolean | ScrollIntoViewOptions>\n) => {\n const posInfo: Ref<PosInfo | null> = ref(null)\n\n const getTargetEl = () => {\n let targetEl: HTMLElement | null | undefined\n if (isString(target.value)) {\n targetEl = document.querySelector<HTMLElement>(target.value)\n } else if (isFunction(target.value)) {\n targetEl = target.value()\n } else {\n targetEl = target.value\n }\n return targetEl\n }\n\n const updatePosInfo = () => {\n const targetEl = getTargetEl()\n if (!targetEl || !open.value) {\n posInfo.value = null\n return\n }\n if (!isInViewPort(targetEl)) {\n targetEl.scrollIntoView(scrollIntoViewOptions.value)\n }\n const { left, top, width, height } = targetEl.getBoundingClientRect()\n posInfo.value = {\n left,\n top,\n width,\n height,\n radius: 0,\n }\n }\n\n onMounted(() => {\n watch(\n [open, target],\n () => {\n updatePosInfo()\n },\n {\n immediate: true,\n }\n )\n window.addEventListener('resize', updatePosInfo)\n })\n\n onBeforeUnmount(() => {\n window.removeEventListener('resize', updatePosInfo)\n })\n\n const getGapOffset = (index: number) =>\n (isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ??\n 6\n\n const mergedPosInfo = computed(() => {\n if (!posInfo.value) return posInfo.value\n\n const gapOffsetX = getGapOffset(0)\n const gapOffsetY = getGapOffset(1)\n const gapRadius = gap.value?.radius || 2\n\n return {\n left: posInfo.value.left - gapOffsetX,\n top: posInfo.value.top - gapOffsetY,\n width: posInfo.value.width + gapOffsetX * 2,\n height: posInfo.value.height + gapOffsetY * 2,\n radius: gapRadius,\n }\n })\n\n const triggerTarget = computed(() => {\n const targetEl = getTargetEl()\n if (!mergedMask.value || !targetEl || !window.DOMRect) {\n return targetEl || undefined\n }\n\n return {\n getBoundingClientRect() {\n return window.DOMRect.fromRect({\n width: mergedPosInfo.value?.width || 0,\n height: mergedPosInfo.value?.height || 0,\n x: mergedPosInfo.value?.left || 0,\n y: mergedPosInfo.value?.top || 0,\n })\n },\n }\n })\n\n return {\n mergedPosInfo,\n triggerTarget,\n }\n}\n\nexport interface TourContext {\n currentStep: Ref<TourStepProps | undefined>\n current: Ref<number>\n total: Ref<number>\n showClose: Ref<boolean>\n closeIcon: Ref<string | Component | undefined>\n mergedType: Ref<'default' | 'primary' | undefined>\n ns: UseNamespaceReturn\n slots: SetupContext['slots']\n updateModelValue(modelValue: boolean): void\n onClose(): void\n onFinish(): void\n}\n\nexport const tourKey: InjectionKey<TourContext> = Symbol('ElTour')\n\nfunction isInViewPort(element: HTMLElement) {\n const viewWidth = window.innerWidth || document.documentElement.clientWidth\n const viewHeight = window.innerHeight || document.documentElement.clientHeight\n const { top, right, bottom, left } = element.getBoundingClientRect()\n\n return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight\n}\n\nexport const useFloating = (\n referenceRef: Ref<HTMLElement | VirtualElement | null>,\n contentRef: Ref<HTMLElement | null>,\n arrowRef: Ref<HTMLElement | null>,\n placement: Ref<Placement | undefined>,\n strategy: Ref<Strategy>,\n offset: Ref<number>,\n zIndex: Ref<number>,\n showArrow: Ref<boolean>\n) => {\n const x = ref<number>()\n const y = ref<number>()\n const middlewareData = ref<ComputePositionReturn['middlewareData']>({})\n\n const states = {\n x,\n y,\n placement,\n strategy,\n middlewareData,\n } as const\n\n const middleware = computed(() => {\n const _middleware: Middleware[] = [\n offsetMiddleware(unref(offset)),\n flip(),\n shift(),\n overflowMiddleware(),\n ]\n\n if (unref(showArrow) && unref(arrowRef)) {\n _middleware.push(\n arrow({\n element: unref(arrowRef)!,\n })\n )\n }\n return _middleware\n })\n\n const update = async () => {\n if (!isClient) return\n\n const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (!referenceEl || !contentEl) return\n\n const data = await computePosition(referenceEl, contentEl, {\n placement: unref(placement),\n strategy: unref(strategy),\n middleware: unref(middleware),\n })\n\n keysOf(states).forEach((key) => {\n states[key].value = data[key]\n })\n }\n\n const contentStyle = computed<CSSProperties>(() => {\n if (!unref(referenceRef)) {\n return {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate3d(-50%, -50%, 0)',\n maxWidth: '100vw',\n zIndex: unref(zIndex),\n }\n }\n\n const { overflow } = unref(middlewareData)\n\n return {\n position: unref(strategy),\n zIndex: unref(zIndex),\n top: unref(y) != null ? `${unref(y)}px` : '',\n left: unref(x) != null ? `${unref(x)}px` : '',\n maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : '',\n }\n })\n\n const arrowStyle = computed<CSSProperties>(() => {\n if (!unref(showArrow)) return {}\n\n const { arrow } = unref(middlewareData)\n return {\n left: arrow?.x != null ? `${arrow?.x}px` : '',\n top: arrow?.y != null ? `${arrow?.y}px` : '',\n }\n })\n\n let cleanup: any\n onMounted(() => {\n const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (referenceEl && contentEl) {\n cleanup = autoUpdate(referenceEl, contentEl, update)\n }\n\n watchEffect(() => {\n update()\n })\n })\n\n onBeforeUnmount(() => {\n cleanup && cleanup()\n })\n\n return {\n update,\n contentStyle,\n arrowStyle,\n }\n}\n\nconst overflowMiddleware = (): Middleware => {\n return {\n name: 'overflow',\n async fn(state) {\n const overflow = await detectOverflow(state)\n let overWidth = 0\n if (overflow.left > 0) overWidth = overflow.left\n if (overflow.right > 0) overWidth = overflow.right\n const floatingWidth = state.rects.floating.width\n return {\n data: {\n maxWidth: floatingWidth - overWidth,\n },\n }\n },\n }\n}\n"],"mappings":";;;;;;;;AA4CA,MAAa,aACX,QAGA,MACA,KACA,YACA,0BACG;CACH,MAAM,WAAA,GAAA,IAAA,KAAmC,KAAK;CAE9C,MAAM,oBAAoB;EACxB,IAAI;EACJ,KAAA,GAAA,YAAA,UAAa,OAAO,MAAM,EACxB,WAAW,SAAS,cAA2B,OAAO,MAAM;OACvD,KAAA,GAAA,YAAA,Y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WAAW,OAAO;EAGtD,CAAA,GAAA,IAAA,mBAAkB;GAChB,QAAQ;IACR;GACF;CAEF,CAAA,GAAA,IAAA,uBAAsB;EACpB,WAAW,SAAS;GACpB;CAEF,OAAO;EACL;EACA;EACA;EACD;;AAGH,MAAM,2BAAuC;CAC3C,OAAO;EACL,MAAM;EACN,MAAM,GAAG,OAAO;GACd,MAAM,WAAW,OAAA,GAAA,iBAAA,gBAAqB,MAAM;GAC5C,IAAI,YAAY;GAChB,IAAI,SAAS,OAAO,GAAG,YAAY,SAAS;GAC5C,IAAI,SAAS,QAAQ,GAAG,YAAY,SAAS;GAE7C,OAAO,EACL,MAAM,EACJ,UAHkB,MAAM,MAAM,SAAS,QAGb,WAC3B,EACF;;EAEJ"}
@@ -15,10 +15,10 @@ declare const __VLS_base: _$vue.DefineComponent<TourStepProps, {}, {}, {}, {}, _
15
15
  }, string, _$vue.PublicProps, Readonly<TourStepProps> & Readonly<{
16
16
  onClose?: (() => any) | undefined;
17
17
  }>, {
18
- showClose: boolean;
19
18
  placement: _$_floating_ui_dom0.Placement;
20
19
  showArrow: boolean;
21
20
  mask: TourMask;
21
+ showClose: boolean;
22
22
  scrollIntoViewOptions: boolean | ScrollIntoViewOptions;
23
23
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
24
24
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -21,7 +21,7 @@ var step_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
21
21
  const emit = __emit;
22
22
  const { Close } = require_icon.CloseComponents;
23
23
  const { t } = require_index.useLocale();
24
- const { currentStep, current, total, showClose, closeIcon, mergedType, ns, slots: tourSlots, updateModelValue, onClose: tourOnClose, onFinish: tourOnFinish, onChange } = (0, vue.inject)(require_helper.tourKey);
24
+ const { currentStep, current, total, showClose, closeIcon, mergedType, ns, slots: tourSlots, updateModelValue, onClose: tourOnClose, onFinish: tourOnFinish } = (0, vue.inject)(require_helper.tourKey);
25
25
  (0, vue.watch)(props, (val) => {
26
26
  currentStep.value = val;
27
27
  }, { immediate: true });
@@ -34,13 +34,11 @@ var step_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
34
34
  const onPrev = () => {
35
35
  current.value -= 1;
36
36
  if (props.prevButtonProps?.onClick) props.prevButtonProps?.onClick();
37
- onChange();
38
37
  };
39
38
  const onNext = () => {
40
39
  if (current.value >= total.value - 1) onFinish();
41
40
  else current.value += 1;
42
41
  if (props.nextButtonProps?.onClick) props.nextButtonProps.onClick();
43
- onChange();
44
42
  };
45
43
  const onFinish = () => {
46
44
  onClose();
@@ -1 +1 @@
1
- {"version":3,"file":"step.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/tour/src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n onChange,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n onChange()\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n onChange()\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAoFA,MAAM,QAAQ;EAOd,MAAM,OAAO;EAEb,MAAM,EAAE,UAAU,aAAA;EAElB,MAAM,EAAE,MAAM,cAAA,WAAU;EAExB,MAAM,EACJ,aACA,SACA,OACA,WACA,WACA,YACA,IACA,OAAO,WACP,kBACA,SAAS,aACT,UAAU,cACV,cAAA,GAAA,IAAA,QACS,eAAA,QAAQ;EAEnB,CAAA,GAAA,IAAA,OACE,QACC,QAAQ;GACP,YAAY,QAAQ;KAEtB,EACE,WAAW,MACb,CACF;EAEA,MAAM,mBAAA,GAAA,IAAA,gBAAiC,MAAM,aAAa,UAAU,MAAK;EACzE,MAAM,mBAAA,GAAA,IAAA,gBACE,MAAM,aAAa,UAAU,SAAS,MAC9C;EAEA,MAAM,qBAAqB,aAA4B;GACrD,IAAI,CAAC,UAAU;GACf,QAAA,GAAA,eAAA,MAAY,UAAU,CAAC,YAAY,UAAU,CAAA;;EAG/C,MAAM,eAAe;GACnB,QAAQ,SAAS;GACjB,IAAI,MAAM,iBAAiB,SACzB,MAAM,iBAAiB,SAAQ;GAEjC,UAAS;;EAGX,MAAM,eAAe;GACnB,IAAI,QAAQ,SA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AU,QAAO,CAAA,CAAA,CAAA;;gDA0B7D,OAAA,EAtBA,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,OAAO,GAAE,CAAC,EAAC,UAAA,CAAA,EAAA,EAAA,EAAA,GAAA,IAAA,OAEP,QAAO,GAAA,MAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,OAOH,gBAAA,SAAA,GAAA,GAAA,IAAA,YAAA;;KANV,MAAK;KACJ,OAAA,GAAA,IAAA,OAAM,WAAA;OACC,kBAAkB,QAAA,gBAAe,EAAA,EACxC,SAAO,QAAM,CAAA,EAAA;qCAE0C,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAArD,QAAA,iBAAiB,aAAA,GAAA,IAAA,OAAY,EAAC,CAAA,mBAAA,CAAA,EAAA,EAAA,CAAA,CAAA;;kFAG3B,QAAO,KAAA,GAAA,IAAA,OAAI,MAAK,GAAA,MAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,OAUZ,gBAAA,SAAA,GAAA,GAAA,IAAA,YAAA;;KATV,MAAK;KACJ,OAAA,GAAA,IAAA,OAAM,WAAU,KAAA,YAAA,YAAA;OACT,kBAAkB,QAAA,gBAAe,EAAA,EACxC,SAAO,QAAM,CAAA,EAAA;qCAKZ,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAFA,QAAA,iBAAiB,cAAA,GAAA,IAAA,OAAuB,QAAO,MAAA,GAAA,IAAA,OAAK,MAAK,GAAA,KAAA,GAAA,IAAA,OAAO,EAAC,CAAA,iBAAA,IAAA,GAAA,IAAA,OAAqB,EAAC,CAAA,eAAA,EAAA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"step.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/tour/src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAoFA,MAAM,QAAQ;EAOd,MAAM,OAAO;EAEb,MAAM,EAAE,UAAU,aAAA;EAElB,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,GAAA,IAAA,OAUZ,gBAAA,SAAA,GAAA,GAAA,IAAA,YAAA;;KATV,MAAK;KACJ,OAAA,GAAA,IAAA,OAAM,WAAU,KAAA,YAAA,YAAA;OACT,kBAAkB,QAAA,gBAAe,EAAA,EACxC,SAAO,QAAM,CAAA,EAAA;qCAKZ,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAFA,QAAA,iBAAiB,cAAA,GAAA,IAAA,OAAuB,QAAO,MAAA,GAAA,IAAA,OAAK,MAAK,GAAA,KAAA,GAAA,IAAA,OAAO,EAAC,CAAA,iBAAA,IAAA,GAAA,IAAA,OAAqB,EAAC,CAAA,eAAA,EAAA,EAAA,EAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"step2.js","names":[],"sources":["../../../../../../packages/components/tour/src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n onChange,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n onChange()\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n onChange()\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"step2.js","names":[],"sources":["../../../../../../packages/components/tour/src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":""}
@@ -75,7 +75,12 @@ interface TourProps {
75
75
  */
76
76
  declare const tourProps: {
77
77
  modelValue: BooleanConstructor;
78
- current: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
78
+ current: {
79
+ readonly type: _$vue.PropType<number>;
80
+ readonly required: false;
81
+ readonly validator: ((val: unknown) => boolean) | undefined;
82
+ __epPropKey: true;
83
+ };
79
84
  showArrow: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
80
85
  showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
81
86
  closeIcon: {
@@ -16,10 +16,7 @@ const tourProps = require_runtime.buildProps({
16
16
  /**
17
17
  * @description what is the current step
18
18
  */
19
- current: {
20
- type: Number,
21
- default: 0
22
- },
19
+ current: { type: Number },
23
20
  /**
24
21
  * @description whether to show the arrow
25
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tour.js","names":["buildProps","iconPropType","tourContentProps","definePropType","UPDATE_MODEL_EVENT","isBoolean","isNumber"],"sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\n\nimport type { TourContentProps } from './content'\nimport type { CSSProperties, ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport interface TourProps {\n /**\n * @description open tour\n */\n modelValue?: boolean\n /**\n * @description what is the current step\n */\n current?: number\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description custom close icon\n */\n closeIcon?: IconPropType\n /**\n * @description position of the guide card relative to the target element\n */\n placement?: TourContentProps['placement']\n /**\n * @description custom style for content\n */\n contentStyle?: CSSProperties\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask?: TourMask\n /**\n * @description transparent gap between mask and target\n */\n gap?: TourGap\n /**\n * @description tour's zIndex\n */\n zIndex?: number\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions?: boolean | ScrollIntoViewOptions\n /**\n * @description type, affects the background color and text color\n */\n type?: 'default' | 'primary'\n /**\n * @description which element the TourContent appends to\n */\n appendTo?: string | HTMLElement\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape?: boolean\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport type TourPropsPublic = ExtractPublicPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour> & unknown\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"mappings":";;;;;;;;;;AAkFA,MAAa,YAAYA,gBAAAA,WAAW;;;;CAIlC,YAAY;;;;CAIZ,SAAS;EACP,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW,EACT,MAAMC,aAAAA,cACP;;;;CAID,WAAWC,gBAAAA,iBAAiB;;;;CAI5B,cAAc,EACZ,MAAMC,gBAAAA,eAA8B,CAAC,OAAO,CAAC,EAC9C;;;;CAID,MAAM;EACJ,MAAMA,gBAAAA,eAAyB,CAAC,SAAS,OAAO,CAAC;EACjD,SAAS;EACV;;;;CAID,KAAK;EACH,MAAMA,gBAAAA,eAAwB,OAAO;EACrC,gBAAgB;GACd,QAAQ;GACR,QAAQ;GACT;EACF;;;;CAID,QAAQ,EACN,MAAM,QACP;;;;CAID,uBAAuB;EACrB,MAAMA,gBAAAA,eAAgD,CAAC,SAAS,OAAO,CAAC;EACxE,gBAAgB,EACd,OAAO,UACR;EACF;;;;CAID,MAAM,EACJ,MAAMA,gBAAAA,eAAsC,OAAO,EACpD;;;;CAID,UAAU;EACR,MAAMA,gBAAAA,eAAqC,CAAC,QAAQ,OAAO,CAAC;EAC5D,SAAS;EACV;;;;CAID,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;;;;CAID,qBAAqB;EACnB,MAAM;EACN,SAAS;EACV;CACF,CAAC;AAQF,MAAa,YAAY;EACtBC,cAAAA,sBAAsB,UAAmBC,cAAAA,UAAU,MAAM;EACzD,oBAAoB,YAAoBC,cAAAA,SAAS,QAAQ;CAC1D,QAAQ,YAAoBA,cAAAA,SAAS,QAAQ;CAC7C,cAAc;CACd,SAAS,YAAoBA,cAAAA,SAAS,QAAQ;CAC/C"}
1
+ {"version":3,"file":"tour.js","names":["buildProps","iconPropType","tourContentProps","definePropType","UPDATE_MODEL_EVENT","isBoolean","isNumber"],"sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\n\nimport type { TourContentProps } from './content'\nimport type { CSSProperties, ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport interface TourProps {\n /**\n * @description open tour\n */\n modelValue?: boolean\n /**\n * @description what is the current step\n */\n current?: number\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description custom close icon\n */\n closeIcon?: IconPropType\n /**\n * @description position of the guide card relative to the target element\n */\n placement?: TourContentProps['placement']\n /**\n * @description custom style for content\n */\n contentStyle?: CSSProperties\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask?: TourMask\n /**\n * @description transparent gap between mask and target\n */\n gap?: TourGap\n /**\n * @description tour's zIndex\n */\n zIndex?: number\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions?: boolean | ScrollIntoViewOptions\n /**\n * @description type, affects the background color and text color\n */\n type?: 'default' | 'primary'\n /**\n * @description which element the TourContent appends to\n */\n appendTo?: string | HTMLElement\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape?: boolean\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport type TourPropsPublic = ExtractPublicPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour> & unknown\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"mappings":";;;;;;;;;;AAkFA,MAAa,YAAYA,gBAAAA,WAAW;;;;CAIlC,YAAY;;;;CAIZ,SAAS,EACP,MAAM,QACP;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW,EACT,MAAMC,aAAAA,cACP;;;;CAID,WAAWC,gBAAAA,iBAAiB;;;;CAI5B,cAAc,EACZ,MAAMC,gBAAAA,eAA8B,CAAC,OAAO,CAAC,EAC9C;;;;CAID,MAAM;EACJ,MAAMA,gBAAAA,eAAyB,CAAC,SAAS,OAAO,CAAC;EACjD,SAAS;EACV;;;;CAID,KAAK;EACH,MAAMA,gBAAAA,eAAwB,OAAO;EACrC,gBAAgB;GACd,QAAQ;GACR,QAAQ;GACT;EACF;;;;CAID,QAAQ,EACN,MAAM,QACP;;;;CAID,uBAAuB;EACrB,MAAMA,gBAAAA,eAAgD,CAAC,SAAS,OAAO,CAAC;EACxE,gBAAgB,EACd,OAAO,UACR;EACF;;;;CAID,MAAM,EACJ,MAAMA,gBAAAA,eAAsC,OAAO,EACpD;;;;CAID,UAAU;EACR,MAAMA,gBAAAA,eAAqC,CAAC,QAAQ,OAAO,CAAC;EAC5D,SAAS;EACV;;;;CAID,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;;;;CAID,qBAAqB;EACnB,MAAM;EACN,SAAS;EACV;CACF,CAAC;AAQF,MAAa,YAAY;EACtBC,cAAAA,sBAAsB,UAAmBC,cAAAA,UAAU,MAAM;EACzD,oBAAoB,YAAoBC,cAAAA,SAAS,QAAQ;CAC1D,QAAQ,YAAoBA,cAAAA,SAAS,QAAQ;CAC7C,cAAc;CACd,SAAS,YAAoBA,cAAAA,SAAS,QAAQ;CAC/C"}
@@ -27,14 +27,13 @@ declare const __VLS_base: _$vue.DefineComponent<TourProps, {}, {}, {}, {}, _$vue
27
27
  "onUpdate:current"?: ((current: number) => any) | undefined;
28
28
  }>, {
29
29
  appendTo: string | HTMLElement;
30
- closeOnPressEscape: boolean;
31
- showClose: boolean;
32
30
  placement: _$_floating_ui_dom0.Placement;
33
31
  showArrow: boolean;
34
32
  gap: TourGap;
35
33
  mask: TourMask;
34
+ closeOnPressEscape: boolean;
35
+ showClose: boolean;
36
36
  scrollIntoViewOptions: boolean | ScrollIntoViewOptions;
37
- current: number;
38
37
  targetAreaClickable: boolean;
39
38
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
40
39
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -8,7 +8,6 @@ const require_helper = require("./helper.js");
8
8
  const require_mask = require("./mask2.js");
9
9
  const require_content = require("./content2.js");
10
10
  const require_steps = require("./steps.js");
11
- let _vueuse_core = require("@vueuse/core");
12
11
  let vue = require("vue");
13
12
  //#region ../../packages/components/tour/src/tour.vue?vue&type=script&setup=true&lang.ts
14
13
  var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -23,7 +22,18 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
23
22
  const ns = require_index.useNamespace("tour");
24
23
  const total = (0, vue.ref)(0);
25
24
  const currentStep = (0, vue.ref)();
26
- const current = (0, _vueuse_core.useVModel)(props, "current", emit, { passive: true });
25
+ const isControlled = (0, vue.computed)(() => !require_types.isUndefined(props.current));
26
+ const innerCurrent = (0, vue.ref)(props.current ?? 0);
27
+ const current = (0, vue.computed)({
28
+ get() {
29
+ return require_types.isUndefined(props.current) ? innerCurrent.value : props.current;
30
+ },
31
+ set(newValue) {
32
+ if ((isControlled.value ? props.current : innerCurrent.value) === newValue) return;
33
+ if (!isControlled.value) innerCurrent.value = newValue;
34
+ emit("update:current", newValue);
35
+ }
36
+ });
27
37
  const currentTarget = (0, vue.computed)(() => currentStep.value?.target);
28
38
  const kls = (0, vue.computed)(() => [ns.b(), mergedType.value === "primary" ? ns.m("primary") : ""]);
29
39
  const mergedPlacement = (0, vue.computed)(() => currentStep.value?.placement || props.placement);
@@ -38,8 +48,13 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
38
48
  const nowZIndex = nextZIndex();
39
49
  const mergedZIndex = (0, vue.computed)(() => props.zIndex ?? nowZIndex);
40
50
  const { mergedPosInfo: pos, triggerTarget } = require_helper.useTarget(currentTarget, (0, vue.toRef)(props, "modelValue"), (0, vue.toRef)(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
51
+ (0, vue.watch)(() => props.current, (val) => !require_types.isUndefined(val) && (innerCurrent.value = val));
52
+ (0, vue.watch)(current, (newCurrent, oldCurrent) => {
53
+ if (!props.modelValue || newCurrent === oldCurrent) return;
54
+ emit(require_event.CHANGE_EVENT, newCurrent);
55
+ }, { flush: "post" });
41
56
  (0, vue.watch)(() => props.modelValue, (val) => {
42
- if (!val) current.value = 0;
57
+ if (!val && current.value !== 0) current.value = 0;
43
58
  });
44
59
  const onEscClose = () => {
45
60
  if (props.closeOnPressEscape) {
@@ -68,9 +83,6 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
68
83
  },
69
84
  onFinish() {
70
85
  emit("finish");
71
- },
72
- onChange() {
73
- emit(require_event.CHANGE_EVENT, current.value);
74
86
  }
75
87
  });
76
88
  return (_ctx, _cache) => {
@@ -90,7 +102,7 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
90
102
  "z-index",
91
103
  "target-area-clickable"
92
104
  ]), __props.modelValue ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_content.default, {
93
- key: (0, vue.unref)(current),
105
+ key: current.value,
94
106
  reference: (0, vue.unref)(triggerTarget),
95
107
  placement: mergedPlacement.value,
96
108
  "show-arrow": mergedShowArrow.value,
@@ -99,7 +111,7 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
99
111
  onClose: onEscClose
100
112
  }, {
101
113
  default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(require_steps.default), {
102
- current: (0, vue.unref)(current),
114
+ current: current.value,
103
115
  onUpdateTotal
104
116
  }, {
105
117
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
@@ -1 +1 @@
1
- {"version":3,"file":"tour.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits } from './tour'\nimport { tourKey, useTarget } from './helper'\n\nimport type { TourStepProps } from './step'\nimport type { TourProps } from './tour'\n\ndefineOptions({\n name: 'ElTour',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TourProps>(), {\n current: 0,\n showArrow: true,\n showClose: true,\n placement: 'bottom',\n mask: true,\n gap: () => ({ offset: 6, radius: 2 }),\n scrollIntoViewOptions: () => ({ block: 'center' }),\n appendTo: 'body',\n closeOnPressEscape: true,\n targetAreaClickable: true,\n})\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\n\nconst current = useVModel(props, 'current', emit, {\n passive: true,\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit(UPDATE_MODEL_EVENT, false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon'),\n mergedType,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit(UPDATE_MODEL_EVENT, modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n onChange() {\n emit(CHANGE_EVENT, current.value)\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAYd,MAAM,OAAO;EAEb,MAAM,KAAK,cAAA,aAAa,OAAM;EAC9B,MAAM,SAAA,GAAA,IAAA,KAAY,EAAC;EACnB,MA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,GAAA,IAAA,OAAA,cAAA,QAAA,EAAA;MAFA,UAAA,GAAA,IAAA,OAAS,QAAO;MAAiB;;sCACvC,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;;;;;;gCAKhB,iBAAqB"}
1
+ {"version":3,"file":"tour.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean, isUndefined } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits } from './tour'\nimport { tourKey, useTarget } from './helper'\n\nimport type { TourStepProps } from './step'\nimport type { TourProps } from './tour'\n\ndefineOptions({\n name: 'ElTour',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TourProps>(), {\n showArrow: true,\n showClose: true,\n placement: 'bottom',\n mask: true,\n gap: () => ({ offset: 6, radius: 2 }),\n scrollIntoViewOptions: () => ({ block: 'center' }),\n appendTo: 'body',\n closeOnPressEscape: true,\n targetAreaClickable: true,\n})\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\nconst isControlled = computed(() => !isUndefined(props.current))\nconst innerCurrent = ref(props.current ?? 0)\n\nconst current = computed<number>({\n get() {\n return isUndefined(props.current) ? innerCurrent.value : props.current\n },\n set(newValue) {\n const oldValue = isControlled.value ? props.current : innerCurrent.value\n if (oldValue === newValue) return\n\n if (!isControlled.value) {\n innerCurrent.value = newValue\n }\n\n emit('update:current', newValue)\n },\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.current,\n (val) => !isUndefined(val) && (innerCurrent.value = val)\n)\n\nwatch(\n current,\n (newCurrent, oldCurrent) => {\n if (!props.modelValue || newCurrent === oldCurrent) return\n emit(CHANGE_EVENT, newCurrent)\n },\n { flush: 'post' }\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val && current.value !== 0) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit(UPDATE_MODEL_EVENT, false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon'),\n mergedType,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit(UPDATE_MODEL_EVENT, modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAkDA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAEb,MAAM,KAAK,cAAA,aAAa,OAAM;EAC9B,MAAM,SAAA,GAAA,IAAA,KAAY,EAAC;EACnB,MAAM,eAAA,GAAA,IAAA,MAAiC;EACvC,MAAM,gBAAA,GAAA,IAAA,gBAA8B,CAAC,cAAA,YAAY,MAAM,QAAQ,CAAA;EAC/D,MAAM,gBAAA,GAAA,IAAA,KAAmB,MAAM,WAAW,EAAC;EAE3C,MAAM,WAAA,GAAA,IAAA,UAA2B;GAC/B,MAAM;IACJ,OAAO,cAAA,YAAY,MAAM,QAAQ,GAAG,aAAa,QAAQ,MAAM;;GAEjE,IAAI,UAAU;IAEZ,KADiB,aAAa,QAAQ,MAAM,UAAU,aAAa,WAClD,UAAU;IAE3B,IAAI,CAAC,aAAa,OAChB,aAAa,QAAQ;IAGvB,KAAK,kBAAkB,SAAQ;;GAElC,CAAA;EAED,MAAM,iBAAA,GAAA,IAAA,gBAA+B,YAAY,OAAO,OAAM;EAE9D,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