@element-plus/nightly 0.0.20250524 → 0.0.20250526

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 (520) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +2 -2
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +2 -2
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hi.js +1 -1
  92. package/dist/locale/hi.min.js +1 -1
  93. package/dist/locale/hi.min.mjs +1 -1
  94. package/dist/locale/hi.mjs +1 -1
  95. package/dist/locale/hr.js +1 -1
  96. package/dist/locale/hr.min.js +1 -1
  97. package/dist/locale/hr.min.mjs +1 -1
  98. package/dist/locale/hr.mjs +1 -1
  99. package/dist/locale/hu.js +1 -1
  100. package/dist/locale/hu.min.js +1 -1
  101. package/dist/locale/hu.min.mjs +1 -1
  102. package/dist/locale/hu.mjs +1 -1
  103. package/dist/locale/hy-am.js +1 -1
  104. package/dist/locale/hy-am.min.js +1 -1
  105. package/dist/locale/hy-am.min.mjs +1 -1
  106. package/dist/locale/hy-am.mjs +1 -1
  107. package/dist/locale/id.js +1 -1
  108. package/dist/locale/id.min.js +1 -1
  109. package/dist/locale/id.min.mjs +1 -1
  110. package/dist/locale/id.mjs +1 -1
  111. package/dist/locale/it.js +1 -1
  112. package/dist/locale/it.min.js +1 -1
  113. package/dist/locale/it.min.mjs +1 -1
  114. package/dist/locale/it.mjs +1 -1
  115. package/dist/locale/ja.js +1 -1
  116. package/dist/locale/ja.min.js +1 -1
  117. package/dist/locale/ja.min.mjs +1 -1
  118. package/dist/locale/ja.mjs +1 -1
  119. package/dist/locale/kk.js +1 -1
  120. package/dist/locale/kk.min.js +1 -1
  121. package/dist/locale/kk.min.mjs +1 -1
  122. package/dist/locale/kk.mjs +1 -1
  123. package/dist/locale/km.js +1 -1
  124. package/dist/locale/km.min.js +1 -1
  125. package/dist/locale/km.min.mjs +1 -1
  126. package/dist/locale/km.mjs +1 -1
  127. package/dist/locale/ko.js +1 -1
  128. package/dist/locale/ko.min.js +1 -1
  129. package/dist/locale/ko.min.mjs +1 -1
  130. package/dist/locale/ko.mjs +1 -1
  131. package/dist/locale/ku.js +1 -1
  132. package/dist/locale/ku.min.js +1 -1
  133. package/dist/locale/ku.min.mjs +1 -1
  134. package/dist/locale/ku.mjs +1 -1
  135. package/dist/locale/ky.js +1 -1
  136. package/dist/locale/ky.min.js +1 -1
  137. package/dist/locale/ky.min.mjs +1 -1
  138. package/dist/locale/ky.mjs +1 -1
  139. package/dist/locale/lo.js +1 -1
  140. package/dist/locale/lo.min.js +1 -1
  141. package/dist/locale/lo.min.mjs +1 -1
  142. package/dist/locale/lo.mjs +1 -1
  143. package/dist/locale/lt.js +1 -1
  144. package/dist/locale/lt.min.js +1 -1
  145. package/dist/locale/lt.min.mjs +1 -1
  146. package/dist/locale/lt.mjs +1 -1
  147. package/dist/locale/lv.js +1 -1
  148. package/dist/locale/lv.min.js +1 -1
  149. package/dist/locale/lv.min.mjs +1 -1
  150. package/dist/locale/lv.mjs +1 -1
  151. package/dist/locale/mg.js +1 -1
  152. package/dist/locale/mg.min.js +1 -1
  153. package/dist/locale/mg.min.mjs +1 -1
  154. package/dist/locale/mg.mjs +1 -1
  155. package/dist/locale/mn.js +1 -1
  156. package/dist/locale/mn.min.js +1 -1
  157. package/dist/locale/mn.min.mjs +1 -1
  158. package/dist/locale/mn.mjs +1 -1
  159. package/dist/locale/ms.js +1 -1
  160. package/dist/locale/ms.min.js +1 -1
  161. package/dist/locale/ms.min.mjs +1 -1
  162. package/dist/locale/ms.mjs +1 -1
  163. package/dist/locale/my.js +1 -1
  164. package/dist/locale/my.min.js +1 -1
  165. package/dist/locale/my.min.mjs +1 -1
  166. package/dist/locale/my.mjs +1 -1
  167. package/dist/locale/nb-no.js +1 -1
  168. package/dist/locale/nb-no.min.js +1 -1
  169. package/dist/locale/nb-no.min.mjs +1 -1
  170. package/dist/locale/nb-no.mjs +1 -1
  171. package/dist/locale/nl.js +1 -1
  172. package/dist/locale/nl.min.js +1 -1
  173. package/dist/locale/nl.min.mjs +1 -1
  174. package/dist/locale/nl.mjs +1 -1
  175. package/dist/locale/no.js +1 -1
  176. package/dist/locale/no.min.js +1 -1
  177. package/dist/locale/no.min.mjs +1 -1
  178. package/dist/locale/no.mjs +1 -1
  179. package/dist/locale/pa.js +1 -1
  180. package/dist/locale/pa.min.js +1 -1
  181. package/dist/locale/pa.min.mjs +1 -1
  182. package/dist/locale/pa.mjs +1 -1
  183. package/dist/locale/pl.js +1 -1
  184. package/dist/locale/pl.min.js +1 -1
  185. package/dist/locale/pl.min.mjs +1 -1
  186. package/dist/locale/pl.mjs +1 -1
  187. package/dist/locale/pt-br.js +1 -1
  188. package/dist/locale/pt-br.min.js +1 -1
  189. package/dist/locale/pt-br.min.mjs +1 -1
  190. package/dist/locale/pt-br.mjs +1 -1
  191. package/dist/locale/pt.js +1 -1
  192. package/dist/locale/pt.min.js +1 -1
  193. package/dist/locale/pt.min.mjs +1 -1
  194. package/dist/locale/pt.mjs +1 -1
  195. package/dist/locale/ro.js +1 -1
  196. package/dist/locale/ro.min.js +1 -1
  197. package/dist/locale/ro.min.mjs +1 -1
  198. package/dist/locale/ro.mjs +1 -1
  199. package/dist/locale/ru.js +1 -1
  200. package/dist/locale/ru.min.js +1 -1
  201. package/dist/locale/ru.min.mjs +1 -1
  202. package/dist/locale/ru.mjs +1 -1
  203. package/dist/locale/sk.js +1 -1
  204. package/dist/locale/sk.min.js +1 -1
  205. package/dist/locale/sk.min.mjs +1 -1
  206. package/dist/locale/sk.mjs +1 -1
  207. package/dist/locale/sl.js +1 -1
  208. package/dist/locale/sl.min.js +1 -1
  209. package/dist/locale/sl.min.mjs +1 -1
  210. package/dist/locale/sl.mjs +1 -1
  211. package/dist/locale/sr.js +1 -1
  212. package/dist/locale/sr.min.js +1 -1
  213. package/dist/locale/sr.min.mjs +1 -1
  214. package/dist/locale/sr.mjs +1 -1
  215. package/dist/locale/sv.js +1 -1
  216. package/dist/locale/sv.min.js +1 -1
  217. package/dist/locale/sv.min.mjs +1 -1
  218. package/dist/locale/sv.mjs +1 -1
  219. package/dist/locale/sw.js +1 -1
  220. package/dist/locale/sw.min.js +1 -1
  221. package/dist/locale/sw.min.mjs +1 -1
  222. package/dist/locale/sw.mjs +1 -1
  223. package/dist/locale/ta.js +1 -1
  224. package/dist/locale/ta.min.js +1 -1
  225. package/dist/locale/ta.min.mjs +1 -1
  226. package/dist/locale/ta.mjs +1 -1
  227. package/dist/locale/te.js +1 -1
  228. package/dist/locale/te.min.js +1 -1
  229. package/dist/locale/te.min.mjs +1 -1
  230. package/dist/locale/te.mjs +1 -1
  231. package/dist/locale/th.js +1 -1
  232. package/dist/locale/th.min.js +1 -1
  233. package/dist/locale/th.min.mjs +1 -1
  234. package/dist/locale/th.mjs +1 -1
  235. package/dist/locale/tk.js +1 -1
  236. package/dist/locale/tk.min.js +1 -1
  237. package/dist/locale/tk.min.mjs +1 -1
  238. package/dist/locale/tk.mjs +1 -1
  239. package/dist/locale/tr.js +1 -1
  240. package/dist/locale/tr.min.js +1 -1
  241. package/dist/locale/tr.min.mjs +1 -1
  242. package/dist/locale/tr.mjs +1 -1
  243. package/dist/locale/ug-cn.js +1 -1
  244. package/dist/locale/ug-cn.min.js +1 -1
  245. package/dist/locale/ug-cn.min.mjs +1 -1
  246. package/dist/locale/ug-cn.mjs +1 -1
  247. package/dist/locale/uk.js +1 -1
  248. package/dist/locale/uk.min.js +1 -1
  249. package/dist/locale/uk.min.mjs +1 -1
  250. package/dist/locale/uk.mjs +1 -1
  251. package/dist/locale/uz-uz.js +1 -1
  252. package/dist/locale/uz-uz.min.js +1 -1
  253. package/dist/locale/uz-uz.min.mjs +1 -1
  254. package/dist/locale/uz-uz.mjs +1 -1
  255. package/dist/locale/vi.js +1 -1
  256. package/dist/locale/vi.min.js +1 -1
  257. package/dist/locale/vi.min.mjs +1 -1
  258. package/dist/locale/vi.mjs +1 -1
  259. package/dist/locale/zh-cn.js +1 -1
  260. package/dist/locale/zh-cn.min.js +1 -1
  261. package/dist/locale/zh-cn.min.mjs +1 -1
  262. package/dist/locale/zh-cn.mjs +1 -1
  263. package/dist/locale/zh-hk.js +1 -1
  264. package/dist/locale/zh-hk.min.js +1 -1
  265. package/dist/locale/zh-hk.min.mjs +1 -1
  266. package/dist/locale/zh-hk.mjs +1 -1
  267. package/dist/locale/zh-mo.js +1 -1
  268. package/dist/locale/zh-mo.min.js +1 -1
  269. package/dist/locale/zh-mo.min.mjs +1 -1
  270. package/dist/locale/zh-mo.mjs +1 -1
  271. package/dist/locale/zh-tw.js +1 -1
  272. package/dist/locale/zh-tw.min.js +1 -1
  273. package/dist/locale/zh-tw.min.mjs +1 -1
  274. package/dist/locale/zh-tw.mjs +1 -1
  275. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  276. package/es/components/avatar/index.mjs +2 -2
  277. package/es/components/avatar/src/avatar.mjs +65 -31
  278. package/es/components/avatar/src/avatar.mjs.map +1 -1
  279. package/es/components/avatar/src/avatar2.mjs +31 -65
  280. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  281. package/es/components/button/index.mjs +2 -2
  282. package/es/components/button/src/button-group.mjs +1 -1
  283. package/es/components/button/src/button.mjs +87 -62
  284. package/es/components/button/src/button.mjs.map +1 -1
  285. package/es/components/button/src/button2.mjs +62 -87
  286. package/es/components/button/src/button2.mjs.map +1 -1
  287. package/es/components/calendar/index.mjs +2 -2
  288. package/es/components/calendar/src/calendar.mjs +16 -134
  289. package/es/components/calendar/src/calendar.mjs.map +1 -1
  290. package/es/components/calendar/src/calendar2.mjs +134 -16
  291. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  292. package/es/components/cascader/index.mjs +2 -2
  293. package/es/components/cascader/src/cascader.mjs +80 -639
  294. package/es/components/cascader/src/cascader.mjs.map +1 -1
  295. package/es/components/cascader/src/cascader2.mjs +639 -80
  296. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  297. package/es/components/checkbox/index.mjs +2 -2
  298. package/es/components/checkbox/src/checkbox-group.mjs +72 -30
  299. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  300. package/es/components/checkbox/src/checkbox-group2.mjs +30 -72
  301. package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
  302. package/es/components/collapse/index.mjs +2 -2
  303. package/es/components/collapse/src/collapse-item.mjs +95 -18
  304. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  305. package/es/components/collapse/src/collapse-item2.mjs +18 -95
  306. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  307. package/es/components/color-picker/src/color-picker.mjs +1 -1
  308. package/es/components/descriptions/index.mjs +2 -2
  309. package/es/components/descriptions/src/description.mjs +127 -26
  310. package/es/components/descriptions/src/description.mjs.map +1 -1
  311. package/es/components/descriptions/src/description2.mjs +26 -127
  312. package/es/components/descriptions/src/description2.mjs.map +1 -1
  313. package/es/components/dialog/src/dialog-content.mjs +29 -88
  314. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  315. package/es/components/dialog/src/dialog-content2.mjs +88 -29
  316. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  317. package/es/components/dialog/src/dialog.mjs +1 -1
  318. package/es/components/dialog/src/dialog2.mjs +1 -1
  319. package/es/components/divider/index.mjs +2 -2
  320. package/es/components/divider/src/divider.mjs +34 -16
  321. package/es/components/divider/src/divider.mjs.map +1 -1
  322. package/es/components/divider/src/divider2.mjs +16 -34
  323. package/es/components/divider/src/divider2.mjs.map +1 -1
  324. package/es/components/dropdown/index.mjs +2 -2
  325. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  326. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  327. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  328. package/es/components/dropdown/src/dropdown.mjs +108 -299
  329. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  330. package/es/components/dropdown/src/dropdown2.mjs +299 -108
  331. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  332. package/es/components/empty/index.mjs +2 -2
  333. package/es/components/empty/src/empty.mjs +52 -11
  334. package/es/components/empty/src/empty.mjs.map +1 -1
  335. package/es/components/empty/src/empty2.mjs +11 -52
  336. package/es/components/empty/src/empty2.mjs.map +1 -1
  337. package/es/components/image/index.mjs +2 -2
  338. package/es/components/image/src/image.mjs +226 -68
  339. package/es/components/image/src/image.mjs.map +1 -1
  340. package/es/components/image/src/image2.mjs +68 -226
  341. package/es/components/image/src/image2.mjs.map +1 -1
  342. package/es/components/index.mjs +19 -19
  343. package/es/components/link/index.mjs +2 -2
  344. package/es/components/link/src/link.mjs +71 -25
  345. package/es/components/link/src/link.mjs.map +1 -1
  346. package/es/components/link/src/link2.mjs +25 -71
  347. package/es/components/link/src/link2.mjs.map +1 -1
  348. package/es/components/page-header/index.mjs +2 -2
  349. package/es/components/page-header/src/page-header.mjs +97 -16
  350. package/es/components/page-header/src/page-header.mjs.map +1 -1
  351. package/es/components/page-header/src/page-header2.mjs +16 -97
  352. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  353. package/es/components/popconfirm/src/popconfirm.mjs +2 -2
  354. package/es/components/popover/src/popover.mjs +2 -2
  355. package/es/components/popper/index.mjs +2 -2
  356. package/es/components/popper/src/arrow.mjs +7 -30
  357. package/es/components/popper/src/arrow.mjs.map +1 -1
  358. package/es/components/popper/src/arrow2.mjs +30 -7
  359. package/es/components/popper/src/arrow2.mjs.map +1 -1
  360. package/es/components/popper/src/content.mjs +1 -1
  361. package/es/components/select/src/select.mjs +1 -1
  362. package/es/components/select-v2/src/defaults.mjs +1 -1
  363. package/es/components/steps/index.mjs +2 -2
  364. package/es/components/steps/src/item.mjs +190 -19
  365. package/es/components/steps/src/item.mjs.map +1 -1
  366. package/es/components/steps/src/item2.mjs +19 -190
  367. package/es/components/steps/src/item2.mjs.map +1 -1
  368. package/es/components/table/src/filter-panel.mjs +1 -1
  369. package/es/components/tooltip/index.mjs +1 -1
  370. package/es/components/tooltip/src/content.mjs +196 -29
  371. package/es/components/tooltip/src/content.mjs.map +1 -1
  372. package/es/components/tooltip/src/content2.mjs +29 -196
  373. package/es/components/tooltip/src/content2.mjs.map +1 -1
  374. package/es/components/tooltip/src/tooltip.mjs +2 -2
  375. package/es/components/tooltip/src/tooltip2.mjs +2 -2
  376. package/es/components/tooltip-v2/index.mjs +1 -1
  377. package/es/components/tooltip-v2/src/arrow.mjs +21 -37
  378. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  379. package/es/components/tooltip-v2/src/arrow2.mjs +37 -21
  380. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  381. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  382. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  383. package/es/components/tour/index.mjs +2 -2
  384. package/es/components/tour/src/tour.mjs +154 -69
  385. package/es/components/tour/src/tour.mjs.map +1 -1
  386. package/es/components/tour/src/tour2.mjs +69 -154
  387. package/es/components/tour/src/tour2.mjs.map +1 -1
  388. package/es/components/watermark/index.mjs +2 -2
  389. package/es/components/watermark/src/watermark.mjs +220 -27
  390. package/es/components/watermark/src/watermark.mjs.map +1 -1
  391. package/es/components/watermark/src/watermark2.mjs +27 -220
  392. package/es/components/watermark/src/watermark2.mjs.map +1 -1
  393. package/es/index.mjs +19 -19
  394. package/es/version.d.ts +1 -1
  395. package/es/version.mjs +1 -1
  396. package/es/version.mjs.map +1 -1
  397. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  398. package/lib/components/avatar/index.js +2 -2
  399. package/lib/components/avatar/src/avatar.js +65 -32
  400. package/lib/components/avatar/src/avatar.js.map +1 -1
  401. package/lib/components/avatar/src/avatar2.js +32 -65
  402. package/lib/components/avatar/src/avatar2.js.map +1 -1
  403. package/lib/components/button/index.js +2 -2
  404. package/lib/components/button/src/button-group.js +1 -1
  405. package/lib/components/button/src/button.js +87 -65
  406. package/lib/components/button/src/button.js.map +1 -1
  407. package/lib/components/button/src/button2.js +65 -87
  408. package/lib/components/button/src/button2.js.map +1 -1
  409. package/lib/components/calendar/index.js +2 -2
  410. package/lib/components/calendar/src/calendar.js +17 -134
  411. package/lib/components/calendar/src/calendar.js.map +1 -1
  412. package/lib/components/calendar/src/calendar2.js +134 -17
  413. package/lib/components/calendar/src/calendar2.js.map +1 -1
  414. package/lib/components/cascader/index.js +2 -2
  415. package/lib/components/cascader/src/cascader.js +81 -639
  416. package/lib/components/cascader/src/cascader.js.map +1 -1
  417. package/lib/components/cascader/src/cascader2.js +639 -81
  418. package/lib/components/cascader/src/cascader2.js.map +1 -1
  419. package/lib/components/checkbox/index.js +2 -2
  420. package/lib/components/checkbox/src/checkbox-group.js +71 -30
  421. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  422. package/lib/components/checkbox/src/checkbox-group2.js +30 -71
  423. package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
  424. package/lib/components/collapse/index.js +2 -2
  425. package/lib/components/collapse/src/collapse-item.js +95 -18
  426. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  427. package/lib/components/collapse/src/collapse-item2.js +18 -95
  428. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  429. package/lib/components/color-picker/src/color-picker.js +1 -1
  430. package/lib/components/descriptions/index.js +2 -2
  431. package/lib/components/descriptions/src/description.js +127 -26
  432. package/lib/components/descriptions/src/description.js.map +1 -1
  433. package/lib/components/descriptions/src/description2.js +26 -127
  434. package/lib/components/descriptions/src/description2.js.map +1 -1
  435. package/lib/components/dialog/src/dialog-content.js +29 -87
  436. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  437. package/lib/components/dialog/src/dialog-content2.js +87 -29
  438. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  439. package/lib/components/dialog/src/dialog.js +1 -1
  440. package/lib/components/dialog/src/dialog2.js +1 -1
  441. package/lib/components/divider/index.js +2 -2
  442. package/lib/components/divider/src/divider.js +34 -16
  443. package/lib/components/divider/src/divider.js.map +1 -1
  444. package/lib/components/divider/src/divider2.js +16 -34
  445. package/lib/components/divider/src/divider2.js.map +1 -1
  446. package/lib/components/dropdown/index.js +2 -2
  447. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  448. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  449. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  450. package/lib/components/dropdown/src/dropdown.js +117 -299
  451. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  452. package/lib/components/dropdown/src/dropdown2.js +299 -117
  453. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  454. package/lib/components/empty/index.js +2 -2
  455. package/lib/components/empty/src/empty.js +52 -11
  456. package/lib/components/empty/src/empty.js.map +1 -1
  457. package/lib/components/empty/src/empty2.js +11 -52
  458. package/lib/components/empty/src/empty2.js.map +1 -1
  459. package/lib/components/image/index.js +2 -2
  460. package/lib/components/image/src/image.js +225 -68
  461. package/lib/components/image/src/image.js.map +1 -1
  462. package/lib/components/image/src/image2.js +68 -225
  463. package/lib/components/image/src/image2.js.map +1 -1
  464. package/lib/components/index.js +19 -19
  465. package/lib/components/link/index.js +2 -2
  466. package/lib/components/link/src/link.js +71 -26
  467. package/lib/components/link/src/link.js.map +1 -1
  468. package/lib/components/link/src/link2.js +26 -71
  469. package/lib/components/link/src/link2.js.map +1 -1
  470. package/lib/components/page-header/index.js +2 -2
  471. package/lib/components/page-header/src/page-header.js +97 -17
  472. package/lib/components/page-header/src/page-header.js.map +1 -1
  473. package/lib/components/page-header/src/page-header2.js +17 -97
  474. package/lib/components/page-header/src/page-header2.js.map +1 -1
  475. package/lib/components/popconfirm/src/popconfirm.js +2 -2
  476. package/lib/components/popover/src/popover.js +2 -2
  477. package/lib/components/popper/index.js +2 -2
  478. package/lib/components/popper/src/arrow.js +8 -30
  479. package/lib/components/popper/src/arrow.js.map +1 -1
  480. package/lib/components/popper/src/arrow2.js +30 -8
  481. package/lib/components/popper/src/arrow2.js.map +1 -1
  482. package/lib/components/popper/src/content.js +1 -1
  483. package/lib/components/select/src/select.js +1 -1
  484. package/lib/components/select-v2/src/defaults.js +1 -1
  485. package/lib/components/steps/index.js +2 -2
  486. package/lib/components/steps/src/item.js +190 -19
  487. package/lib/components/steps/src/item.js.map +1 -1
  488. package/lib/components/steps/src/item2.js +19 -190
  489. package/lib/components/steps/src/item2.js.map +1 -1
  490. package/lib/components/table/src/filter-panel.js +1 -1
  491. package/lib/components/tooltip/index.js +1 -1
  492. package/lib/components/tooltip/src/content.js +196 -29
  493. package/lib/components/tooltip/src/content.js.map +1 -1
  494. package/lib/components/tooltip/src/content2.js +29 -196
  495. package/lib/components/tooltip/src/content2.js.map +1 -1
  496. package/lib/components/tooltip/src/tooltip.js +2 -2
  497. package/lib/components/tooltip/src/tooltip2.js +2 -2
  498. package/lib/components/tooltip-v2/index.js +1 -1
  499. package/lib/components/tooltip-v2/src/arrow.js +22 -37
  500. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  501. package/lib/components/tooltip-v2/src/arrow2.js +37 -22
  502. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  503. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  504. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  505. package/lib/components/tour/index.js +2 -2
  506. package/lib/components/tour/src/tour.js +153 -69
  507. package/lib/components/tour/src/tour.js.map +1 -1
  508. package/lib/components/tour/src/tour2.js +69 -153
  509. package/lib/components/tour/src/tour2.js.map +1 -1
  510. package/lib/components/watermark/index.js +2 -2
  511. package/lib/components/watermark/src/watermark.js +220 -27
  512. package/lib/components/watermark/src/watermark.js.map +1 -1
  513. package/lib/components/watermark/src/watermark2.js +27 -220
  514. package/lib/components/watermark/src/watermark2.js.map +1 -1
  515. package/lib/index.js +19 -19
  516. package/lib/version.d.ts +1 -1
  517. package/lib/version.js +1 -1
  518. package/lib/version.js.map +1 -1
  519. package/package.json +2 -2
  520. package/web-types.json +1 -1
