@element-plus/nightly 0.0.20250106 → 0.0.20250108
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +28 -2
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +28 -2
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +191 -0
- package/dist/locale/hi.min.js +2 -0
- package/dist/locale/hi.min.js.map +1 -0
- package/dist/locale/hi.min.mjs +2 -0
- package/dist/locale/hi.min.mjs.map +1 -0
- package/dist/locale/hi.mjs +183 -0
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +36 -89
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +89 -36
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +1 -1
- package/es/components/anchor/src/anchor-link.mjs +81 -5
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +5 -81
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +79 -364
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +364 -79
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +6 -29
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +29 -6
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel.mjs +204 -61
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +61 -204
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +38 -14
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +14 -38
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +71 -29
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +29 -71
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +43 -64
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +64 -43
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +28 -16
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +16 -28
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +16 -34
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +34 -16
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +45 -412
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +412 -45
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +25 -25
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +102 -431
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +431 -102
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +166 -15
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +15 -166
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +1 -1
- package/es/components/mention/src/mention2.mjs +2 -2
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +68 -142
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +142 -68
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/pagination/src/components/next.mjs +18 -35
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +35 -18
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +31 -127
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +127 -31
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/row/index.mjs +2 -2
- package/es/components/row/src/row.mjs +28 -44
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/row/src/row2.mjs +44 -28
- package/es/components/row/src/row2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/bar.mjs +10 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -10
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +33 -167
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +167 -33
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/skeleton/index.mjs +4 -4
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +48 -21
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +21 -48
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +69 -25
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +25 -69
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +3 -3
- package/es/components/tabs/src/tab-bar.mjs +95 -7
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +7 -95
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tabs/src/tab-pane.mjs +13 -71
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +71 -13
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +27 -99
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +99 -27
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +8 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -8
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +27 -1
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/root.mjs +17 -79
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +79 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +210 -27
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +27 -210
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +25 -25
- package/es/locale/lang/hi.d.ts +180 -0
- package/es/locale/lang/hi.mjs +182 -0
- package/es/locale/lang/hi.mjs.map +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +37 -88
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +88 -37
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/anchor/index.js +1 -1
- package/lib/components/anchor/src/anchor-link.js +81 -5
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +5 -81
- package/lib/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +79 -363
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +363 -79
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +6 -29
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +29 -6
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel.js +204 -62
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +62 -204
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +38 -15
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +15 -38
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +71 -30
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +30 -71
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +43 -64
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +64 -43
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +28 -18
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +18 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +16 -34
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +34 -16
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +46 -412
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +412 -46
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +25 -25
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +102 -430
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +430 -102
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/mention/src/mention-dropdown.js +166 -16
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +16 -166
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention.js +1 -1
- package/lib/components/mention/src/mention2.js +2 -2
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +69 -141
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +141 -69
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/pagination/src/components/next.js +18 -35
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +35 -18
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +32 -127
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +127 -32
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/row/index.js +2 -2
- package/lib/components/row/src/row.js +30 -44
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/row/src/row2.js +44 -30
- package/lib/components/row/src/row2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/bar.js +10 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -10
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +170 -56
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +56 -170
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +34 -167
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +167 -34
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/skeleton/index.js +4 -4
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +48 -21
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +21 -48
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +69 -25
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +25 -69
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/tabs/index.js +3 -3
- package/lib/components/tabs/src/tab-bar.js +95 -7
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +7 -95
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tabs/src/tab-pane.js +13 -71
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +71 -13
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +28 -99
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +99 -28
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +8 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -8
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/text/src/text2.js +26 -0
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/root.js +17 -79
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +79 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +210 -27
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +27 -210
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +25 -25
- package/lib/locale/lang/hi.d.ts +180 -0
- package/lib/locale/lang/hi.js +186 -0
- package/lib/locale/lang/hi.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/select.scss +1 -0
- package/web-types.json +1 -1
@@ -1,215 +1,32 @@
|
|
1
|
-
import {
|
2
|
-
import { useMutationObserver } from '@vueuse/core';
|
3
|
-
import { watermarkProps } from './watermark.mjs';
|
4
|
-
import { reRendering, getStyleStr, getPixelRatio } from './utils.mjs';
|
5
|
-
import useClips, { FontGap } from './useClips.mjs';
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
7
|
-
import { isArray } from '@vue/shared';
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
8
2
|
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.fontStyle) != null ? _b : "normal";
|
35
|
-
});
|
36
|
-
const fontFamily = computed(() => {
|
37
|
-
var _a, _b;
|
38
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.fontFamily) != null ? _b : "sans-serif";
|
39
|
-
});
|
40
|
-
const textAlign = computed(() => {
|
41
|
-
var _a, _b;
|
42
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.textAlign) != null ? _b : "center";
|
43
|
-
});
|
44
|
-
const textBaseline = computed(() => {
|
45
|
-
var _a, _b;
|
46
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.textBaseline) != null ? _b : "hanging";
|
47
|
-
});
|
48
|
-
const gapX = computed(() => props.gap[0]);
|
49
|
-
const gapY = computed(() => props.gap[1]);
|
50
|
-
const gapXCenter = computed(() => gapX.value / 2);
|
51
|
-
const gapYCenter = computed(() => gapY.value / 2);
|
52
|
-
const offsetLeft = computed(() => {
|
53
|
-
var _a, _b;
|
54
|
-
return (_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value;
|
55
|
-
});
|
56
|
-
const offsetTop = computed(() => {
|
57
|
-
var _a, _b;
|
58
|
-
return (_b = (_a = props.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value;
|
59
|
-
});
|
60
|
-
const getMarkStyle = () => {
|
61
|
-
const markStyle = {
|
62
|
-
zIndex: props.zIndex,
|
63
|
-
position: "absolute",
|
64
|
-
left: 0,
|
65
|
-
top: 0,
|
66
|
-
width: "100%",
|
67
|
-
height: "100%",
|
68
|
-
pointerEvents: "none",
|
69
|
-
backgroundRepeat: "repeat"
|
70
|
-
};
|
71
|
-
let positionLeft = offsetLeft.value - gapXCenter.value;
|
72
|
-
let positionTop = offsetTop.value - gapYCenter.value;
|
73
|
-
if (positionLeft > 0) {
|
74
|
-
markStyle.left = `${positionLeft}px`;
|
75
|
-
markStyle.width = `calc(100% - ${positionLeft}px)`;
|
76
|
-
positionLeft = 0;
|
77
|
-
}
|
78
|
-
if (positionTop > 0) {
|
79
|
-
markStyle.top = `${positionTop}px`;
|
80
|
-
markStyle.height = `calc(100% - ${positionTop}px)`;
|
81
|
-
positionTop = 0;
|
82
|
-
}
|
83
|
-
markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
|
84
|
-
return markStyle;
|
85
|
-
};
|
86
|
-
const containerRef = shallowRef(null);
|
87
|
-
const watermarkRef = shallowRef();
|
88
|
-
const stopObservation = ref(false);
|
89
|
-
const destroyWatermark = () => {
|
90
|
-
if (watermarkRef.value) {
|
91
|
-
watermarkRef.value.remove();
|
92
|
-
watermarkRef.value = void 0;
|
93
|
-
}
|
94
|
-
};
|
95
|
-
const appendWatermark = (base64Url, markWidth) => {
|
96
|
-
var _a;
|
97
|
-
if (containerRef.value && watermarkRef.value) {
|
98
|
-
stopObservation.value = true;
|
99
|
-
watermarkRef.value.setAttribute("style", getStyleStr({
|
100
|
-
...getMarkStyle(),
|
101
|
-
backgroundImage: `url('${base64Url}')`,
|
102
|
-
backgroundSize: `${Math.floor(markWidth)}px`
|
103
|
-
}));
|
104
|
-
(_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value);
|
105
|
-
setTimeout(() => {
|
106
|
-
stopObservation.value = false;
|
107
|
-
});
|
108
|
-
}
|
109
|
-
};
|
110
|
-
const getMarkSize = (ctx) => {
|
111
|
-
let defaultWidth = 120;
|
112
|
-
let defaultHeight = 64;
|
113
|
-
const image = props.image;
|
114
|
-
const content = props.content;
|
115
|
-
const width = props.width;
|
116
|
-
const height = props.height;
|
117
|
-
if (!image && ctx.measureText) {
|
118
|
-
ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
|
119
|
-
const contents = isArray(content) ? content : [content];
|
120
|
-
const sizes = contents.map((item) => {
|
121
|
-
const metrics = ctx.measureText(item);
|
122
|
-
return [
|
123
|
-
metrics.width,
|
124
|
-
metrics.fontBoundingBoxAscent !== void 0 ? metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent : metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent
|
125
|
-
];
|
126
|
-
});
|
127
|
-
defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])));
|
128
|
-
defaultHeight = Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length + (contents.length - 1) * FontGap;
|
129
|
-
}
|
130
|
-
return [width != null ? width : defaultWidth, height != null ? height : defaultHeight];
|
131
|
-
};
|
132
|
-
const getClips = useClips();
|
133
|
-
const renderWatermark = () => {
|
134
|
-
const canvas = document.createElement("canvas");
|
135
|
-
const ctx = canvas.getContext("2d");
|
136
|
-
const image = props.image;
|
137
|
-
const content = props.content;
|
138
|
-
const rotate = props.rotate;
|
139
|
-
if (ctx) {
|
140
|
-
if (!watermarkRef.value) {
|
141
|
-
watermarkRef.value = document.createElement("div");
|
142
|
-
}
|
143
|
-
const ratio = getPixelRatio();
|
144
|
-
const [markWidth, markHeight] = getMarkSize(ctx);
|
145
|
-
const drawCanvas = (drawContent) => {
|
146
|
-
const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
|
147
|
-
color: color.value,
|
148
|
-
fontSize: fontSize.value,
|
149
|
-
fontStyle: fontStyle.value,
|
150
|
-
fontWeight: fontWeight.value,
|
151
|
-
fontFamily: fontFamily.value,
|
152
|
-
textAlign: textAlign.value,
|
153
|
-
textBaseline: textBaseline.value
|
154
|
-
}, gapX.value, gapY.value);
|
155
|
-
appendWatermark(textClips, clipWidth);
|
156
|
-
};
|
157
|
-
if (image) {
|
158
|
-
const img = new Image();
|
159
|
-
img.onload = () => {
|
160
|
-
drawCanvas(img);
|
161
|
-
};
|
162
|
-
img.onerror = () => {
|
163
|
-
drawCanvas(content);
|
164
|
-
};
|
165
|
-
img.crossOrigin = "anonymous";
|
166
|
-
img.referrerPolicy = "no-referrer";
|
167
|
-
img.src = image;
|
168
|
-
} else {
|
169
|
-
drawCanvas(content);
|
170
|
-
}
|
171
|
-
}
|
172
|
-
};
|
173
|
-
onMounted(() => {
|
174
|
-
renderWatermark();
|
175
|
-
});
|
176
|
-
watch(() => props, () => {
|
177
|
-
renderWatermark();
|
178
|
-
}, {
|
179
|
-
deep: true,
|
180
|
-
flush: "post"
|
181
|
-
});
|
182
|
-
onBeforeUnmount(() => {
|
183
|
-
destroyWatermark();
|
184
|
-
});
|
185
|
-
const onMutate = (mutations) => {
|
186
|
-
if (stopObservation.value) {
|
187
|
-
return;
|
188
|
-
}
|
189
|
-
mutations.forEach((mutation) => {
|
190
|
-
if (reRendering(mutation, watermarkRef.value)) {
|
191
|
-
destroyWatermark();
|
192
|
-
renderWatermark();
|
193
|
-
}
|
194
|
-
});
|
195
|
-
};
|
196
|
-
useMutationObserver(containerRef, onMutate, {
|
197
|
-
attributes: true,
|
198
|
-
subtree: true,
|
199
|
-
childList: true
|
200
|
-
});
|
201
|
-
return (_ctx, _cache) => {
|
202
|
-
return openBlock(), createElementBlock("div", {
|
203
|
-
ref_key: "containerRef",
|
204
|
-
ref: containerRef,
|
205
|
-
style: normalizeStyle([style])
|
206
|
-
}, [
|
207
|
-
renderSlot(_ctx.$slots, "default")
|
208
|
-
], 4);
|
209
|
-
};
|
3
|
+
const watermarkProps = buildProps({
|
4
|
+
zIndex: {
|
5
|
+
type: Number,
|
6
|
+
default: 9
|
7
|
+
},
|
8
|
+
rotate: {
|
9
|
+
type: Number,
|
10
|
+
default: -22
|
11
|
+
},
|
12
|
+
width: Number,
|
13
|
+
height: Number,
|
14
|
+
image: String,
|
15
|
+
content: {
|
16
|
+
type: definePropType([String, Array]),
|
17
|
+
default: "Element Plus"
|
18
|
+
},
|
19
|
+
font: {
|
20
|
+
type: definePropType(Object)
|
21
|
+
},
|
22
|
+
gap: {
|
23
|
+
type: definePropType(Array),
|
24
|
+
default: () => [100, 100]
|
25
|
+
},
|
26
|
+
offset: {
|
27
|
+
type: definePropType(Array)
|
210
28
|
}
|
211
29
|
});
|
212
|
-
var Watermark = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "watermark.vue"]]);
|
213
30
|
|
214
|
-
export {
|
31
|
+
export { watermarkProps };
|
215
32
|
//# sourceMappingURL=watermark2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"watermark2.mjs","sources":["../../../../../../packages/components/watermark/src/watermark.vue"],"sourcesContent":["<template>\n <div ref=\"containerRef\" :style=\"[style]\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n} from 'vue'\nimport { useMutationObserver } from '@vueuse/core'\nimport { isArray } from '@element-plus/utils'\nimport { watermarkProps } from './watermark'\nimport { getPixelRatio, getStyleStr, reRendering } from './utils'\nimport useClips, { FontGap } from './useClips'\nimport type { WatermarkProps } from './watermark'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElWatermark',\n})\n\nconst style: CSSProperties = {\n position: 'relative',\n}\n\nconst props = defineProps(watermarkProps)\nconst color = computed(() => props.font?.color ?? 'rgba(0,0,0,.15)')\nconst fontSize = computed(() => props.font?.fontSize ?? 16)\nconst fontWeight = computed(() => props.font?.fontWeight ?? 'normal')\nconst fontStyle = computed(() => props.font?.fontStyle ?? 'normal')\nconst fontFamily = computed(() => props.font?.fontFamily ?? 'sans-serif')\nconst textAlign = computed(() => props.font?.textAlign ?? 'center')\nconst textBaseline = computed(() => props.font?.textBaseline ?? 'hanging')\n\nconst gapX = computed(() => props.gap[0])\nconst gapY = computed(() => props.gap[1])\nconst gapXCenter = computed(() => gapX.value / 2)\nconst gapYCenter = computed(() => gapY.value / 2)\nconst offsetLeft = computed(() => props.offset?.[0] ?? gapXCenter.value)\nconst offsetTop = computed(() => props.offset?.[1] ?? gapYCenter.value)\n\nconst getMarkStyle = () => {\n const markStyle: CSSProperties = {\n zIndex: props.zIndex,\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n backgroundRepeat: 'repeat',\n }\n\n /** Calculate the style of the offset */\n let positionLeft = offsetLeft.value - gapXCenter.value\n let positionTop = offsetTop.value - gapYCenter.value\n if (positionLeft > 0) {\n markStyle.left = `${positionLeft}px`\n markStyle.width = `calc(100% - ${positionLeft}px)`\n positionLeft = 0\n }\n if (positionTop > 0) {\n markStyle.top = `${positionTop}px`\n markStyle.height = `calc(100% - ${positionTop}px)`\n positionTop = 0\n }\n markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`\n\n return markStyle\n}\n\nconst containerRef = shallowRef<HTMLDivElement | null>(null)\nconst watermarkRef = shallowRef<HTMLDivElement>()\nconst stopObservation = ref(false)\n\nconst destroyWatermark = () => {\n if (watermarkRef.value) {\n watermarkRef.value.remove()\n watermarkRef.value = undefined\n }\n}\nconst appendWatermark = (base64Url: string, markWidth: number) => {\n if (containerRef.value && watermarkRef.value) {\n stopObservation.value = true\n watermarkRef.value.setAttribute(\n 'style',\n getStyleStr({\n ...getMarkStyle(),\n backgroundImage: `url('${base64Url}')`,\n backgroundSize: `${Math.floor(markWidth)}px`,\n })\n )\n containerRef.value?.append(watermarkRef.value)\n // Delayed execution\n setTimeout(() => {\n stopObservation.value = false\n })\n }\n}\n\n/**\n * Get the width and height of the watermark. The default values are as follows\n * Image: [120, 64]; Content: It's calculated by content;\n */\nconst getMarkSize = (ctx: CanvasRenderingContext2D) => {\n let defaultWidth = 120\n let defaultHeight = 64\n const image = props.image\n const content = props.content\n const width = props.width\n const height = props.height\n if (!image && ctx.measureText) {\n ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`\n const contents = isArray(content) ? content : [content]\n const sizes = contents.map((item) => {\n const metrics = ctx.measureText(item!)\n\n return [\n metrics.width,\n // Using `actualBoundingBoxAscent` to be compatible with lower version browsers (eg: Firefox < 116)\n metrics.fontBoundingBoxAscent !== undefined\n ? metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent\n : metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent,\n ]\n })\n defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])))\n defaultHeight =\n Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length +\n (contents.length - 1) * FontGap\n }\n return [width ?? defaultWidth, height ?? defaultHeight] as const\n}\n\nconst getClips = useClips()\n\nconst renderWatermark = () => {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n const image = props.image\n const content = props.content\n const rotate = props.rotate\n\n if (ctx) {\n if (!watermarkRef.value) {\n watermarkRef.value = document.createElement('div')\n }\n\n const ratio = getPixelRatio()\n const [markWidth, markHeight] = getMarkSize(ctx)\n\n const drawCanvas = (\n drawContent?: NonNullable<WatermarkProps['content']> | HTMLImageElement\n ) => {\n const [textClips, clipWidth] = getClips(\n drawContent || '',\n rotate,\n ratio,\n markWidth,\n markHeight,\n {\n color: color.value,\n fontSize: fontSize.value,\n fontStyle: fontStyle.value,\n fontWeight: fontWeight.value,\n fontFamily: fontFamily.value,\n textAlign: textAlign.value,\n textBaseline: textBaseline.value,\n },\n gapX.value,\n gapY.value\n )\n\n appendWatermark(textClips, clipWidth)\n }\n\n if (image) {\n const img = new Image()\n img.onload = () => {\n drawCanvas(img)\n }\n img.onerror = () => {\n drawCanvas(content)\n }\n img.crossOrigin = 'anonymous'\n img.referrerPolicy = 'no-referrer'\n img.src = image\n } else {\n drawCanvas(content)\n }\n }\n}\n\nonMounted(() => {\n renderWatermark()\n})\n\nwatch(\n () => props,\n () => {\n renderWatermark()\n },\n {\n deep: true,\n flush: 'post',\n }\n)\n\nonBeforeUnmount(() => {\n destroyWatermark()\n})\n\nconst onMutate = (mutations: MutationRecord[]) => {\n if (stopObservation.value) {\n return\n }\n mutations.forEach((mutation) => {\n if (reRendering(mutation, watermarkRef.value)) {\n destroyWatermark()\n renderWatermark()\n }\n })\n}\n\nuseMutationObserver(containerRef, onMutate, {\n attributes: true,\n subtree: true,\n childList: true,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;mCAuBc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAA,MAAM,KAAuB,GAAA;AAAA,MAC3B,QAAU,EAAA,UAAA;AAAA,KACZ,CAAA;AAGA,IAAA,MAAM,QAAQ,QAAS,CAAA,MAAM;AAC7B,MAAA,IAAM;AACN,MAAA,mBAA4B,KAAA,CAAA,IAAA,KAAY,IAAA,GAAA,iBAAoB,KAAQ,IAAA,GAAA,EAAA,GAAA,iBAAA,CAAA;AACpE,KAAA,CAAA,CAAA;AACA,IAAA,MAAM,mBAAsB,CAAA,MAAA;AAC5B,MAAA,IAAM;AACN,MAAA,mBAAqB,KAAS,CAAA,IAAA,KAAM,IAAM,GAAA,KAAM,oBAAyB,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA;AAEzE,KAAA,CAAA,CAAA;AACA,IAAA,MAAM,UAAgB,GAAA,QAAA,CAAM,MAAM;AAClC,MAAA,IAAM,EAAa,EAAA,EAAA,CAAA;AACnB,MAAA,OAAmB,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAe,KAAA,YAAc,CAAA,GAAA,EAAA,CAAA,UAAA,KAAA,IAAA,GAAA,EAAA,GA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AAA,aAAA,CAAA;AAAA,UACQ,GAAA,CAAA,GAAA,GAAA,KAAA,CAAA;AAAA,SACC,MAAA;AAAA,UACT,UAAA,CAAA,OAAA,CAAA,CAAA;AAAA,SACF;AAEA,OAAA;AACE,KAAiB,CAAA;AAAA,IACnB,SAAC,CAAA,MAAA;AAED,MAAM,eAAW,EAAiC,CAAA;AAChD,KAAA,CAAA,CAAA;AACE,IAAA,KAAA,CAAA,MAAA,KAAA,EAAA,MAAA;AAAA,MACF,eAAA,EAAA,CAAA;AACA,KAAU,EAAA;AACR,MAAA,IAAA,EAAI,IAAY;AACd,MAAiB,KAAA,EAAA,MAAA;AACjB,KAAgB,CAAA,CAAA;AAAA,IAClB,eAAA,CAAA,MAAA;AAAA,MACF,gBAAC,EAAA,CAAA;AAAA,KACH,CAAA,CAAA;AAEA,IAAA,MAAA,QAAA,GAAA,CAAA;AAA4C,MAC1C,IAAY,eAAA,CAAA,KAAA,EAAA;AAAA,QACH,OAAA;AAAA,OACE;AAAA,MACZ,SAAA,CAAA,OAAA,CAAA,CAAA,QAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"watermark2.mjs","sources":["../../../../../../packages/components/watermark/src/watermark.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Watermark from './watermark.vue'\n\nexport interface WatermarkFontType {\n color?: string\n fontSize?: number | string\n fontWeight?: 'normal' | 'light' | 'weight' | number\n fontStyle?: 'none' | 'normal' | 'italic' | 'oblique'\n fontFamily?: string\n textAlign?: 'start' | 'end' | 'left' | 'right' | 'center'\n textBaseline?:\n | 'top'\n | 'hanging'\n | 'middle'\n | 'alphabetic'\n | 'ideographic'\n | 'bottom'\n}\n\nexport const watermarkProps = buildProps({\n /**\n * @description The z-index of the appended watermark element\n */\n zIndex: {\n type: Number,\n default: 9,\n },\n /**\n * @description The rotation angle of the watermark\n */\n rotate: {\n type: Number,\n default: -22,\n },\n /**\n * @description The width of the watermark\n */\n width: Number,\n /**\n * @description The height of the watermark\n */\n height: Number,\n /**\n * @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format)\n */\n image: String,\n /**\n * @description Watermark text content\n */\n content: {\n type: definePropType<string | string[]>([String, Array]),\n default: 'Element Plus',\n },\n /**\n * @description Text style\n */\n font: {\n type: definePropType<WatermarkFontType>(Object),\n },\n /**\n * @description The spacing between watermarks\n */\n gap: {\n type: definePropType<[number, number]>(Array),\n default: () => [100, 100],\n },\n /**\n * @description The offset of the watermark from the upper left corner of the container. The default is gap/2\n */\n offset: {\n type: definePropType<[number, number]>(Array),\n },\n} as const)\n\nexport type WatermarkProps = ExtractPropTypes<typeof watermarkProps>\nexport type WatermarkInstance = InstanceType<typeof Watermark>\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC,EAAE;AAChB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,cAAc;AAC3B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;AAC7B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,CAAC;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { getCurrentInstance, shallowRef, ref, watch, onMounted } from 'vue';
|
2
2
|
import { useEventListener } from '@vueuse/core';
|
3
|
-
import { isFunction } from '@vue/shared';
|
4
3
|
import { isElement } from '../../utils/types.mjs';
|
4
|
+
import { isFunction } from '@vue/shared';
|
5
5
|
|
6
6
|
function useFocusController(target, {
|
7
7
|
beforeFocus,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { isRef, computed, watch, onScopeDispose } from 'vue';
|
2
2
|
import { useNamespace } from '../use-namespace/index.mjs';
|
3
3
|
import { throwError } from '../../utils/error.mjs';
|
4
|
+
import { isClient } from '@vueuse/core';
|
4
5
|
import { hasClass, addClass, getStyle, removeClass } from '../../utils/dom/style.mjs';
|
5
6
|
import { getScrollBarWidth } from '../../utils/dom/scroll.mjs';
|
6
|
-
import { isClient } from '@vueuse/core';
|
7
7
|
|
8
8
|
const useLockscreen = (trigger, options = {}) => {
|
9
9
|
if (!isRef(trigger)) {
|
package/es/index.mjs
CHANGED
@@ -4,9 +4,9 @@ export { makeInstaller } from './make-installer.mjs';
|
|
4
4
|
export { default as dayjs } from 'dayjs';
|
5
5
|
export { affixEmits, affixProps } from './components/affix/src/affix.mjs';
|
6
6
|
export { ElAffix } from './components/affix/index.mjs';
|
7
|
-
export { alertEffects, alertEmits, alertProps } from './components/alert/src/
|
7
|
+
export { alertEffects, alertEmits, alertProps } from './components/alert/src/alert.mjs';
|
8
8
|
export { ElAlert } from './components/alert/index.mjs';
|
9
|
-
export { autocompleteEmits, autocompleteProps } from './components/autocomplete/src/
|
9
|
+
export { autocompleteEmits, autocompleteProps } from './components/autocomplete/src/autocomplete.mjs';
|
10
10
|
export { ElAutocomplete } from './components/autocomplete/index.mjs';
|
11
11
|
export { avatarEmits, avatarProps } from './components/avatar/src/avatar.mjs';
|
12
12
|
export { ElAvatar } from './components/avatar/index.mjs';
|
@@ -14,7 +14,7 @@ export { backtopEmits, backtopProps } from './components/backtop/src/backtop.mjs
|
|
14
14
|
export { ElBacktop } from './components/backtop/index.mjs';
|
15
15
|
export { badgeProps } from './components/badge/src/badge.mjs';
|
16
16
|
export { ElBadge } from './components/badge/index.mjs';
|
17
|
-
export { breadcrumbProps } from './components/breadcrumb/src/
|
17
|
+
export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb.mjs';
|
18
18
|
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item.mjs';
|
19
19
|
export { breadcrumbKey } from './components/breadcrumb/src/constants.mjs';
|
20
20
|
export { ElBreadcrumb, ElBreadcrumbItem } from './components/breadcrumb/index.mjs';
|
@@ -25,7 +25,7 @@ export { calendarEmits, calendarProps } from './components/calendar/src/calendar
|
|
25
25
|
export { ElCalendar } from './components/calendar/index.mjs';
|
26
26
|
export { cardProps } from './components/card/src/card.mjs';
|
27
27
|
export { ElCard } from './components/card/index.mjs';
|
28
|
-
export { carouselEmits, carouselProps } from './components/carousel/src/
|
28
|
+
export { carouselEmits, carouselProps } from './components/carousel/src/carousel2.mjs';
|
29
29
|
export { carouselItemProps } from './components/carousel/src/carousel-item.mjs';
|
30
30
|
export { CAROUSEL_ITEM_NAME, carouselContextKey } from './components/carousel/src/constants.mjs';
|
31
31
|
export { ElCarousel, ElCarouselItem } from './components/carousel/index.mjs';
|
@@ -34,15 +34,15 @@ export { ElCascader } from './components/cascader/index.mjs';
|
|
34
34
|
export { CASCADER_PANEL_INJECTION_KEY } from './components/cascader-panel/src/types.mjs';
|
35
35
|
export { CommonProps, DefaultProps, useCascaderConfig } from './components/cascader-panel/src/config.mjs';
|
36
36
|
export { ElCascaderPanel } from './components/cascader-panel/index.mjs';
|
37
|
-
export { checkTagEmits, checkTagProps } from './components/check-tag/src/check-
|
37
|
+
export { checkTagEmits, checkTagProps } from './components/check-tag/src/check-tag2.mjs';
|
38
38
|
export { ElCheckTag } from './components/check-tag/index.mjs';
|
39
|
-
export { checkboxGroupEmits, checkboxGroupProps } from './components/checkbox/src/checkbox-
|
39
|
+
export { checkboxGroupEmits, checkboxGroupProps } from './components/checkbox/src/checkbox-group2.mjs';
|
40
40
|
export { checkboxEmits, checkboxProps } from './components/checkbox/src/checkbox.mjs';
|
41
41
|
export { checkboxGroupContextKey } from './components/checkbox/src/constants.mjs';
|
42
42
|
export { ElCheckbox, ElCheckboxButton, ElCheckboxGroup } from './components/checkbox/index.mjs';
|
43
|
-
export { colProps } from './components/col/src/
|
43
|
+
export { colProps } from './components/col/src/col.mjs';
|
44
44
|
export { ElCol } from './components/col/index.mjs';
|
45
|
-
export { collapseEmits, collapseProps, emitChangeFn } from './components/collapse/src/
|
45
|
+
export { collapseEmits, collapseProps, emitChangeFn } from './components/collapse/src/collapse2.mjs';
|
46
46
|
export { collapseItemProps } from './components/collapse/src/collapse-item.mjs';
|
47
47
|
export { collapseContextKey } from './components/collapse/src/constants.mjs';
|
48
48
|
export { ElCollapse, ElCollapseItem } from './components/collapse/index.mjs';
|
@@ -67,7 +67,7 @@ export { useDialog } from './components/dialog/src/use-dialog.mjs';
|
|
67
67
|
export { dialogEmits, dialogProps } from './components/dialog/src/dialog.mjs';
|
68
68
|
export { dialogInjectionKey } from './components/dialog/src/constants.mjs';
|
69
69
|
export { ElDialog } from './components/dialog/index.mjs';
|
70
|
-
export { dividerProps } from './components/divider/src/
|
70
|
+
export { dividerProps } from './components/divider/src/divider.mjs';
|
71
71
|
export { ElDivider } from './components/divider/index.mjs';
|
72
72
|
export { drawerEmits, drawerProps } from './components/drawer/src/drawer.mjs';
|
73
73
|
export { ElDrawer } from './components/drawer/index.mjs';
|
@@ -86,9 +86,9 @@ export { iconProps } from './components/icon/src/icon.mjs';
|
|
86
86
|
export { ElIcon } from './components/icon/index.mjs';
|
87
87
|
export { imageEmits, imageProps } from './components/image/src/image.mjs';
|
88
88
|
export { ElImage } from './components/image/index.mjs';
|
89
|
-
export { imageViewerEmits, imageViewerProps } from './components/image-viewer/src/image-
|
89
|
+
export { imageViewerEmits, imageViewerProps } from './components/image-viewer/src/image-viewer.mjs';
|
90
90
|
export { ElImageViewer } from './components/image-viewer/index.mjs';
|
91
|
-
export { inputEmits, inputProps } from './components/input/src/
|
91
|
+
export { inputEmits, inputProps } from './components/input/src/input.mjs';
|
92
92
|
export { ElInput } from './components/input/index.mjs';
|
93
93
|
export { inputNumberEmits, inputNumberProps } from './components/input-number/src/input-number.mjs';
|
94
94
|
export { ElInputNumber } from './components/input-number/index.mjs';
|
@@ -111,18 +111,18 @@ export { ElPagination } from './components/pagination/index.mjs';
|
|
111
111
|
export { popconfirmEmits, popconfirmProps } from './components/popconfirm/src/popconfirm.mjs';
|
112
112
|
export { ElPopconfirm } from './components/popconfirm/index.mjs';
|
113
113
|
export { Effect, popperProps, roleTypes, usePopperProps } from './components/popper/src/popper.mjs';
|
114
|
-
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/
|
114
|
+
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/trigger.mjs';
|
115
115
|
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './components/popper/src/content.mjs';
|
116
116
|
export { popperArrowProps, usePopperArrowProps } from './components/popper/src/arrow.mjs';
|
117
117
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './components/popper/src/constants.mjs';
|
118
118
|
export { default as ElPopperArrow } from './components/popper/src/arrow2.mjs';
|
119
|
-
export { default as ElPopperTrigger } from './components/popper/src/
|
119
|
+
export { default as ElPopperTrigger } from './components/popper/src/trigger2.mjs';
|
120
120
|
export { default as ElPopperContent } from './components/popper/src/content2.mjs';
|
121
121
|
export { ElPopper } from './components/popper/index.mjs';
|
122
122
|
export { progressProps } from './components/progress/src/progress.mjs';
|
123
123
|
export { ElProgress } from './components/progress/index.mjs';
|
124
124
|
export { radioEmits, radioProps, radioPropsBase } from './components/radio/src/radio.mjs';
|
125
|
-
export { radioGroupEmits, radioGroupProps } from './components/radio/src/radio-
|
125
|
+
export { radioGroupEmits, radioGroupProps } from './components/radio/src/radio-group2.mjs';
|
126
126
|
export { radioButtonProps } from './components/radio/src/radio-button.mjs';
|
127
127
|
export { radioGroupKey } from './components/radio/src/constants.mjs';
|
128
128
|
export { ElRadio, ElRadioButton, ElRadioGroup } from './components/radio/index.mjs';
|
@@ -130,11 +130,11 @@ export { rateEmits, rateProps } from './components/rate/src/rate.mjs';
|
|
130
130
|
export { ElRate } from './components/rate/index.mjs';
|
131
131
|
export { IconComponentMap, IconMap, resultProps } from './components/result/src/result.mjs';
|
132
132
|
export { ElResult } from './components/result/index.mjs';
|
133
|
-
export { RowAlign, RowJustify, rowProps } from './components/row/src/
|
133
|
+
export { RowAlign, RowJustify, rowProps } from './components/row/src/row.mjs';
|
134
134
|
export { rowContextKey } from './components/row/src/constants.mjs';
|
135
135
|
export { ElRow } from './components/row/index.mjs';
|
136
136
|
export { BAR_MAP, GAP, renderThumbStyle } from './components/scrollbar/src/util.mjs';
|
137
|
-
export { scrollbarEmits, scrollbarProps } from './components/scrollbar/src/
|
137
|
+
export { scrollbarEmits, scrollbarProps } from './components/scrollbar/src/scrollbar2.mjs';
|
138
138
|
export { thumbProps } from './components/scrollbar/src/thumb.mjs';
|
139
139
|
export { scrollbarContextKey } from './components/scrollbar/src/constants.mjs';
|
140
140
|
export { ElScrollbar } from './components/scrollbar/index.mjs';
|
@@ -142,8 +142,8 @@ export { selectGroupKey, selectKey } from './components/select/src/token.mjs';
|
|
142
142
|
export { ElOption, ElOptionGroup, ElSelect } from './components/select/index.mjs';
|
143
143
|
export { selectV2InjectionKey } from './components/select-v2/src/token.mjs';
|
144
144
|
export { ElSelectV2 } from './components/select-v2/index.mjs';
|
145
|
-
export { skeletonProps } from './components/skeleton/src/
|
146
|
-
export { skeletonItemProps } from './components/skeleton/src/skeleton-
|
145
|
+
export { skeletonProps } from './components/skeleton/src/skeleton2.mjs';
|
146
|
+
export { skeletonItemProps } from './components/skeleton/src/skeleton-item2.mjs';
|
147
147
|
export { ElSkeleton, ElSkeletonItem } from './components/skeleton/index.mjs';
|
148
148
|
export { sliderEmits, sliderProps } from './components/slider/src/slider.mjs';
|
149
149
|
export { sliderContextKey } from './components/slider/src/constants.mjs';
|
@@ -152,7 +152,7 @@ export { spaceProps } from './components/space/src/space.mjs';
|
|
152
152
|
export { spaceItemProps } from './components/space/src/item.mjs';
|
153
153
|
export { useSpace } from './components/space/src/use-space.mjs';
|
154
154
|
export { ElSpace } from './components/space/index.mjs';
|
155
|
-
export { statisticProps } from './components/statistic/src/
|
155
|
+
export { statisticProps } from './components/statistic/src/statistic2.mjs';
|
156
156
|
export { ElStatistic } from './components/statistic/index.mjs';
|
157
157
|
export { stepProps } from './components/steps/src/item.mjs';
|
158
158
|
export { stepsEmits, stepsProps } from './components/steps/src/steps.mjs';
|
@@ -168,12 +168,12 @@ export { tableV2Props } from './components/table-v2/src/table.mjs';
|
|
168
168
|
export { tableV2RowProps } from './components/table-v2/src/row.mjs';
|
169
169
|
export { ElAutoResizer, ElTableV2 } from './components/table-v2/index.mjs';
|
170
170
|
export { tabsEmits, tabsProps } from './components/tabs/src/tabs.mjs';
|
171
|
-
export { tabBarProps } from './components/tabs/src/tab-
|
171
|
+
export { tabBarProps } from './components/tabs/src/tab-bar2.mjs';
|
172
172
|
export { tabNavEmits, tabNavProps } from './components/tabs/src/tab-nav.mjs';
|
173
|
-
export { tabPaneProps } from './components/tabs/src/tab-
|
173
|
+
export { tabPaneProps } from './components/tabs/src/tab-pane.mjs';
|
174
174
|
export { tabsRootContextKey } from './components/tabs/src/constants.mjs';
|
175
175
|
export { ElTabPane, ElTabs } from './components/tabs/index.mjs';
|
176
|
-
export { tagEmits, tagProps } from './components/tag/src/
|
176
|
+
export { tagEmits, tagProps } from './components/tag/src/tag.mjs';
|
177
177
|
export { ElTag } from './components/tag/index.mjs';
|
178
178
|
export { textProps } from './components/text/src/text.mjs';
|
179
179
|
export { ElText } from './components/text/index.mjs';
|
@@ -208,7 +208,7 @@ export { default as DynamicSizeList } from './components/virtual-list/src/compon
|
|
208
208
|
export { default as FixedSizeGrid } from './components/virtual-list/src/components/fixed-size-grid.mjs';
|
209
209
|
export { default as DynamicSizeGrid } from './components/virtual-list/src/components/dynamic-size-grid.mjs';
|
210
210
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './components/virtual-list/src/props.mjs';
|
211
|
-
export { watermarkProps } from './components/watermark/src/
|
211
|
+
export { watermarkProps } from './components/watermark/src/watermark2.mjs';
|
212
212
|
export { ElWatermark } from './components/watermark/index.mjs';
|
213
213
|
export { tourEmits, tourProps } from './components/tour/src/tour.mjs';
|
214
214
|
export { tourStepEmits, tourStepProps } from './components/tour/src/step.mjs';
|
@@ -216,7 +216,7 @@ export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } fr
|
|
216
216
|
export { ElTour, ElTourStep } from './components/tour/index.mjs';
|
217
217
|
export { anchorEmits, anchorProps } from './components/anchor/src/anchor.mjs';
|
218
218
|
export { ElAnchor, ElAnchorLink } from './components/anchor/index.mjs';
|
219
|
-
export { segmentedEmits, segmentedProps } from './components/segmented/src/
|
219
|
+
export { segmentedEmits, segmentedProps } from './components/segmented/src/segmented.mjs';
|
220
220
|
export { ElSegmented } from './components/segmented/index.mjs';
|
221
221
|
export { mentionEmits, mentionProps } from './components/mention/src/mention.mjs';
|
222
222
|
export { ElMention } from './components/mention/index.mjs';
|
@@ -227,7 +227,7 @@ export { Loading as ElLoadingService } from './components/loading/src/service.mj
|
|
227
227
|
export { messageDefaults, messageEmits, messageProps, messageTypes } from './components/message/src/message.mjs';
|
228
228
|
export { ElMessage } from './components/message/index.mjs';
|
229
229
|
export { ElMessageBox } from './components/message-box/index.mjs';
|
230
|
-
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/
|
230
|
+
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/notification.mjs';
|
231
231
|
export { ElNotification } from './components/notification/index.mjs';
|
232
232
|
export { popoverEmits, popoverProps } from './components/popover/src/popover.mjs';
|
233
233
|
export { ElPopover, ElPopoverDirective } from './components/popover/index.mjs';
|