@element-plus/nightly 0.0.20250202 → 0.0.20250205
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.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -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 +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- 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/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.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/anchor/index.mjs +1 -1
- package/es/components/anchor/src/anchor-link.mjs +5 -81
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +81 -5
- 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 +367 -79
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +79 -367
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +32 -71
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +71 -32
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +16 -134
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +134 -16
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +22 -79
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +79 -22
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +49 -426
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +426 -49
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +18 -18
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +60 -349
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +349 -60
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +65 -215
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +215 -65
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +142 -68
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +68 -142
- 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/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 +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +36 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -36
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group2.mjs +1 -1
- package/es/components/radio/src/radio.mjs +73 -32
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +32 -73
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- 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/index.mjs +1 -1
- package/es/components/select/src/select.mjs +113 -429
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +429 -113
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/slider/index.mjs +2 -2
- package/es/components/slider/src/slider.mjs +238 -88
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +88 -238
- package/es/components/slider/src/slider2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +228 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -228
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +54 -131
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +131 -54
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +2 -2
- package/es/components/tooltip/src/trigger.mjs +14 -72
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +72 -14
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/arrow.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tour/index.mjs +1 -1
- package/es/components/tour/src/content.mjs +67 -43
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +43 -67
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +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 +18 -18
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +1 -1
- package/lib/components/anchor/src/anchor-link.js +5 -81
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +81 -5
- 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 +366 -79
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +79 -366
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +32 -71
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +71 -32
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +17 -134
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +134 -17
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +23 -79
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +79 -23
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +50 -426
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +426 -50
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +18 -18
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +59 -347
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +347 -59
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +65 -214
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +214 -65
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +141 -69
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +69 -141
- 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/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 +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +36 -8
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +8 -36
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group2.js +1 -1
- package/lib/components/radio/src/radio.js +73 -34
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +34 -73
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- 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/index.js +1 -1
- package/lib/components/select/src/select.js +113 -429
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select2.js +429 -113
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/slider/index.js +2 -2
- package/lib/components/slider/src/slider.js +238 -89
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +89 -238
- package/lib/components/slider/src/slider2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +227 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -227
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +54 -136
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +136 -54
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +2 -2
- package/lib/components/tooltip/src/trigger.js +14 -72
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +72 -14
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/arrow.js +22 -37
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +37 -22
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tour/index.js +1 -1
- package/lib/components/tour/src/content.js +67 -46
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +46 -67
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +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 +18 -18
- 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/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countdown.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.
|
|
1
|
+
{"version":3,"file":"countdown.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Countdown from './countdown.vue'\n\nexport const countdownProps = buildProps({\n /**\n * @description Formatting the countdown display\n */\n format: {\n type: String,\n default: 'HH:mm:ss',\n },\n /**\n * @description Sets the prefix of a countdown\n */\n prefix: String,\n /**\n * @description Sets the suffix of a countdown\n */\n suffix: String,\n /**\n * @description countdown titles\n */\n title: String,\n /**\n * @description target time\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Styles countdown values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type CountdownProps = ExtractPropTypes<typeof countdownProps>\n\nexport const countdownEmits = {\n finish: () => true,\n [CHANGE_EVENT]: (value: number) => isNumber(value),\n}\nexport type CountdownEmits = typeof countdownEmits\n\nexport type CountdownInstance = InstanceType<typeof Countdown>\n"],"names":[],"mappings":";;;;AAEY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC5C;;;;"}
|
|
@@ -1,27 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, watch, onBeforeUnmount, openBlock, createBlock, unref, createSlots, renderList, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { ElStatistic } from '../../statistic/index.mjs';
|
|
3
|
+
import { countdownProps, countdownEmits } from './countdown.mjs';
|
|
4
|
+
import { formatTime, getTime } from './utils.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { rAF, cAF } from '../../../utils/raf.mjs';
|
|
4
7
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
const __default__ = defineComponent({
|
|
9
|
+
name: "ElCountdown"
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: countdownProps,
|
|
14
|
+
emits: countdownEmits,
|
|
15
|
+
setup(__props, { expose, emit }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
let timer;
|
|
18
|
+
const rawValue = ref(0);
|
|
19
|
+
const displayValue = computed(() => formatTime(rawValue.value, props.format));
|
|
20
|
+
const formatter = (val) => formatTime(val, props.format);
|
|
21
|
+
const stopTimer = () => {
|
|
22
|
+
if (timer) {
|
|
23
|
+
cAF(timer);
|
|
24
|
+
timer = void 0;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const startTimer = () => {
|
|
28
|
+
const timestamp = getTime(props.value);
|
|
29
|
+
const frameFunc = () => {
|
|
30
|
+
let diff = timestamp - Date.now();
|
|
31
|
+
emit("change", diff);
|
|
32
|
+
if (diff <= 0) {
|
|
33
|
+
diff = 0;
|
|
34
|
+
stopTimer();
|
|
35
|
+
emit("finish");
|
|
36
|
+
} else {
|
|
37
|
+
timer = rAF(frameFunc);
|
|
38
|
+
}
|
|
39
|
+
rawValue.value = diff;
|
|
40
|
+
};
|
|
41
|
+
timer = rAF(frameFunc);
|
|
42
|
+
};
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
rawValue.value = getTime(props.value) - Date.now();
|
|
45
|
+
watch(() => [props.value, props.format], () => {
|
|
46
|
+
stopTimer();
|
|
47
|
+
startTimer();
|
|
48
|
+
}, {
|
|
49
|
+
immediate: true
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
onBeforeUnmount(() => {
|
|
53
|
+
stopTimer();
|
|
54
|
+
});
|
|
55
|
+
expose({
|
|
56
|
+
displayValue
|
|
57
|
+
});
|
|
58
|
+
return (_ctx, _cache) => {
|
|
59
|
+
return openBlock(), createBlock(unref(ElStatistic), {
|
|
60
|
+
value: rawValue.value,
|
|
61
|
+
title: _ctx.title,
|
|
62
|
+
prefix: _ctx.prefix,
|
|
63
|
+
suffix: _ctx.suffix,
|
|
64
|
+
"value-style": _ctx.valueStyle,
|
|
65
|
+
formatter
|
|
66
|
+
}, createSlots({
|
|
67
|
+
_: 2
|
|
68
|
+
}, [
|
|
69
|
+
renderList(_ctx.$slots, (_, name) => {
|
|
70
|
+
return {
|
|
71
|
+
name,
|
|
72
|
+
fn: withCtx(() => [
|
|
73
|
+
renderSlot(_ctx.$slots, name)
|
|
74
|
+
])
|
|
75
|
+
};
|
|
76
|
+
})
|
|
77
|
+
]), 1032, ["value", "title", "prefix", "suffix", "value-style"]);
|
|
78
|
+
};
|
|
19
79
|
}
|
|
20
80
|
});
|
|
21
|
-
|
|
22
|
-
finish: () => true,
|
|
23
|
-
[CHANGE_EVENT]: (value) => isNumber(value)
|
|
24
|
-
};
|
|
81
|
+
var Countdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "countdown.vue"]]);
|
|
25
82
|
|
|
26
|
-
export {
|
|
83
|
+
export { Countdown as default };
|
|
27
84
|
//# sourceMappingURL=countdown2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countdown2.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.
|
|
1
|
+
{"version":3,"file":"countdown2.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.vue"],"sourcesContent":["<template>\n <el-statistic\n :value=\"rawValue\"\n :title=\"title\"\n :prefix=\"prefix\"\n :suffix=\"suffix\"\n :value-style=\"valueStyle\"\n :formatter=\"formatter\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]>\n <slot :name=\"name\" />\n </template>\n </el-statistic>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport { ElStatistic } from '@element-plus/components/statistic'\nimport { cAF, rAF } from '@element-plus/utils'\nimport { countdownEmits, countdownProps } from './countdown'\nimport { formatTime, getTime } from './utils'\n\ndefineOptions({\n name: 'ElCountdown',\n})\n\nconst props = defineProps(countdownProps)\nconst emit = defineEmits(countdownEmits)\n\nlet timer: ReturnType<typeof rAF> | undefined\nconst rawValue = ref<number>(0)\nconst displayValue = computed(() => formatTime(rawValue.value, props.format))\n\nconst formatter = (val: number) => formatTime(val, props.format)\n\nconst stopTimer = () => {\n if (timer) {\n cAF(timer)\n timer = undefined\n }\n}\n\nconst startTimer = () => {\n const timestamp = getTime(props.value)\n const frameFunc = () => {\n let diff = timestamp - Date.now()\n emit('change', diff)\n if (diff <= 0) {\n diff = 0\n stopTimer()\n emit('finish')\n } else {\n timer = rAF(frameFunc)\n }\n rawValue.value = diff\n }\n timer = rAF(frameFunc)\n}\n\nonMounted(() => {\n rawValue.value = getTime(props.value) - Date.now()\n\n watch(\n () => [props.value, props.format],\n () => {\n stopTimer()\n startTimer()\n },\n {\n immediate: true,\n }\n )\n})\n\nonBeforeUnmount(() => {\n stopTimer()\n})\n\ndefineExpose({\n /**\n * @description current display value\n */\n displayValue,\n})\n</script>\n"],"names":["_openBlock","_createBlock","_unref"],"mappings":";;;;;;;mCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAI,IAAA,KAAA,CAAA;AACJ,IAAM,MAAA,QAAA,GAAW,IAAY,CAAC,CAAA,CAAA;AAC9B,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM,UAAA,CAAW,SAAS,KAAO,EAAA,KAAA,CAAM,MAAM,CAAC,CAAA,CAAA;AAE5E,IAAA,MAAM,YAAY,CAAC,GAAA,KAAgB,UAAW,CAAA,GAAA,EAAK,MAAM,MAAM,CAAA,CAAA;AAE/D,IAAA,MAAM,YAAY,MAAM;AACtB,MAAA,IAAI,KAAO,EAAA;AACT,QAAA,GAAA,CAAI,KAAK,CAAA,CAAA;AACT,QAAQ,KAAA,GAAA,KAAA,CAAA,CAAA;AAAA,OACV;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,aAAa,MAAM;AACvB,MAAM,MAAA,SAAA,GAAY,OAAQ,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AACrC,MAAA,MAAM,YAAY,MAAM;AACtB,QAAI,IAAA,IAAA,GAAO,SAAY,GAAA,IAAA,CAAK,GAAI,EAAA,CAAA;AAChC,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,IAAI,QAAQ,CAAG,EAAA;AACb,UAAO,IAAA,GAAA,CAAA,CAAA;AACP,UAAU,SAAA,EAAA,CAAA;AACV,UAAA,IAAA,CAAK,QAAQ,CAAA,CAAA;AAAA,SACR,MAAA;AACL,UAAA,KAAA,GAAQ,IAAI,SAAS,CAAA,CAAA;AAAA,SACvB;AACA,QAAA,QAAA,CAAS,KAAQ,GAAA,IAAA,CAAA;AAAA,OACnB,CAAA;AACA,MAAA,KAAA,GAAQ,IAAI,SAAS,CAAA,CAAA;AAAA,KACvB,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,QAAA,CAAS,QAAQ,OAAQ,CAAA,KAAA,CAAM,KAAK,CAAA,GAAI,KAAK,GAAI,EAAA,CAAA;AAEjD,MAAA,KAAA,CAAA,MAAA,CAAA,KAAA,CAAA,KAAA,EAAA,KAAA,CAAA,MAAA,CAAA,EAAA,MAAA;AAAA,QACE,SAAa,EAAA,CAAA;AAAmB,QAChC,UAAM,EAAA,CAAA;AACJ,OAAU,EAAA;AACV,QAAW,SAAA,EAAA,IAAA;AAAA,OACb,CAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAAA,IAAA,eACa,CAAA,MAAA;AAAA,MACb,SAAA,EAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAAA,IACF,MAAC,CAAA;AAED,MAAA,YAAA;AACE,KAAU,CAAA,CAAA;AAAA,IACZ,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;AAED,MAAa,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAAAC,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,QAAA,KAAA,EAAA,QAAA,CAAA,KAAA;AAAA,QAAA,KAAA,EAAA,IAAA,CAAA,KAAA;AAAA,QAAA,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,QAIX,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,QACD,aAAA,EAAA,IAAA,CAAA,UAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useTooltipTriggerProps } from '../../tooltip/src/
|
|
1
|
+
import { useTooltipTriggerProps } from '../../tooltip/src/trigger.mjs';
|
|
2
2
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
3
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
4
4
|
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ImageViewer from './src/image-
|
|
2
|
-
export { imageViewerEmits, imageViewerProps } from './src/image-
|
|
1
|
+
import ImageViewer from './src/image-viewer2.mjs';
|
|
2
|
+
export { imageViewerEmits, imageViewerProps } from './src/image-viewer.mjs';
|
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
4
4
|
|
|
5
5
|
const ElImageViewer = withInstall(ImageViewer);
|
|
@@ -1,431 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
|
5
|
-
import { ElTeleport } from '../../teleport/index.mjs';
|
|
6
|
-
import { ElIcon } from '../../icon/index.mjs';
|
|
7
|
-
import { FullScreen, ScaleToOriginal, Close, ArrowLeft, ArrowRight, ZoomOut, ZoomIn, RefreshLeft, RefreshRight } from '@element-plus/icons-vue';
|
|
8
|
-
import { imageViewerProps, imageViewerEmits } from './image-viewer2.mjs';
|
|
9
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
11
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
-
import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
|
|
13
|
-
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
14
|
-
import { keysOf } from '../../../utils/objects.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';
|
|
15
4
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
const isFirst = computed(() => activeIndex.value === 0);
|
|
58
|
-
const isLast = computed(() => activeIndex.value === props.urlList.length - 1);
|
|
59
|
-
const currentImg = computed(() => props.urlList[activeIndex.value]);
|
|
60
|
-
const arrowPrevKls = computed(() => [
|
|
61
|
-
ns.e("btn"),
|
|
62
|
-
ns.e("prev"),
|
|
63
|
-
ns.is("disabled", !props.infinite && isFirst.value)
|
|
64
|
-
]);
|
|
65
|
-
const arrowNextKls = computed(() => [
|
|
66
|
-
ns.e("btn"),
|
|
67
|
-
ns.e("next"),
|
|
68
|
-
ns.is("disabled", !props.infinite && isLast.value)
|
|
69
|
-
]);
|
|
70
|
-
const imgStyle = computed(() => {
|
|
71
|
-
const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;
|
|
72
|
-
let translateX = offsetX / scale;
|
|
73
|
-
let translateY = offsetY / scale;
|
|
74
|
-
const radian = deg * Math.PI / 180;
|
|
75
|
-
const cosRadian = Math.cos(radian);
|
|
76
|
-
const sinRadian = Math.sin(radian);
|
|
77
|
-
translateX = translateX * cosRadian + translateY * sinRadian;
|
|
78
|
-
translateY = translateY * cosRadian - offsetX / scale * sinRadian;
|
|
79
|
-
const style = {
|
|
80
|
-
transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
|
|
81
|
-
transition: enableTransition ? "transform .3s" : ""
|
|
82
|
-
};
|
|
83
|
-
if (mode.value.name === modes.CONTAIN.name) {
|
|
84
|
-
style.maxWidth = style.maxHeight = "100%";
|
|
85
|
-
}
|
|
86
|
-
return style;
|
|
87
|
-
});
|
|
88
|
-
const progress = computed(() => `${activeIndex.value + 1} / ${props.urlList.length}`);
|
|
89
|
-
function hide() {
|
|
90
|
-
unregisterEventListener();
|
|
91
|
-
emit("close");
|
|
92
|
-
}
|
|
93
|
-
function registerEventListener() {
|
|
94
|
-
const keydownHandler = throttle((e) => {
|
|
95
|
-
switch (e.code) {
|
|
96
|
-
case EVENT_CODE.esc:
|
|
97
|
-
props.closeOnPressEscape && hide();
|
|
98
|
-
break;
|
|
99
|
-
case EVENT_CODE.space:
|
|
100
|
-
toggleMode();
|
|
101
|
-
break;
|
|
102
|
-
case EVENT_CODE.left:
|
|
103
|
-
prev();
|
|
104
|
-
break;
|
|
105
|
-
case EVENT_CODE.up:
|
|
106
|
-
handleActions("zoomIn");
|
|
107
|
-
break;
|
|
108
|
-
case EVENT_CODE.right:
|
|
109
|
-
next();
|
|
110
|
-
break;
|
|
111
|
-
case EVENT_CODE.down:
|
|
112
|
-
handleActions("zoomOut");
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
const mousewheelHandler = throttle((e) => {
|
|
117
|
-
const delta = e.deltaY || e.deltaX;
|
|
118
|
-
handleActions(delta < 0 ? "zoomIn" : "zoomOut", {
|
|
119
|
-
zoomRate: props.zoomRate,
|
|
120
|
-
enableTransition: false
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
scopeEventListener.run(() => {
|
|
124
|
-
useEventListener(document, "keydown", keydownHandler);
|
|
125
|
-
useEventListener(document, "wheel", mousewheelHandler);
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function unregisterEventListener() {
|
|
129
|
-
scopeEventListener.stop();
|
|
130
|
-
}
|
|
131
|
-
function handleImgLoad() {
|
|
132
|
-
loading.value = false;
|
|
133
|
-
}
|
|
134
|
-
function handleImgError(e) {
|
|
135
|
-
loading.value = false;
|
|
136
|
-
e.target.alt = t("el.image.error");
|
|
137
|
-
}
|
|
138
|
-
function handleMouseDown(e) {
|
|
139
|
-
if (loading.value || e.button !== 0 || !wrapper.value)
|
|
140
|
-
return;
|
|
141
|
-
transform.value.enableTransition = false;
|
|
142
|
-
const { offsetX, offsetY } = transform.value;
|
|
143
|
-
const startX = e.pageX;
|
|
144
|
-
const startY = e.pageY;
|
|
145
|
-
const dragHandler = throttle((ev) => {
|
|
146
|
-
transform.value = {
|
|
147
|
-
...transform.value,
|
|
148
|
-
offsetX: offsetX + ev.pageX - startX,
|
|
149
|
-
offsetY: offsetY + ev.pageY - startY
|
|
150
|
-
};
|
|
151
|
-
});
|
|
152
|
-
const removeMousemove = useEventListener(document, "mousemove", dragHandler);
|
|
153
|
-
useEventListener(document, "mouseup", () => {
|
|
154
|
-
removeMousemove();
|
|
155
|
-
});
|
|
156
|
-
e.preventDefault();
|
|
157
|
-
}
|
|
158
|
-
function reset() {
|
|
159
|
-
transform.value = {
|
|
160
|
-
scale: 1,
|
|
161
|
-
deg: 0,
|
|
162
|
-
offsetX: 0,
|
|
163
|
-
offsetY: 0,
|
|
164
|
-
enableTransition: false
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
function toggleMode() {
|
|
168
|
-
if (loading.value)
|
|
169
|
-
return;
|
|
170
|
-
const modeNames = keysOf(modes);
|
|
171
|
-
const modeValues = Object.values(modes);
|
|
172
|
-
const currentMode = mode.value.name;
|
|
173
|
-
const index = modeValues.findIndex((i) => i.name === currentMode);
|
|
174
|
-
const nextIndex = (index + 1) % modeNames.length;
|
|
175
|
-
mode.value = modes[modeNames[nextIndex]];
|
|
176
|
-
reset();
|
|
177
|
-
}
|
|
178
|
-
function setActiveItem(index) {
|
|
179
|
-
const len = props.urlList.length;
|
|
180
|
-
activeIndex.value = (index + len) % len;
|
|
181
|
-
}
|
|
182
|
-
function prev() {
|
|
183
|
-
if (isFirst.value && !props.infinite)
|
|
184
|
-
return;
|
|
185
|
-
setActiveItem(activeIndex.value - 1);
|
|
186
|
-
}
|
|
187
|
-
function next() {
|
|
188
|
-
if (isLast.value && !props.infinite)
|
|
189
|
-
return;
|
|
190
|
-
setActiveItem(activeIndex.value + 1);
|
|
191
|
-
}
|
|
192
|
-
function handleActions(action, options = {}) {
|
|
193
|
-
if (loading.value)
|
|
194
|
-
return;
|
|
195
|
-
const { minScale, maxScale } = props;
|
|
196
|
-
const { zoomRate, rotateDeg, enableTransition } = {
|
|
197
|
-
zoomRate: props.zoomRate,
|
|
198
|
-
rotateDeg: 90,
|
|
199
|
-
enableTransition: true,
|
|
200
|
-
...options
|
|
201
|
-
};
|
|
202
|
-
switch (action) {
|
|
203
|
-
case "zoomOut":
|
|
204
|
-
if (transform.value.scale > minScale) {
|
|
205
|
-
transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
|
|
206
|
-
}
|
|
207
|
-
break;
|
|
208
|
-
case "zoomIn":
|
|
209
|
-
if (transform.value.scale < maxScale) {
|
|
210
|
-
transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
|
|
211
|
-
}
|
|
212
|
-
break;
|
|
213
|
-
case "clockwise":
|
|
214
|
-
transform.value.deg += rotateDeg;
|
|
215
|
-
emit("rotate", transform.value.deg);
|
|
216
|
-
break;
|
|
217
|
-
case "anticlockwise":
|
|
218
|
-
transform.value.deg -= rotateDeg;
|
|
219
|
-
emit("rotate", transform.value.deg);
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
transform.value.enableTransition = enableTransition;
|
|
223
|
-
}
|
|
224
|
-
function onFocusoutPrevented(event) {
|
|
225
|
-
var _a2;
|
|
226
|
-
if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) === "pointer") {
|
|
227
|
-
event.preventDefault();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
function onCloseRequested() {
|
|
231
|
-
if (props.closeOnPressEscape) {
|
|
232
|
-
hide();
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
watch(currentImg, () => {
|
|
236
|
-
nextTick(() => {
|
|
237
|
-
const $img = imgRefs.value[0];
|
|
238
|
-
if (!($img == null ? void 0 : $img.complete)) {
|
|
239
|
-
loading.value = true;
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
watch(activeIndex, (val) => {
|
|
244
|
-
reset();
|
|
245
|
-
emit("switch", val);
|
|
246
|
-
});
|
|
247
|
-
onMounted(() => {
|
|
248
|
-
registerEventListener();
|
|
249
|
-
});
|
|
250
|
-
expose({
|
|
251
|
-
setActiveItem
|
|
252
|
-
});
|
|
253
|
-
return (_ctx, _cache) => {
|
|
254
|
-
return openBlock(), createBlock(unref(ElTeleport), {
|
|
255
|
-
to: "body",
|
|
256
|
-
disabled: !_ctx.teleported
|
|
257
|
-
}, {
|
|
258
|
-
default: withCtx(() => [
|
|
259
|
-
createVNode(Transition, {
|
|
260
|
-
name: "viewer-fade",
|
|
261
|
-
appear: ""
|
|
262
|
-
}, {
|
|
263
|
-
default: withCtx(() => [
|
|
264
|
-
createElementVNode("div", {
|
|
265
|
-
ref_key: "wrapper",
|
|
266
|
-
ref: wrapper,
|
|
267
|
-
tabindex: -1,
|
|
268
|
-
class: normalizeClass(unref(ns).e("wrapper")),
|
|
269
|
-
style: normalizeStyle({ zIndex: zIndex.value })
|
|
270
|
-
}, [
|
|
271
|
-
createVNode(unref(ElFocusTrap), {
|
|
272
|
-
loop: "",
|
|
273
|
-
trapped: "",
|
|
274
|
-
"focus-trap-el": wrapper.value,
|
|
275
|
-
"focus-start-el": "container",
|
|
276
|
-
onFocusoutPrevented,
|
|
277
|
-
onReleaseRequested: onCloseRequested
|
|
278
|
-
}, {
|
|
279
|
-
default: withCtx(() => [
|
|
280
|
-
createElementVNode("div", {
|
|
281
|
-
class: normalizeClass(unref(ns).e("mask")),
|
|
282
|
-
onClick: withModifiers(($event) => _ctx.hideOnClickModal && hide(), ["self"])
|
|
283
|
-
}, null, 10, ["onClick"]),
|
|
284
|
-
createCommentVNode(" CLOSE "),
|
|
285
|
-
createElementVNode("span", {
|
|
286
|
-
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
|
|
287
|
-
onClick: hide
|
|
288
|
-
}, [
|
|
289
|
-
createVNode(unref(ElIcon), null, {
|
|
290
|
-
default: withCtx(() => [
|
|
291
|
-
createVNode(unref(Close))
|
|
292
|
-
]),
|
|
293
|
-
_: 1
|
|
294
|
-
})
|
|
295
|
-
], 2),
|
|
296
|
-
createCommentVNode(" ARROW "),
|
|
297
|
-
!unref(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
298
|
-
createElementVNode("span", {
|
|
299
|
-
class: normalizeClass(unref(arrowPrevKls)),
|
|
300
|
-
onClick: prev
|
|
301
|
-
}, [
|
|
302
|
-
createVNode(unref(ElIcon), null, {
|
|
303
|
-
default: withCtx(() => [
|
|
304
|
-
createVNode(unref(ArrowLeft))
|
|
305
|
-
]),
|
|
306
|
-
_: 1
|
|
307
|
-
})
|
|
308
|
-
], 2),
|
|
309
|
-
createElementVNode("span", {
|
|
310
|
-
class: normalizeClass(unref(arrowNextKls)),
|
|
311
|
-
onClick: next
|
|
312
|
-
}, [
|
|
313
|
-
createVNode(unref(ElIcon), null, {
|
|
314
|
-
default: withCtx(() => [
|
|
315
|
-
createVNode(unref(ArrowRight))
|
|
316
|
-
]),
|
|
317
|
-
_: 1
|
|
318
|
-
})
|
|
319
|
-
], 2)
|
|
320
|
-
], 64)) : createCommentVNode("v-if", true),
|
|
321
|
-
_ctx.showProgress ? (openBlock(), createElementBlock("div", {
|
|
322
|
-
key: 1,
|
|
323
|
-
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")])
|
|
324
|
-
}, [
|
|
325
|
-
renderSlot(_ctx.$slots, "progress", {
|
|
326
|
-
activeIndex: activeIndex.value,
|
|
327
|
-
total: _ctx.urlList.length
|
|
328
|
-
}, () => [
|
|
329
|
-
createTextVNode(toDisplayString(unref(progress)), 1)
|
|
330
|
-
])
|
|
331
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
332
|
-
createCommentVNode(" ACTIONS "),
|
|
333
|
-
createElementVNode("div", {
|
|
334
|
-
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")])
|
|
335
|
-
}, [
|
|
336
|
-
createElementVNode("div", {
|
|
337
|
-
class: normalizeClass(unref(ns).e("actions__inner"))
|
|
338
|
-
}, [
|
|
339
|
-
renderSlot(_ctx.$slots, "toolbar", {
|
|
340
|
-
actions: handleActions,
|
|
341
|
-
prev,
|
|
342
|
-
next,
|
|
343
|
-
reset: toggleMode,
|
|
344
|
-
activeIndex: activeIndex.value
|
|
345
|
-
}, () => [
|
|
346
|
-
createVNode(unref(ElIcon), {
|
|
347
|
-
onClick: ($event) => handleActions("zoomOut")
|
|
348
|
-
}, {
|
|
349
|
-
default: withCtx(() => [
|
|
350
|
-
createVNode(unref(ZoomOut))
|
|
351
|
-
]),
|
|
352
|
-
_: 1
|
|
353
|
-
}, 8, ["onClick"]),
|
|
354
|
-
createVNode(unref(ElIcon), {
|
|
355
|
-
onClick: ($event) => handleActions("zoomIn")
|
|
356
|
-
}, {
|
|
357
|
-
default: withCtx(() => [
|
|
358
|
-
createVNode(unref(ZoomIn))
|
|
359
|
-
]),
|
|
360
|
-
_: 1
|
|
361
|
-
}, 8, ["onClick"]),
|
|
362
|
-
createElementVNode("i", {
|
|
363
|
-
class: normalizeClass(unref(ns).e("actions__divider"))
|
|
364
|
-
}, null, 2),
|
|
365
|
-
createVNode(unref(ElIcon), { onClick: toggleMode }, {
|
|
366
|
-
default: withCtx(() => [
|
|
367
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(mode).icon)))
|
|
368
|
-
]),
|
|
369
|
-
_: 1
|
|
370
|
-
}),
|
|
371
|
-
createElementVNode("i", {
|
|
372
|
-
class: normalizeClass(unref(ns).e("actions__divider"))
|
|
373
|
-
}, null, 2),
|
|
374
|
-
createVNode(unref(ElIcon), {
|
|
375
|
-
onClick: ($event) => handleActions("anticlockwise")
|
|
376
|
-
}, {
|
|
377
|
-
default: withCtx(() => [
|
|
378
|
-
createVNode(unref(RefreshLeft))
|
|
379
|
-
]),
|
|
380
|
-
_: 1
|
|
381
|
-
}, 8, ["onClick"]),
|
|
382
|
-
createVNode(unref(ElIcon), {
|
|
383
|
-
onClick: ($event) => handleActions("clockwise")
|
|
384
|
-
}, {
|
|
385
|
-
default: withCtx(() => [
|
|
386
|
-
createVNode(unref(RefreshRight))
|
|
387
|
-
]),
|
|
388
|
-
_: 1
|
|
389
|
-
}, 8, ["onClick"])
|
|
390
|
-
])
|
|
391
|
-
], 2)
|
|
392
|
-
], 2),
|
|
393
|
-
createCommentVNode(" CANVAS "),
|
|
394
|
-
createElementVNode("div", {
|
|
395
|
-
class: normalizeClass(unref(ns).e("canvas"))
|
|
396
|
-
}, [
|
|
397
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.urlList, (url, i) => {
|
|
398
|
-
return withDirectives((openBlock(), createElementBlock("img", {
|
|
399
|
-
ref_for: true,
|
|
400
|
-
ref: (el) => imgRefs.value[i] = el,
|
|
401
|
-
key: url,
|
|
402
|
-
src: url,
|
|
403
|
-
style: normalizeStyle(unref(imgStyle)),
|
|
404
|
-
class: normalizeClass(unref(ns).e("img")),
|
|
405
|
-
crossorigin: _ctx.crossorigin,
|
|
406
|
-
onLoad: handleImgLoad,
|
|
407
|
-
onError: handleImgError,
|
|
408
|
-
onMousedown: handleMouseDown
|
|
409
|
-
}, null, 46, ["src", "crossorigin"])), [
|
|
410
|
-
[vShow, i === activeIndex.value]
|
|
411
|
-
]);
|
|
412
|
-
}), 128))
|
|
413
|
-
], 2),
|
|
414
|
-
renderSlot(_ctx.$slots, "default")
|
|
415
|
-
]),
|
|
416
|
-
_: 3
|
|
417
|
-
}, 8, ["focus-trap-el"])
|
|
418
|
-
], 6)
|
|
419
|
-
]),
|
|
420
|
-
_: 3
|
|
421
|
-
})
|
|
422
|
-
]),
|
|
423
|
-
_: 3
|
|
424
|
-
}, 8, ["disabled"]);
|
|
425
|
-
};
|
|
5
|
+
const imageViewerProps = buildProps({
|
|
6
|
+
urlList: {
|
|
7
|
+
type: definePropType(Array),
|
|
8
|
+
default: () => mutable([])
|
|
9
|
+
},
|
|
10
|
+
zIndex: {
|
|
11
|
+
type: Number
|
|
12
|
+
},
|
|
13
|
+
initialIndex: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
infinite: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true
|
|
20
|
+
},
|
|
21
|
+
hideOnClickModal: Boolean,
|
|
22
|
+
teleported: Boolean,
|
|
23
|
+
closeOnPressEscape: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
26
|
+
},
|
|
27
|
+
zoomRate: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 1.2
|
|
30
|
+
},
|
|
31
|
+
minScale: {
|
|
32
|
+
type: Number,
|
|
33
|
+
default: 0.2
|
|
34
|
+
},
|
|
35
|
+
maxScale: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: 7
|
|
38
|
+
},
|
|
39
|
+
showProgress: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
crossorigin: {
|
|
44
|
+
type: definePropType(String)
|
|
426
45
|
}
|
|
427
46
|
});
|
|
428
|
-
|
|
47
|
+
const imageViewerEmits = {
|
|
48
|
+
close: () => true,
|
|
49
|
+
switch: (index) => isNumber(index),
|
|
50
|
+
rotate: (deg) => isNumber(deg)
|
|
51
|
+
};
|
|
429
52
|
|
|
430
|
-
export {
|
|
53
|
+
export { imageViewerEmits, imageViewerProps };
|
|
431
54
|
//# sourceMappingURL=image-viewer.mjs.map
|