@@ -1,231 +1,73 @@
1
- import { defineComponent, useAttrs, computed, ref, watch, onMounted, openBlock, createElementBlock, mergeProps, unref, renderSlot, createElementVNode, normalizeClass, toDisplayString, Fragment, createCommentVNode, createBlock, createSlots, withCtx, normalizeProps, guardReactiveProps, nextTick } from 'vue';
2
- import { isClient, useThrottleFn, useEventListener } from '@vueuse/core';
3
- import { fromPairs } from 'lodash-unified';
4
- import { ElImageViewer } from '../../image-viewer/index.mjs';
5
- import { imageProps, imageEmits } from './image.mjs';
6
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
- import { isInContainer } from '../../../utils/dom/position.mjs';
8
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
9
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
10
- import { useAttrs as useAttrs$1 } from '../../../hooks/use-attrs/index.mjs';
11
- import { isArray, isString } from '@vue/shared';
12
- import { isElement } from '../../../utils/types.mjs';
13
- import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
1
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
2
+ import { mutable } from '../../../utils/typescript.mjs';
3
+ import { isNumber } from '../../../utils/types.mjs';
14
4
 
15
- const __default__ = defineComponent({
16
- name: "ElImage",
17
- inheritAttrs: false
18
- });
19
- const _sfc_main = /* @__PURE__ */ defineComponent({
20
- ...__default__,
21
- props: imageProps,
22
- emits: imageEmits,
23
- setup(__props, { expose, emit }) {
24
- const props = __props;
25
- const { t } = useLocale();
26
- const ns = useNamespace("image");
27
- const rawAttrs = useAttrs();
28
- const containerAttrs = computed(() => {
29
- return fromPairs(Object.entries(rawAttrs).filter(([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)));
30
- });
31
- const imgAttrs = useAttrs$1({
32
- excludeListeners: true,
33
- excludeKeys: computed(() => {
34
- return Object.keys(containerAttrs.value);
35
- })
36
- });
37
- const imageSrc = ref();
38
- const hasLoadError = ref(false);
39
- const isLoading = ref(true);
40
- const showViewer = ref(false);
41
- const container = ref();
42
- const _scrollContainer = ref();
43
- const supportLoading = isClient && "loading" in HTMLImageElement.prototype;
44
- let stopScrollListener;
45
- const imageKls = computed(() => [
46
- ns.e("inner"),
47
- preview.value && ns.e("preview"),
48
- isLoading.value && ns.is("loading")
49
- ]);
50
- const imageStyle = computed(() => {
51
- const { fit } = props;
52
- if (isClient && fit) {
53
- return { objectFit: fit };
54
- }
55
- return {};
56
- });
57
- const preview = computed(() => {
58
- const { previewSrcList } = props;
59
- return isArray(previewSrcList) && previewSrcList.length > 0;
60
- });
61
- const imageIndex = computed(() => {
62
- const { previewSrcList, initialIndex } = props;
63
- let previewIndex = initialIndex;
64
- if (initialIndex > previewSrcList.length - 1) {
65
- previewIndex = 0;
66
- }
67
- return previewIndex;
68
- });
69
- const isManual = computed(() => {
70
- if (props.loading === "eager")
71
- return false;
72
- return !supportLoading && props.loading === "lazy" || props.lazy;
73
- });
74
- const loadImage = () => {
75
- if (!isClient)
76
- return;
77
- isLoading.value = true;
78
- hasLoadError.value = false;
79
- imageSrc.value = props.src;
80
- };
81
- function handleLoad(event) {
82
- isLoading.value = false;
83
- hasLoadError.value = false;
84
- emit("load", event);
85
- }
86
- function handleError(event) {
87
- isLoading.value = false;
88
- hasLoadError.value = true;
89
- emit("error", event);
90
- }
91
- function handleLazyLoad() {
92
- if (isInContainer(container.value, _scrollContainer.value)) {
93
- loadImage();
94
- removeLazyLoadListener();
95
- }
96
- }
97
- const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true);
98
- async function addLazyLoadListener() {
99
- var _a;
100
- if (!isClient)
101
- return;
102
- await nextTick();
103
- const { scrollContainer } = props;
104
- if (isElement(scrollContainer)) {
105
- _scrollContainer.value = scrollContainer;
106
- } else if (isString(scrollContainer) && scrollContainer !== "") {
107
- _scrollContainer.value = (_a = document.querySelector(scrollContainer)) != null ? _a : void 0;
108
- } else if (container.value) {
109
- _scrollContainer.value = getScrollContainer(container.value);
110
- }
111
- if (_scrollContainer.value) {
112
- stopScrollListener = useEventListener(_scrollContainer, "scroll", lazyLoadHandler);
113
- setTimeout(() => handleLazyLoad(), 100);
114
- }
115
- }
116
- function removeLazyLoadListener() {
117
- if (!isClient || !_scrollContainer.value || !lazyLoadHandler)
118
- return;
119
- stopScrollListener == null ? void 0 : stopScrollListener();
120
- _scrollContainer.value = void 0;
121
- }
122
- function clickHandler() {
123
- if (!preview.value)
124
- return;
125
- showViewer.value = true;
126
- emit("show");
127
- }
128
- function closeViewer() {
129
- showViewer.value = false;
130
- emit("close");
131
- }
132
- function switchViewer(val) {
133
- emit("switch", val);
134
- }
135
- watch(() => props.src, () => {
136
- if (isManual.value) {
137
- isLoading.value = true;
138
- hasLoadError.value = false;
139
- removeLazyLoadListener();
140
- addLazyLoadListener();
141
- } else {
142
- loadImage();
143
- }
144
- });
145
- onMounted(() => {
146
- if (isManual.value) {
147
- addLazyLoadListener();
148
- } else {
149
- loadImage();
150
- }
151
- });
152
- expose({
153
- showPreview: clickHandler
154
- });
155
- return (_ctx, _cache) => {
156
- return openBlock(), createElementBlock("div", mergeProps({
157
- ref_key: "container",
158
- ref: container
159
- }, unref(containerAttrs), {
160
- class: [unref(ns).b(), _ctx.$attrs.class]
161
- }), [
162
- hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [
163
- createElementVNode("div", {
164
- class: normalizeClass(unref(ns).e("error"))
165
- }, toDisplayString(unref(t)("el.image.error")), 3)
166
- ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
167
- imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), {
168
- src: imageSrc.value,
169
- loading: _ctx.loading,
170
- style: unref(imageStyle),
171
- class: unref(imageKls),
172
- crossorigin: _ctx.crossorigin,
173
- onClick: clickHandler,
174
- onLoad: handleLoad,
175
- onError: handleError
176
- }), null, 16, ["src", "loading", "crossorigin"])) : createCommentVNode("v-if", true),
177
- isLoading.value ? (openBlock(), createElementBlock("div", {
178
- key: 1,
179
- class: normalizeClass(unref(ns).e("wrapper"))
180
- }, [
181
- renderSlot(_ctx.$slots, "placeholder", {}, () => [
182
- createElementVNode("div", {
183
- class: normalizeClass(unref(ns).e("placeholder"))
184
- }, null, 2)
185
- ])
186
- ], 2)) : createCommentVNode("v-if", true)
187
- ], 64)),
188
- unref(preview) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
189
- showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
190
- key: 0,
191
- "z-index": _ctx.zIndex,
192
- "initial-index": unref(imageIndex),
193
- infinite: _ctx.infinite,
194
- "zoom-rate": _ctx.zoomRate,
195
- "min-scale": _ctx.minScale,
196
- "max-scale": _ctx.maxScale,
197
- "show-progress": _ctx.showProgress,
198
- "url-list": _ctx.previewSrcList,
199
- crossorigin: _ctx.crossorigin,
200
- "hide-on-click-modal": _ctx.hideOnClickModal,
201
- teleported: _ctx.previewTeleported,
202
- "close-on-press-escape": _ctx.closeOnPressEscape,
203
- onClose: closeViewer,
204
- onSwitch: switchViewer
205
- }, createSlots({
206
- toolbar: withCtx((toolbar) => [
207
- renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar)))
208
- ]),
209
- default: withCtx(() => [
210
- _ctx.$slots.viewer ? (openBlock(), createElementBlock("div", { key: 0 }, [
211
- renderSlot(_ctx.$slots, "viewer")
212
- ])) : createCommentVNode("v-if", true)
213
- ]),
214
- _: 2
215
- }, [
216
- _ctx.$slots.progress ? {
217
- name: "progress",
218
- fn: withCtx((progress) => [
219
- renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress)))
220
- ])
221
- } : void 0
222
- ]), 1032, ["z-index", "initial-index", "infinite", "zoom-rate", "min-scale", "max-scale", "show-progress", "url-list", "crossorigin", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : createCommentVNode("v-if", true)
223
- ], 64)) : createCommentVNode("v-if", true)
224
- ], 16);
225
- };
5
+ const imageProps = buildProps({
6
+ hideOnClickModal: Boolean,
7
+ src: {
8
+ type: String,
9
+ default: ""
10
+ },
11
+ fit: {
12
+ type: String,
13
+ values: ["", "contain", "cover", "fill", "none", "scale-down"],
14
+ default: ""
15
+ },
16
+ loading: {
17
+ type: String,
18
+ values: ["eager", "lazy"]
19
+ },
20
+ lazy: Boolean,
21
+ scrollContainer: {
22
+ type: definePropType([String, Object])
23
+ },
24
+ previewSrcList: {
25
+ type: definePropType(Array),
26
+ default: () => mutable([])
27
+ },
28
+ previewTeleported: Boolean,
29
+ zIndex: {
30
+ type: Number
31
+ },
32
+ initialIndex: {
33
+ type: Number,
34
+ default: 0
35
+ },
36
+ infinite: {
37
+ type: Boolean,
38
+ default: true
39
+ },
40
+ closeOnPressEscape: {
41
+ type: Boolean,
42
+ default: true
43
+ },
44
+ zoomRate: {
45
+ type: Number,
46
+ default: 1.2
47
+ },
48
+ minScale: {
49
+ type: Number,
50
+ default: 0.2
51
+ },
52
+ maxScale: {
53
+ type: Number,
54
+ default: 7
55
+ },
56
+ showProgress: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ crossorigin: {
61
+ type: definePropType(String)
226
62
  }
227
63
  });
