@element-plus/nightly 0.0.20250210 → 0.0.20250212
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 +296 -329
- package/dist/index.full.min.js +5 -5
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +5 -5
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +296 -329
- 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 +2 -2
- package/es/components/anchor/src/anchor.mjs +42 -192
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +192 -42
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +29 -6
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +6 -29
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +42 -20
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +20 -42
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +14 -38
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +38 -14
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/index.mjs +10 -10
- package/es/components/menu/src/menu-collapse-transition.mjs +16 -17
- package/es/components/menu/src/menu-collapse-transition.mjs.map +1 -1
- package/es/components/menu/src/menu-collapse-transition.vue.d.ts +10 -4
- package/es/components/menu/src/menu-item-group.vue.d.ts +12 -21
- package/es/components/menu/src/menu-item-group2.mjs +23 -24
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/menu/src/menu-item.vue.d.ts +14 -2
- package/es/components/menu/src/menu-item2.mjs +45 -45
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/menu/src/menu.mjs +4 -13
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.mjs +4 -20
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/menu/src/use-menu-color.mjs +1 -5
- package/es/components/menu/src/use-menu-color.mjs.map +1 -1
- package/es/components/menu/src/use-menu-css-var.mjs +8 -10
- package/es/components/menu/src/use-menu-css-var.mjs.map +1 -1
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message.mjs +145 -91
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +91 -145
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/message-box/src/index.mjs +1 -1
- package/es/components/message-box/src/index.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +35 -17
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +17 -35
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +6 -26
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +26 -6
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popper/index.mjs +4 -4
- 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/popper/src/popper.mjs +22 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -22
- package/es/components/popper/src/popper2.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-group.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/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/slider/src/button.mjs +19 -89
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +89 -19
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +131 -54
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +54 -131
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/content.mjs +110 -48
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +48 -110
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +6 -35
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +35 -6
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +10 -10
- 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 +2 -2
- package/lib/components/anchor/src/anchor.js +42 -191
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +191 -42
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +29 -6
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +6 -29
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +42 -20
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +20 -42
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +15 -38
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +38 -15
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/index.js +10 -10
- package/lib/components/menu/src/menu-collapse-transition.js +15 -16
- package/lib/components/menu/src/menu-collapse-transition.js.map +1 -1
- package/lib/components/menu/src/menu-collapse-transition.vue.d.ts +10 -4
- package/lib/components/menu/src/menu-item-group.vue.d.ts +12 -21
- package/lib/components/menu/src/menu-item-group2.js +22 -23
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/menu/src/menu-item.vue.d.ts +14 -2
- package/lib/components/menu/src/menu-item2.js +48 -48
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/menu/src/menu.js +4 -13
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.js +4 -20
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/menu/src/use-menu-color.js +1 -5
- package/lib/components/menu/src/use-menu-color.js.map +1 -1
- package/lib/components/menu/src/use-menu-css-var.js +8 -10
- package/lib/components/menu/src/use-menu-css-var.js.map +1 -1
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message.js +144 -93
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +93 -144
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/message-box/src/index.js +1 -1
- package/lib/components/message-box/src/index.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +35 -18
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +18 -35
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +6 -26
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +26 -6
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popper/index.js +4 -4
- 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/popper/src/popper.js +25 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -25
- package/lib/components/popper/src/popper2.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-group.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/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/slider/src/button.js +20 -89
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +89 -20
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +136 -54
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +54 -136
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/content.js +110 -48
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +48 -110
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +6 -35
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +35 -6
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +10 -10
- 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
|
@@ -63,14 +63,12 @@ var SubMenu = vue.defineComponent({
|
|
|
63
63
|
let timeout;
|
|
64
64
|
const mouseInChild = vue.ref(false);
|
|
65
65
|
const verticalTitleRef = vue.ref();
|
|
66
|
-
const vPopper = vue.ref(
|
|
66
|
+
const vPopper = vue.ref();
|
|
67
67
|
const currentPlacement = vue.computed(() => mode.value === "horizontal" && isFirstLevel.value ? "bottom-start" : "right-start");
|
|
68
68
|
const subMenuTitleIcon = vue.computed(() => {
|
|
69
69
|
return mode.value === "horizontal" && isFirstLevel.value || mode.value === "vertical" && !rootMenu.props.collapse ? props.expandCloseIcon && props.expandOpenIcon ? opened.value ? props.expandOpenIcon : props.expandCloseIcon : iconsVue.ArrowDown : props.collapseCloseIcon && props.collapseOpenIcon ? opened.value ? props.collapseOpenIcon : props.collapseCloseIcon : iconsVue.ArrowRight;
|
|
70
70
|
});
|
|
71
|
-
const isFirstLevel = vue.computed(() =>
|
|
72
|
-
return subMenu.level === 0;
|
|
73
|
-
});
|
|
71
|
+
const isFirstLevel = vue.computed(() => subMenu.level === 0);
|
|
74
72
|
const appendToBody = vue.computed(() => {
|
|
75
73
|
const value = props.teleported;
|
|
76
74
|
return value === void 0 ? isFirstLevel.value : value;
|
|
@@ -94,20 +92,7 @@ var SubMenu = vue.defineComponent({
|
|
|
94
92
|
"top-end"
|
|
95
93
|
]);
|
|
96
94
|
const opened = vue.computed(() => rootMenu.openedMenus.includes(props.index));
|
|
97
|
-
const active = vue.computed(() => {
|
|
98
|
-
let isActive = false;
|
|
99
|
-
Object.values(items.value).forEach((item2) => {
|
|
100
|
-
if (item2.active) {
|
|
101
|
-
isActive = true;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
Object.values(subMenus.value).forEach((subItem) => {
|
|
105
|
-
if (subItem.active) {
|
|
106
|
-
isActive = true;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
return isActive;
|
|
110
|
-
});
|
|
95
|
+
const active = vue.computed(() => [...Object.values(items.value), ...Object.values(subMenus.value)].some(({ active: active2 }) => active2));
|
|
111
96
|
const mode = vue.computed(() => rootMenu.props.mode);
|
|
112
97
|
const item = vue.reactive({
|
|
113
98
|
index: props.index,
|
|
@@ -151,9 +136,8 @@ var SubMenu = vue.defineComponent({
|
|
|
151
136
|
};
|
|
152
137
|
const handleMouseenter = (event, showTimeout = subMenuShowTimeout.value) => {
|
|
153
138
|
var _a;
|
|
154
|
-
if (event.type === "focus")
|
|
139
|
+
if (event.type === "focus")
|
|
155
140
|
return;
|
|
156
|
-
}
|
|
157
141
|
if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) {
|
|
158
142
|
subMenu.mouseInChild.value = true;
|
|
159
143
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-menu.js","sources":["../../../../../../packages/components/menu/src/sub-menu.ts"],"sourcesContent":["import {\n Fragment,\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n vShow,\n watch,\n withDirectives,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n buildProps,\n iconPropType,\n isString,\n throwError,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { ExtractPropTypes, VNodeArrayChildren } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n /**\n * @description unique identification\n */\n index: {\n type: String,\n required: true,\n },\n /**\n * @description timeout before showing a sub-menu(inherit `show-timeout` of the menu by default.)\n */\n showTimeout: Number,\n /**\n * @description timeout before hiding a sub-menu(inherit `hide-timeout` of the menu by default.)\n */\n hideTimeout: Number,\n /**\n * @description custom class name for the popup menu\n */\n popperClass: String,\n /**\n * @description whether the sub-menu is disabled\n */\n disabled: Boolean,\n /**\n * @description whether popup menu is teleported to the body\n */\n teleported: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description offset of the popper (overrides the `popper` of menu)\n */\n popperOffset: Number,\n /**\n * @description Icon when menu are expanded and submenu are closed, `expand-close-icon` and `expand-open-icon` need to be passed together to take effect\n */\n expandCloseIcon: {\n type: iconPropType,\n },\n /**\n * @description Icon when menu are expanded and submenu are opened, `expand-open-icon` and `expand-close-icon` need to be passed together to take effect\n */\n expandOpenIcon: {\n type: iconPropType,\n },\n /**\n * @description Icon when menu are collapsed and submenu are closed, `collapse-close-icon` and `collapse-open-icon` need to be passed together to take effect\n */\n collapseCloseIcon: {\n type: iconPropType,\n },\n /**\n * @description Icon when menu are collapsed and submenu are opened, `collapse-open-icon` and `collapse-close-icon` need to be passed together to take effect\n */\n collapseOpenIcon: {\n type: iconPropType,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes<typeof subMenuProps>\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n const instance = getCurrentInstance()!\n const { indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // inject\n const rootMenu = inject<MenuProvider>('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n let timeout: (() => void) | undefined\n const mouseInChild = ref(false)\n const verticalTitleRef = ref<HTMLDivElement>()\n const vPopper = ref<InstanceType<typeof ElTooltip> | null>(null)\n\n // computed\n const currentPlacement = computed<Placement>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n )\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? props.expandCloseIcon && props.expandOpenIcon\n ? opened.value\n ? props.expandOpenIcon\n : props.expandCloseIcon\n : ArrowDown\n : props.collapseCloseIcon && props.collapseOpenIcon\n ? opened.value\n ? props.collapseOpenIcon\n : props.collapseCloseIcon\n : ArrowRight\n })\n const isFirstLevel = computed(() => {\n return subMenu.level === 0\n })\n const appendToBody = computed(() => {\n const value = props.teleported\n return value === undefined ? isFirstLevel.value : value\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse\n ? `${nsMenu.namespace.value}-zoom-in-left`\n : `${nsMenu.namespace.value}-zoom-in-top`\n )\n const fallbackPlacements = computed<Placement[]>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'right',\n 'right-end',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() => {\n let isActive = false\n\n Object.values(items.value).forEach((item) => {\n if (item.active) {\n isActive = true\n }\n })\n\n Object.values(subMenus.value).forEach((subItem) => {\n if (subItem.active) {\n isActive = true\n }\n })\n\n return isActive\n })\n\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)\n\n const subMenuPopperOffset = computed(() => {\n return props.popperOffset ?? rootMenu.props.popperOffset\n })\n\n const subMenuPopperClass = computed(() => {\n return props.popperClass ?? rootMenu.props.popperClass\n })\n\n const subMenuShowTimeout = computed(() => {\n return props.showTimeout ?? rootMenu.props.showTimeout\n })\n\n const subMenuHideTimeout = computed(() => {\n return props.hideTimeout ?? rootMenu.props.hideTimeout\n })\n\n // methods\n const doDestroy = () =>\n vPopper.value?.popperRef?.popperInstanceRef?.destroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (!value) {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = subMenuShowTimeout.value\n ) => {\n if (event.type === 'focus') {\n return\n }\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n subMenu.mouseInChild.value = true\n return\n }\n subMenu.mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(() => {\n rootMenu.openMenu(props.index, indexPath.value)\n }, showTimeout))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n subMenu.mouseInChild.value = false\n return\n }\n timeout?.()\n subMenu.mouseInChild.value = false\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n subMenuHideTimeout.value\n ))\n\n if (appendToBody.value && deepDispatch) {\n subMenu.handleMouseleave?.(true)\n }\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide<SubMenuProvider>(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n mouseInChild,\n level: subMenu.level + 1,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-arrow'),\n style: {\n transform: opened.value\n ? (props.expandCloseIcon && props.expandOpenIcon) ||\n (props.collapseCloseIcon &&\n props.collapseOpenIcon &&\n rootMenu.props.collapse)\n ? 'none'\n : 'rotateZ(180deg)'\n : 'none',\n },\n },\n {\n default: () =>\n isString(subMenuTitleIcon.value)\n ? h(instance.appContext.components[subMenuTitleIcon.value])\n : h(subMenuTitleIcon.value),\n }\n ),\n ]\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n // temporarily mark ElPopper as any due to type inconsistency.\n const child = rootMenu.isMenuPopup\n ? h(\n // TODO: correct popper's type.\n ElTooltip as any,\n {\n ref: vPopper,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: subMenuPopperOffset.value,\n showArrow: false,\n persistent: true,\n popperClass: subMenuPopperClass.value,\n placement: currentPlacement.value,\n teleported: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n content: () =>\n h(\n 'div',\n {\n class: [\n nsMenu.m(mode.value),\n nsMenu.m('popup-container'),\n subMenuPopperClass.value,\n ],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n nsMenu.b(),\n nsMenu.m('popup'),\n nsMenu.m(`popup-${currentPlacement.value}`),\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n default: () =>\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: [nsMenu.b(), nsMenu.m('inline')],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n nsSubMenu.b(),\n nsSubMenu.is('active', active.value),\n nsSubMenu.is('opened', opened.value),\n nsSubMenu.is('disabled', props.disabled),\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n"],"names":["buildProps","iconPropType","defineComponent","getCurrentInstance","useMenu","computed","useNamespace","inject","throwError","ref","ArrowDown","ArrowRight","reactive","useMenuCssVar","useTimeoutFn","watch","provide","onMounted","onBeforeUnmount","h","ElIcon","isString","ElTooltip","Fragment","ElCollapseTransition","withDirectives","vShow"],"mappings":";;;;;;;;;;;;;;;;;;AA8BY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAEA,iBAAY;AACtB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAEA,iBAAY;AACtB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAEA,iBAAY;AACtB,GAAG;AACH,CAAC,EAAE;AACH,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,cAAeC,mBAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,cAAc;AACtB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;AAClC,IAAI,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AAC1C,IAAI,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAGC,kBAAO,CAAC,QAAQ,EAAEC,YAAQ,CAAC,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF,IAAI,MAAM,MAAM,GAAGC,kBAAY,CAAC,MAAM,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CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;AAClD,SAAS;AACT,QAAQ,IAAI,EAAE,UAAU;AACxB,QAAQ,YAAY,EAAE,IAAI;AAC1B,QAAQ,YAAY,EAAE,MAAM,CAAC,KAAK;AAClC,QAAQ,YAAY,EAAE,gBAAgB;AACtC,QAAQ,YAAY,EAAE,MAAM,gBAAgB,EAAE;AAC9C,QAAQ,OAAO,EAAE,gBAAgB;AACjC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAClB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;;"}
|
|
1
|
+
{"version":3,"file":"sub-menu.js","sources":["../../../../../../packages/components/menu/src/sub-menu.ts"],"sourcesContent":["import {\n Fragment,\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n vShow,\n watch,\n withDirectives,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n buildProps,\n iconPropType,\n isString,\n throwError,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { ExtractPropTypes, VNodeArrayChildren } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n /**\n * @description unique identification\n */\n index: {\n type: String,\n required: true,\n },\n /**\n * @description timeout before showing a sub-menu(inherit `show-timeout` of the menu by default.)\n */\n showTimeout: Number,\n /**\n * @description timeout before hiding a sub-menu(inherit `hide-timeout` of the menu by default.)\n */\n hideTimeout: Number,\n /**\n * @description custom class name for the popup menu\n */\n popperClass: String,\n /**\n * @description whether the sub-menu is disabled\n */\n disabled: Boolean,\n /**\n * @description whether popup menu is teleported to the body\n */\n teleported: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description offset of the popper (overrides the `popper` of menu)\n */\n popperOffset: Number,\n /**\n * @description Icon when menu are expanded and submenu are closed, `expand-close-icon` and `expand-open-icon` need to be passed together to take effect\n */\n expandCloseIcon: {\n type: iconPropType,\n },\n /**\n * @description Icon when menu are expanded and submenu are opened, `expand-open-icon` and `expand-close-icon` need to be passed together to take effect\n */\n expandOpenIcon: {\n type: iconPropType,\n },\n /**\n * @description Icon when menu are collapsed and submenu are closed, `collapse-close-icon` and `collapse-open-icon` need to be passed together to take effect\n */\n collapseCloseIcon: {\n type: iconPropType,\n },\n /**\n * @description Icon when menu are collapsed and submenu are opened, `collapse-open-icon` and `collapse-close-icon` need to be passed together to take effect\n */\n collapseOpenIcon: {\n type: iconPropType,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes<typeof subMenuProps>\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n const instance = getCurrentInstance()!\n const { indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // inject\n const rootMenu = inject<MenuProvider>('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n let timeout: (() => void) | undefined\n const mouseInChild = ref(false)\n const verticalTitleRef = ref<HTMLDivElement>()\n const vPopper = ref<TooltipInstance>()\n\n // computed\n const currentPlacement = computed<Placement>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n )\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? props.expandCloseIcon && props.expandOpenIcon\n ? opened.value\n ? props.expandOpenIcon\n : props.expandCloseIcon\n : ArrowDown\n : props.collapseCloseIcon && props.collapseOpenIcon\n ? opened.value\n ? props.collapseOpenIcon\n : props.collapseCloseIcon\n : ArrowRight\n })\n const isFirstLevel = computed(() => subMenu.level === 0)\n const appendToBody = computed(() => {\n const value = props.teleported\n return value === undefined ? isFirstLevel.value : value\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse\n ? `${nsMenu.namespace.value}-zoom-in-left`\n : `${nsMenu.namespace.value}-zoom-in-top`\n )\n const fallbackPlacements = computed<Placement[]>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'right',\n 'right-end',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() =>\n [...Object.values(items.value), ...Object.values(subMenus.value)].some(\n ({ active }) => active\n )\n )\n\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)\n\n const subMenuPopperOffset = computed(\n () => props.popperOffset ?? rootMenu.props.popperOffset\n )\n\n const subMenuPopperClass = computed(\n () => props.popperClass ?? rootMenu.props.popperClass\n )\n\n const subMenuShowTimeout = computed(\n () => props.showTimeout ?? rootMenu.props.showTimeout\n )\n\n const subMenuHideTimeout = computed(\n () => props.hideTimeout ?? rootMenu.props.hideTimeout\n )\n\n // methods\n const doDestroy = () =>\n vPopper.value?.popperRef?.popperInstanceRef?.destroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (!value) {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = subMenuShowTimeout.value\n ) => {\n if (event.type === 'focus') return\n\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n subMenu.mouseInChild.value = true\n return\n }\n subMenu.mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(() => {\n rootMenu.openMenu(props.index, indexPath.value)\n }, showTimeout))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n subMenu.mouseInChild.value = false\n return\n }\n timeout?.()\n subMenu.mouseInChild.value = false\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n subMenuHideTimeout.value\n ))\n\n if (appendToBody.value && deepDispatch) {\n subMenu.handleMouseleave?.(true)\n }\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide<SubMenuProvider>(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n mouseInChild,\n level: subMenu.level + 1,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-arrow'),\n style: {\n transform: opened.value\n ? (props.expandCloseIcon && props.expandOpenIcon) ||\n (props.collapseCloseIcon &&\n props.collapseOpenIcon &&\n rootMenu.props.collapse)\n ? 'none'\n : 'rotateZ(180deg)'\n : 'none',\n },\n },\n {\n default: () =>\n isString(subMenuTitleIcon.value)\n ? h(instance.appContext.components[subMenuTitleIcon.value])\n : h(subMenuTitleIcon.value),\n }\n ),\n ]\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n const child = rootMenu.isMenuPopup\n ? h(\n ElTooltip,\n {\n ref: vPopper,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: subMenuPopperOffset.value,\n showArrow: false,\n persistent: true,\n popperClass: subMenuPopperClass.value,\n placement: currentPlacement.value,\n teleported: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n content: () =>\n h(\n 'div',\n {\n class: [\n nsMenu.m(mode.value),\n nsMenu.m('popup-container'),\n subMenuPopperClass.value,\n ],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n nsMenu.b(),\n nsMenu.m('popup'),\n nsMenu.m(`popup-${currentPlacement.value}`),\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n default: () =>\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: [nsMenu.b(), nsMenu.m('inline')],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n nsSubMenu.b(),\n nsSubMenu.is('active', active.value),\n nsSubMenu.is('opened', opened.value),\n nsSubMenu.is('disabled', props.disabled),\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n"],"names":["buildProps","iconPropType","defineComponent","getCurrentInstance","useMenu","computed","useNamespace","inject","throwError","ref","ArrowDown","ArrowRight","reactive","useMenuCssVar","useTimeoutFn","watch","provide","onMounted","onBeforeUnmount","h","ElIcon","isString","ElTooltip","Fragment","ElCollapseTransition","withDirectives","vShow"],"mappings":";;;;;;;;;;;;;;;;;;AA8BY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,eAAe,EAAE;A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G,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAC,CAAC;AACT,MAAM,OAAOP,KAAC,CAAC,IAAI,EAAE;AACrB,QAAQ,KAAK,EAAE;AACf,UAAU,SAAS,CAAC,CAAC,EAAE;AACvB,UAAU,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC;AAC9C,UAAU,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC;AAC9C,UAAU,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;AAClD,SAAS;AACT,QAAQ,IAAI,EAAE,UAAU;AACxB,QAAQ,YAAY,EAAE,IAAI;AAC1B,QAAQ,YAAY,EAAE,MAAM,CAAC,KAAK;AAClC,QAAQ,YAAY,EAAE,gBAAgB;AACtC,QAAQ,YAAY,EAAE,MAAM,gBAAgB,EAAE;AAC9C,QAAQ,OAAO,EAAE,gBAAgB;AACjC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAClB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;;"}
|
|
@@ -8,11 +8,7 @@ var tinycolor = require('@ctrl/tinycolor');
|
|
|
8
8
|
function useMenuColor(props) {
|
|
9
9
|
const menuBarColor = vue.computed(() => {
|
|
10
10
|
const color = props.backgroundColor;
|
|
11
|
-
|
|
12
|
-
return "";
|
|
13
|
-
} else {
|
|
14
|
-
return new tinycolor.TinyColor(color).shade(20).toString();
|
|
15
|
-
}
|
|
11
|
+
return color ? new tinycolor.TinyColor(color).shade(20).toString() : "";
|
|
16
12
|
});
|
|
17
13
|
return menuBarColor;
|
|
18
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-menu-color.js","sources":["../../../../../../packages/components/menu/src/use-menu-color.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { TinyColor } from '@ctrl/tinycolor'\n\nimport type { MenuProps } from './menu'\n\nexport default function useMenuColor(props: MenuProps) {\n const menuBarColor = computed(() => {\n const color = props.backgroundColor\n
|
|
1
|
+
{"version":3,"file":"use-menu-color.js","sources":["../../../../../../packages/components/menu/src/use-menu-color.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { TinyColor } from '@ctrl/tinycolor'\n\nimport type { MenuProps } from './menu'\n\nexport default function useMenuColor(props: MenuProps) {\n const menuBarColor = computed(() => {\n const color = props.backgroundColor\n return color ? new TinyColor(color).shade(20).toString() : ''\n })\n return menuBarColor\n}\n"],"names":["computed","TinyColor"],"mappings":";;;;;;;AAEe,SAAS,YAAY,CAAC,KAAK,EAAE;AAC5C,EAAE,MAAM,YAAY,GAAGA,YAAQ,CAAC,MAAM;AACtC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,eAAe,CAAC;AACxC,IAAI,OAAO,KAAK,GAAG,IAAIC,mBAAS,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC;AAClE,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,YAAY,CAAC;AACtB;;;;"}
|
|
@@ -8,16 +8,14 @@ var index = require('../../../hooks/use-namespace/index.js');
|
|
|
8
8
|
|
|
9
9
|
const useMenuCssVar = (props, level) => {
|
|
10
10
|
const ns = index.useNamespace("menu");
|
|
11
|
-
return vue.computed(() => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
});
|
|
11
|
+
return vue.computed(() => ns.cssVarBlock({
|
|
12
|
+
"text-color": props.textColor || "",
|
|
13
|
+
"hover-text-color": props.textColor || "",
|
|
14
|
+
"bg-color": props.backgroundColor || "",
|
|
15
|
+
"hover-bg-color": useMenuColor["default"](props).value || "",
|
|
16
|
+
"active-color": props.activeTextColor || "",
|
|
17
|
+
level: `${level}`
|
|
18
|
+
}));
|
|
21
19
|
};
|
|
22
20
|
|
|
23
21
|
exports.useMenuCssVar = useMenuCssVar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-menu-css-var.js","sources":["../../../../../../packages/components/menu/src/use-menu-css-var.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport useMenuColor from './use-menu-color'\n\nimport type { MenuProps } from './menu'\n\nexport const useMenuCssVar = (props: MenuProps, level: number) => {\n const ns = useNamespace('menu')\n return computed(()
|
|
1
|
+
{"version":3,"file":"use-menu-css-var.js","sources":["../../../../../../packages/components/menu/src/use-menu-css-var.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport useMenuColor from './use-menu-color'\n\nimport type { MenuProps } from './menu'\n\nexport const useMenuCssVar = (props: MenuProps, level: number) => {\n const ns = useNamespace('menu')\n return computed(() =>\n ns.cssVarBlock({\n 'text-color': props.textColor || '',\n 'hover-text-color': props.textColor || '',\n 'bg-color': props.backgroundColor || '',\n 'hover-bg-color': useMenuColor(props).value || '',\n 'active-color': props.activeTextColor || '',\n level: `${level}`,\n })\n )\n}\n"],"names":["useNamespace","computed","useMenuColor"],"mappings":";;;;;;;;AAGY,MAAC,aAAa,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK;AAC/C,EAAE,MAAM,EAAE,GAAGA,kBAAY,CAAC,MAAM,CAAC,CAAC;AAClC,EAAE,OAAOC,YAAQ,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC;AACvC,IAAI,YAAY,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE;AACvC,IAAI,kBAAkB,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE;AAC7C,IAAI,UAAU,EAAE,KAAK,CAAC,eAAe,IAAI,EAAE;AAC3C,IAAI,gBAAgB,EAAEC,uBAAY,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE;AACrD,IAAI,cAAc,EAAE,KAAK,CAAC,eAAe,IAAI,EAAE;AAC/C,IAAI,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AACrB,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var method = require('./src/method.js');
|
|
6
|
-
var message = require('./src/
|
|
6
|
+
var message = require('./src/message2.js');
|
|
7
7
|
var install = require('../../utils/vue/install.js');
|
|
8
8
|
|
|
9
9
|
const ElMessage = install.withInstallFunction(method["default"], "$message");
|
|
@@ -2,103 +2,154 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var icon = require('../../../utils/vue/icon.js');
|
|
7
|
-
var typescript = require('../../../utils/typescript.js');
|
|
5
|
+
var vue = require('vue');
|
|
8
6
|
var core = require('@vueuse/core');
|
|
7
|
+
var index = require('../../badge/index.js');
|
|
8
|
+
var index$1 = require('../../icon/index.js');
|
|
9
|
+
var message = require('./message2.js');
|
|
10
|
+
var instance = require('./instance.js');
|
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
+
var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
|
|
13
|
+
var icon = require('../../../utils/vue/icon.js');
|
|
14
|
+
var aria = require('../../../constants/aria.js');
|
|
9
15
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
customClass: "",
|
|
13
|
-
center: false,
|
|
14
|
-
dangerouslyUseHTMLString: false,
|
|
15
|
-
duration: 3e3,
|
|
16
|
-
icon: void 0,
|
|
17
|
-
id: "",
|
|
18
|
-
message: "",
|
|
19
|
-
onClose: void 0,
|
|
20
|
-
showClose: false,
|
|
21
|
-
type: "info",
|
|
22
|
-
plain: false,
|
|
23
|
-
offset: 16,
|
|
24
|
-
zIndex: 0,
|
|
25
|
-
grouping: false,
|
|
26
|
-
repeatNum: 1,
|
|
27
|
-
appendTo: core.isClient ? document.body : void 0
|
|
16
|
+
const __default__ = vue.defineComponent({
|
|
17
|
+
name: "ElMessage"
|
|
28
18
|
});
|
|
29
|
-
const
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
20
|
+
...__default__,
|
|
21
|
+
props: message.messageProps,
|
|
22
|
+
emits: message.messageEmits,
|
|
23
|
+
setup(__props, { expose }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const { Close } = icon.TypeComponents;
|
|
26
|
+
const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("message");
|
|
27
|
+
const { currentZIndex, nextZIndex } = zIndex;
|
|
28
|
+
const messageRef = vue.ref();
|
|
29
|
+
const visible = vue.ref(false);
|
|
30
|
+
const height = vue.ref(0);
|
|
31
|
+
let stopTimer = void 0;
|
|
32
|
+
const badgeType = vue.computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
|
|
33
|
+
const typeClass = vue.computed(() => {
|
|
34
|
+
const type = props.type;
|
|
35
|
+
return { [ns.bm("icon", type)]: type && icon.TypeComponentsMap[type] };
|
|
36
|
+
});
|
|
37
|
+
const iconComponent = vue.computed(() => props.icon || icon.TypeComponentsMap[props.type] || "");
|
|
38
|
+
const lastOffset = vue.computed(() => instance.getLastOffset(props.id));
|
|
39
|
+
const offset = vue.computed(() => instance.getOffsetOrSpace(props.id, props.offset) + lastOffset.value);
|
|
40
|
+
const bottom = vue.computed(() => height.value + offset.value);
|
|
41
|
+
const customStyle = vue.computed(() => ({
|
|
42
|
+
top: `${offset.value}px`,
|
|
43
|
+
zIndex: currentZIndex.value
|
|
44
|
+
}));
|
|
45
|
+
function startTimer() {
|
|
46
|
+
if (props.duration === 0)
|
|
47
|
+
return;
|
|
48
|
+
({ stop: stopTimer } = core.useTimeoutFn(() => {
|
|
49
|
+
close();
|
|
50
|
+
}, props.duration));
|
|
51
|
+
}
|
|
52
|
+
function clearTimer() {
|
|
53
|
+
stopTimer == null ? void 0 : stopTimer();
|
|
54
|
+
}
|
|
55
|
+
function close() {
|
|
56
|
+
visible.value = false;
|
|
57
|
+
}
|
|
58
|
+
function keydown({ code }) {
|
|
59
|
+
if (code === aria.EVENT_CODE.esc) {
|
|
60
|
+
close();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
vue.onMounted(() => {
|
|
64
|
+
startTimer();
|
|
65
|
+
nextZIndex();
|
|
66
|
+
visible.value = true;
|
|
67
|
+
});
|
|
68
|
+
vue.watch(() => props.repeatNum, () => {
|
|
69
|
+
clearTimer();
|
|
70
|
+
startTimer();
|
|
71
|
+
});
|
|
72
|
+
core.useEventListener(document, "keydown", keydown);
|
|
73
|
+
core.useResizeObserver(messageRef, () => {
|
|
74
|
+
height.value = messageRef.value.getBoundingClientRect().height;
|
|
75
|
+
});
|
|
76
|
+
expose({
|
|
77
|
+
visible,
|
|
78
|
+
bottom,
|
|
79
|
+
close
|
|
80
|
+
});
|
|
81
|
+
return (_ctx, _cache) => {
|
|
82
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
83
|
+
name: vue.unref(ns).b("fade"),
|
|
84
|
+
onBeforeLeave: _ctx.onClose,
|
|
85
|
+
onAfterLeave: ($event) => _ctx.$emit("destroy"),
|
|
86
|
+
persisted: ""
|
|
87
|
+
}, {
|
|
88
|
+
default: vue.withCtx(() => [
|
|
89
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
90
|
+
id: _ctx.id,
|
|
91
|
+
ref_key: "messageRef",
|
|
92
|
+
ref: messageRef,
|
|
93
|
+
class: vue.normalizeClass([
|
|
94
|
+
vue.unref(ns).b(),
|
|
95
|
+
{ [vue.unref(ns).m(_ctx.type)]: _ctx.type },
|
|
96
|
+
vue.unref(ns).is("center", _ctx.center),
|
|
97
|
+
vue.unref(ns).is("closable", _ctx.showClose),
|
|
98
|
+
vue.unref(ns).is("plain", _ctx.plain),
|
|
99
|
+
_ctx.customClass
|
|
100
|
+
]),
|
|
101
|
+
style: vue.normalizeStyle(vue.unref(customStyle)),
|
|
102
|
+
role: "alert",
|
|
103
|
+
onMouseenter: clearTimer,
|
|
104
|
+
onMouseleave: startTimer
|
|
105
|
+
}, [
|
|
106
|
+
_ctx.repeatNum > 1 ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElBadge), {
|
|
107
|
+
key: 0,
|
|
108
|
+
value: _ctx.repeatNum,
|
|
109
|
+
type: vue.unref(badgeType),
|
|
110
|
+
class: vue.normalizeClass(vue.unref(ns).e("badge"))
|
|
111
|
+
}, null, 8, ["value", "type", "class"])) : vue.createCommentVNode("v-if", true),
|
|
112
|
+
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
113
|
+
key: 1,
|
|
114
|
+
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
|
|
115
|
+
}, {
|
|
116
|
+
default: vue.withCtx(() => [
|
|
117
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
121
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
122
|
+
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
123
|
+
key: 0,
|
|
124
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
125
|
+
}, vue.toDisplayString(_ctx.message), 3)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
126
|
+
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
127
|
+
vue.createElementVNode("p", {
|
|
128
|
+
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
129
|
+
innerHTML: _ctx.message
|
|
130
|
+
}, null, 10, ["innerHTML"])
|
|
131
|
+
], 2112))
|
|
132
|
+
]),
|
|
133
|
+
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
134
|
+
key: 2,
|
|
135
|
+
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
|
|
136
|
+
onClick: vue.withModifiers(close, ["stop"])
|
|
137
|
+
}, {
|
|
138
|
+
default: vue.withCtx(() => [
|
|
139
|
+
vue.createVNode(vue.unref(Close))
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
143
|
+
], 46, ["id"]), [
|
|
144
|
+
[vue.vShow, visible.value]
|
|
145
|
+
])
|
|
146
|
+
]),
|
|
147
|
+
_: 3
|
|
148
|
+
}, 8, ["name", "onBeforeLeave", "onAfterLeave"]);
|
|
149
|
+
};
|
|
94
150
|
}
|
|
95
151
|
});
|
|
96
|
-
|
|
97
|
-
destroy: () => true
|
|
98
|
-
};
|
|
152
|
+
var MessageConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "message.vue"]]);
|
|
99
153
|
|
|
100
|
-
exports
|
|
101
|
-
exports.messageEmits = messageEmits;
|
|
102
|
-
exports.messageProps = messageProps;
|
|
103
|
-
exports.messageTypes = messageTypes;
|
|
154
|
+
exports["default"] = MessageConstructor;
|
|
104
155
|
//# sourceMappingURL=message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sources":["../../../../../../packages/components/message/src/message.
|
|
1
|
+
{"version":3,"file":"message.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)\ndefineEmits(messageEmits)\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\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","useGlobalComponentSettings","ref","computed","TypeComponentsMap","getLastOffset","getOffsetOrSpace","useTimeoutFn","EVENT_CODE","onMounted","watch","useEventListener","useResizeObserver","_openBlock","_createBlock","_Transition","_unref","_withCtx"],"mappings":";;;;;;;;;;;;;;;uCA6Dc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAJA,IAAM,MAAA,EAAE,OAAU,GAAAA,mBAAA,CAAA;AASlB,IAAA,MAAM,EAAE,EAAA,EAAI,MAAO,EAAA,GAAIC,2CAA2B,SAAS,CAAA,CAAA;AAC3D,IAAM,MAAA,EAAE,aAAe,EAAA,UAAA,EAAe,GAAA,MAAA,CAAA;AAEtC,IAAA,MAAM,aAAaC,OAAoB,EAAA,CAAA;AACvC,IAAM,MAAA,OAAA,GAAUA,QAAI,KAAK,CAAA,CAAA;AACzB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AAEpB,IAAA,IAAI,SAAsC,GAAA,KAAA,CAAA,CAAA;AAE1C,IAAA,MAAM,SAAY,GAAAC,YAAA,CAAA,MAAA,KAAA,CAAA,IAAA,GAAA,KAAA,CAAA,IAAA,KAAA,OAAA,GAAA,QAAA,GAAA,KAAA,CAAA,IAAA,GAAA,MAAA,CAAA,CAAA;AAAA,IAA6B,MAAA,SAC/B,GAAAA,YAAA,CAAM;AAA4C,MAClE,MAAA,IAAA,GAAA,KAAA,CAAA,IAAA,CAAA;AACA,MAAM,OAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAY,YAAe,CAAA,GAAA,IAAA,IAAAC,sBAAA,CAAA,IAAA,CAAA,EA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