@element-plus/nightly 0.0.20250403 → 0.0.20250404
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.css +1 -1
- package/dist/index.full.js +16 -6
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +16 -6
- 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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.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/index.mjs +16 -16
- package/es/packages/components/anchor/index.mjs +1 -1
- package/es/packages/components/anchor/src/anchor-link.mjs +81 -5
- package/es/packages/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/packages/components/anchor/src/anchor-link2.mjs +5 -81
- package/es/packages/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/packages/components/backtop/index.mjs +2 -2
- package/es/packages/components/backtop/src/backtop.mjs +53 -21
- package/es/packages/components/backtop/src/backtop.mjs.map +1 -1
- package/es/packages/components/backtop/src/backtop2.mjs +21 -53
- package/es/packages/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/packages/components/card/index.mjs +2 -2
- package/es/packages/components/card/src/card.mjs +42 -20
- package/es/packages/components/card/src/card.mjs.map +1 -1
- package/es/packages/components/card/src/card2.mjs +20 -42
- package/es/packages/components/card/src/card2.mjs.map +1 -1
- package/es/packages/components/check-tag/index.mjs +2 -2
- package/es/packages/components/check-tag/src/check-tag.mjs +14 -38
- package/es/packages/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/packages/components/check-tag/src/check-tag2.mjs +38 -14
- package/es/packages/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/packages/components/col/index.mjs +2 -2
- package/es/packages/components/col/src/col.mjs +64 -43
- package/es/packages/components/col/src/col.mjs.map +1 -1
- package/es/packages/components/col/src/col2.mjs +43 -64
- package/es/packages/components/col/src/col2.mjs.map +1 -1
- package/es/packages/components/color-picker/index.mjs +2 -2
- package/es/packages/components/color-picker/src/color-picker.mjs +401 -39
- package/es/packages/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/packages/components/color-picker/src/color-picker2.mjs +39 -401
- package/es/packages/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/packages/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/packages/components/index.mjs +16 -16
- package/es/packages/components/input/index.mjs +2 -2
- package/es/packages/components/input/src/input.mjs +437 -103
- package/es/packages/components/input/src/input.mjs.map +1 -1
- package/es/packages/components/input/src/input2.mjs +103 -437
- package/es/packages/components/input/src/input2.mjs.map +1 -1
- package/es/packages/components/link/index.mjs +2 -2
- package/es/packages/components/link/src/link.mjs +49 -24
- package/es/packages/components/link/src/link.mjs.map +1 -1
- package/es/packages/components/link/src/link2.mjs +24 -49
- package/es/packages/components/link/src/link2.mjs.map +1 -1
- package/es/packages/components/mention/src/mention.mjs +1 -1
- package/es/packages/components/mention/src/mention2.mjs +1 -1
- package/es/packages/components/message/src/message2.mjs +12 -3
- package/es/packages/components/message/src/message2.mjs.map +1 -1
- package/es/packages/components/message/src/method.mjs +3 -2
- package/es/packages/components/message/src/method.mjs.map +1 -1
- package/es/packages/components/pagination/src/components/sizes.mjs +71 -23
- package/es/packages/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/packages/components/pagination/src/components/sizes2.mjs +23 -71
- package/es/packages/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/packages/components/pagination/src/pagination.mjs +1 -1
- package/es/packages/components/popconfirm/index.mjs +2 -2
- package/es/packages/components/popconfirm/src/popconfirm.mjs +114 -45
- package/es/packages/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/packages/components/popconfirm/src/popconfirm2.mjs +45 -114
- package/es/packages/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/packages/components/popper/index.mjs +2 -2
- package/es/packages/components/popper/src/arrow.mjs +36 -7
- package/es/packages/components/popper/src/arrow.mjs.map +1 -1
- package/es/packages/components/popper/src/arrow2.mjs +7 -36
- package/es/packages/components/popper/src/arrow2.mjs.map +1 -1
- package/es/packages/components/rate/index.mjs +2 -2
- package/es/packages/components/rate/src/rate.mjs +258 -83
- package/es/packages/components/rate/src/rate.mjs.map +1 -1
- package/es/packages/components/rate/src/rate2.mjs +83 -258
- package/es/packages/components/rate/src/rate2.mjs.map +1 -1
- package/es/packages/components/scrollbar/src/bar.mjs +10 -64
- package/es/packages/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/packages/components/scrollbar/src/bar2.mjs +64 -10
- package/es/packages/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/packages/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/packages/components/skeleton/index.mjs +4 -4
- package/es/packages/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/packages/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/packages/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/packages/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/packages/components/skeleton/src/skeleton.mjs +48 -21
- package/es/packages/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/packages/components/skeleton/src/skeleton2.mjs +21 -48
- package/es/packages/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/packages/components/steps/index.mjs +2 -2
- package/es/packages/components/steps/src/item.mjs +190 -19
- package/es/packages/components/steps/src/item.mjs.map +1 -1
- package/es/packages/components/steps/src/item2.mjs +19 -190
- package/es/packages/components/steps/src/item2.mjs.map +1 -1
- package/es/packages/components/timeline/index.mjs +2 -2
- package/es/packages/components/timeline/src/timeline-item.mjs +33 -72
- package/es/packages/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/packages/components/timeline/src/timeline-item2.mjs +72 -33
- package/es/packages/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/packages/components/tooltip/src/tooltip.mjs +1 -1
- package/es/packages/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/packages/components/tooltip-v2/index.mjs +1 -1
- package/es/packages/components/tooltip-v2/src/content.mjs +110 -48
- package/es/packages/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/packages/components/tooltip-v2/src/content2.mjs +48 -110
- package/es/packages/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/packages/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/packages/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/packages/components/tour/src/mask.mjs +75 -18
- package/es/packages/components/tour/src/mask.mjs.map +1 -1
- package/es/packages/components/tour/src/mask2.mjs +18 -75
- package/es/packages/components/tour/src/mask2.mjs.map +1 -1
- package/es/packages/components/tour/src/tour2.mjs +1 -1
- package/es/packages/components/upload/index.mjs +1 -1
- package/es/packages/components/upload/src/upload-content.mjs +196 -33
- package/es/packages/components/upload/src/upload-content.mjs.map +1 -1
- package/es/packages/components/upload/src/upload-content2.mjs +33 -196
- package/es/packages/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/packages/components/upload/src/upload2.mjs +1 -1
- package/es/packages/directives/click-outside/index.mjs +1 -1
- package/es/packages/hooks/use-focus-controller/index.mjs +1 -1
- package/es/packages/hooks/use-lockscreen/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/index.js +16 -16
- package/lib/packages/components/anchor/index.js +1 -1
- package/lib/packages/components/anchor/src/anchor-link.js +81 -5
- package/lib/packages/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/packages/components/anchor/src/anchor-link2.js +5 -81
- package/lib/packages/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/packages/components/backtop/index.js +2 -2
- package/lib/packages/components/backtop/src/backtop.js +53 -22
- package/lib/packages/components/backtop/src/backtop.js.map +1 -1
- package/lib/packages/components/backtop/src/backtop2.js +22 -53
- package/lib/packages/components/backtop/src/backtop2.js.map +1 -1
- package/lib/packages/components/card/index.js +2 -2
- package/lib/packages/components/card/src/card.js +42 -20
- package/lib/packages/components/card/src/card.js.map +1 -1
- package/lib/packages/components/card/src/card2.js +20 -42
- package/lib/packages/components/card/src/card2.js.map +1 -1
- package/lib/packages/components/check-tag/index.js +2 -2
- package/lib/packages/components/check-tag/src/check-tag.js +15 -38
- package/lib/packages/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/packages/components/check-tag/src/check-tag2.js +38 -15
- package/lib/packages/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/packages/components/col/index.js +2 -2
- package/lib/packages/components/col/src/col.js +64 -43
- package/lib/packages/components/col/src/col.js.map +1 -1
- package/lib/packages/components/col/src/col2.js +43 -64
- package/lib/packages/components/col/src/col2.js.map +1 -1
- package/lib/packages/components/color-picker/index.js +2 -2
- package/lib/packages/components/color-picker/src/color-picker.js +400 -40
- package/lib/packages/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/packages/components/color-picker/src/color-picker2.js +40 -400
- package/lib/packages/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/packages/components/color-picker/src/components/predefine.js +1 -1
- package/lib/packages/components/index.js +16 -16
- package/lib/packages/components/input/index.js +2 -2
- package/lib/packages/components/input/src/input.js +434 -101
- package/lib/packages/components/input/src/input.js.map +1 -1
- package/lib/packages/components/input/src/input2.js +101 -434
- package/lib/packages/components/input/src/input2.js.map +1 -1
- package/lib/packages/components/link/index.js +2 -2
- package/lib/packages/components/link/src/link.js +49 -25
- package/lib/packages/components/link/src/link.js.map +1 -1
- package/lib/packages/components/link/src/link2.js +25 -49
- package/lib/packages/components/link/src/link2.js.map +1 -1
- package/lib/packages/components/mention/src/mention.js +1 -1
- package/lib/packages/components/mention/src/mention2.js +1 -1
- package/lib/packages/components/message/src/message2.js +11 -2
- package/lib/packages/components/message/src/message2.js.map +1 -1
- package/lib/packages/components/message/src/method.js +5 -4
- package/lib/packages/components/message/src/method.js.map +1 -1
- package/lib/packages/components/pagination/src/components/sizes.js +71 -23
- package/lib/packages/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/packages/components/pagination/src/components/sizes2.js +23 -71
- package/lib/packages/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/packages/components/pagination/src/pagination.js +1 -1
- package/lib/packages/components/popconfirm/index.js +2 -2
- package/lib/packages/components/popconfirm/src/popconfirm.js +114 -46
- package/lib/packages/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/packages/components/popconfirm/src/popconfirm2.js +46 -114
- package/lib/packages/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/packages/components/popper/index.js +2 -2
- package/lib/packages/components/popper/src/arrow.js +36 -8
- package/lib/packages/components/popper/src/arrow.js.map +1 -1
- package/lib/packages/components/popper/src/arrow2.js +8 -36
- package/lib/packages/components/popper/src/arrow2.js.map +1 -1
- package/lib/packages/components/rate/index.js +2 -2
- package/lib/packages/components/rate/src/rate.js +257 -83
- package/lib/packages/components/rate/src/rate.js.map +1 -1
- package/lib/packages/components/rate/src/rate2.js +83 -257
- package/lib/packages/components/rate/src/rate2.js.map +1 -1
- package/lib/packages/components/scrollbar/src/bar.js +10 -64
- package/lib/packages/components/scrollbar/src/bar.js.map +1 -1
- package/lib/packages/components/scrollbar/src/bar2.js +64 -10
- package/lib/packages/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/packages/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/packages/components/skeleton/index.js +4 -4
- package/lib/packages/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/packages/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/packages/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/packages/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/packages/components/skeleton/src/skeleton.js +48 -21
- package/lib/packages/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/packages/components/skeleton/src/skeleton2.js +21 -48
- package/lib/packages/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/packages/components/steps/index.js +2 -2
- package/lib/packages/components/steps/src/item.js +190 -19
- package/lib/packages/components/steps/src/item.js.map +1 -1
- package/lib/packages/components/steps/src/item2.js +19 -190
- package/lib/packages/components/steps/src/item2.js.map +1 -1
- package/lib/packages/components/timeline/index.js +2 -2
- package/lib/packages/components/timeline/src/timeline-item.js +33 -72
- package/lib/packages/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/packages/components/timeline/src/timeline-item2.js +72 -33
- package/lib/packages/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/packages/components/tooltip/src/tooltip.js +1 -1
- package/lib/packages/components/tooltip/src/tooltip2.js +1 -1
- package/lib/packages/components/tooltip-v2/index.js +1 -1
- package/lib/packages/components/tooltip-v2/src/content.js +110 -48
- package/lib/packages/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/packages/components/tooltip-v2/src/content2.js +48 -110
- package/lib/packages/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/packages/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/packages/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/packages/components/tour/src/mask.js +75 -18
- package/lib/packages/components/tour/src/mask.js.map +1 -1
- package/lib/packages/components/tour/src/mask2.js +18 -75
- package/lib/packages/components/tour/src/mask2.js.map +1 -1
- package/lib/packages/components/tour/src/tour2.js +1 -1
- package/lib/packages/components/upload/index.js +1 -1
- package/lib/packages/components/upload/src/upload-content.js +194 -31
- package/lib/packages/components/upload/src/upload-content.js.map +1 -1
- package/lib/packages/components/upload/src/upload-content2.js +31 -194
- package/lib/packages/components/upload/src/upload-content2.js.map +1 -1
- package/lib/packages/components/upload/src/upload2.js +1 -1
- package/lib/packages/directives/click-outside/index.js +1 -1
- package/lib/packages/hooks/use-focus-controller/index.js +1 -1
- package/lib/packages/hooks/use-lockscreen/index.js +1 -1
- 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-date-picker.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/date-picker/picker-panel.scss +4 -2
- package/web-types.json +1 -1
|
@@ -2,33 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
var link = require('./link2.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "ElLink"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: link.linkProps,
|
|
17
|
+
emits: link.linkEmits,
|
|
18
|
+
setup(__props, { emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const ns = index.useNamespace("link");
|
|
21
|
+
const linkKls = vue.computed(() => [
|
|
22
|
+
ns.b(),
|
|
23
|
+
ns.m(props.type),
|
|
24
|
+
ns.is("disabled", props.disabled),
|
|
25
|
+
ns.is("underline", props.underline && !props.disabled)
|
|
26
|
+
]);
|
|
27
|
+
function handleClick(event) {
|
|
28
|
+
if (!props.disabled)
|
|
29
|
+
emit("click", event);
|
|
30
|
+
}
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return vue.openBlock(), vue.createElementBlock("a", {
|
|
33
|
+
class: vue.normalizeClass(vue.unref(linkKls)),
|
|
34
|
+
href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
|
|
35
|
+
target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target,
|
|
36
|
+
onClick: handleClick
|
|
37
|
+
}, [
|
|
38
|
+
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 0 }, {
|
|
39
|
+
default: vue.withCtx(() => [
|
|
40
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
41
|
+
]),
|
|
42
|
+
_: 1
|
|
43
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
44
|
+
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
45
|
+
key: 1,
|
|
46
|
+
class: vue.normalizeClass(vue.unref(ns).e("inner"))
|
|
47
|
+
}, [
|
|
48
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
49
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
50
|
+
_ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 2 }) : vue.createCommentVNode("v-if", true)
|
|
51
|
+
], 10, ["href", "target"]);
|
|
52
|
+
};
|
|
26
53
|
}
|
|
27
54
|
});
|
|
28
|
-
|
|
29
|
-
click: (evt) => evt instanceof MouseEvent
|
|
30
|
-
};
|
|
55
|
+
var Link = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "link.vue"]]);
|
|
31
56
|
|
|
32
|
-
exports
|
|
33
|
-
exports.linkProps = linkProps;
|
|
57
|
+
exports["default"] = Link;
|
|
34
58
|
//# sourceMappingURL=link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sources":["../../../../../../../packages/components/link/src/link.
|
|
1
|
+
{"version":3,"file":"link.js","sources":["../../../../../../../packages/components/link/src/link.vue"],"sourcesContent":["<template>\n <a\n :class=\"linkKls\"\n :href=\"disabled || !href ? undefined : href\"\n :target=\"disabled || !href ? undefined : target\"\n @click=\"handleClick\"\n >\n <el-icon v-if=\"icon\"><component :is=\"icon\" /></el-icon>\n <span v-if=\"$slots.default\" :class=\"ns.e('inner')\">\n <slot />\n </span>\n\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n </a>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { linkEmits, linkProps } from './link'\n\ndefineOptions({\n name: 'ElLink',\n})\nconst props = defineProps(linkProps)\nconst emit = defineEmits(linkEmits)\n\nconst ns = useNamespace('link')\n\nconst linkKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.is('disabled', props.disabled),\n ns.is('underline', props.underline && !props.disabled),\n])\n\nfunction handleClick(event: MouseEvent) {\n if (!props.disabled) emit('click', event)\n}\n</script>\n"],"names":["useNamespace","computed"],"mappings":";;;;;;;;;;uCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAAA,MAC7B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACf,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,QAAQ,CAAA;AAAA,MAChC,GAAG,EAAG,CAAA,WAAA,EAAa,MAAM,SAAa,IAAA,CAAC,MAAM,QAAQ,CAAA;AAAA,KACtD,CAAA,CAAA;AAED,IAAA,SAAS,YAAY,KAAmB,EAAA;AACtC,MAAA,IAAI,CAAC,KAAA,CAAM,QAAU;AAAmB,QAC1C,IAAA,CAAA,OAAA,EAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,57 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var link = require('./link.js');
|
|
8
|
-
var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
6
|
+
var icon = require('../../../utils/vue/icon.js');
|
|
10
7
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
emit("click", event);
|
|
30
|
-
}
|
|
31
|
-
return (_ctx, _cache) => {
|
|
32
|
-
return vue.openBlock(), vue.createElementBlock("a", {
|
|
33
|
-
class: vue.normalizeClass(vue.unref(linkKls)),
|
|
34
|
-
href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
|
|
35
|
-
target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target,
|
|
36
|
-
onClick: handleClick
|
|
37
|
-
}, [
|
|
38
|
-
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 0 }, {
|
|
39
|
-
default: vue.withCtx(() => [
|
|
40
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
41
|
-
]),
|
|
42
|
-
_: 1
|
|
43
|
-
})) : vue.createCommentVNode("v-if", true),
|
|
44
|
-
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
45
|
-
key: 1,
|
|
46
|
-
class: vue.normalizeClass(vue.unref(ns).e("inner"))
|
|
47
|
-
}, [
|
|
48
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
49
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
50
|
-
_ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 2 }) : vue.createCommentVNode("v-if", true)
|
|
51
|
-
], 10, ["href", "target"]);
|
|
52
|
-
};
|
|
8
|
+
const linkProps = runtime.buildProps({
|
|
9
|
+
type: {
|
|
10
|
+
type: String,
|
|
11
|
+
values: ["primary", "success", "warning", "info", "danger", "default"],
|
|
12
|
+
default: "default"
|
|
13
|
+
},
|
|
14
|
+
underline: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: true
|
|
17
|
+
},
|
|
18
|
+
disabled: Boolean,
|
|
19
|
+
href: { type: String, default: "" },
|
|
20
|
+
target: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "_self"
|
|
23
|
+
},
|
|
24
|
+
icon: {
|
|
25
|
+
type: icon.iconPropType
|
|
53
26
|
}
|
|
54
27
|
});
|
|
55
|
-
|
|
28
|
+
const linkEmits = {
|
|
29
|
+
click: (evt) => evt instanceof MouseEvent
|
|
30
|
+
};
|
|
56
31
|
|
|
57
|
-
exports
|
|
32
|
+
exports.linkEmits = linkEmits;
|
|
33
|
+
exports.linkProps = linkProps;
|
|
58
34
|
//# sourceMappingURL=link2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link2.js","sources":["../../../../../../../packages/components/link/src/link.
|
|
1
|
+
{"version":3,"file":"link2.js","sources":["../../../../../../../packages/components/link/src/link.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n /**\n * @description type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: 'default',\n },\n /**\n * @description whether the component has underline\n */\n underline: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description same as native hyperlink's `href`\n */\n href: { type: String, default: '' },\n /**\n * @description same as native hyperlink's `target`\n */\n target: {\n type: String as PropType<'_blank' | '_parent' | '_self' | '_top' | string>,\n default: '_self',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n} as const)\nexport type LinkProps = ExtractPropTypes<typeof linkProps>\n\nexport const linkEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type LinkEmits = typeof linkEmits\n\nexport type LinkInstance = InstanceType<typeof Link> & unknown\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;AACY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;AAC1E,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var helper = require('./helper.js');
|
|
6
|
-
var input = require('../../input/src/
|
|
6
|
+
var input = require('../../input/src/input2.js');
|
|
7
7
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
8
|
var shared = require('@vue/shared');
|
|
9
9
|
var event = require('../../../constants/event.js');
|
|
@@ -10,7 +10,7 @@ var mention = require('./mention.js');
|
|
|
10
10
|
var helper = require('./helper.js');
|
|
11
11
|
var mentionDropdown = require('./mention-dropdown2.js');
|
|
12
12
|
var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
-
var input = require('../../input/src/
|
|
13
|
+
var input = require('../../input/src/input2.js');
|
|
14
14
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
15
15
|
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
|
16
16
|
var index$1 = require('../../../hooks/use-id/index.js');
|
|
@@ -20,9 +20,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
...__default__,
|
|
21
21
|
props: message.messageProps,
|
|
22
22
|
emits: message.messageEmits,
|
|
23
|
-
setup(__props, { expose }) {
|
|
23
|
+
setup(__props, { expose, emit }) {
|
|
24
24
|
const props = __props;
|
|
25
25
|
const { Close } = icon.TypeComponents;
|
|
26
|
+
const isStartTransition = vue.ref(false);
|
|
26
27
|
const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("message");
|
|
27
28
|
const { currentZIndex, nextZIndex } = zIndex;
|
|
28
29
|
const messageRef = vue.ref();
|
|
@@ -54,6 +55,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
54
55
|
}
|
|
55
56
|
function close() {
|
|
56
57
|
visible.value = false;
|
|
58
|
+
vue.nextTick(() => {
|
|
59
|
+
var _a;
|
|
60
|
+
if (!isStartTransition.value) {
|
|
61
|
+
(_a = props.onClose) == null ? void 0 : _a.call(props);
|
|
62
|
+
emit("destroy");
|
|
63
|
+
}
|
|
64
|
+
});
|
|
57
65
|
}
|
|
58
66
|
function keydown({ code }) {
|
|
59
67
|
if (code === aria.EVENT_CODE.esc) {
|
|
@@ -81,6 +89,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
89
|
return (_ctx, _cache) => {
|
|
82
90
|
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
83
91
|
name: vue.unref(ns).b("fade"),
|
|
92
|
+
onBeforeEnter: ($event) => isStartTransition.value = true,
|
|
84
93
|
onBeforeLeave: _ctx.onClose,
|
|
85
94
|
onAfterLeave: ($event) => _ctx.$emit("destroy"),
|
|
86
95
|
persisted: ""
|
|
@@ -145,7 +154,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
145
154
|
])
|
|
146
155
|
]),
|
|
147
156
|
_: 3
|
|
148
|
-
}, 8, ["name", "onBeforeLeave", "onAfterLeave"]);
|
|
157
|
+
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]);
|
|
149
158
|
};
|
|
150
159
|
}
|
|
151
160
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message2.js","sources":["../../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type },\n ns.is('center', center),\n ns.is('closable', showClose),\n ns.is('plain', plain),\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { messageEmits, messageProps } from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = defineProps(messageProps)\
|
|
1
|
+
{"version":3,"file":"message2.js","sources":["../../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-enter=\"isStartTransition = true\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type },\n ns.is('center', center),\n ns.is('closable', showClose),\n ns.is('plain', plain),\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { messageEmits, messageProps } from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = defineProps(messageProps)\nconst emit = defineEmits(messageEmits)\n\nconst isStartTransition = ref(false)\n\nconst { ns, zIndex } = useGlobalComponentSettings('message')\nconst { currentZIndex, nextZIndex } = zIndex\n\nconst messageRef = ref<HTMLDivElement>()\nconst visible = ref(false)\nconst height = ref(0)\n\nlet stopTimer: (() => void) | undefined = undefined\n\nconst badgeType = computed<BadgeProps['type']>(() =>\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst lastOffset = computed(() => getLastOffset(props.id))\nconst offset = computed(\n () => getOffsetOrSpace(props.id, props.offset) + lastOffset.value\n)\nconst bottom = computed((): number => height.value + offset.value)\nconst customStyle = computed<CSSProperties>(() => ({\n top: `${offset.value}px`,\n zIndex: currentZIndex.value,\n}))\n\nfunction startTimer() {\n if (props.duration === 0) return\n ;({ stop: stopTimer } = useTimeoutFn(() => {\n close()\n }, props.duration))\n}\n\nfunction clearTimer() {\n stopTimer?.()\n}\n\nfunction close() {\n visible.value = false\n\n // if the message has never started a transition, we can destroy it immediately\n nextTick(() => {\n if (!isStartTransition.value) {\n props.onClose?.()\n emit('destroy')\n }\n })\n}\n\nfunction keydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.esc) {\n // press esc to close the message\n close()\n }\n}\n\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nwatch(\n () => props.repeatNum,\n () => {\n clearTimer()\n startTimer()\n }\n)\n\nuseEventListener(document, 'keydown', keydown)\n\nuseResizeObserver(messageRef, () => {\n height.value = messageRef.value!.getBoundingClientRect().height\n})\n\ndefineExpose({\n visible,\n bottom,\n close,\n})\n</script>\n"],"names":["TypeComponents","ref","useGlobalComponentSettings","computed","TypeComponentsMap","getLastOffset","getOffsetOrSpace","useTimeoutFn","nextTick","EVENT_CODE","onMounted","watch","useEventListener","useResizeObserver","_openBlock","_createBlock","_Transition","_unref"],"mappings":";;;;;;;;;;;;;;;u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
|
77
77
|
close: () => {
|
|
78
|
-
vm.exposed.
|
|
78
|
+
vm.exposed.close();
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
const instance = {
|
|
@@ -116,9 +116,10 @@ message$1.messageTypes.forEach((type) => {
|
|
|
116
116
|
};
|
|
117
117
|
});
|
|
118
118
|
function closeAll(type) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
const instancesToClose = [...instance.instances];
|
|
120
|
+
for (const instance of instancesToClose) {
|
|
121
|
+
if (!type || type === instance.props.type) {
|
|
122
|
+
instance.handler.close();
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.js","sources":["../../../../../../../packages/components/message/src/method.ts"],"sourcesContent":["import { createVNode, isVNode, render } from 'vue'\nimport {\n debugWarn,\n isBoolean,\n isClient,\n isElement,\n isFunction,\n isNumber,\n isString,\n} from '@element-plus/utils'\nimport { messageConfig } from '@element-plus/components/config-provider'\nimport MessageConstructor from './message.vue'\nimport { messageDefaults, messageTypes } from './message'\nimport { instances } from './instance'\n\nimport type { MessageContext } from './instance'\nimport type { AppContext } from 'vue'\nimport type {\n Message,\n MessageFn,\n MessageHandler,\n MessageOptions,\n MessageParams,\n MessageParamsNormalized,\n messageType,\n} from './message'\n\nlet seed = 1\n\n// TODO: Since Notify.ts is basically the same like this file. So we could do some encapsulation against them to reduce code duplication.\n\nconst normalizeOptions = (params?: MessageParams) => {\n const options: MessageOptions =\n !params || isString(params) || isVNode(params) || isFunction(params)\n ? { message: params }\n : params\n\n const normalized = {\n ...messageDefaults,\n ...options,\n }\n\n if (!normalized.appendTo) {\n normalized.appendTo = document.body\n } else if (isString(normalized.appendTo)) {\n let appendTo = document.querySelector<HTMLElement>(normalized.appendTo)\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessage',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n\n normalized.appendTo = appendTo\n }\n\n // When grouping is configured globally,\n // if grouping is manually set when calling message individually and it is not equal to the default value,\n // the global configuration cannot override the current setting. default => false\n if (isBoolean(messageConfig.grouping) && !normalized.grouping) {\n normalized.grouping = messageConfig.grouping\n }\n if (isNumber(messageConfig.duration) && normalized.duration === 3000) {\n normalized.duration = messageConfig.duration\n }\n if (isNumber(messageConfig.offset) && normalized.offset === 16) {\n normalized.offset = messageConfig.offset\n }\n if (isBoolean(messageConfig.showClose) && !normalized.showClose) {\n normalized.showClose = messageConfig.showClose\n }\n\n return normalized as MessageParamsNormalized\n}\n\nconst closeMessage = (instance: MessageContext) => {\n const idx = instances.indexOf(instance)\n if (idx === -1) return\n\n instances.splice(idx, 1)\n const { handler } = instance\n handler.close()\n}\n\nconst createMessage = (\n { appendTo, ...options }: MessageParamsNormalized,\n context?: AppContext | null\n): MessageContext => {\n const id = `message_${seed++}`\n const userOnClose = options.onClose\n\n const container = document.createElement('div')\n\n const props = {\n ...options,\n // now the zIndex will be used inside the message.vue component instead of here.\n // zIndex: nextIndex() + options.zIndex\n id,\n onClose: () => {\n userOnClose?.()\n closeMessage(instance)\n },\n\n // clean message element preventing mem leak\n onDestroy: () => {\n // since the element is destroy, then the VNode should be collected by GC as well\n // we do not want cause any mem leak because we have returned vm as a reference to users\n // so that we manually set it to false.\n render(null, container)\n },\n }\n const vnode = createVNode(\n MessageConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? {\n default: isFunction(props.message)\n ? props.message\n : () => props.message,\n }\n : null\n )\n vnode.appContext = context || message._context\n\n render(vnode, container)\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n appendTo.appendChild(container.firstElementChild!)\n\n const vm = vnode.component!\n\n const handler: MessageHandler = {\n // instead of calling the onClose function directly, setting this value so that we can have the full lifecycle\n // for out component, so that all closing steps will not be skipped.\n close: () => {\n vm.exposed!.visible.value = false\n },\n }\n\n const instance: MessageContext = {\n id,\n vnode,\n vm,\n handler,\n props: (vnode.component as any).props,\n }\n\n return instance\n}\n\nconst message: MessageFn &\n Partial<Message> & { _context: AppContext | null } = (\n options = {},\n context\n) => {\n if (!isClient) return { close: () => undefined }\n\n const normalized = normalizeOptions(options)\n\n if (normalized.grouping && instances.length) {\n const instance = instances.find(\n ({ vnode: vm }) => vm.props?.message === normalized.message\n )\n if (instance) {\n instance.props.repeatNum += 1\n instance.props.type = normalized.type\n return instance.handler\n }\n }\n\n if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {\n return { close: () => undefined }\n }\n\n const instance = createMessage(normalized, context)\n\n instances.push(instance)\n return instance.handler\n}\n\nmessageTypes.forEach((type) => {\n message[type] = (options = {}, appContext) => {\n const normalized = normalizeOptions(options)\n return message({ ...normalized, type }, appContext)\n }\n})\n\nexport function closeAll(type?: messageType): void {\n for (const instance of instances) {\n if (!type || type === instance.props.type) {\n instance.handler.close()\n }\n }\n}\n\nmessage.closeAll = closeAll\nmessage._context = null\n\nexport default message as Message\n"],"names":["isString","isVNode","isFunction","messageDefaults","isElement","debugWarn","isBoolean","messageConfig","isNumber","instance","instances","render","createVNode","MessageConstructor","isClient","messageTypes"],"mappings":";;;;;;;;;;;;;;AAcA,IAAI,IAAI,GAAG,CAAC,CAAC;AACb,MAAM,gBAAgB,GAAG,CAAC,MAAM,KAAK;AACrC,EAAE,MAAM,OAAO,GAAG,CAAC,MAAM,IAAIA,eAAQ,CAAC,MAAM,CAAC,IAAIC,WAAO,CAAC,MAAM,CAAC,IAAIC,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;AACtH,EAAE,MAAM,UAAU,GAAG;AACrB,IAAI,GAAGC,yBAAe;AACtB,IAAI,GAAG,OAAO;AACd,GAAG,CAAC;AACJ,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;AAC5B,IAAI,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AACxC,G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5B,OAAO,CAAC,QAAQ,GAAG,IAAI;;;;;"}
|
|
1
|
+
{"version":3,"file":"method.js","sources":["../../../../../../../packages/components/message/src/method.ts"],"sourcesContent":["import { createVNode, isVNode, render } from 'vue'\nimport {\n debugWarn,\n isBoolean,\n isClient,\n isElement,\n isFunction,\n isNumber,\n isString,\n} from '@element-plus/utils'\nimport { messageConfig } from '@element-plus/components/config-provider'\nimport MessageConstructor from './message.vue'\nimport { messageDefaults, messageTypes } from './message'\nimport { instances } from './instance'\n\nimport type { MessageContext } from './instance'\nimport type { AppContext } from 'vue'\nimport type {\n Message,\n MessageFn,\n MessageHandler,\n MessageOptions,\n MessageParams,\n MessageParamsNormalized,\n messageType,\n} from './message'\n\nlet seed = 1\n\n// TODO: Since Notify.ts is basically the same like this file. So we could do some encapsulation against them to reduce code duplication.\n\nconst normalizeOptions = (params?: MessageParams) => {\n const options: MessageOptions =\n !params || isString(params) || isVNode(params) || isFunction(params)\n ? { message: params }\n : params\n\n const normalized = {\n ...messageDefaults,\n ...options,\n }\n\n if (!normalized.appendTo) {\n normalized.appendTo = document.body\n } else if (isString(normalized.appendTo)) {\n let appendTo = document.querySelector<HTMLElement>(normalized.appendTo)\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessage',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n\n normalized.appendTo = appendTo\n }\n\n // When grouping is configured globally,\n // if grouping is manually set when calling message individually and it is not equal to the default value,\n // the global configuration cannot override the current setting. default => false\n if (isBoolean(messageConfig.grouping) && !normalized.grouping) {\n normalized.grouping = messageConfig.grouping\n }\n if (isNumber(messageConfig.duration) && normalized.duration === 3000) {\n normalized.duration = messageConfig.duration\n }\n if (isNumber(messageConfig.offset) && normalized.offset === 16) {\n normalized.offset = messageConfig.offset\n }\n if (isBoolean(messageConfig.showClose) && !normalized.showClose) {\n normalized.showClose = messageConfig.showClose\n }\n\n return normalized as MessageParamsNormalized\n}\n\nconst closeMessage = (instance: MessageContext) => {\n const idx = instances.indexOf(instance)\n if (idx === -1) return\n\n instances.splice(idx, 1)\n const { handler } = instance\n handler.close()\n}\n\nconst createMessage = (\n { appendTo, ...options }: MessageParamsNormalized,\n context?: AppContext | null\n): MessageContext => {\n const id = `message_${seed++}`\n const userOnClose = options.onClose\n\n const container = document.createElement('div')\n\n const props = {\n ...options,\n // now the zIndex will be used inside the message.vue component instead of here.\n // zIndex: nextIndex() + options.zIndex\n id,\n onClose: () => {\n userOnClose?.()\n closeMessage(instance)\n },\n\n // clean message element preventing mem leak\n onDestroy: () => {\n // since the element is destroy, then the VNode should be collected by GC as well\n // we do not want cause any mem leak because we have returned vm as a reference to users\n // so that we manually set it to false.\n render(null, container)\n },\n }\n const vnode = createVNode(\n MessageConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? {\n default: isFunction(props.message)\n ? props.message\n : () => props.message,\n }\n : null\n )\n vnode.appContext = context || message._context\n\n render(vnode, container)\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n appendTo.appendChild(container.firstElementChild!)\n\n const vm = vnode.component!\n\n const handler: MessageHandler = {\n // instead of calling the onClose function directly, setting this value so that we can have the full lifecycle\n // for out component, so that all closing steps will not be skipped.\n close: () => {\n vm.exposed!.close()\n },\n }\n\n const instance: MessageContext = {\n id,\n vnode,\n vm,\n handler,\n props: (vnode.component as any).props,\n }\n\n return instance\n}\n\nconst message: MessageFn &\n Partial<Message> & { _context: AppContext | null } = (\n options = {},\n context\n) => {\n if (!isClient) return { close: () => undefined }\n\n const normalized = normalizeOptions(options)\n\n if (normalized.grouping && instances.length) {\n const instance = instances.find(\n ({ vnode: vm }) => vm.props?.message === normalized.message\n )\n if (instance) {\n instance.props.repeatNum += 1\n instance.props.type = normalized.type\n return instance.handler\n }\n }\n\n if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {\n return { close: () => undefined }\n }\n\n const instance = createMessage(normalized, context)\n\n instances.push(instance)\n return instance.handler\n}\n\nmessageTypes.forEach((type) => {\n message[type] = (options = {}, appContext) => {\n const normalized = normalizeOptions(options)\n return message({ ...normalized, type }, appContext)\n }\n})\n\nexport function closeAll(type?: messageType): void {\n // Create a copy of instances to avoid modification during iteration\n const instancesToClose = [...instances]\n\n for (const instance of instancesToClose) {\n if (!type || type === instance.props.type) {\n instance.handler.close()\n }\n }\n}\n\nmessage.closeAll = closeAll\nmessage._context = null\n\nexport default message as Message\n"],"names":["isString","isVNode","isFunction","messageDefaults","isElement","debugWarn","isBoolean","messageConfig","isNumber","instance","instances","render","createVNode","MessageConstructor","isClient","messageTypes"],"mappings":";;;;;;;;;;;;;;AAcA,IAAI,IAAI,GAAG,CAAC,CAAC;AACb,MAAM,gBAAgB,GAAG,CAAC,MAAM,KAAK;AACrC,EAAE,MAAM,OAAO,GAAG,CAAC,MAAM,IAAIA,eAAQ,CAAC,MAAM,CAAC,IAAIC,WAAO,CAAC,MAAM,CAAC,IAAIC,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;AACtH,EAAE,MAAM,UAAU,GAAG;AACrB,IAAI,GAAGC,yBAAe;AACtB,IAAI,GAAG,OAAO;AACd,GAAG,CAAC;AACJ,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;AAC5B,IAAI,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AACxC,GAAG,MAAM,IAAIH,eAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AAC5C,IAAI,IAAI,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC/D,IAAI,IAAI,CAACI,eAAS,CAAC,QAAQ,CAAC,EAAE;AAC9B,MAAMC,eAAS,CAAC,WAAW,EAAE,2EAA2E,CAAC,CAAC;AAC1G,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC/B,KAAK;AACL,IAAI,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KAAK,CAAC,EAAE,CAAC;AACnC,GAAG;AACH,EAAE,MAAME,UAAQ,GAAG,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AACtD,EAAEC,kBAAS,CAAC,IAAI,CAACD,UAAQ,CAAC,CAAC;AAC3B,EAAE,OAAOA,UAAQ,CAAC,OAAO,CAAC;AAC1B,EAAE;AACFM,sBAAY,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AAC/B,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,UAAU,KAAK;AAChD,IAAI,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACjD,IAAI,OAAO,OAAO,CAAC,EAAE,GAAG,UAAU,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;AACxD,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;AACI,SAAS,QAAQ,CAAC,IAAI,EAAE;AAC/B,EAAE,MAAM,gBAAgB,GAAG,CAAC,GAAGL,kBAAS,CAAC,CAAC;AAC1C,EAAE,KAAK,MAAM,QAAQ,IAAI,gBAAgB,EAAE;AAC3C,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;AAC/C,MAAM,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;AAC/B,KAAK;AACL,GAAG;AACH,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B,OAAO,CAAC,QAAQ,GAAG,IAAI;;;;;"}
|
|
@@ -2,30 +2,78 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var lodashUnified = require('lodash-unified');
|
|
7
|
+
var index$2 = require('../../../select/index.js');
|
|
8
|
+
var usePagination = require('../usePagination.js');
|
|
9
|
+
var sizes = require('./sizes2.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../../hooks/use-locale/index.js');
|
|
12
|
+
var index$1 = require('../../../../hooks/use-namespace/index.js');
|
|
13
|
+
var shared = require('@vue/shared');
|
|
8
14
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
type: Number,
|
|
12
|
-
required: true
|
|
13
|
-
},
|
|
14
|
-
pageSizes: {
|
|
15
|
-
type: runtime.definePropType(Array),
|
|
16
|
-
default: () => typescript.mutable([10, 20, 30, 40, 50, 100])
|
|
17
|
-
},
|
|
18
|
-
popperClass: {
|
|
19
|
-
type: String
|
|
20
|
-
},
|
|
21
|
-
disabled: Boolean,
|
|
22
|
-
teleported: Boolean,
|
|
23
|
-
size: {
|
|
24
|
-
type: String,
|
|
25
|
-
values: size.componentSizes
|
|
26
|
-
},
|
|
27
|
-
appendSizeTo: String
|
|
15
|
+
const __default__ = vue.defineComponent({
|
|
16
|
+
name: "ElPaginationSizes"
|
|
28
17
|
});
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: sizes.paginationSizesProps,
|
|
21
|
+
emits: ["page-size-change"],
|
|
22
|
+
setup(__props, { emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const { t } = index.useLocale();
|
|
25
|
+
const ns = index$1.useNamespace("pagination");
|
|
26
|
+
const pagination = usePagination.usePagination();
|
|
27
|
+
const innerPageSize = vue.ref(props.pageSize);
|
|
28
|
+
vue.watch(() => props.pageSizes, (newVal, oldVal) => {
|
|
29
|
+
if (lodashUnified.isEqual(newVal, oldVal))
|
|
30
|
+
return;
|
|
31
|
+
if (shared.isArray(newVal)) {
|
|
32
|
+
const pageSize = newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0];
|
|
33
|
+
emit("page-size-change", pageSize);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
vue.watch(() => props.pageSize, (newVal) => {
|
|
37
|
+
innerPageSize.value = newVal;
|
|
38
|
+
});
|
|
39
|
+
const innerPageSizes = vue.computed(() => props.pageSizes);
|
|
40
|
+
function handleChange(val) {
|
|
41
|
+
var _a;
|
|
42
|
+
if (val !== innerPageSize.value) {
|
|
43
|
+
innerPageSize.value = val;
|
|
44
|
+
(_a = pagination.handleSizeChange) == null ? void 0 : _a.call(pagination, Number(val));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return (_ctx, _cache) => {
|
|
48
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
49
|
+
class: vue.normalizeClass(vue.unref(ns).e("sizes"))
|
|
50
|
+
}, [
|
|
51
|
+
vue.createVNode(vue.unref(index$2.ElSelect), {
|
|
52
|
+
"model-value": innerPageSize.value,
|
|
53
|
+
disabled: _ctx.disabled,
|
|
54
|
+
"popper-class": _ctx.popperClass,
|
|
55
|
+
size: _ctx.size,
|
|
56
|
+
teleported: _ctx.teleported,
|
|
57
|
+
"validate-event": false,
|
|
58
|
+
"append-to": _ctx.appendSizeTo,
|
|
59
|
+
onChange: handleChange
|
|
60
|
+
}, {
|
|
61
|
+
default: vue.withCtx(() => [
|
|
62
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(innerPageSizes), (item) => {
|
|
63
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElOption), {
|
|
64
|
+
key: item,
|
|
65
|
+
value: item,
|
|
66
|
+
label: item + vue.unref(t)("el.pagination.pagesize")
|
|
67
|
+
}, null, 8, ["value", "label"]);
|
|
68
|
+
}), 128))
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"])
|
|
72
|
+
], 2);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
var Sizes = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "sizes.vue"]]);
|
|
29
77
|
|
|
30
|
-
exports
|
|
78
|
+
exports["default"] = Sizes;
|
|
31
79
|
//# sourceMappingURL=sizes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizes.js","sources":["../../../../../../../../packages/components/pagination/src/components/sizes.
|
|
1
|
+
{"version":3,"file":"sizes.js","sources":["../../../../../../../../packages/components/pagination/src/components/sizes.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('sizes')\">\n <el-select\n :model-value=\"innerPageSize\"\n :disabled=\"disabled\"\n :popper-class=\"popperClass\"\n :size=\"size\"\n :teleported=\"teleported\"\n :validate-event=\"false\"\n :append-to=\"appendSizeTo\"\n @change=\"handleChange\"\n >\n <el-option\n v-for=\"item in innerPageSizes\"\n :key=\"item\"\n :value=\"item\"\n :label=\"item + t('el.pagination.pagesize')\"\n />\n </el-select>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { ElOption, ElSelect } from '@element-plus/components/select'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { isArray } from '@element-plus/utils'\nimport { usePagination } from '../usePagination'\nimport { paginationSizesProps } from './sizes'\n\ndefineOptions({\n name: 'ElPaginationSizes',\n})\n\nconst props = defineProps(paginationSizesProps)\nconst emit = defineEmits(['page-size-change'])\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst pagination = usePagination()\nconst innerPageSize = ref<number>(props.pageSize!)\n\nwatch(\n () => props.pageSizes,\n (newVal, oldVal) => {\n if (isEqual(newVal, oldVal)) return\n if (isArray(newVal)) {\n const pageSize = newVal.includes(props.pageSize!)\n ? props.pageSize\n : props.pageSizes[0]\n emit('page-size-change', pageSize)\n }\n }\n)\n\nwatch(\n () => props.pageSize,\n (newVal) => {\n innerPageSize.value = newVal!\n }\n)\n\nconst innerPageSizes = computed(() => props.pageSizes)\nfunction handleChange(val: number) {\n if (val !== innerPageSize.value) {\n innerPageSize.value = val\n pagination.handleSizeChange?.(Number(val))\n }\n}\n</script>\n"],"names":["useLocale","useNamespace","usePagination","ref","watch","isArray","computed","_openBlock","_createElementBlock","_normalizeClass","_unref"],"mappings":";;;;;;;;;;;;;;uCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,mBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAIA,eAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,YAAY,CAAA,CAAA;AACpC,IAAA,MAAM,aAAaC,2BAAc,EAAA,CAAA;AACjC,IAAM,MAAA,aAAA,GAAgBC,OAAY,CAAA,KAAA,CAAM,QAAS,CAAA,CAAA;AAEjD,IAAAC,SAAA,CAAA,MAAA,KAAA,CAAA,SAAA,EAAA,CAAA,MAAA,EAAA,MAAA,KAAA;AAAA,MACE,yBAAY,CAAA,MAAA,EAAA,MAAA,CAAA;AAAA,eACH;AACP,MAAI,IAAAC,cAAA,CAAA,MAAgB,CAAA,EAAA;AACpB,QAAI,MAAA,iBAAiB,CAAA,QAAA,CAAA,KAAA,CAAA,QAAA,CAAA,GAAA,KAAA,CAAA,QAAA,GAAA,KAAA,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA;AACnB,QAAM,IAAA,CAAA,kBAAkB,EAAA,QAAA,CAAA,CAAS;AAGjC,OAAA;AAAiC,KACnC,CAAA,CAAA;AAAA,IACFD,SAAA,CAAA,MAAA,KAAA,CAAA,QAAA,EAAA,CAAA,MAAA,KAAA;AAAA,MACF,aAAA,CAAA,KAAA,GAAA,MAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AAAA,IAAA,oBACc,GAAAE,YAAA,CAAA,MAAA,KAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,SACA,YAAA,CAAA,GAAA,EAAA;AACV,MAAA,IAAA,EAAA,CAAA;AAAsB,MACxB,IAAA,GAAA,KAAA,aAAA,CAAA,KAAA,EAAA;AAAA,QACF,aAAA,CAAA,KAAA,GAAA,GAAA,CAAA;AAEA,QAAA,CAAA,EAAuB,GAAA,UAAA,CAAA,gBAAe,KAAA,IAAe,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,UAAA,EAAA,MAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AACrD,OAAA;AACE,KAAI;AACF,IAAA,OAAA,CAAA,IAAA,EAAA,MAAsB,KAAA;AACtB,MAAW,OAAAC,aAAA,EAAA,EAAAC,sBAA0B,CAAA,MAAI,EAAA;AAAA,QAC3C,KAAA,EAAAC,kBAAA,CAAAC,SAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA;AAAA,OACF,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,78 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var usePagination = require('../usePagination.js');
|
|
9
|
-
var sizes = require('./sizes.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
-
var index = require('../../../../hooks/use-locale/index.js');
|
|
12
|
-
var index$1 = require('../../../../hooks/use-namespace/index.js');
|
|
13
|
-
var shared = require('@vue/shared');
|
|
5
|
+
var runtime = require('../../../../utils/vue/props/runtime.js');
|
|
6
|
+
var typescript = require('../../../../utils/typescript.js');
|
|
7
|
+
var size = require('../../../../constants/size.js');
|
|
14
8
|
|
|
15
|
-
const
|
|
16
|
-
|
|
9
|
+
const paginationSizesProps = runtime.buildProps({
|
|
10
|
+
pageSize: {
|
|
11
|
+
type: Number,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
pageSizes: {
|
|
15
|
+
type: runtime.definePropType(Array),
|
|
16
|
+
default: () => typescript.mutable([10, 20, 30, 40, 50, 100])
|
|
17
|
+
},
|
|
18
|
+
popperClass: {
|
|
19
|
+
type: String
|
|
20
|
+
},
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
teleported: Boolean,
|
|
23
|
+
size: {
|
|
24
|
+
type: String,
|
|
25
|
+
values: size.componentSizes
|
|
26
|
+
},
|
|
27
|
+
appendSizeTo: String
|
|
17
28
|
});
|
|
18
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
-
...__default__,
|
|
20
|
-
props: sizes.paginationSizesProps,
|
|
21
|
-
emits: ["page-size-change"],
|
|
22
|
-
setup(__props, { emit }) {
|
|
23
|
-
const props = __props;
|
|
24
|
-
const { t } = index.useLocale();
|
|
25
|
-
const ns = index$1.useNamespace("pagination");
|
|
26
|
-
const pagination = usePagination.usePagination();
|
|
27
|
-
const innerPageSize = vue.ref(props.pageSize);
|
|
28
|
-
vue.watch(() => props.pageSizes, (newVal, oldVal) => {
|
|
29
|
-
if (lodashUnified.isEqual(newVal, oldVal))
|
|
30
|
-
return;
|
|
31
|
-
if (shared.isArray(newVal)) {
|
|
32
|
-
const pageSize = newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0];
|
|
33
|
-
emit("page-size-change", pageSize);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
vue.watch(() => props.pageSize, (newVal) => {
|
|
37
|
-
innerPageSize.value = newVal;
|
|
38
|
-
});
|
|
39
|
-
const innerPageSizes = vue.computed(() => props.pageSizes);
|
|
40
|
-
function handleChange(val) {
|
|
41
|
-
var _a;
|
|
42
|
-
if (val !== innerPageSize.value) {
|
|
43
|
-
innerPageSize.value = val;
|
|
44
|
-
(_a = pagination.handleSizeChange) == null ? void 0 : _a.call(pagination, Number(val));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return (_ctx, _cache) => {
|
|
48
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
49
|
-
class: vue.normalizeClass(vue.unref(ns).e("sizes"))
|
|
50
|
-
}, [
|
|
51
|
-
vue.createVNode(vue.unref(index$2.ElSelect), {
|
|
52
|
-
"model-value": innerPageSize.value,
|
|
53
|
-
disabled: _ctx.disabled,
|
|
54
|
-
"popper-class": _ctx.popperClass,
|
|
55
|
-
size: _ctx.size,
|
|
56
|
-
teleported: _ctx.teleported,
|
|
57
|
-
"validate-event": false,
|
|
58
|
-
"append-to": _ctx.appendSizeTo,
|
|
59
|
-
onChange: handleChange
|
|
60
|
-
}, {
|
|
61
|
-
default: vue.withCtx(() => [
|
|
62
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(innerPageSizes), (item) => {
|
|
63
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElOption), {
|
|
64
|
-
key: item,
|
|
65
|
-
value: item,
|
|
66
|
-
label: item + vue.unref(t)("el.pagination.pagesize")
|
|
67
|
-
}, null, 8, ["value", "label"]);
|
|
68
|
-
}), 128))
|
|
69
|
-
]),
|
|
70
|
-
_: 1
|
|
71
|
-
}, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"])
|
|
72
|
-
], 2);
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
var Sizes = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "sizes.vue"]]);
|
|
77
29
|
|
|
78
|
-
exports
|
|
30
|
+
exports.paginationSizesProps = paginationSizesProps;
|
|
79
31
|
//# sourceMappingURL=sizes2.js.map
|