228
- var Image = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "image.vue"]]);
64
+ const imageEmits = {
65
+ load: (evt) => evt instanceof Event,
66
+ error: (evt) => evt instanceof Event,
67
+ switch: (val) => isNumber(val),
68
+ close: () => true,
69
+ show: () => true
70
+ };
229
71
 
230
- export { Image as default };
72
+ export { imageEmits, imageProps };
231
73
  //# sourceMappingURL=image2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"image2.mjs","sources":["../../../../../../packages/components/image/src/image.vue"],"sourcesContent":["<template>\n <div ref=\"container\" v-bind=\"containerAttrs\" :class=\"[ns.b(), $attrs.class]\">\n <slot v-if=\"hasLoadError\" name=\"error\">\n <div :class=\"ns.e('error')\">{{ t('el.image.error') }}</div>\n </slot>\n <template v-else>\n <img\n v-if=\"imageSrc !== undefined\"\n v-bind=\"imgAttrs\"\n :src=\"imageSrc\"\n :loading=\"loading\"\n :style=\"imageStyle\"\n :class=\"imageKls\"\n :crossorigin=\"crossorigin\"\n @click=\"clickHandler\"\n @load=\"handleLoad\"\n @error=\"handleError\"\n />\n <div v-if=\"isLoading\" :class=\"ns.e('wrapper')\">\n <slot name=\"placeholder\">\n <div :class=\"ns.e('placeholder')\" />\n </slot>\n </div>\n </template>\n <template v-if=\"preview\">\n <image-viewer\n v-if=\"showViewer\"\n :z-index=\"zIndex\"\n :initial-index=\"imageIndex\"\n :infinite=\"infinite\"\n :zoom-rate=\"zoomRate\"\n :min-scale=\"minScale\"\n :max-scale=\"maxScale\"\n :show-progress=\"showProgress\"\n :url-list=\"previewSrcList\"\n :crossorigin=\"crossorigin\"\n :hide-on-click-modal=\"hideOnClickModal\"\n :teleported=\"previewTeleported\"\n :close-on-press-escape=\"closeOnPressEscape\"\n @close=\"closeViewer\"\n @switch=\"switchViewer\"\n >\n <div v-if=\"$slots.viewer\">\n <slot name=\"viewer\" />\n </div>\n <template v-if=\"$slots.progress\" #progress=\"progress\">\n <slot name=\"progress\" v-bind=\"progress\" />\n </template>\n <template #toolbar=\"toolbar\">\n <slot name=\"toolbar\" v-bind=\"toolbar\" />\n </template>\n </image-viewer>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n useAttrs as useRawAttrs,\n watch,\n} from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { fromPairs } from 'lodash-unified'\nimport { useAttrs, useLocale, useNamespace } from '@element-plus/hooks'\nimport ImageViewer from '@element-plus/components/image-viewer'\nimport {\n getScrollContainer,\n isArray,\n isClient,\n isElement,\n isInContainer,\n isString,\n} from '@element-plus/utils'\nimport { imageEmits, imageProps } from './image'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElImage',\n inheritAttrs: false,\n})\n\nconst props = defineProps(imageProps)\nconst emit = defineEmits(imageEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('image')\nconst rawAttrs = useRawAttrs()\n\nconst containerAttrs = computed(() => {\n return fromPairs(\n Object.entries(rawAttrs).filter(\n ([key]) => /^(data-|on[A-Z])/i.test(key) || ['id', 'style'].includes(key)\n )\n )\n})\n\nconst imgAttrs = useAttrs({\n excludeListeners: true,\n excludeKeys: computed<string[]>(() => {\n return Object.keys(containerAttrs.value)\n }),\n})\n\nconst imageSrc = ref<string | undefined>()\nconst hasLoadError = ref(false)\nconst isLoading = ref(true)\nconst showViewer = ref(false)\nconst container = ref<HTMLElement>()\nconst _scrollContainer = ref<HTMLElement | Window>()\n\nconst supportLoading = isClient && 'loading' in HTMLImageElement.prototype\nlet stopScrollListener: (() => void) | undefined\n\nconst imageKls = computed(() => [\n ns.e('inner'),\n preview.value && ns.e('preview'),\n isLoading.value && ns.is('loading'),\n])\n\nconst imageStyle = computed<CSSProperties>(() => {\n const { fit } = props\n if (isClient && fit) {\n return { objectFit: fit }\n }\n return {}\n})\n\nconst preview = computed(() => {\n const { previewSrcList } = props\n return isArray(previewSrcList) && previewSrcList.length > 0\n})\n\nconst imageIndex = computed(() => {\n const { previewSrcList, initialIndex } = props\n let previewIndex = initialIndex\n if (initialIndex > previewSrcList.length - 1) {\n previewIndex = 0\n }\n return previewIndex\n})\n\nconst isManual = computed(() => {\n if (props.loading === 'eager') return false\n return (!supportLoading && props.loading === 'lazy') || props.lazy\n})\n\nconst loadImage = () => {\n if (!isClient) return\n\n // reset status\n isLoading.value = true\n hasLoadError.value = false\n imageSrc.value = props.src\n}\n\nfunction handleLoad(event: Event) {\n isLoading.value = false\n hasLoadError.value = false\n emit('load', event)\n}\n\nfunction handleError(event: Event) {\n isLoading.value = false\n hasLoadError.value = true\n emit('error', event)\n}\n\nfunction handleLazyLoad() {\n if (isInContainer(container.value, _scrollContainer.value)) {\n loadImage()\n removeLazyLoadListener()\n }\n}\n\nconst lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true)\n\nasync function addLazyLoadListener() {\n if (!isClient) return\n\n await nextTick()\n\n const { scrollContainer } = props\n if (isElement(scrollContainer)) {\n _scrollContainer.value = scrollContainer\n } else if (isString(scrollContainer) && scrollContainer !== '') {\n _scrollContainer.value =\n document.querySelector<HTMLElement>(scrollContainer) ?? undefined\n } else if (container.value) {\n _scrollContainer.value = getScrollContainer(container.value)\n }\n\n if (_scrollContainer.value) {\n stopScrollListener = useEventListener(\n _scrollContainer,\n 'scroll',\n lazyLoadHandler\n )\n setTimeout(() => handleLazyLoad(), 100)\n }\n}\n\nfunction removeLazyLoadListener() {\n if (!isClient || !_scrollContainer.value || !lazyLoadHandler) return\n\n stopScrollListener?.()\n _scrollContainer.value = undefined\n}\n\nfunction clickHandler() {\n // don't show viewer when preview is false\n if (!preview.value) return\n showViewer.value = true\n emit('show')\n}\n\nfunction closeViewer() {\n showViewer.value = false\n emit('close')\n}\n\nfunction switchViewer(val: number) {\n emit('switch', val)\n}\n\nwatch(\n () => props.src,\n () => {\n if (isManual.value) {\n // reset status\n isLoading.value = true\n hasLoadError.value = false\n removeLazyLoadListener()\n addLazyLoadListener()\n } else {\n loadImage()\n }\n }\n)\n\nonMounted(() => {\n if (isManual.value) {\n addLazyLoadListener()\n } else {\n loadImage()\n }\n})\n\ndefineExpose({\n /** @description manually open preview */\n showPreview: clickHandler,\n})\n</script>\n"],"names":["useRawAttrs","useAttrs","_openBlock","_createElementBlock","_mergeProps","_unref"],"mappings":";;;;;;;;;;;;;;mCAiFc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,WAAWA,QAAY,EAAA,CAAA;AAE7B,IAAM,MAAA,cAAA,GAAiB,SAAS,MAAM;AACpC,MAAO,OAAA,SAAA,CAAA,MAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,IAAA,CAAA,IAAA,EA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,CAAA,CAAA;AACE,IAAoB,MAAA,CAAA;AAAA,MACtB,WAAO,EAAA,YAAA;AACL,KAAU,CAAA,CAAA;AAAA,IACZ,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAC,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAAC,UAAA,CAAA;AAED,QAAa,OAAA,EAAA,WAAA;AAAA,QAAA,GAAA,EAAA,SAAA;AAAA,OAEE,EAAAC,KAAA,CAAA,cAAA,CAAA,EAAA;AAAA,QACd,KAAA,EAAA,CAAAA,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"image2.mjs","sources":["../../../../../../packages/components/image/src/image.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Image from './image.vue'\n\nexport const imageProps = buildProps({\n /**\n * @description when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode.\n */\n hideOnClickModal: Boolean,\n /**\n * @description image source, same as native.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit).\n */\n fit: {\n type: String,\n values: ['', 'contain', 'cover', 'fill', 'none', 'scale-down'],\n default: '',\n },\n /**\n * @description Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading)\n */\n loading: {\n type: String,\n values: ['eager', 'lazy'],\n },\n /**\n * @description whether to use lazy load.\n */\n lazy: Boolean,\n /**\n * @description the container to add scroll listener when using lazy load.\n */\n scrollContainer: {\n type: definePropType<string | HTMLElement | undefined>([String, Object]),\n },\n /**\n * @description allow big image preview.\n */\n previewSrcList: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`.\n */\n previewTeleported: Boolean,\n /**\n * @description set image preview z-index.\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description initial preview image index, less than the length of `url-list`.\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether the viewer preview is infinite.\n */\n infinite: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the image-viewer can be closed by pressing ESC.\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the zoom rate of the image viewer zoom event\n */\n zoomRate: {\n type: Number,\n default: 1.2,\n },\n /**\n * @description the min scale of the image viewer zoom event.\n */\n minScale: {\n type: Number,\n default: 0.2,\n },\n /**\n * @description the max scale of the image viewer zoom event.\n */\n maxScale: {\n type: Number,\n default: 7,\n },\n /**\n * @description show preview image progress content.\n */\n showProgress: {\n type: Boolean,\n default: false,\n },\n /**\n * @description set HTML attribute: crossorigin.\n */\n crossorigin: {\n type: definePropType<'anonymous' | 'use-credentials' | ''>(String),\n },\n} as const)\nexport type ImageProps = ExtractPropTypes<typeof imageProps>\n\nexport const imageEmits = {\n load: (evt: Event) => evt instanceof Event,\n error: (evt: Event) => evt instanceof Event,\n switch: (val: number) => isNumber(val),\n close: () => true,\n show: () => true,\n}\nexport type ImageEmits = typeof imageEmits\nexport type ImageInstance = InstanceType<typeof Image> & unknown\n"],"names":[],"mappings":";;;;AAMY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,gBAAgB,EAAE,OAAO;AAC3B,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAA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AAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,KAAK;AACrC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,KAAK;AACtC,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC;AAChC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB;;;;"}
