@element-plus/nightly 0.0.20220222 → 0.0.20220225
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +2649 -5535
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2650 -5536
- 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.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/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/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/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/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.d.ts +6 -8
- package/es/components/affix/src/affix.vue.d.ts +6 -8
- package/es/components/affix/src/affix2.mjs +35 -34
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/avatar/index.d.ts +58 -0
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/index.mjs.map +1 -1
- package/es/components/avatar/src/avatar.vue.d.ts +58 -0
- package/es/components/avatar/src/avatar2.mjs +29 -38
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +4 -1
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/button/index.d.ts +12 -1
- package/es/components/button/index.mjs +3 -3
- package/es/components/button/index.mjs.map +1 -1
- package/es/components/button/src/button-group.vue.d.ts +6 -0
- package/es/components/button/src/button-group2.mjs +15 -16
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +0 -1
- package/es/components/button/src/button2.mjs +3 -5
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/index.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +27 -29
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +12 -12
- package/es/components/cascader/src/index.vue.d.ts +6 -6
- package/es/components/descriptions/index.d.ts +2 -2
- package/es/components/descriptions/src/description-item.d.ts +1 -1
- package/es/components/dialog/index.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +1 -1
- package/es/components/drawer/index.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +1 -1
- package/es/components/dropdown/index.d.ts +3 -3
- package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +33 -8
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +8 -33
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/message/index.d.ts +1 -1
- package/es/components/message/src/message-method.d.ts +1 -1
- package/es/components/message/src/message-method.mjs +10 -7
- package/es/components/message/src/message-method.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +3 -3
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/notification/index.d.ts +1 -1
- package/es/components/popover/index.d.ts +10 -10
- package/es/components/popover/src/index.vue.d.ts +5 -5
- package/es/components/popper/src/content.mjs +9 -0
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content.vue.d.ts +3 -0
- package/es/components/popper/src/popper.d.ts +1 -0
- package/es/components/popper/src/popper.mjs +3 -0
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/row/index.d.ts +3 -3
- package/es/components/row/src/row.d.ts +4 -4
- package/es/components/row/src/row.mjs +8 -1
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/scrollbar/index.d.ts +1 -1
- package/es/components/scrollbar/src/bar.vue.d.ts +2 -2
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +3 -3
- package/es/components/select/src/select.vue.d.ts +3 -3
- package/es/components/select/src/useSelect.d.ts +3 -3
- package/es/components/select-v2/index.d.ts +8 -8
- package/es/components/select-v2/src/select.vue.d.ts +4 -4
- package/es/components/select-v2/src/useSelect.d.ts +3 -3
- package/es/components/slider/index.d.ts +2 -2
- package/es/components/slider/src/index.vue.d.ts +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +3 -3
- package/es/components/table/src/store/watcher.mjs +4 -8
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table.mjs +1 -0
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +6 -2
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +4 -3
- package/es/components/tooltip/index.d.ts +1 -1
- package/es/components/tooltip/src/content.mjs +2 -1
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +7 -2
- package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/utils/vue/install.d.ts +2 -2
- package/es/utils/vue/install.mjs +2 -0
- package/es/utils/vue/install.mjs.map +1 -1
- package/es/utils/vue/typescript.d.ts +4 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.d.ts +6 -8
- package/lib/components/affix/src/affix.vue.d.ts +6 -8
- package/lib/components/affix/src/affix2.js +34 -33
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/avatar/index.d.ts +58 -0
- package/lib/components/avatar/src/avatar.vue.d.ts +58 -0
- package/lib/components/avatar/src/avatar2.js +31 -40
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/src/badge2.js +4 -1
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.d.ts +12 -1
- package/lib/components/button/src/button-group.vue.d.ts +6 -0
- package/lib/components/button/src/button-group2.js +14 -15
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +0 -1
- package/lib/components/button/src/button2.js +3 -5
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/card/src/card2.js +26 -28
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/index.d.ts +12 -12
- package/lib/components/cascader/src/index.vue.d.ts +6 -6
- package/lib/components/descriptions/index.d.ts +2 -2
- package/lib/components/descriptions/src/description-item.d.ts +1 -1
- package/lib/components/dialog/index.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
- package/lib/components/drawer/index.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +1 -1
- package/lib/components/dropdown/index.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +33 -8
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +8 -33
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/message/index.d.ts +1 -1
- package/lib/components/message/src/message-method.d.ts +1 -1
- package/lib/components/message/src/message-method.js +10 -7
- package/lib/components/message/src/message-method.js.map +1 -1
- package/lib/components/message/src/message.d.ts +3 -3
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/notification/index.d.ts +1 -1
- package/lib/components/popover/index.d.ts +10 -10
- package/lib/components/popover/src/index.vue.d.ts +5 -5
- package/lib/components/popper/src/content.js +9 -0
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content.vue.d.ts +3 -0
- package/lib/components/popper/src/popper.d.ts +1 -0
- package/lib/components/popper/src/popper.js +3 -0
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/row/index.d.ts +3 -3
- package/lib/components/row/src/row.d.ts +4 -4
- package/lib/components/row/src/row.js +8 -1
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/scrollbar/index.d.ts +1 -1
- package/lib/components/scrollbar/src/bar.vue.d.ts +2 -2
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +3 -3
- package/lib/components/select/src/select.vue.d.ts +3 -3
- package/lib/components/select/src/useSelect.d.ts +3 -3
- package/lib/components/select-v2/index.d.ts +8 -8
- package/lib/components/select-v2/src/select.vue.d.ts +4 -4
- package/lib/components/select-v2/src/useSelect.d.ts +3 -3
- package/lib/components/slider/index.d.ts +2 -2
- package/lib/components/slider/src/index.vue.d.ts +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +3 -3
- package/lib/components/table/src/store/watcher.js +4 -8
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table.js +1 -0
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +6 -2
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +4 -3
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/components/tooltip/src/content.js +2 -1
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +7 -2
- package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/utils/vue/install.d.ts +2 -2
- package/lib/utils/vue/install.js +2 -0
- package/lib/utils/vue/install.js.map +1 -1
- package/lib/utils/vue/typescript.d.ts +4 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +3 -3
- package/theme-chalk/el-button.css +1 -1
- package/theme-chalk/el-check-tag.css +1 -1
- package/theme-chalk/el-checkbox-button.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-row.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-tag.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/check-tag.scss +7 -5
- package/theme-chalk/src/checkbox-button.scss +1 -1
- package/theme-chalk/src/common/var.scss +3 -14
- package/theme-chalk/src/date-picker/date-table.scss +14 -14
- package/theme-chalk/src/date-picker/picker.scss +3 -4
- package/theme-chalk/src/input.scss +12 -7
- package/theme-chalk/src/mixins/_button.scss +119 -15
- package/theme-chalk/src/mixins/_var.scss +12 -0
- package/theme-chalk/src/mixins/function.scss +17 -0
- package/theme-chalk/src/row.scss +3 -1
- package/theme-chalk/src/select.scss +3 -0
- package/theme-chalk/src/tag.scss +64 -66
- package/web-types.json +1 -1
package/es/components/index.mjs
CHANGED
|
@@ -92,7 +92,7 @@ export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
|
|
|
92
92
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
|
|
93
93
|
export { DROPDOWN_INJECTION_KEY } from './dropdown/src/tokens.mjs';
|
|
94
94
|
export { emptyProps } from './empty/src/empty.mjs';
|
|
95
|
-
export { iconProps } from './icon/src/
|
|
95
|
+
export { iconProps } from './icon/src/icon2.mjs';
|
|
96
96
|
export { imageEmits, imageProps } from './image/src/image.mjs';
|
|
97
97
|
export { imageViewerEmits, imageViewerProps } from './image-viewer/src/image-viewer.mjs';
|
|
98
98
|
export { inputEmits, inputProps } from './input/src/input.mjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ElMessage: import("element-plus/es/utils").
|
|
1
|
+
export declare const ElMessage: import("element-plus/es/utils").SFCInstallWithContext<import("./src/message").Message>;
|
|
2
2
|
export default ElMessage;
|
|
3
3
|
export * from './src/message';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Message } from './message';
|
|
2
1
|
import type { VNode } from 'vue';
|
|
2
|
+
import type { Message } from './message';
|
|
3
3
|
export declare function close(id: string, userOnClose?: (vm: VNode) => void): void;
|
|
4
4
|
export declare function closeAll(): void;
|
|
5
5
|
declare const _default: Message;
|
|
@@ -5,18 +5,19 @@ import '../../../hooks/index.mjs';
|
|
|
5
5
|
import { messageConfig } from '../../config-provider/src/config-provider.mjs';
|
|
6
6
|
import MessageConstructor from './message2.mjs';
|
|
7
7
|
import { messageTypes } from './message.mjs';
|
|
8
|
+
import { isObject, isString } from '@vue/shared';
|
|
8
9
|
import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
|
|
9
10
|
import { debugWarn } from '../../../utils/error.mjs';
|
|
10
11
|
|
|
11
12
|
const instances = [];
|
|
12
13
|
let seed = 1;
|
|
13
|
-
const message = function(options = {}) {
|
|
14
|
+
const message = function(options = {}, context) {
|
|
14
15
|
if (!isClient)
|
|
15
16
|
return { close: () => void 0 };
|
|
16
17
|
if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {
|
|
17
18
|
return { close: () => void 0 };
|
|
18
19
|
}
|
|
19
|
-
if (!isVNode(options) &&
|
|
20
|
+
if (!isVNode(options) && isObject(options) && options.grouping && !isVNode(options.message) && instances.length) {
|
|
20
21
|
const tempVm = instances.find((item) => {
|
|
21
22
|
var _a, _b, _c;
|
|
22
23
|
return `${(_b = (_a = item.vm.props) == null ? void 0 : _a.message) != null ? _b : ""}` === `${(_c = options.message) != null ? _c : ""}`;
|
|
@@ -29,7 +30,7 @@ const message = function(options = {}) {
|
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
if (
|
|
33
|
+
if (isString(options) || isVNode(options)) {
|
|
33
34
|
options = { message: options };
|
|
34
35
|
}
|
|
35
36
|
let verticalOffset = options.offset || 20;
|
|
@@ -53,7 +54,7 @@ const message = function(options = {}) {
|
|
|
53
54
|
let appendTo = document.body;
|
|
54
55
|
if (options.appendTo instanceof HTMLElement) {
|
|
55
56
|
appendTo = options.appendTo;
|
|
56
|
-
} else if (
|
|
57
|
+
} else if (isString(options.appendTo)) {
|
|
57
58
|
appendTo = document.querySelector(options.appendTo);
|
|
58
59
|
}
|
|
59
60
|
if (!(appendTo instanceof HTMLElement)) {
|
|
@@ -62,8 +63,9 @@ const message = function(options = {}) {
|
|
|
62
63
|
}
|
|
63
64
|
const container = document.createElement("div");
|
|
64
65
|
container.className = `container_${id}`;
|
|
65
|
-
const
|
|
66
|
-
const vm = createVNode(MessageConstructor, props, isVNode(
|
|
66
|
+
const messageContent = props.message;
|
|
67
|
+
const vm = createVNode(MessageConstructor, props, isVNode(messageContent) ? { default: () => messageContent } : null);
|
|
68
|
+
vm.appContext = context || message._context;
|
|
67
69
|
vm.props.onDestroy = () => {
|
|
68
70
|
render(null, container);
|
|
69
71
|
};
|
|
@@ -76,7 +78,7 @@ const message = function(options = {}) {
|
|
|
76
78
|
};
|
|
77
79
|
messageTypes.forEach((type) => {
|
|
78
80
|
message[type] = (options = {}) => {
|
|
79
|
-
if (
|
|
81
|
+
if (isString(options) || isVNode(options)) {
|
|
80
82
|
options = {
|
|
81
83
|
message: options
|
|
82
84
|
};
|
|
@@ -113,6 +115,7 @@ function closeAll() {
|
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
message.closeAll = closeAll;
|
|
118
|
+
message._context = null;
|
|
116
119
|
|
|
117
120
|
export { close, closeAll, message as default };
|
|
118
121
|
//# sourceMappingURL=message-method.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-method.mjs","sources":["../../../../../../packages/components/message/src/message-method.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { isVNode, isNumber, debugWarn } from '@element-plus/utils'\nimport { useZIndex } from '@element-plus/hooks'\nimport { messageConfig } from '@element-plus/components/config-provider/src/config-provider'\nimport MessageConstructor from './message.vue'\nimport { messageTypes } from './message'\n\nimport type { Message, MessageFn, MessageQueue, MessageProps } from './message'\nimport type { ComponentPublicInstance, VNode } from 'vue'\n\nconst instances: MessageQueue = []\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 message: MessageFn & Partial<Message> = function (options = {}) {\n if (!isClient) return { close: () => undefined }\n if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {\n return { close: () => undefined }\n }\n\n if (\n !isVNode(options) &&\n typeof options === 'object' &&\n options.grouping &&\n !isVNode(options.message) &&\n instances.length\n ) {\n const tempVm: any = instances.find(\n (item) =>\n `${item.vm.props?.message ?? ''}` ===\n `${(options as any).message ?? ''}`\n )\n if (tempVm) {\n tempVm.vm.component!.props.repeatNum += 1\n tempVm.vm.component!.props.type = options?.type\n return {\n close: () =>\n ((\n vm.component!.proxy as ComponentPublicInstance<{ visible: boolean }>\n ).visible = false),\n }\n }\n }\n\n if (typeof options === 'string' || isVNode(options)) {\n options = { message: options }\n }\n\n let verticalOffset = options.offset || 20\n instances.forEach(({ vm }) => {\n verticalOffset += (vm.el?.offsetHeight || 0) + 16\n })\n verticalOffset += 16\n\n const { nextZIndex } = useZIndex()\n\n const id = `message_${seed++}`\n const userOnClose = options.onClose\n const props: Partial<MessageProps> = {\n zIndex: nextZIndex(),\n offset: verticalOffset,\n ...options,\n id,\n onClose: () => {\n close(id, userOnClose)\n },\n }\n\n let appendTo: HTMLElement | null = document.body\n if (options.appendTo instanceof HTMLElement) {\n appendTo = options.appendTo\n } else if (typeof options.appendTo === 'string') {\n appendTo = document.querySelector(options.appendTo)\n }\n // should fallback to default value with a warning\n if (!(appendTo instanceof HTMLElement)) {\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 const container = document.createElement('div')\n\n container.className = `container_${id}`\n\n const message = props.message\n const vm = createVNode(\n MessageConstructor,\n props,\n isVNode(props.message) ? { default: () => message } : null\n )\n\n // clean message element preventing mem leak\n vm.props!.onDestroy = () => {\n render(null, container)\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 }\n\n render(vm, container)\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n instances.push({ vm })\n appendTo.appendChild(container.firstElementChild!)\n\n return {\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 ((\n vm.component!.proxy as ComponentPublicInstance<{ visible: boolean }>\n ).visible = false),\n }\n}\n\nmessageTypes.forEach((type) => {\n message[type] = (options = {}) => {\n if (typeof options === 'string' || isVNode(options)) {\n options = {\n message: options,\n }\n }\n return message({\n ...options,\n type,\n })\n }\n})\n\nexport function close(id: string, userOnClose?: (vm: VNode) => void): void {\n const idx = instances.findIndex(({ vm }) => id === vm.component!.props.id)\n if (idx === -1) return\n\n const { vm } = instances[idx]\n if (!vm) return\n userOnClose?.(vm)\n\n const removedHeight = vm.el!.offsetHeight\n instances.splice(idx, 1)\n\n // adjust other instances vertical offset\n const len = instances.length\n if (len < 1) return\n for (let i = idx; i < len; i++) {\n const pos =\n parseInt(instances[i].vm.el!.style['top'], 10) - removedHeight - 16\n\n instances[i].vm.component!.props.offset = pos\n }\n}\n\nexport function closeAll(): void {\n for (let i = instances.length - 1; i >= 0; i--) {\n const instance = instances[i].vm.component\n ;(instance?.proxy as any)?.close()\n }\n}\n\nmessage.closeAll = closeAll\n\nexport default message as Message\n"],"names":[],"mappings":";;;;;;;;;;AAOA,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,GAAG,CAAC,CAAC;AACR,MAAC,OAAO,GAAG,SAAS,OAAO,GAAG,EAAE,EAAE;AACvC,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;AACnC,EAAE,IAAI,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,IAA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,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC;AACjD,GAAG;AACH,CAAC;AACM,SAAS,QAAQ,GAAG;AAC3B,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;AAClD,IAAI,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC;AAC/C,IAAI,CAAC,EAAE,GAAG,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;AACpF,GAAG;AACH,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ;;;;"}
|
|
1
|
+
{"version":3,"file":"message-method.mjs","sources":["../../../../../../packages/components/message/src/message-method.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport {\n isVNode,\n isNumber,\n isObject,\n isString,\n debugWarn,\n} from '@element-plus/utils'\nimport { useZIndex } from '@element-plus/hooks'\nimport { messageConfig } from '@element-plus/components/config-provider/src/config-provider'\nimport MessageConstructor from './message.vue'\nimport { messageTypes } from './message'\n\nimport type { AppContext, ComponentPublicInstance, VNode } from 'vue'\nimport type { Message, MessageFn, MessageQueue, MessageProps } from './message'\n\nconst instances: MessageQueue = []\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 message: MessageFn & Partial<Message> & { _context: AppContext | null } =\n function (options = {}, context?: AppContext | null) {\n if (!isClient) return { close: () => undefined }\n if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {\n return { close: () => undefined }\n }\n\n if (\n !isVNode(options) &&\n isObject(options) &&\n options.grouping &&\n !isVNode(options.message) &&\n instances.length\n ) {\n const tempVm: any = instances.find(\n (item) =>\n `${item.vm.props?.message ?? ''}` ===\n `${(options as any).message ?? ''}`\n )\n if (tempVm) {\n tempVm.vm.component!.props.repeatNum += 1\n tempVm.vm.component!.props.type = options?.type\n return {\n close: () =>\n ((\n vm.component!.proxy as ComponentPublicInstance<{\n visible: boolean\n }>\n ).visible = false),\n }\n }\n }\n\n if (isString(options) || isVNode(options)) {\n options = { message: options }\n }\n\n let verticalOffset = options.offset || 20\n instances.forEach(({ vm }) => {\n verticalOffset += (vm.el?.offsetHeight || 0) + 16\n })\n verticalOffset += 16\n\n const { nextZIndex } = useZIndex()\n\n const id = `message_${seed++}`\n const userOnClose = options.onClose\n const props: Partial<MessageProps> = {\n zIndex: nextZIndex(),\n offset: verticalOffset,\n ...options,\n id,\n onClose: () => {\n close(id, userOnClose)\n },\n }\n\n let appendTo: HTMLElement | null = document.body\n if (options.appendTo instanceof HTMLElement) {\n appendTo = options.appendTo\n } else if (isString(options.appendTo)) {\n appendTo = document.querySelector(options.appendTo)\n }\n // should fallback to default value with a warning\n if (!(appendTo instanceof HTMLElement)) {\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 const container = document.createElement('div')\n\n container.className = `container_${id}`\n\n const messageContent = props.message\n const vm = createVNode(\n MessageConstructor,\n props,\n isVNode(messageContent) ? { default: () => messageContent } : null\n )\n\n vm.appContext = context || message._context\n\n // clean message element preventing mem leak\n vm.props!.onDestroy = () => {\n render(null, container)\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 }\n\n render(vm, container)\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n instances.push({ vm })\n appendTo.appendChild(container.firstElementChild!)\n\n return {\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 ((\n vm.component!.proxy as ComponentPublicInstance<{ visible: boolean }>\n ).visible = false),\n }\n }\n\nmessageTypes.forEach((type) => {\n message[type] = (options = {}) => {\n if (isString(options) || isVNode(options)) {\n options = {\n message: options,\n }\n }\n return message({\n ...options,\n type,\n })\n }\n})\n\nexport function close(id: string, userOnClose?: (vm: VNode) => void): void {\n const idx = instances.findIndex(({ vm }) => id === vm.component!.props.id)\n if (idx === -1) return\n\n const { vm } = instances[idx]\n if (!vm) return\n userOnClose?.(vm)\n\n const removedHeight = vm.el!.offsetHeight\n instances.splice(idx, 1)\n\n // adjust other instances vertical offset\n const len = instances.length\n if (len < 1) return\n for (let i = idx; i < len; i++) {\n const pos =\n parseInt(instances[i].vm.el!.style['top'], 10) - removedHeight - 16\n\n instances[i].vm.component!.props.offset = pos\n }\n}\n\nexport function closeAll(): void {\n for (let i = instances.length - 1; i >= 0; i--) {\n const instance = instances[i].vm.component\n ;(instance?.proxy as any)?.close()\n }\n}\n\nmessage.closeAll = closeAll\nmessage._context = null\n\nexport default message as Message\n"],"names":[],"mappings":";;;;;;;;;;;AAaA,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,GAAG,CAAC,CAAC;AACR,MAAC,OAAO,GAAG,SAAS,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE;AAChD,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;AACnC,EAAE,IAAI,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE;AAC5E,IAAI,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;AACnC,GAAG;AACH,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,MAAM,EA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IAAI,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC;AAC/C,IAAI,CAAC,EAAE,GAAG,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;AACpF,GAAG;AACH,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B,OAAO,CAAC,QAAQ,GAAG,IAAI;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VNode, ExtractPropTypes } from 'vue';
|
|
1
|
+
import type { VNode, ExtractPropTypes, AppContext } from 'vue';
|
|
2
2
|
export declare const messageTypes: readonly ["success", "info", "warning", "error"];
|
|
3
3
|
export interface MessageConfigContext {
|
|
4
4
|
max?: number;
|
|
@@ -35,10 +35,10 @@ export interface MessageHandle {
|
|
|
35
35
|
}
|
|
36
36
|
export declare type MessageParams = Partial<MessageOptions> | string | VNode;
|
|
37
37
|
export declare type MessageParamsTyped = Partial<MessageOptionsTyped> | string | VNode;
|
|
38
|
-
export declare type MessageFn = ((options?: MessageParams) => MessageHandle) & {
|
|
38
|
+
export declare type MessageFn = ((options?: MessageParams, appContext?: null | AppContext) => MessageHandle) & {
|
|
39
39
|
closeAll(): void;
|
|
40
40
|
};
|
|
41
|
-
export declare type MessageTypedFn = (options?: MessageParamsTyped) => MessageHandle;
|
|
41
|
+
export declare type MessageTypedFn = (options?: MessageParamsTyped, appContext?: null | AppContext) => MessageHandle;
|
|
42
42
|
export interface Message extends MessageFn {
|
|
43
43
|
success: MessageTypedFn;
|
|
44
44
|
warning: MessageTypedFn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.mjs","sources":["../../../../../../packages/components/message/src/message.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport type { VNode, ExtractPropTypes } from 'vue'\n\nexport const messageTypes = ['success', 'info', 'warning', 'error'] as const\n\nexport interface MessageConfigContext {\n max?: number\n}\n\nexport const messageProps = buildProps({\n customClass: {\n type: String,\n default: '',\n },\n center: {\n type: Boolean,\n default: false,\n },\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: false,\n },\n duration: {\n type: Number,\n default: 3000,\n },\n icon: {\n type: iconPropType,\n default: '',\n },\n id: {\n type: String,\n default: '',\n },\n message: {\n type: definePropType<string | VNode>([String, Object]),\n default: '',\n },\n onClose: {\n type: definePropType<() => void>(Function),\n required: false,\n },\n showClose: {\n type: Boolean,\n default: false,\n },\n type: {\n type: String,\n values: messageTypes,\n default: 'info',\n },\n offset: {\n type: Number,\n default: 20,\n },\n zIndex: {\n type: Number,\n default: 0,\n },\n grouping: {\n type: Boolean,\n default: false,\n },\n repeatNum: {\n type: Number,\n default: 1,\n },\n} as const)\nexport type MessageProps = ExtractPropTypes<typeof messageProps>\n\nexport const messageEmits = {\n destroy: () => true,\n}\nexport type MessageEmits = typeof messageEmits\n\nexport type MessageOptions = Omit<MessageProps, 'id'> & {\n appendTo?: HTMLElement | string\n}\nexport type MessageOptionsTyped = Omit<MessageOptions, 'type'>\n\nexport interface MessageHandle {\n close: () => void\n}\n\nexport type MessageParams = Partial<MessageOptions> | string | VNode\nexport type MessageParamsTyped = Partial<MessageOptionsTyped> | string | VNode\n\nexport type MessageFn = ((options?: MessageParams) => MessageHandle) & {\n closeAll(): void\n}\nexport type MessageTypedFn = (options?: MessageParamsTyped) => MessageHandle\n\nexport interface Message extends MessageFn {\n success: MessageTypedFn\n warning: MessageTypedFn\n info: MessageTypedFn\n error: MessageTypedFn\n}\n\ntype MessageQueueItem = {\n vm: VNode\n}\n\nexport type MessageQueue = MessageQueueItem[]\n"],"names":[],"mappings":";;;;AACY,MAAC,YAAY,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;AACxD,MAAC,YAAY,GAAG,UAAU,CAAC;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QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;"}
|
|
1
|
+
{"version":3,"file":"message.mjs","sources":["../../../../../../packages/components/message/src/message.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport type { VNode, ExtractPropTypes, AppContext } from 'vue'\n\nexport const messageTypes = ['success', 'info', 'warning', 'error'] as const\n\nexport interface MessageConfigContext {\n max?: number\n}\n\nexport const messageProps = buildProps({\n customClass: {\n type: String,\n default: '',\n },\n center: {\n type: Boolean,\n default: false,\n },\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: false,\n },\n duration: {\n type: Number,\n default: 3000,\n },\n icon: {\n type: iconPropType,\n default: '',\n },\n id: {\n type: String,\n default: '',\n },\n message: {\n type: definePropType<string | VNode>([String, Object]),\n default: '',\n },\n onClose: {\n type: definePropType<() => void>(Function),\n required: false,\n },\n showClose: {\n type: Boolean,\n default: false,\n },\n type: {\n type: String,\n values: messageTypes,\n default: 'info',\n },\n offset: {\n type: Number,\n default: 20,\n },\n zIndex: {\n type: Number,\n default: 0,\n },\n grouping: {\n type: Boolean,\n default: false,\n },\n repeatNum: {\n type: Number,\n default: 1,\n },\n} as const)\nexport type MessageProps = ExtractPropTypes<typeof messageProps>\n\nexport const messageEmits = {\n destroy: () => true,\n}\nexport type MessageEmits = typeof messageEmits\n\nexport type MessageOptions = Omit<MessageProps, 'id'> & {\n appendTo?: HTMLElement | string\n}\nexport type MessageOptionsTyped = Omit<MessageOptions, 'type'>\n\nexport interface MessageHandle {\n close: () => void\n}\n\nexport type MessageParams = Partial<MessageOptions> | string | VNode\nexport type MessageParamsTyped = Partial<MessageOptionsTyped> | string | VNode\n\nexport type MessageFn = ((\n options?: MessageParams,\n appContext?: null | AppContext\n) => MessageHandle) & {\n closeAll(): void\n}\nexport type MessageTypedFn = (\n options?: MessageParamsTyped,\n appContext?: null | AppContext\n) => MessageHandle\n\nexport interface Message extends MessageFn {\n success: MessageTypedFn\n warning: MessageTypedFn\n info: MessageTypedFn\n error: MessageTypedFn\n}\n\ntype MessageQueueItem = {\n vm: VNode\n}\n\nexport type MessageQueue = MessageQueueItem[]\n"],"names":[],"mappings":";;;;AACY,MAAC,YAAY,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;AACxD,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,wBAAwB,EAAE;AAC5B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,QAAQ,EAAE,KAAK;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ElNotification: import("element-plus/es/utils").
|
|
1
|
+
export declare const ElNotification: import("element-plus/es/utils").SFCInstallWithContext<import("./src/notification").Notify>;
|
|
2
2
|
export default ElNotification;
|
|
3
3
|
export * from './src/notification';
|
|
@@ -119,6 +119,7 @@ declare const _Popover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
119
119
|
} | (string | {
|
|
120
120
|
[x: string]: any;
|
|
121
121
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
122
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
122
123
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
123
124
|
pure: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
124
125
|
popperClass: string | {
|
|
@@ -149,7 +150,6 @@ declare const _Popover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
149
150
|
popperStyle: import("vue").StyleValue;
|
|
150
151
|
referenceEl: HTMLElement;
|
|
151
152
|
stopPopperMouseEvent: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
152
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
153
153
|
content: string;
|
|
154
154
|
showAfter: number;
|
|
155
155
|
hideAfter: number;
|
|
@@ -252,7 +252,7 @@ declare const _Popover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
252
252
|
"onUpdate:visible": import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<(val: boolean) => void>, never, false, never, never>;
|
|
253
253
|
}>> & {
|
|
254
254
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
255
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "offset" | "effect" | "arrowOffset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "placement" | "popperOptions" | "strategy" | "style" | "className" | "enterable" | "pure" | "popperClass" | "popperStyle" | "referenceEl" | "stopPopperMouseEvent" | "
|
|
255
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "offset" | "effect" | "arrowOffset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "placement" | "popperOptions" | "strategy" | "style" | "className" | "visible" | "enterable" | "pure" | "popperClass" | "popperStyle" | "referenceEl" | "stopPopperMouseEvent" | "content" | "showAfter" | "hideAfter" | "appendTo" | "rawContent" | "transition" | "teleported" | "persistent" | "trigger" | "virtualRef" | "virtualTriggering" | "onUpdate:visible" | "openDelay" | "visibleArrow" | "showArrow">;
|
|
256
256
|
$attrs: {
|
|
257
257
|
[x: string]: unknown;
|
|
258
258
|
};
|
|
@@ -436,6 +436,7 @@ declare const _Popover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
436
436
|
} | (string | {
|
|
437
437
|
[x: string]: any;
|
|
438
438
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
439
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
439
440
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
440
441
|
pure: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
441
442
|
popperClass: string | {
|
|
@@ -466,7 +467,6 @@ declare const _Popover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
466
467
|
popperStyle: import("vue").StyleValue;
|
|
467
468
|
referenceEl: HTMLElement;
|
|
468
469
|
stopPopperMouseEvent: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
469
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
470
470
|
content: string;
|
|
471
471
|
showAfter: number;
|
|
472
472
|
hideAfter: number;
|
|
@@ -743,10 +743,10 @@ declare const _Popover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
743
743
|
}, {
|
|
744
744
|
disabled: boolean;
|
|
745
745
|
offset: number;
|
|
746
|
-
width: import("element-plus/es/utils").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
747
746
|
effect: string;
|
|
748
747
|
placement: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<import("@popperjs/core").Placement>, unknown, unknown>;
|
|
749
748
|
popperOptions: Partial<import("@popperjs/core").Options>;
|
|
749
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
750
750
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
751
751
|
popperClass: string | {
|
|
752
752
|
[x: string]: any;
|
|
@@ -774,8 +774,8 @@ declare const _Popover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
774
774
|
[x: string]: any;
|
|
775
775
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
776
776
|
popperStyle: import("vue").StyleValue;
|
|
777
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
778
777
|
content: string;
|
|
778
|
+
width: import("element-plus/es/utils").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
779
779
|
showAfter: number;
|
|
780
780
|
hideAfter: number;
|
|
781
781
|
transition: string;
|
|
@@ -909,6 +909,7 @@ export declare const ElPopover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
909
909
|
} | (string | {
|
|
910
910
|
[x: string]: any;
|
|
911
911
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
912
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
912
913
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
913
914
|
pure: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
914
915
|
popperClass: string | {
|
|
@@ -939,7 +940,6 @@ export declare const ElPopover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
939
940
|
popperStyle: import("vue").StyleValue;
|
|
940
941
|
referenceEl: HTMLElement;
|
|
941
942
|
stopPopperMouseEvent: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
942
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
943
943
|
content: string;
|
|
944
944
|
showAfter: number;
|
|
945
945
|
hideAfter: number;
|
|
@@ -1042,7 +1042,7 @@ export declare const ElPopover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1042
1042
|
"onUpdate:visible": import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<(val: boolean) => void>, never, false, never, never>;
|
|
1043
1043
|
}>> & {
|
|
1044
1044
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
1045
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "offset" | "effect" | "arrowOffset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "placement" | "popperOptions" | "strategy" | "style" | "className" | "enterable" | "pure" | "popperClass" | "popperStyle" | "referenceEl" | "stopPopperMouseEvent" | "
|
|
1045
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "offset" | "effect" | "arrowOffset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "placement" | "popperOptions" | "strategy" | "style" | "className" | "visible" | "enterable" | "pure" | "popperClass" | "popperStyle" | "referenceEl" | "stopPopperMouseEvent" | "content" | "showAfter" | "hideAfter" | "appendTo" | "rawContent" | "transition" | "teleported" | "persistent" | "trigger" | "virtualRef" | "virtualTriggering" | "onUpdate:visible" | "openDelay" | "visibleArrow" | "showArrow">;
|
|
1046
1046
|
$attrs: {
|
|
1047
1047
|
[x: string]: unknown;
|
|
1048
1048
|
};
|
|
@@ -1226,6 +1226,7 @@ export declare const ElPopover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1226
1226
|
} | (string | {
|
|
1227
1227
|
[x: string]: any;
|
|
1228
1228
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
1229
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
1229
1230
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1230
1231
|
pure: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1231
1232
|
popperClass: string | {
|
|
@@ -1256,7 +1257,6 @@ export declare const ElPopover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1256
1257
|
popperStyle: import("vue").StyleValue;
|
|
1257
1258
|
referenceEl: HTMLElement;
|
|
1258
1259
|
stopPopperMouseEvent: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1259
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
1260
1260
|
content: string;
|
|
1261
1261
|
showAfter: number;
|
|
1262
1262
|
hideAfter: number;
|
|
@@ -1533,10 +1533,10 @@ export declare const ElPopover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1533
1533
|
}, {
|
|
1534
1534
|
disabled: boolean;
|
|
1535
1535
|
offset: number;
|
|
1536
|
-
width: import("element-plus/es/utils").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
1537
1536
|
effect: string;
|
|
1538
1537
|
placement: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<import("@popperjs/core").Placement>, unknown, unknown>;
|
|
1539
1538
|
popperOptions: Partial<import("@popperjs/core").Options>;
|
|
1539
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
1540
1540
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1541
1541
|
popperClass: string | {
|
|
1542
1542
|
[x: string]: any;
|
|
@@ -1564,8 +1564,8 @@ export declare const ElPopover: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1564
1564
|
[x: string]: any;
|
|
1565
1565
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
1566
1566
|
popperStyle: import("vue").StyleValue;
|
|
1567
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
1568
1567
|
content: string;
|
|
1568
|
+
width: import("element-plus/es/utils").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
1569
1569
|
showAfter: number;
|
|
1570
1570
|
hideAfter: number;
|
|
1571
1571
|
transition: string;
|
|
@@ -118,6 +118,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
118
118
|
} | (string | {
|
|
119
119
|
[x: string]: any;
|
|
120
120
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
121
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
121
122
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
122
123
|
pure: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
123
124
|
popperClass: string | {
|
|
@@ -148,7 +149,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
148
149
|
popperStyle: StyleValue;
|
|
149
150
|
referenceEl: HTMLElement;
|
|
150
151
|
stopPopperMouseEvent: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
151
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
152
152
|
content: string;
|
|
153
153
|
showAfter: number;
|
|
154
154
|
hideAfter: number;
|
|
@@ -251,7 +251,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
251
251
|
"onUpdate:visible": import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<(val: boolean) => void>, never, false, never, never>;
|
|
252
252
|
}>> & {
|
|
253
253
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
254
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "offset" | "effect" | "arrowOffset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "placement" | "popperOptions" | "strategy" | "style" | "className" | "enterable" | "pure" | "popperClass" | "popperStyle" | "referenceEl" | "stopPopperMouseEvent" | "
|
|
254
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "offset" | "effect" | "arrowOffset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "placement" | "popperOptions" | "strategy" | "style" | "className" | "visible" | "enterable" | "pure" | "popperClass" | "popperStyle" | "referenceEl" | "stopPopperMouseEvent" | "content" | "showAfter" | "hideAfter" | "appendTo" | "rawContent" | "transition" | "teleported" | "persistent" | "trigger" | "virtualRef" | "virtualTriggering" | "onUpdate:visible" | "openDelay" | "visibleArrow" | "showArrow">;
|
|
255
255
|
$attrs: {
|
|
256
256
|
[x: string]: unknown;
|
|
257
257
|
};
|
|
@@ -435,6 +435,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
435
435
|
} | (string | {
|
|
436
436
|
[x: string]: any;
|
|
437
437
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
438
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
438
439
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
439
440
|
pure: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
440
441
|
popperClass: string | {
|
|
@@ -465,7 +466,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
465
466
|
popperStyle: StyleValue;
|
|
466
467
|
referenceEl: HTMLElement;
|
|
467
468
|
stopPopperMouseEvent: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
468
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
469
469
|
content: string;
|
|
470
470
|
showAfter: number;
|
|
471
471
|
hideAfter: number;
|
|
@@ -742,10 +742,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
742
742
|
}, {
|
|
743
743
|
disabled: boolean;
|
|
744
744
|
offset: number;
|
|
745
|
-
width: import("element-plus/es/utils").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
746
745
|
effect: string;
|
|
747
746
|
placement: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<import("element-plus/es/components/popper").Placement>, unknown, unknown>;
|
|
748
747
|
popperOptions: Partial<import("element-plus/es/components/popper").Options>;
|
|
748
|
+
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
749
749
|
enterable: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
750
750
|
popperClass: string | {
|
|
751
751
|
[x: string]: any;
|
|
@@ -773,8 +773,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
773
773
|
[x: string]: any;
|
|
774
774
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
775
775
|
popperStyle: StyleValue;
|
|
776
|
-
visible: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean | null>, unknown, unknown>;
|
|
777
776
|
content: string;
|
|
777
|
+
width: import("element-plus/es/utils").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
778
778
|
showAfter: number;
|
|
779
779
|
hideAfter: number;
|
|
780
780
|
transition: string;
|
|
@@ -47,6 +47,14 @@ const _sfc_main = defineComponent({
|
|
|
47
47
|
(_a = unref(popperInstanceRef)) == null ? void 0 : _a.update();
|
|
48
48
|
contentZIndex.value = props.zIndex || nextZIndex();
|
|
49
49
|
};
|
|
50
|
+
const togglePopoerAlive = () => {
|
|
51
|
+
var _a;
|
|
52
|
+
const monitorable = { name: "eventListeners", enabled: props.visible };
|
|
53
|
+
(_a = unref(popperInstanceRef)) == null ? void 0 : _a.setOptions((options) => ({
|
|
54
|
+
...options,
|
|
55
|
+
modifiers: [...options.modifiers, monitorable]
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
50
58
|
onMounted(() => {
|
|
51
59
|
let updateHandle;
|
|
52
60
|
watch(() => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef), (val) => {
|
|
@@ -74,6 +82,7 @@ const _sfc_main = defineComponent({
|
|
|
74
82
|
}, {
|
|
75
83
|
immediate: true
|
|
76
84
|
});
|
|
85
|
+
watch(() => props.visible, togglePopoerAlive, { immediate: true });
|
|
77
86
|
watch(() => buildPopperOptions(props, {
|
|
78
87
|
arrowEl: unref(arrowRef),
|
|
79
88
|
arrowOffset: unref(arrowOffset)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"popperContentRef\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n role=\"tooltip\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n ref,\n inject,\n provide,\n unref,\n onMounted,\n watch,\n} from 'vue'\nimport { createPopper } from '@popperjs/core'\nimport { useZIndex, useNamespace } from '@element-plus/hooks'\nimport { POPPER_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY } from './tokens'\nimport { usePopperContentProps } from './popper'\nimport { buildPopperOptions, unwrapMeasurableEl } from './utils'\n\nexport default defineComponent({\n name: 'ElPopperContent',\n props: usePopperContentProps,\n emits: ['mouseenter', 'mouseleave'],\n setup(props) {\n const { triggerRef, popperInstanceRef, contentRef } = inject(\n POPPER_INJECTION_KEY,\n undefined\n )!\n const { nextZIndex } = useZIndex()\n const ns = useNamespace('popper')\n const popperContentRef = ref<HTMLElement | null>(null)\n const arrowRef = ref<HTMLElement | null>(null)\n const arrowOffset = ref<number>()\n provide(POPPER_CONTENT_INJECTION_KEY, {\n arrowRef,\n arrowOffset,\n })\n const contentZIndex = ref(props.zIndex || nextZIndex())\n\n const contentStyle = computed(\n () => [{ zIndex: unref(contentZIndex) }, props.popperStyle] as any\n )\n\n const contentClass = computed(() => [\n ns.b(),\n ns.is('pure', props.pure),\n ns.is(props.effect),\n props.popperClass,\n ])\n\n const createPopperInstance = ({\n referenceEl,\n popperContentEl,\n arrowEl,\n }) => {\n const options = buildPopperOptions(props, {\n arrowEl,\n arrowOffset: unref(arrowOffset),\n })\n\n return createPopper(referenceEl, popperContentEl, options)\n }\n\n const updatePopper = () => {\n unref(popperInstanceRef)?.update()\n contentZIndex.value = props.zIndex || nextZIndex()\n }\n\n onMounted(() => {\n let updateHandle: ReturnType<typeof watch>\n watch(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef),\n (val) => {\n updateHandle?.()\n if (val) {\n popperInstanceRef.value?.destroy()\n const popperContentEl = unref(popperContentRef)!\n contentRef.value = popperContentEl\n const arrowEl = unref(arrowRef)\n\n const newInstance = createPopperInstance({\n referenceEl: val,\n popperContentEl: unref(popperContentRef)!,\n arrowEl,\n })\n popperInstanceRef.value = newInstance\n\n updateHandle = watch(\n () => val!.getBoundingClientRect(),\n () => {\n updatePopper()\n },\n {\n immediate: true,\n }\n )\n } else {\n popperInstanceRef.value = null\n }\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () =>\n buildPopperOptions(props, {\n arrowEl: unref(arrowRef),\n arrowOffset: unref(arrowOffset),\n }),\n (option) => popperInstanceRef.value?.setOptions(option)\n )\n })\n\n return {\n ns,\n popperContentRef,\n popperInstanceRef,\n contentStyle,\n contentClass,\n updatePopper,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;AA8BA,MAAK,YAAa,gBAAa;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,cAAc;AAAA,EACtB,MAAM,OAAO;AACX,UAAM,EAAE,YAAY,mBAAmB,eAAe,OACpD,sBACA;AAEF,UAAM,EAAE,eAAe;AACvB,UAAM,KAAK,aAAa;AACxB,UAAM,mBAAmB,IAAwB;AACjD,UAAM,WAAW,IAAwB;AACzC,UAAM,cAAc;AACpB,YAAQ,8BAA8B;AAAA,MACpC;AAAA,MACA;AAAA;AAEF,UAAM,gBAAgB,IAAI,MAAM,UAAU;AAE1C,UAAM,eAAe,SACnB,MAAM,CAAC,EAAE,QAAQ,MAAM,kBAAkB,MAAM;AAGjD,UAAM,eAAe,SAAS,MAAM;AAAA,MAClC,GAAG;AAAA,MACH,GAAG,GAAG,QAAQ,MAAM;AAAA,MACpB,GAAG,GAAG,MAAM;AAAA,MACZ,MAAM;AAAA;AAGR,UAAM,uBAAuB,CAAC;AAAA,MAC5B;AAAA,MACA;AAAA,MACA;AAAA,UACI;AACJ,YAAM,UAAU,mBAAmB,OAAO;AAAA,QACxC;AAAA,QACA,aAAa,MAAM;AAAA;AAGrB,aAAO,aAAa,aAAa,iBAAiB;AAAA;AAGpD,UAAM,eAAe,MAAM;AACzB,YAAM;AACN;AAAsC;AAGxC;AACE;AACA;AAGI;AACA,YAAI;AACF,
|
|
1
|
+
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"popperContentRef\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n role=\"tooltip\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n ref,\n inject,\n provide,\n unref,\n onMounted,\n watch,\n} from 'vue'\nimport { createPopper } from '@popperjs/core'\nimport { useZIndex, useNamespace } from '@element-plus/hooks'\nimport { POPPER_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY } from './tokens'\nimport { usePopperContentProps } from './popper'\nimport { buildPopperOptions, unwrapMeasurableEl } from './utils'\n\nexport default defineComponent({\n name: 'ElPopperContent',\n props: usePopperContentProps,\n emits: ['mouseenter', 'mouseleave'],\n setup(props) {\n const { triggerRef, popperInstanceRef, contentRef } = inject(\n POPPER_INJECTION_KEY,\n undefined\n )!\n const { nextZIndex } = useZIndex()\n const ns = useNamespace('popper')\n const popperContentRef = ref<HTMLElement | null>(null)\n const arrowRef = ref<HTMLElement | null>(null)\n const arrowOffset = ref<number>()\n provide(POPPER_CONTENT_INJECTION_KEY, {\n arrowRef,\n arrowOffset,\n })\n const contentZIndex = ref(props.zIndex || nextZIndex())\n\n const contentStyle = computed(\n () => [{ zIndex: unref(contentZIndex) }, props.popperStyle] as any\n )\n\n const contentClass = computed(() => [\n ns.b(),\n ns.is('pure', props.pure),\n ns.is(props.effect),\n props.popperClass,\n ])\n\n const createPopperInstance = ({\n referenceEl,\n popperContentEl,\n arrowEl,\n }) => {\n const options = buildPopperOptions(props, {\n arrowEl,\n arrowOffset: unref(arrowOffset),\n })\n\n return createPopper(referenceEl, popperContentEl, options)\n }\n\n const updatePopper = () => {\n unref(popperInstanceRef)?.update()\n contentZIndex.value = props.zIndex || nextZIndex()\n }\n\n const togglePopoerAlive = () => {\n const monitorable = { name: 'eventListeners', enabled: props.visible }\n unref(popperInstanceRef)?.setOptions((options) => ({\n ...options,\n modifiers: [...options.modifiers, monitorable],\n }))\n }\n\n onMounted(() => {\n let updateHandle: ReturnType<typeof watch>\n watch(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef),\n (val) => {\n updateHandle?.()\n if (val) {\n popperInstanceRef.value?.destroy()\n const popperContentEl = unref(popperContentRef)!\n contentRef.value = popperContentEl\n const arrowEl = unref(arrowRef)\n\n const newInstance = createPopperInstance({\n referenceEl: val,\n popperContentEl: unref(popperContentRef)!,\n arrowEl,\n })\n popperInstanceRef.value = newInstance\n\n updateHandle = watch(\n () => val!.getBoundingClientRect(),\n () => {\n updatePopper()\n },\n {\n immediate: true,\n }\n )\n } else {\n popperInstanceRef.value = null\n }\n },\n {\n immediate: true,\n }\n )\n\n watch(() => props.visible, togglePopoerAlive, { immediate: true })\n\n watch(\n () =>\n buildPopperOptions(props, {\n arrowEl: unref(arrowRef),\n arrowOffset: unref(arrowOffset),\n }),\n (option) => popperInstanceRef.value?.setOptions(option)\n )\n })\n\n return {\n ns,\n popperContentRef,\n popperInstanceRef,\n contentStyle,\n contentClass,\n updatePopper,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;AA8BA,MAAK,YAAa,gBAAa;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,cAAc;AAAA,EACtB,MAAM,OAAO;AACX,UAAM,EAAE,YAAY,mBAAmB,eAAe,OACpD,sBACA;AAEF,UAAM,EAAE,eAAe;AACvB,UAAM,KAAK,aAAa;AACxB,UAAM,mBAAmB,IAAwB;AACjD,UAAM,WAAW,IAAwB;AACzC,UAAM,cAAc;AACpB,YAAQ,8BAA8B;AAAA,MACpC;AAAA,MACA;AAAA;AAEF,UAAM,gBAAgB,IAAI,MAAM,UAAU;AAE1C,UAAM,eAAe,SACnB,MAAM,CAAC,EAAE,QAAQ,MAAM,kBAAkB,MAAM;AAGjD,UAAM,eAAe,SAAS,MAAM;AAAA,MAClC,GAAG;AAAA,MACH,GAAG,GAAG,QAAQ,MAAM;AAAA,MACpB,GAAG,GAAG,MAAM;AAAA,MACZ,MAAM;AAAA;AAGR,UAAM,uBAAuB,CAAC;AAAA,MAC5B;AAAA,MACA;AAAA,MACA;AAAA,UACI;AACJ,YAAM,UAAU,mBAAmB,OAAO;AAAA,QACxC;AAAA,QACA,aAAa,MAAM;AAAA;AAGrB,aAAO,aAAa,aAAa,iBAAiB;AAAA;AAGpD,UAAM,eAAe,MAAM;AACzB,YAAM;AACN;AAAsC;AAGxC;AACE;AACA,YAAM;AAA6C;AAC9C;AAC+B;AAAA;AAItC;AACE;AACA;AAGI;AACA,YAAI;AACF;AACA,wCAA8B;AAC9B;AACA,gBAAM;AAEN,gBAAM;AAAmC;AAC1B;AACU;AACvB;AAEF;AAEA;AAGI;AAAA;AAEF;AACa;AAAA;AAIf;AAA0B;AAAA,SAG9B;AAAA;AACa;AAIf;AAEA;AAE8B,QACxB;AAAe;AACI,WAEtB;AAA+C;AAIpD;AAAO;AACL;AACA;AACA;AACA,MACA;AAAA;AACA;AAAA;AAAA;;;;AApIE;AARA;AACI;AAEH,mDACe;AAAoB;AACA;IAExC;AAAQ;;;;;;;;;;;;"}
|
|
@@ -26,6 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
[x: string]: any;
|
|
27
27
|
} | any)[])[])[])[])[])[])[])[])[])[])[]>, unknown, unknown, unknown, unknown>;
|
|
28
28
|
readonly effect: import("../../../utils").BuildPropReturn<StringConstructor, "dark", unknown, unknown, unknown>;
|
|
29
|
+
readonly visible: import("../../../utils").BuildPropReturn<BooleanConstructor, unknown, unknown, unknown, unknown>;
|
|
29
30
|
readonly enterable: import("../../../utils").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
30
31
|
readonly pure: import("../../../utils").BuildPropReturn<BooleanConstructor, unknown, unknown, unknown, unknown>;
|
|
31
32
|
readonly popperClass: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<string | {
|
|
@@ -114,6 +115,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
115
|
[x: string]: any;
|
|
115
116
|
} | any)[])[])[])[])[])[])[])[])[])[])[]>, unknown, unknown, unknown, unknown>;
|
|
116
117
|
readonly effect: import("../../../utils").BuildPropReturn<StringConstructor, "dark", unknown, unknown, unknown>;
|
|
118
|
+
readonly visible: import("../../../utils").BuildPropReturn<BooleanConstructor, unknown, unknown, unknown, unknown>;
|
|
117
119
|
readonly enterable: import("../../../utils").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
118
120
|
readonly pure: import("../../../utils").BuildPropReturn<BooleanConstructor, unknown, unknown, unknown, unknown>;
|
|
119
121
|
readonly popperClass: import("../../../utils").BuildPropReturn<import("../../../utils").PropWrapper<string | {
|
|
@@ -190,6 +192,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
190
192
|
} | (string | {
|
|
191
193
|
[x: string]: any;
|
|
192
194
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
195
|
+
visible: import("../../../utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
193
196
|
enterable: import("../../../utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
194
197
|
pure: import("../../../utils").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
195
198
|
popperClass: string | {
|
|
@@ -34,6 +34,7 @@ export declare const usePopperContentProps: {
|
|
|
34
34
|
readonly style: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<StyleValue>, unknown, unknown, unknown, unknown>;
|
|
35
35
|
readonly className: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<ClassType>, unknown, unknown, unknown, unknown>;
|
|
36
36
|
readonly effect: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "dark", unknown, unknown, unknown>;
|
|
37
|
+
readonly visible: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, unknown, unknown, unknown, unknown>;
|
|
37
38
|
readonly enterable: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
38
39
|
readonly pure: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, unknown, unknown, unknown, unknown>;
|
|
39
40
|
readonly popperClass: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<ClassType>, unknown, unknown, unknown, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popper.mjs","sources":["../../../../../../packages/components/popper/src/popper.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Placement, Options } from '@popperjs/core'\n\nconst effects = ['light', 'dark'] as const\nconst triggers = ['click', 'contextmenu', 'hover', 'focus'] as const\n\nexport const Effect = {\n LIGHT: 'light',\n DARK: 'dark',\n}\n\nexport type PopperEffect = typeof effects[number]\nexport type PopperTrigger = typeof triggers[number]\nexport type Measurable = {\n getBoundingClientRect: () => DOMRect\n}\n\ntype ClassObjectType = Record<string, any>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nexport const usePopperArrowProps = buildProps({\n arrowOffset: {\n type: Number,\n default: 5,\n },\n} as const)\n\nexport const usePopperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: () => [],\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n offset: {\n type: Number,\n default: 12,\n },\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: ['fixed', 'absolute'] as const,\n default: 'absolute',\n },\n} as const)\n\nexport const usePopperProps = buildProps({\n autoClose: {\n type: Number,\n default: 0,\n },\n cutoff: {\n type: Boolean,\n default: false,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport const usePopperContentProps = buildProps({\n ...usePopperCoreConfigProps,\n style: { type: definePropType<StyleValue>([String, Array, Object]) },\n className: { type: definePropType<ClassType>([String, Array, Object]) },\n effect: {\n type: String,\n default: 'dark',\n },\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: {\n type: Boolean,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n zIndex: Number,\n} as const)\n\nexport const usePopperTriggerProps = buildProps({\n virtualRef: {\n type: definePropType<Measurable>(Object),\n },\n virtualTriggering: {\n type: Boolean,\n },\n} as const)\n\nexport type UsePopperProps = ExtractPropTypes<typeof usePopperProps>\nexport type UsePopperCoreConfigProps = ExtractPropTypes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,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,CAAC,EAAE;AACS,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"popper.mjs","sources":["../../../../../../packages/components/popper/src/popper.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Placement, Options } from '@popperjs/core'\n\nconst effects = ['light', 'dark'] as const\nconst triggers = ['click', 'contextmenu', 'hover', 'focus'] as const\n\nexport const Effect = {\n LIGHT: 'light',\n DARK: 'dark',\n}\n\nexport type PopperEffect = typeof effects[number]\nexport type PopperTrigger = typeof triggers[number]\nexport type Measurable = {\n getBoundingClientRect: () => DOMRect\n}\n\ntype ClassObjectType = Record<string, any>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nexport const usePopperArrowProps = buildProps({\n arrowOffset: {\n type: Number,\n default: 5,\n },\n} as const)\n\nexport const usePopperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: () => [],\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n offset: {\n type: Number,\n default: 12,\n },\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: ['fixed', 'absolute'] as const,\n default: 'absolute',\n },\n} as const)\n\nexport const usePopperProps = buildProps({\n autoClose: {\n type: Number,\n default: 0,\n },\n cutoff: {\n type: Boolean,\n default: false,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport const usePopperContentProps = buildProps({\n ...usePopperCoreConfigProps,\n style: { type: definePropType<StyleValue>([String, Array, Object]) },\n className: { type: definePropType<ClassType>([String, Array, Object]) },\n effect: {\n type: String,\n default: 'dark',\n },\n visible: {\n type: Boolean,\n },\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: {\n type: Boolean,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n zIndex: Number,\n} as const)\n\nexport const usePopperTriggerProps = buildProps({\n virtualRef: {\n type: definePropType<Measurable>(Object),\n },\n virtualTriggering: {\n type: Boolean,\n },\n} as const)\n\nexport type UsePopperProps = ExtractPropTypes<typeof usePopperProps>\nexport type UsePopperCoreConfigProps = ExtractPropTypes<\n typeof usePopperCoreConfigProps\n>\n"],"names":[],"mappings":";;;;AAEA,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAClC,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAChD,MAAC,MAAM,GAAG;AACtB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE;AACU,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,CAAC,EAAE;AACS,MAAC,wBAAwB,GAAG,UAAU,CAAC;AACnD,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO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AAE,MAAM,CAAC,CAAC,EAAE;AAC1D,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE;AAC9D,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,CAAC,EAAE;AACS,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export declare const ElRow: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
2
|
readonly tag: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
|
|
3
3
|
readonly gutter: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
|
|
4
|
-
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
|
|
4
|
+
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "space-evenly" | "end" | "start", unknown>;
|
|
5
5
|
readonly align: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
|
|
6
6
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
9
|
readonly tag: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
|
|
10
10
|
readonly gutter: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
|
|
11
|
-
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
|
|
11
|
+
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "space-evenly" | "end" | "start", unknown>;
|
|
12
12
|
readonly align: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
|
|
13
13
|
}>>, {
|
|
14
|
-
justify: import("element-plus/es/utils").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
|
|
14
|
+
justify: import("element-plus/es/utils").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "space-evenly" | "end" | "start", unknown>;
|
|
15
15
|
tag: string;
|
|
16
16
|
gutter: number;
|
|
17
17
|
align: import("element-plus/es/utils").BuildPropType<StringConstructor, "top" | "bottom" | "middle", unknown>;
|
|
@@ -2,24 +2,24 @@ import type { ExtractPropTypes } from 'vue';
|
|
|
2
2
|
export declare const rowProps: {
|
|
3
3
|
readonly tag: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
|
|
4
4
|
readonly gutter: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
|
|
5
|
-
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
|
|
5
|
+
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "space-evenly" | "end" | "start", unknown>;
|
|
6
6
|
readonly align: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
|
|
7
7
|
};
|
|
8
8
|
export declare type RowProps = ExtractPropTypes<typeof rowProps>;
|
|
9
9
|
declare const Row: import("vue").DefineComponent<{
|
|
10
10
|
readonly tag: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
|
|
11
11
|
readonly gutter: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
|
|
12
|
-
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
|
|
12
|
+
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "space-evenly" | "end" | "start", unknown>;
|
|
13
13
|
readonly align: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
|
|
14
14
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
17
17
|
readonly tag: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
|
|
18
18
|
readonly gutter: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
|
|
19
|
-
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
|
|
19
|
+
readonly justify: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "space-evenly" | "end" | "start", unknown>;
|
|
20
20
|
readonly align: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
|
|
21
21
|
}>>, {
|
|
22
|
-
justify: import("element-plus/es/utils").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
|
|
22
|
+
justify: import("element-plus/es/utils").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "space-evenly" | "end" | "start", unknown>;
|
|
23
23
|
tag: string;
|
|
24
24
|
gutter: number;
|
|
25
25
|
align: import("element-plus/es/utils").BuildPropType<StringConstructor, "top" | "bottom" | "middle", unknown>;
|
|
@@ -15,7 +15,14 @@ const rowProps = buildProps({
|
|
|
15
15
|
},
|
|
16
16
|
justify: {
|
|
17
17
|
type: String,
|
|
18
|
-
values: [
|
|
18
|
+
values: [
|
|
19
|
+
"start",
|
|
20
|
+
"center",
|
|
21
|
+
"end",
|
|
22
|
+
"space-around",
|
|
23
|
+
"space-between",
|
|
24
|
+
"space-evenly"
|
|
25
|
+
],
|
|
19
26
|
default: "start"
|
|
20
27
|
},
|
|
21
28
|
align: {
|