@@ -87,29 +87,29 @@ export { default as ElLoadingService } from './loading/src/service.mjs';
87
87
  export { affixEmits, affixProps } from './affix/src/affix.mjs';
88
88
  export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
89
89
  export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
90
- export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
90
+ export { avatarEmits, avatarProps } from './avatar/src/avatar2.mjs';
91
91
  export { backtopEmits, backtopProps } from './backtop/src/backtop.mjs';
92
92
  export { badgeProps } from './badge/src/badge.mjs';
93
93
  export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
94
94
  export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
95
95
  export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
96
- export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
96
+ export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button2.mjs';
97
97
  export { buttonGroupContextKey } from './button/src/constants.mjs';
98
- export { calendarEmits, calendarProps } from './calendar/src/calendar2.mjs';
98
+ export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
99
99
  export { cardProps } from './card/src/card.mjs';
100
100
  export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
101
101
  export { carouselItemProps } from './carousel/src/carousel-item.mjs';
102
102
  export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants.mjs';
103
- export { cascaderEmits, cascaderProps } from './cascader/src/cascader2.mjs';
103
+ export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
104
104
  export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
105
105
  export { CommonProps, DefaultProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
106
106
  export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag.mjs';
107
- export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
107
+ export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group2.mjs';
108
108
  export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
109
109
  export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
110
110
  export { colProps } from './col/src/col2.mjs';
111
111
  export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
112
- export { collapseItemProps } from './collapse/src/collapse-item.mjs';
112
+ export { collapseItemProps } from './collapse/src/collapse-item2.mjs';
113
113
  export { collapseContextKey } from './collapse/src/constants.mjs';
114
114
  export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
115
115
  export { messageConfig } from './config-provider/src/config-provider.mjs';
@@ -119,43 +119,43 @@ export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from
119
119
  export { countdownEmits, countdownProps } from './countdown/src/countdown.mjs';
120
120
  export { ROOT_PICKER_INJECTION_KEY } from './date-picker/src/constants.mjs';
121
121
  export { datePickerProps } from './date-picker/src/props/date-picker.mjs';
122
- export { descriptionProps } from './descriptions/src/description.mjs';
122
+ export { descriptionProps } from './descriptions/src/description2.mjs';
123
123
  export { descriptionItemProps } from './descriptions/src/description-item.mjs';
124
124
  export { useDialog } from './dialog/src/use-dialog.mjs';
125
125
  export { dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
126
126
  export { dialogInjectionKey } from './dialog/src/constants.mjs';
127
- export { dividerProps } from './divider/src/divider.mjs';
127
+ export { dividerProps } from './divider/src/divider2.mjs';
128
128
  export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
129
- export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown2.mjs';
129
+ export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
130
130
  export { DROPDOWN_INJECTION_KEY } from './dropdown/src/tokens.mjs';
131
- export { emptyProps } from './empty/src/empty.mjs';
131
+ export { emptyProps } from './empty/src/empty2.mjs';
132
132
  export { formEmits, formMetaProps, formProps } from './form/src/form.mjs';
133
133
  export { formItemProps, formItemValidateStates } from './form/src/form-item.mjs';
134
134
  export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
135
135
  export { useDisabled, useFormDisabled, useFormSize, useSize } from './form/src/hooks/use-form-common-props.mjs';
136
136
  export { useFormItem, useFormItemInputId } from './form/src/hooks/use-form-item.mjs';
137
137
  export { iconProps } from './icon/src/icon.mjs';
138
- export { imageEmits, imageProps } from './image/src/image.mjs';
138
+ export { imageEmits, imageProps } from './image/src/image2.mjs';
139
139
  export { imageViewerEmits, imageViewerProps } from './image-viewer/src/image-viewer2.mjs';
140
140
  export { inputEmits, inputProps } from './input/src/input.mjs';
141
141
  export { inputNumberEmits, inputNumberProps } from './input-number/src/input-number2.mjs';
142
142
  export { inputTagEmits, inputTagProps } from './input-tag/src/input-tag.mjs';
143
- export { linkEmits, linkProps } from './link/src/link.mjs';
143
+ export { linkEmits, linkProps } from './link/src/link2.mjs';
144
144
  export { menuEmits, menuProps } from './menu/src/menu.mjs';
145
145
  export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
146
146
  export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
147
147
  export { subMenuProps } from './menu/src/sub-menu.mjs';
148
148
  export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
149
- export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header.mjs';
149
+ export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header2.mjs';
150
150
  export { paginationEmits, paginationProps } from './pagination/src/pagination.mjs';
151
151
  export { elPaginationKey } from './pagination/src/constants.mjs';
152
152
  export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
153
153
  export { Effect, popperProps, roleTypes, usePopperProps } from './popper/src/popper.mjs';
154
154
  export { popperTriggerProps, usePopperTriggerProps } from './popper/src/trigger.mjs';
155
155
  export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './popper/src/content.mjs';
156
- export { popperArrowProps, usePopperArrowProps } from './popper/src/arrow2.mjs';
156
+ export { popperArrowProps, usePopperArrowProps } from './popper/src/arrow.mjs';
157
157
  export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './popper/src/constants.mjs';
158
- export { default as ElPopperArrow } from './popper/src/arrow.mjs';
158
+ export { default as ElPopperArrow } from './popper/src/arrow2.mjs';
159
159
  export { default as ElPopperTrigger } from './popper/src/trigger2.mjs';
160
160
  export { default as ElPopperContent } from './popper/src/content2.mjs';
161
161
  export { progressProps } from './progress/src/progress.mjs';
@@ -182,7 +182,7 @@ export { spaceProps } from './space/src/space.mjs';
182
182
  export { spaceItemProps } from './space/src/item.mjs';
183
183
  export { useSpace } from './space/src/use-space.mjs';
184
184
  export { statisticProps } from './statistic/src/statistic.mjs';
185
- export { stepProps } from './steps/src/item.mjs';
185
+ export { stepProps } from './steps/src/item2.mjs';
186
186
  export { stepsEmits, stepsProps } from './steps/src/steps.mjs';
187
187
  export { switchEmits, switchProps } from './switch/src/switch.mjs';
188
188
  export { Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, SortOrder as TableV2SortOrder } from './table-v2/src/constants.mjs';
@@ -207,7 +207,7 @@ export { timeSelectProps } from './time-select/src/time-select.mjs';
207
207
  export { timelineItemProps } from './timeline/src/timeline-item.mjs';
208
208
  export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/tooltip.mjs';
209
209
  export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
210
- export { useTooltipContentProps } from './tooltip/src/content.mjs';
210
+ export { useTooltipContentProps } from './tooltip/src/content2.mjs';
211
211
  export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
212
212
  export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer.mjs';
213
213
  export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
@@ -218,8 +218,8 @@ export { uploadContextKey } from './upload/src/constants.mjs';
218
218
  export { default as FixedSizeList } from './virtual-list/src/components/fixed-size-list.mjs';
219
219
  export { default as DynamicSizeList } from './virtual-list/src/components/dynamic-size-list.mjs';
220
220
  export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
221
- export { watermarkProps } from './watermark/src/watermark.mjs';
222
- export { tourEmits, tourProps } from './tour/src/tour.mjs';
221
+ export { watermarkProps } from './watermark/src/watermark2.mjs';
222
+ export { tourEmits, tourProps } from './tour/src/tour2.mjs';
223
223
  export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
224
224
  export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content2.mjs';
225
225
  export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
@@ -1,5 +1,5 @@
1
- import Link from './src/link2.mjs';
2
- export { linkEmits, linkProps } from './src/link.mjs';
1
+ import Link from './src/link.mjs';
2
+ export { linkEmits, linkProps } from './src/link2.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElLink = withInstall(Link);
@@ -1,30 +1,76 @@
1
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
2
- import { iconPropType } from '../../../utils/vue/icon.mjs';
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, renderSlot } from 'vue';
2
+ import { ElIcon } from '../../icon/index.mjs';
3
+ import { linkProps, linkEmits } from './link2.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { useGlobalConfig } from '../../config-provider/src/hooks/use-global-config.mjs';
6
+ import { useDeprecated } from '../../../hooks/use-deprecated/index.mjs';
7
+ import { isBoolean } from '../../../utils/types.mjs';
8
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
9
 
4
- const linkProps = buildProps({
5
- type: {
6
- type: String,
7
- values: ["primary", "success", "warning", "info", "danger", "default"],
8
- default: void 0
9
- },
10
- underline: {
11
- type: [Boolean, String],
12
- values: [true, false, "always", "never", "hover"],
13
- default: void 0
14
- },
15
- disabled: Boolean,
16
- href: { type: String, default: "" },
17
- target: {
18
- type: String,
19
- default: "_self"
20
- },
21
- icon: {
22
- type: iconPropType
10
+ const __default__ = defineComponent({
11
+ name: "ElLink"
12
+ });
13
+ const _sfc_main = /* @__PURE__ */ defineComponent({
14
+ ...__default__,
15
+ props: linkProps,
16
+ emits: linkEmits,
17
+ setup(__props, { emit }) {
18
+ const props = __props;
19
+ const globalConfig = useGlobalConfig("link");
20
+ useDeprecated({
21
+ scope: "el-link",
22
+ from: "The underline option (boolean)",
23
+ replacement: "'always' | 'hover' | 'never'",
24
+ version: "3.0.0",
25
+ ref: "https://element-plus.org/en-US/component/link.html#underline"
26
+ }, computed(() => isBoolean(props.underline)));
27
+ const ns = useNamespace("link");
28
+ const linkKls = computed(() => {
29
+ var _a, _b, _c;
30
+ return [
31
+ ns.b(),
32
+ ns.m((_c = (_b = props.type) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.type) != null ? _c : "default"),
33
+ ns.is("disabled", props.disabled),
34
+ ns.is("underline", underline.value === "always"),
35
+ ns.is("hover-underline", underline.value === "hover" && !props.disabled)
36
+ ];
37
+ });
38
+ const underline = computed(() => {
39
+ var _a, _b, _c;
40
+ if (isBoolean(props.underline)) {
41
+ return props.underline ? "hover" : "never";
42
+ } else
43
+ return (_c = (_b = props.underline) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.underline) != null ? _c : "hover";
44
+ });
45
+ function handleClick(event) {
46
+ if (!props.disabled)
47
+ emit("click", event);
48
+ }
49
+ return (_ctx, _cache) => {
50
+ return openBlock(), createElementBlock("a", {
51
+ class: normalizeClass(unref(linkKls)),
52
+ href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
53
+ target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target,
54
+ onClick: handleClick
55
+ }, [
56
+ _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
57
+ default: withCtx(() => [
58
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
59
+ ]),
60
+ _: 1
61
+ })) : createCommentVNode("v-if", true),
62
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
63
+ key: 1,
64
+ class: normalizeClass(unref(ns).e("inner"))
65
+ }, [
66
+ renderSlot(_ctx.$slots, "default")
67
+ ], 2)) : createCommentVNode("v-if", true),
68
+ _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
69
+ ], 10, ["href", "target"]);
70
+ };
23
71
  }
24
72
  });
25
- const linkEmits = {
26
- click: (evt) => evt instanceof MouseEvent
27
- };
73
+ var Link = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "link.vue"]]);
28
74
 
29
- export { linkEmits, linkProps };
75
+ export { Link as default };
30
76
  //# sourceMappingURL=link.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.mjs","sources":["../../../../../../packages/components/link/src/link.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n /**\n * @description type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: undefined,\n },\n /**\n * @description when underlines should appear\n */\n underline: {\n type: [Boolean, String],\n values: [true, false, 'always', 'never', 'hover'],\n default: undefined,\n },\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description same as native hyperlink's `href`\n */\n href: { type: String, default: '' },\n /**\n * @description same as native hyperlink's `target`\n */\n target: {\n type: String as PropType<'_blank' | '_parent' | '_self' | '_top' | string>,\n default: '_self',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n} as const)\nexport type LinkProps = ExtractPropTypes<typeof linkProps>\n\nexport const linkEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type LinkEmits = typeof linkEmits\n\nexport type LinkInstance = InstanceType<typeof Link> & unknown\nexport interface LinkConfigContext {\n type?: string\n underline?: string | boolean\n}\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;AAC1E,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AAC3B,IAAI,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACrD,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
1
+ {"version":3,"file":"link.mjs","sources":["../../../../../../packages/components/link/src/link.vue"],"sourcesContent":["<template>\n <a\n :class=\"linkKls\"\n :href=\"disabled || !href ? undefined : href\"\n :target=\"disabled || !href ? undefined : target\"\n @click=\"handleClick\"\n >\n <el-icon v-if=\"icon\"><component :is=\"icon\" /></el-icon>\n <span v-if=\"$slots.default\" :class=\"ns.e('inner')\">\n <slot />\n </span>\n\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n </a>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated, useNamespace } from '@element-plus/hooks'\nimport { isBoolean } from '@element-plus/utils'\nimport { linkEmits, linkProps } from './link'\n\ndefineOptions({\n name: 'ElLink',\n})\nconst props = defineProps(linkProps)\nconst emit = defineEmits(linkEmits)\nconst globalConfig = useGlobalConfig('link')\n\nuseDeprecated(\n {\n scope: 'el-link',\n from: 'The underline option (boolean)',\n replacement: \"'always' | 'hover' | 'never'\",\n version: '3.0.0',\n ref: 'https://element-plus.org/en-US/component/link.html#underline',\n },\n computed(() => isBoolean(props.underline))\n)\n\nconst ns = useNamespace('link')\n\nconst linkKls = computed(() => [\n ns.b(),\n ns.m(props.type ?? globalConfig.value?.type ?? 'default'),\n ns.is('disabled', props.disabled),\n ns.is('underline', underline.value === 'always'),\n ns.is('hover-underline', underline.value === 'hover' && !props.disabled),\n])\n\n// Boolean compatibility\nconst underline = computed(() => {\n if (isBoolean(props.underline)) {\n return props.underline ? 'hover' : 'never'\n } else return props.underline ?? globalConfig.value?.underline ?? 'hover'\n})\n\nfunction handleClick(event: MouseEvent) {\n if (!props.disabled) emit('click', event)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCAwBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAGA,IAAM,MAAA,YAAA,GAAe,gBAAgB,MAAM,CAAA,CAAA;AAE3C,IAAA,aAAA,CAAA;AAAA,MACE,KAAA,EAAA,SAAA;AAAA,MAAA,IACS,EAAA,gCAAA;AAAA,MAAA,WACD,EAAA,8BAAA;AAAA,MAAA,OACO,EAAA,OAAA;AAAA,MAAA,GACJ,EAAA,8DAAA;AAAA,KAAA,EAAA,QACJ,CAAA,MAAA,SAAA,CAAA,KAAA,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA;AAAA,IACP,MAAA,EAAA,GAAA,YAAA,CAAA,MAAA,CAAA,CAAA;AAAA,IAAA,MACS,OAAA,GAAA,QAAgB,CAAA,MAAA;AAAgB,MAC3C,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAEA,MAAM,OAAA;AAEN,QAAM,EAAA,CAAA,CAAA,EAAA;AAAyB,UACxB,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,EAAA,GAAA,YAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,KAAA,IAAA,GAAA,EAAA,GAAA,SAAA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