element-plus 2.2.12 → 2.2.15
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 +926 -725
- package/dist/index.full.min.js +16 -16
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +17 -17
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +927 -726
- 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/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/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 +47 -12
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.js.map +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.min.mjs.map +1 -1
- package/dist/locale/zh-tw.mjs +47 -12
- package/es/components/carousel/index.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/index.d.ts +2 -2
- package/es/components/cascader/src/index.mjs +15 -12
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +42 -43
- package/es/components/checkbox/index.d.ts +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +3 -3
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox.d.ts +4 -5
- package/es/components/checkbox/src/checkbox.mjs +6 -10
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/color-picker/src/index.mjs +10 -15
- package/es/components/color-picker/src/index.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -0
- package/es/components/date-picker/src/panel-utils.d.ts +2 -0
- package/es/components/dialog/src/use-dialog.mjs +1 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/form/index.d.ts +4 -0
- package/es/components/form/src/form-item2.mjs +1 -0
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.d.ts +1 -0
- package/es/components/form/src/form.mjs +5 -0
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form.vue.d.ts +4 -0
- package/es/components/index.mjs +1 -1
- package/es/components/menu/index.d.ts +224 -0
- package/es/components/menu/src/menu.mjs +39 -17
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.d.ts +138 -2
- package/es/components/menu/src/sub-menu.mjs +18 -3
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/message/src/instance.mjs +1 -1
- package/es/components/message/src/instance.mjs.map +1 -1
- package/es/components/message/src/method.mjs +1 -1
- package/es/components/message/src/method.mjs.map +1 -1
- package/es/components/message-box/src/message-box.type.d.ts +1 -1
- package/es/components/message-box/src/messageBox.mjs +10 -9
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/notification/src/notification.d.ts +2 -0
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +111 -5
- package/es/components/notification/src/notification2.mjs +84 -91
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/page-header/index.d.ts +46 -0
- package/es/components/page-header/src/page-header.vue.d.ts +46 -0
- package/es/components/page-header/src/page-header2.mjs +70 -28
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +6 -0
- package/es/components/pagination/src/components/next.d.ts +6 -0
- package/es/components/pagination/src/components/next.mjs +4 -0
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next.vue.d.ts +18 -1
- package/es/components/pagination/src/components/next2.mjs +2 -3
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.d.ts +6 -0
- package/es/components/pagination/src/components/prev.mjs +4 -0
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.vue.d.ts +18 -1
- package/es/components/pagination/src/components/prev2.mjs +2 -3
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.d.ts +8 -0
- package/es/components/pagination/src/pagination.mjs +12 -0
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/popconfirm/index.d.ts +7 -0
- package/es/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/es/components/popconfirm/src/popconfirm.mjs +5 -1
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +454 -447
- package/es/components/popconfirm/src/popconfirm2.mjs +14 -5
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +1 -1
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +169 -44
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +44 -169
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/src/useOption.mjs +2 -2
- package/es/components/select/src/useOption.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +31 -32
- package/es/components/select/src/useSelect.mjs +8 -11
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/slider/src/composables/use-marks.mjs +1 -1
- package/es/components/slider/src/composables/use-marks.mjs.map +1 -1
- package/es/components/slot/src/only-child.mjs +3 -1
- package/es/components/slot/src/only-child.mjs.map +1 -1
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/src/space.d.ts +5 -4
- package/es/components/space/src/space.mjs.map +1 -1
- package/es/components/space/src/use-space.d.ts +1 -1
- package/es/components/switch/src/switch2.mjs +2 -1
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +11 -9
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/events-helper.d.ts +1 -3
- package/es/components/table/src/table-body/events-helper.mjs +2 -2
- package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -5
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-body/render-helper.mjs +2 -2
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/index.mjs +1 -2
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/util.mjs +1 -0
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +6 -9
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +21 -22
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +12 -4
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -0
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +1 -0
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +1 -0
- package/es/components/transfer/index.d.ts +10 -10
- package/es/components/transfer/src/transfer-panel.vue.d.ts +2 -2
- package/es/components/transfer/src/transfer.vue.d.ts +10 -10
- package/es/components/tree/src/model/node.mjs +3 -3
- package/es/components/tree/src/model/node.mjs.map +1 -1
- package/es/components/tree/src/model/tree-store.mjs +2 -2
- package/es/components/tree/src/model/tree-store.mjs.map +1 -1
- package/es/components/tree-v2/src/composables/useTree.d.ts +4 -0
- package/es/components/tree-v2/src/composables/useTree.mjs +21 -7
- package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.mjs +10 -2
- package/es/components/tree-v2/src/tree.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.mjs +3 -3
- package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
- package/es/hooks/use-id/index.mjs +4 -1
- package/es/hooks/use-id/index.mjs.map +1 -1
- package/es/hooks/use-lockscreen/index.mjs +4 -6
- package/es/hooks/use-lockscreen/index.mjs.map +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/lang/zh-tw.d.ts +35 -0
- package/es/locale/lang/zh-tw.mjs +46 -11
- package/es/locale/lang/zh-tw.mjs.map +1 -1
- package/es/utils/dom/index.d.ts +0 -1
- package/es/utils/dom/index.mjs +0 -1
- package/es/utils/dom/index.mjs.map +1 -1
- package/es/utils/index.mjs +0 -1
- package/es/utils/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/carousel/index.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/index.d.ts +2 -2
- package/lib/components/cascader/src/index.js +16 -13
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +42 -43
- package/lib/components/checkbox/index.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +3 -3
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox.d.ts +4 -5
- package/lib/components/checkbox/src/checkbox.js +4 -8
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/color-picker/src/index.js +8 -13
- package/lib/components/color-picker/src/index.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +2 -0
- package/lib/components/dialog/src/use-dialog.js +1 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/form/index.d.ts +4 -0
- package/lib/components/form/src/form-item2.js +1 -0
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.d.ts +1 -0
- package/lib/components/form/src/form.js +5 -0
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form.vue.d.ts +4 -0
- package/lib/components/index.js +1 -1
- package/lib/components/menu/index.d.ts +224 -0
- package/lib/components/menu/src/menu.js +39 -17
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.d.ts +138 -2
- package/lib/components/menu/src/sub-menu.js +17 -2
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/message/src/instance.js +1 -1
- package/lib/components/message/src/instance.js.map +1 -1
- package/lib/components/message/src/method.js +1 -1
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/message-box/src/message-box.type.d.ts +1 -1
- package/lib/components/message-box/src/messageBox.js +10 -9
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +2 -0
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +111 -5
- package/lib/components/notification/src/notification2.js +85 -92
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/page-header/index.d.ts +46 -0
- package/lib/components/page-header/src/page-header.vue.d.ts +46 -0
- package/lib/components/page-header/src/page-header2.js +69 -27
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/index.d.ts +6 -0
- package/lib/components/pagination/src/components/next.d.ts +6 -0
- package/lib/components/pagination/src/components/next.js +4 -0
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next.vue.d.ts +18 -1
- package/lib/components/pagination/src/components/next2.js +1 -2
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.d.ts +6 -0
- package/lib/components/pagination/src/components/prev.js +4 -0
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev.vue.d.ts +18 -1
- package/lib/components/pagination/src/components/prev2.js +1 -2
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.d.ts +8 -0
- package/lib/components/pagination/src/pagination.js +12 -0
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popconfirm/index.d.ts +7 -0
- package/lib/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/lib/components/popconfirm/src/popconfirm.js +5 -1
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +454 -447
- package/lib/components/popconfirm/src/popconfirm2.js +13 -4
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/src/popover2.js +1 -1
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +169 -45
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +45 -169
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/src/useOption.js +1 -1
- package/lib/components/select/src/useOption.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +31 -32
- package/lib/components/select/src/useSelect.js +9 -12
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/slider/src/composables/use-marks.js +1 -1
- package/lib/components/slider/src/composables/use-marks.js.map +1 -1
- package/lib/components/slot/src/only-child.js +3 -1
- package/lib/components/slot/src/only-child.js.map +1 -1
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/src/space.d.ts +5 -4
- package/lib/components/space/src/space.js.map +1 -1
- package/lib/components/space/src/use-space.d.ts +1 -1
- package/lib/components/switch/src/switch2.js +2 -1
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +11 -9
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-body/events-helper.d.ts +1 -3
- package/lib/components/table/src/table-body/events-helper.js +2 -2
- package/lib/components/table/src/table-body/events-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +0 -4
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-body/render-helper.js +2 -2
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/table-header/index.js +1 -2
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/util.js +1 -0
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +17 -20
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +21 -22
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js +12 -4
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -0
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +1 -0
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +1 -0
- package/lib/components/transfer/index.d.ts +10 -10
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +2 -2
- package/lib/components/transfer/src/transfer.vue.d.ts +10 -10
- package/lib/components/tree/src/model/node.js +3 -3
- package/lib/components/tree/src/model/node.js.map +1 -1
- package/lib/components/tree/src/model/tree-store.js +1 -1
- package/lib/components/tree/src/model/tree-store.js.map +1 -1
- package/lib/components/tree-v2/src/composables/useTree.d.ts +4 -0
- package/lib/components/tree-v2/src/composables/useTree.js +21 -7
- package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
- package/lib/components/tree-v2/src/tree.js +10 -2
- package/lib/components/tree-v2/src/tree.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.js +2 -2
- package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
- package/lib/hooks/use-id/index.js +4 -1
- package/lib/hooks/use-id/index.js.map +1 -1
- package/lib/hooks/use-lockscreen/index.js +4 -6
- package/lib/hooks/use-lockscreen/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/zh-tw.d.ts +35 -0
- package/lib/locale/lang/zh-tw.js +46 -11
- package/lib/locale/lang/zh-tw.js.map +1 -1
- package/lib/utils/dom/index.d.ts +0 -1
- package/lib/utils/dom/index.js +0 -3
- package/lib/utils/dom/index.js.map +1 -1
- package/lib/utils/index.js +0 -3
- package/lib/utils/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +6 -4
- package/tags.json +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-message.css +1 -1
- package/theme-chalk/el-page-header.css +1 -1
- package/theme-chalk/el-popover.css +1 -1
- package/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +0 -2
- package/theme-chalk/src/form.scss +17 -6
- package/theme-chalk/src/input.scss +1 -0
- package/theme-chalk/src/menu.scss +0 -11
- package/theme-chalk/src/message.scss +1 -0
- package/theme-chalk/src/page-header.scss +40 -26
- package/theme-chalk/src/popover.scss +8 -0
- package/theme-chalk/src/rate.scss +1 -1
- package/theme-chalk/src/select/common.scss +3 -5
- package/theme-chalk/src/select.scss +1 -0
- package/theme-chalk/src/table.scss +15 -25
- package/web-types.json +1 -1
- package/es/utils/dom/resize-event.d.ts +0 -9
- package/es/utils/dom/resize-event.mjs +0 -34
- package/es/utils/dom/resize-event.mjs.map +0 -1
- package/lib/utils/dom/resize-event.d.ts +0 -9
- package/lib/utils/dom/resize-event.js +0 -39
- package/lib/utils/dom/resize-event.js.map +0 -1
|
@@ -36,6 +36,45 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
36
|
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "info" | "error", unknown, "", boolean>;
|
|
37
37
|
readonly zIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
38
38
|
}, {
|
|
39
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
readonly customClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
41
|
+
readonly dangerouslyUseHTMLString: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
42
|
+
readonly duration: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 4500, boolean>;
|
|
43
|
+
readonly icon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Comment) & {}) | (() => string | Comment) | ((new (...args: any[]) => (string | Comment) & {}) | (() => string | Comment))[], unknown, unknown, "", boolean>;
|
|
44
|
+
readonly id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
45
|
+
readonly message: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}>) & {}) | (() => string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>) | ((new (...args: any[]) => (string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}>) & {}) | (() => string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}>))[], unknown, unknown, "", boolean>;
|
|
54
|
+
readonly offset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
55
|
+
readonly onClick: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => () => void) | (() => () => void) | {
|
|
56
|
+
(): () => void;
|
|
57
|
+
new (): any;
|
|
58
|
+
readonly prototype: any;
|
|
59
|
+
} | ((new (...args: any[]) => () => void) | (() => () => void) | {
|
|
60
|
+
(): () => void;
|
|
61
|
+
new (): any;
|
|
62
|
+
readonly prototype: any;
|
|
63
|
+
})[], unknown, unknown, () => undefined, boolean>;
|
|
64
|
+
readonly onClose: {
|
|
65
|
+
readonly type: import("vue").PropType<() => void>;
|
|
66
|
+
readonly required: true;
|
|
67
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
68
|
+
__epPropKey: true;
|
|
69
|
+
};
|
|
70
|
+
readonly position: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top-right" | "top-left" | "bottom-right" | "bottom-left", unknown, "top-right", boolean>;
|
|
71
|
+
readonly showClose: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
72
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
73
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "info" | "error", unknown, "", boolean>;
|
|
74
|
+
readonly zIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
75
|
+
}>> & {
|
|
76
|
+
onDestroy?: (() => any) | undefined;
|
|
77
|
+
}>>;
|
|
39
78
|
ns: {
|
|
40
79
|
namespace: import("vue").ComputedRef<string>;
|
|
41
80
|
b: (blockSuffix?: string) => string;
|
|
@@ -54,14 +93,81 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
93
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
55
94
|
cssVarBlockName: (name: string) => string;
|
|
56
95
|
};
|
|
57
|
-
|
|
96
|
+
Close: import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
97
|
+
visible: import("vue").Ref<boolean>;
|
|
98
|
+
timer: undefined;
|
|
58
99
|
typeClass: import("vue").ComputedRef<string>;
|
|
59
|
-
iconComponent: import("vue").ComputedRef<
|
|
100
|
+
iconComponent: import("vue").ComputedRef<"" | import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
101
|
+
horizontalClass: import("vue").ComputedRef<"left" | "right">;
|
|
102
|
+
verticalProperty: import("vue").ComputedRef<"top" | "bottom">;
|
|
60
103
|
positionStyle: import("vue").ComputedRef<CSSProperties>;
|
|
61
|
-
visible: import("vue").Ref<boolean>;
|
|
62
|
-
close: () => void;
|
|
63
|
-
clearTimer: () => void;
|
|
64
104
|
startTimer: () => void;
|
|
105
|
+
clearTimer: () => void;
|
|
106
|
+
close: () => void;
|
|
107
|
+
onKeydown: ({ code }: KeyboardEvent) => void;
|
|
108
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
109
|
+
readonly size: {
|
|
110
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
111
|
+
readonly required: false;
|
|
112
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
113
|
+
__epPropKey: true;
|
|
114
|
+
};
|
|
115
|
+
readonly color: {
|
|
116
|
+
readonly type: import("vue").PropType<string>;
|
|
117
|
+
readonly required: false;
|
|
118
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
119
|
+
__epPropKey: true;
|
|
120
|
+
};
|
|
121
|
+
}, {
|
|
122
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
123
|
+
readonly size: {
|
|
124
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
125
|
+
readonly required: false;
|
|
126
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
127
|
+
__epPropKey: true;
|
|
128
|
+
};
|
|
129
|
+
readonly color: {
|
|
130
|
+
readonly type: import("vue").PropType<string>;
|
|
131
|
+
readonly required: false;
|
|
132
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
133
|
+
__epPropKey: true;
|
|
134
|
+
};
|
|
135
|
+
}>> & {
|
|
136
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
137
|
+
}>>;
|
|
138
|
+
ns: {
|
|
139
|
+
namespace: import("vue").ComputedRef<string>;
|
|
140
|
+
b: (blockSuffix?: string) => string;
|
|
141
|
+
e: (element?: string | undefined) => string;
|
|
142
|
+
m: (modifier?: string | undefined) => string;
|
|
143
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
144
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
145
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
146
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
147
|
+
is: {
|
|
148
|
+
(name: string, state: boolean | undefined): string;
|
|
149
|
+
(name: string): string;
|
|
150
|
+
};
|
|
151
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
152
|
+
cssVarName: (name: string) => string;
|
|
153
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
154
|
+
cssVarBlockName: (name: string) => string;
|
|
155
|
+
};
|
|
156
|
+
style: import("vue").ComputedRef<CSSProperties>;
|
|
157
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
158
|
+
readonly size: {
|
|
159
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
160
|
+
readonly required: false;
|
|
161
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
162
|
+
__epPropKey: true;
|
|
163
|
+
};
|
|
164
|
+
readonly color: {
|
|
165
|
+
readonly type: import("vue").PropType<string>;
|
|
166
|
+
readonly required: false;
|
|
167
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
168
|
+
__epPropKey: true;
|
|
169
|
+
};
|
|
170
|
+
}>>, {}>> & Record<string, any>;
|
|
65
171
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
66
172
|
destroy: () => boolean;
|
|
67
173
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, onMounted,
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, resolveDynamicComponent, createCommentVNode, toDisplayString, renderSlot, createElementBlock, Fragment, vShow, withModifiers, createVNode } from 'vue';
|
|
2
2
|
import { useTimeoutFn, useEventListener } from '@vueuse/core';
|
|
3
3
|
import '../../../utils/index.mjs';
|
|
4
4
|
import '../../../constants/index.mjs';
|
|
@@ -6,20 +6,25 @@ import { ElIcon } from '../../icon/index.mjs';
|
|
|
6
6
|
import '../../../hooks/index.mjs';
|
|
7
7
|
import { notificationProps, notificationEmits } from './notification.mjs';
|
|
8
8
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
-
import { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';
|
|
10
9
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
+
import { CloseComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';
|
|
11
11
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
const _hoisted_1 = ["id"];
|
|
14
|
+
const _hoisted_2 = ["textContent"];
|
|
15
|
+
const _hoisted_3 = { key: 0 };
|
|
16
|
+
const _hoisted_4 = ["innerHTML"];
|
|
17
|
+
const __default__ = {
|
|
18
|
+
name: "ElNotification"
|
|
19
|
+
};
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
+
...__default__,
|
|
19
22
|
props: notificationProps,
|
|
20
23
|
emits: notificationEmits,
|
|
21
|
-
setup(
|
|
24
|
+
setup(__props, { expose }) {
|
|
25
|
+
const props = __props;
|
|
22
26
|
const ns = useNamespace("notification");
|
|
27
|
+
const { Close } = CloseComponents;
|
|
23
28
|
const visible = ref(false);
|
|
24
29
|
let timer = void 0;
|
|
25
30
|
const typeClass = computed(() => {
|
|
@@ -27,7 +32,9 @@ const _sfc_main = defineComponent({
|
|
|
27
32
|
return type && TypeComponentsMap[props.type] ? ns.m(type) : "";
|
|
28
33
|
});
|
|
29
34
|
const iconComponent = computed(() => {
|
|
30
|
-
|
|
35
|
+
if (!props.type)
|
|
36
|
+
return "";
|
|
37
|
+
return TypeComponentsMap[props.type] || props.icon;
|
|
31
38
|
});
|
|
32
39
|
const horizontalClass = computed(() => props.position.endsWith("right") ? "right" : "left");
|
|
33
40
|
const verticalProperty = computed(() => props.position.startsWith("top") ? "top" : "bottom");
|
|
@@ -68,91 +75,77 @@ const _sfc_main = defineComponent({
|
|
|
68
75
|
visible.value = true;
|
|
69
76
|
});
|
|
70
77
|
useEventListener(document, "keydown", onKeydown);
|
|
71
|
-
|
|
72
|
-
ns,
|
|
73
|
-
horizontalClass,
|
|
74
|
-
typeClass,
|
|
75
|
-
iconComponent,
|
|
76
|
-
positionStyle,
|
|
78
|
+
expose({
|
|
77
79
|
visible,
|
|
78
|
-
close
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
close
|
|
81
|
+
});
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return openBlock(), createBlock(Transition, {
|
|
84
|
+
name: unref(ns).b("fade"),
|
|
85
|
+
onBeforeLeave: _ctx.onClose,
|
|
86
|
+
onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
|
|
87
|
+
persisted: ""
|
|
88
|
+
}, {
|
|
89
|
+
default: withCtx(() => [
|
|
90
|
+
withDirectives(createElementVNode("div", {
|
|
91
|
+
id: _ctx.id,
|
|
92
|
+
class: normalizeClass([unref(ns).b(), _ctx.customClass, unref(horizontalClass)]),
|
|
93
|
+
style: normalizeStyle(unref(positionStyle)),
|
|
94
|
+
role: "alert",
|
|
95
|
+
onMouseenter: clearTimer,
|
|
96
|
+
onMouseleave: startTimer,
|
|
97
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
98
|
+
}, [
|
|
99
|
+
unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
100
|
+
key: 0,
|
|
101
|
+
class: normalizeClass([unref(ns).e("icon"), unref(typeClass)])
|
|
102
|
+
}, {
|
|
103
|
+
default: withCtx(() => [
|
|
104
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
|
|
105
|
+
]),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
108
|
+
createElementVNode("div", {
|
|
109
|
+
class: normalizeClass(unref(ns).e("group"))
|
|
110
|
+
}, [
|
|
111
|
+
createElementVNode("h2", {
|
|
112
|
+
class: normalizeClass(unref(ns).e("title")),
|
|
113
|
+
textContent: toDisplayString(_ctx.title)
|
|
114
|
+
}, null, 10, _hoisted_2),
|
|
115
|
+
withDirectives(createElementVNode("div", {
|
|
116
|
+
class: normalizeClass(unref(ns).e("content")),
|
|
117
|
+
style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
118
|
+
}, [
|
|
119
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
120
|
+
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
121
|
+
createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
122
|
+
createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
123
|
+
], 2112))
|
|
124
|
+
])
|
|
125
|
+
], 6), [
|
|
126
|
+
[vShow, _ctx.message]
|
|
127
|
+
]),
|
|
128
|
+
_ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: normalizeClass(unref(ns).e("closeBtn")),
|
|
131
|
+
onClick: withModifiers(close, ["stop"])
|
|
132
|
+
}, {
|
|
133
|
+
default: withCtx(() => [
|
|
134
|
+
createVNode(unref(Close))
|
|
135
|
+
]),
|
|
136
|
+
_: 1
|
|
137
|
+
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
|
|
138
|
+
], 2)
|
|
139
|
+
], 46, _hoisted_1), [
|
|
140
|
+
[vShow, visible.value]
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
_: 3
|
|
144
|
+
}, 8, ["name", "onBeforeLeave"]);
|
|
81
145
|
};
|
|
82
146
|
}
|
|
83
147
|
});
|
|
84
|
-
|
|
85
|
-
const _hoisted_2 = ["textContent"];
|
|
86
|
-
const _hoisted_3 = { key: 0 };
|
|
87
|
-
const _hoisted_4 = ["innerHTML"];
|
|
88
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
89
|
-
const _component_el_icon = resolveComponent("el-icon");
|
|
90
|
-
const _component_close = resolveComponent("close");
|
|
91
|
-
return openBlock(), createBlock(Transition, {
|
|
92
|
-
name: _ctx.ns.b("fade"),
|
|
93
|
-
onBeforeLeave: _ctx.onClose,
|
|
94
|
-
onAfterLeave: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("destroy")),
|
|
95
|
-
persisted: ""
|
|
96
|
-
}, {
|
|
97
|
-
default: withCtx(() => [
|
|
98
|
-
withDirectives(createElementVNode("div", {
|
|
99
|
-
id: _ctx.id,
|
|
100
|
-
class: normalizeClass([_ctx.ns.b(), _ctx.customClass, _ctx.horizontalClass]),
|
|
101
|
-
style: normalizeStyle(_ctx.positionStyle),
|
|
102
|
-
role: "alert",
|
|
103
|
-
onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.clearTimer && _ctx.clearTimer(...args)),
|
|
104
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.startTimer && _ctx.startTimer(...args)),
|
|
105
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
106
|
-
}, [
|
|
107
|
-
_ctx.iconComponent ? (openBlock(), createBlock(_component_el_icon, {
|
|
108
|
-
key: 0,
|
|
109
|
-
class: normalizeClass([_ctx.ns.e("icon"), _ctx.typeClass])
|
|
110
|
-
}, {
|
|
111
|
-
default: withCtx(() => [
|
|
112
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
|
|
113
|
-
]),
|
|
114
|
-
_: 1
|
|
115
|
-
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
116
|
-
createElementVNode("div", {
|
|
117
|
-
class: normalizeClass(_ctx.ns.e("group"))
|
|
118
|
-
}, [
|
|
119
|
-
createElementVNode("h2", {
|
|
120
|
-
class: normalizeClass(_ctx.ns.e("title")),
|
|
121
|
-
textContent: toDisplayString(_ctx.title)
|
|
122
|
-
}, null, 10, _hoisted_2),
|
|
123
|
-
withDirectives(createElementVNode("div", {
|
|
124
|
-
class: normalizeClass(_ctx.ns.e("content")),
|
|
125
|
-
style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
126
|
-
}, [
|
|
127
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
128
|
-
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
129
|
-
createCommentVNode(" Caution here, message could've been compromized, nerver use user's input as message "),
|
|
130
|
-
createCommentVNode(" eslint-disable-next-line "),
|
|
131
|
-
createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
132
|
-
], 2112))
|
|
133
|
-
])
|
|
134
|
-
], 6), [
|
|
135
|
-
[vShow, _ctx.message]
|
|
136
|
-
]),
|
|
137
|
-
_ctx.showClose ? (openBlock(), createBlock(_component_el_icon, {
|
|
138
|
-
key: 0,
|
|
139
|
-
class: normalizeClass(_ctx.ns.e("closeBtn")),
|
|
140
|
-
onClick: withModifiers(_ctx.close, ["stop"])
|
|
141
|
-
}, {
|
|
142
|
-
default: withCtx(() => [
|
|
143
|
-
createVNode(_component_close)
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
|
|
147
|
-
], 2)
|
|
148
|
-
], 46, _hoisted_1), [
|
|
149
|
-
[vShow, _ctx.visible]
|
|
150
|
-
])
|
|
151
|
-
]),
|
|
152
|
-
_: 3
|
|
153
|
-
}, 8, ["name", "onBeforeLeave"]);
|
|
154
|
-
}
|
|
155
|
-
var NotificationConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);
|
|
148
|
+
var NotificationConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);
|
|
156
149
|
|
|
157
150
|
export { NotificationConstructor as default };
|
|
158
151
|
//# sourceMappingURL=notification2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification2.mjs","sources":["../../../../../../packages/components/notification/src/notification.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 :class=\"[ns.b(), customClass, horizontalClass]\"\n :style=\"positionStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n @click=\"onClick\"\n >\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('group')\">\n <h2 :class=\"ns.e('title')\" v-text=\"title\" />\n <div\n v-show=\"message\"\n :class=\"ns.e('content')\"\n :style=\"!!title ? undefined : { margin: 0 }\"\n >\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <!-- Caution here, message could've been
|
|
1
|
+
{"version":3,"file":"notification2.mjs","sources":["../../../../../../packages/components/notification/src/notification.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 :class=\"[ns.b(), customClass, horizontalClass]\"\n :style=\"positionStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n @click=\"onClick\"\n >\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('group')\">\n <h2 :class=\"ns.e('title')\" v-text=\"title\" />\n <div\n v-show=\"message\"\n :class=\"ns.e('content')\"\n :style=\"!!title ? undefined : { margin: 0 }\"\n >\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else v-html=\"message\" />\n </slot>\n </div>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { CloseComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { notificationEmits, notificationProps } from './notification'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElNotification',\n})\n\nconst props = defineProps(notificationProps)\ndefineEmits(notificationEmits)\n\nconst ns = useNamespace('notification')\nconst { Close } = CloseComponents\n\nconst visible = ref(false)\nlet timer: (() => void) | undefined = undefined\n\nconst typeClass = computed(() => {\n const type = props.type\n return type && TypeComponentsMap[props.type] ? ns.m(type) : ''\n})\n\nconst iconComponent = computed(() => {\n if (!props.type) return ''\n return TypeComponentsMap[props.type] || props.icon\n})\n\nconst horizontalClass = computed(() =>\n props.position.endsWith('right') ? 'right' : 'left'\n)\n\nconst verticalProperty = computed(() =>\n props.position.startsWith('top') ? 'top' : 'bottom'\n)\n\nconst positionStyle = computed<CSSProperties>(() => {\n return {\n [verticalProperty.value]: `${props.offset}px`,\n zIndex: props.zIndex,\n }\n})\n\nfunction startTimer() {\n if (props.duration > 0) {\n ;({ stop: timer } = useTimeoutFn(() => {\n if (visible.value) close()\n }, props.duration))\n }\n}\n\nfunction clearTimer() {\n timer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction onKeydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {\n clearTimer() // press delete/backspace clear timer\n } else if (code === EVENT_CODE.esc) {\n // press esc to close the notification\n if (visible.value) {\n close()\n }\n } else {\n startTimer() // resume timer\n }\n}\n\n// lifecycle\nonMounted(() => {\n startTimer()\n visible.value = true\n})\n\nuseEventListener(document, 'keydown', onKeydown)\n\ndefineExpose({\n visible,\n /** @description close notification */\n close,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,IAAA,MAAA,EAAA,GAAA,aAAA,cAAA,CAAA,CAAA;AACA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAA,eAAA,CAAA;AAEA,IAAA,MAAA,OAAA,GAAA,IAAA,KAAA,CAAA,CAAA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KACA;AAEA,IAAA,SAAA,UAAA,GAAA;AACA,MAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,EAAA,CAAA;AAAA,KACA;AAEA,IAAA,SAAA,KAAA,GAAA;AACA,MAAA,OAAA,CAAA,KAAA,GAAA,KAAA,CAAA;AAAA,KACA;AAEA,IAAA,SAAA,SAAA,CAAA,EAAA,IAAA,EAAA,EAAA;AACA,MAAA,IAAA,IAAA,KAAA,UAAA,CAAA,MAAA,IAAA,IAAA,KAAA,WAAA,SAAA,EAAA;AACA,QAAA,UAAA,EAAA,CAAA;AAAA,OACA,MAAA,IAAA,IAAA,KAAA,UAAA,CAAA,GAAA,EAAA;AAEA,QAAA,IAAA,QAAA,KAAA,EAAA;AACA,UAAA,KAAA,EAAA,CAAA;AAAA,SACA;AAAA,OACA,MAAA;AACA,QAAA,UAAA,EAAA,CAAA;AAAA,OACA;AAAA,KACA;AAGA,IAAA,SAAA,CAAA,MAAA;AACA,MAAA,UAAA,EAAA,CAAA;AACA,MAAA,OAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,gBAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,CAAA;AAEA,IAAA,MAAA,CAAA;AAAA,MACA,OAAA;AAAA,MAEA,KAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -66,7 +66,7 @@ const notify = function(options = {}, context = null) {
|
|
|
66
66
|
return {
|
|
67
67
|
close: () => {
|
|
68
68
|
;
|
|
69
|
-
vm.component.
|
|
69
|
+
vm.component.exposed.visible.value = false;
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
};
|
|
@@ -111,7 +111,7 @@ function closeAll() {
|
|
|
111
111
|
for (const orientedNotifications of Object.values(notifications)) {
|
|
112
112
|
orientedNotifications.forEach(({ vm }) => {
|
|
113
113
|
;
|
|
114
|
-
vm.component.
|
|
114
|
+
vm.component.exposed.visible.value = false;
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.mjs","sources":["../../../../../../packages/components/notification/src/notify.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { useZIndex } from '@element-plus/hooks'\nimport { debugWarn, isElement, isString, isVNode } from '@element-plus/utils'\nimport NotificationConstructor from './notification.vue'\nimport { notificationTypes } from './notification'\n\nimport type { AppContext, ComponentPublicInstance, VNode } from 'vue'\nimport type {\n NotificationOptions,\n NotificationProps,\n NotificationQueue,\n Notify,\n NotifyFn,\n} from './notification'\n\n// This should be a queue but considering there were `non-autoclosable` notifications.\nconst notifications: Record<\n NotificationOptions['position'],\n NotificationQueue\n> = {\n 'top-left': [],\n 'top-right': [],\n 'bottom-left': [],\n 'bottom-right': [],\n}\n\n// the gap size between each notification\nconst GAP_SIZE = 16\nlet seed = 1\n\nconst notify: NotifyFn & Partial<Notify> & { _context: AppContext | null } =\n function (options = {}, context: AppContext | null = null) {\n if (!isClient) return { close: () => undefined }\n\n if (typeof options === 'string' || isVNode(options)) {\n options = { message: options }\n }\n\n const position = options.position || 'top-right'\n\n let verticalOffset = options.offset || 0\n notifications[position].forEach(({ vm }) => {\n verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE\n })\n verticalOffset += GAP_SIZE\n\n const { nextZIndex } = useZIndex()\n\n const id = `notification_${seed++}`\n const userOnClose = options.onClose\n const props: Partial<NotificationProps> = {\n ...options,\n zIndex: nextZIndex(),\n offset: verticalOffset,\n id,\n onClose: () => {\n close(id, position, userOnClose)\n },\n }\n\n let appendTo: HTMLElement | null = document.body\n if (isElement(options.appendTo)) {\n appendTo = options.appendTo\n } else if (isString(options.appendTo)) {\n appendTo = document.querySelector(options.appendTo)\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElNotification',\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 const vm = createVNode(\n NotificationConstructor,\n props,\n isVNode(props.message)\n ? {\n default: () => props.message,\n }\n : null\n )\n vm.appContext = context ?? notify._context\n\n // clean notification element preventing mem leak\n vm.props!.onDestroy = () => {\n render(null, container)\n }\n\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n render(vm, container)\n notifications[position].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 }\nnotificationTypes.forEach((type) => {\n notify[type] = (options = {}) => {\n if (typeof options === 'string' || isVNode(options)) {\n options = {\n message: options,\n }\n }\n return notify({\n ...options,\n type,\n })\n }\n})\n\n/**\n * This function gets called when user click `x` button or press `esc` or the time reached its limitation.\n * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called\n * by @after-leave the DOM element will be removed from the page thus we can no longer fetch the offsetHeight.\n * @param {String} id notification id to be closed\n * @param {Position} position the positioning strategy\n * @param {Function} userOnClose the callback called when close passed by user\n */\nexport function close(\n id: string,\n position: NotificationOptions['position'],\n userOnClose?: (vm: VNode) => void\n): void {\n // maybe we can store the index when inserting the vm to notification list.\n const orientedNotifications = notifications[position]\n const idx = orientedNotifications.findIndex(\n ({ vm }) => vm.component?.props.id === id\n )\n if (idx === -1) return\n const { vm } = orientedNotifications[idx]\n if (!vm) return\n // calling user's on close function before notification gets removed from DOM.\n userOnClose?.(vm)\n\n // note that this is called @before-leave, that's why we were able to fetch this property.\n const removedHeight = vm.el!.offsetHeight\n const verticalPos = position.split('-')[0]\n orientedNotifications.splice(idx, 1)\n const len = orientedNotifications.length\n if (len < 1) return\n // starting from the removing item.\n for (let i = idx; i < len; i++) {\n // new position equals the current offsetTop minus removed height plus 16px(the gap size between each item)\n const { el, component } = orientedNotifications[i].vm\n const pos =\n Number.parseInt(el!.style[verticalPos], 10) - removedHeight - GAP_SIZE\n component!.props.offset = pos\n }\n}\n\nexport function closeAll(): void {\n // loop through all directions, close them at once.\n for (const orientedNotifications of Object.values(notifications)) {\n orientedNotifications.forEach(({ vm }) => {\n // same as the previous close method, we'd like to make sure lifecycle gets handle properly.\n ;(\n vm.component!.proxy as ComponentPublicInstance<{ visible: boolean }>\n ).visible = false\n })\n }\n}\n\nnotify.closeAll = closeAll\nnotify._context = null\n\nexport default notify as Notify\n"],"names":[],"mappings":";;;;;;;;;;;AAMA,MAAM,aAAa,GAAG;AACtB,EAAE,UAAU,EAAE,EAAE;AAChB,EAAE,WAAW,EAAE,EAAE;AACjB,EAAE,aAAa,EAAE,EAAE;AACnB,EAAE,cAAc,EAAE,EAAE;AACpB,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,IAAI,IAAI,GAAG,CAAC,CAAC;AACR,MAAC,MAAM,GAAG,SAAS,OAAO,GAAG,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE;AACtD,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;AACnC,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;AACvD,IAAI,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACnC,GAAG;AACH,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,WAAW,CAAC;AACnD,EAAE,IAAI,cAAc,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;AAC3C,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK;AACnD,IAAI,IAAI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AC,EAAE,CAAC;AAC1D,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,GAAG,aAAa,GAAG,QAAQ,CAAC;AACtF,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC;AACjC,GAAG;AACH,CAAC;AACM,SAAS,QAAQ,GAAG;AAC3B,EAAE,KAAK,MAAM,qBAAqB,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;AACpE,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK;AAC9C,MAAM,CAAC;AACP,MAAM,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;AACzC,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC;AACD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC3B,MAAM,CAAC,QAAQ,GAAG,IAAI;;;;"}
|
|
1
|
+
{"version":3,"file":"notify.mjs","sources":["../../../../../../packages/components/notification/src/notify.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { useZIndex } from '@element-plus/hooks'\nimport { debugWarn, isElement, isString, isVNode } from '@element-plus/utils'\nimport NotificationConstructor from './notification.vue'\nimport { notificationTypes } from './notification'\n\nimport type { AppContext, Ref, VNode } from 'vue'\nimport type {\n NotificationOptions,\n NotificationProps,\n NotificationQueue,\n Notify,\n NotifyFn,\n} from './notification'\n\n// This should be a queue but considering there were `non-autoclosable` notifications.\nconst notifications: Record<\n NotificationOptions['position'],\n NotificationQueue\n> = {\n 'top-left': [],\n 'top-right': [],\n 'bottom-left': [],\n 'bottom-right': [],\n}\n\n// the gap size between each notification\nconst GAP_SIZE = 16\nlet seed = 1\n\nconst notify: NotifyFn & Partial<Notify> & { _context: AppContext | null } =\n function (options = {}, context: AppContext | null = null) {\n if (!isClient) return { close: () => undefined }\n\n if (typeof options === 'string' || isVNode(options)) {\n options = { message: options }\n }\n\n const position = options.position || 'top-right'\n\n let verticalOffset = options.offset || 0\n notifications[position].forEach(({ vm }) => {\n verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE\n })\n verticalOffset += GAP_SIZE\n\n const { nextZIndex } = useZIndex()\n\n const id = `notification_${seed++}`\n const userOnClose = options.onClose\n const props: Partial<NotificationProps> = {\n ...options,\n zIndex: nextZIndex(),\n offset: verticalOffset,\n id,\n onClose: () => {\n close(id, position, userOnClose)\n },\n }\n\n let appendTo: HTMLElement | null = document.body\n if (isElement(options.appendTo)) {\n appendTo = options.appendTo\n } else if (isString(options.appendTo)) {\n appendTo = document.querySelector(options.appendTo)\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElNotification',\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 const vm = createVNode(\n NotificationConstructor,\n props,\n isVNode(props.message)\n ? {\n default: () => props.message,\n }\n : null\n )\n vm.appContext = context ?? notify._context\n\n // clean notification element preventing mem leak\n vm.props!.onDestroy = () => {\n render(null, container)\n }\n\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n render(vm, container)\n notifications[position].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 ;(vm.component!.exposed as { visible: Ref<boolean> }).visible.value =\n false\n },\n }\n }\nnotificationTypes.forEach((type) => {\n notify[type] = (options = {}) => {\n if (typeof options === 'string' || isVNode(options)) {\n options = {\n message: options,\n }\n }\n return notify({\n ...options,\n type,\n })\n }\n})\n\n/**\n * This function gets called when user click `x` button or press `esc` or the time reached its limitation.\n * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called\n * by @after-leave the DOM element will be removed from the page thus we can no longer fetch the offsetHeight.\n * @param {String} id notification id to be closed\n * @param {Position} position the positioning strategy\n * @param {Function} userOnClose the callback called when close passed by user\n */\nexport function close(\n id: string,\n position: NotificationOptions['position'],\n userOnClose?: (vm: VNode) => void\n): void {\n // maybe we can store the index when inserting the vm to notification list.\n const orientedNotifications = notifications[position]\n const idx = orientedNotifications.findIndex(\n ({ vm }) => vm.component?.props.id === id\n )\n if (idx === -1) return\n const { vm } = orientedNotifications[idx]\n if (!vm) return\n // calling user's on close function before notification gets removed from DOM.\n userOnClose?.(vm)\n\n // note that this is called @before-leave, that's why we were able to fetch this property.\n const removedHeight = vm.el!.offsetHeight\n const verticalPos = position.split('-')[0]\n orientedNotifications.splice(idx, 1)\n const len = orientedNotifications.length\n if (len < 1) return\n // starting from the removing item.\n for (let i = idx; i < len; i++) {\n // new position equals the current offsetTop minus removed height plus 16px(the gap size between each item)\n const { el, component } = orientedNotifications[i].vm\n const pos =\n Number.parseInt(el!.style[verticalPos], 10) - removedHeight - GAP_SIZE\n component!.props.offset = pos\n }\n}\n\nexport function closeAll(): void {\n // loop through all directions, close them at once.\n for (const orientedNotifications of Object.values(notifications)) {\n orientedNotifications.forEach(({ vm }) => {\n // same as the previous close method, we'd like to make sure lifecycle gets handle properly.\n ;(vm.component!.exposed as { visible: Ref<boolean> }).visible.value =\n false\n })\n }\n}\n\nnotify.closeAll = closeAll\nnotify._context = null\n\nexport default notify as Notify\n"],"names":[],"mappings":";;;;;;;;;;;AAMA,MAAM,aAAa,GAAG;AACtB,EAAE,UAAU,EAAE,EAAE;AAChB,EAAE,WAAW,EAAE,EAAE;AACjB,EAAE,aAAa,EAAE,EAAE;AACnB,EAAE,cAAc,EAAE,EAAE;AACpB,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,IAAI,IAAI,GAAG,CAAC,CAAC;AACR,MAAC,MAAM,GAAG,SAAS,OAAO,GAAG,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE;AACtD,EAAE,IAAI,CAAC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/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
5
5
|
}, {
|
|
6
6
|
emit: (event: "back") => void;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
[name: string]: import("vue").Slot | undefined;
|
|
9
|
+
}>;
|
|
7
10
|
t: import("../..").Translator;
|
|
8
11
|
ns: {
|
|
9
12
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -23,6 +26,9 @@ export declare const ElPageHeader: import("element-plus/es/utils").SFCWithInstal
|
|
|
23
26
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
24
27
|
cssVarBlockName: (name: string) => string;
|
|
25
28
|
};
|
|
29
|
+
kls: import("vue").ComputedRef<(string | {
|
|
30
|
+
[x: string]: boolean;
|
|
31
|
+
})[]>;
|
|
26
32
|
handleClick: () => void;
|
|
27
33
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
28
34
|
readonly size: {
|
|
@@ -87,6 +93,46 @@ export declare const ElPageHeader: import("element-plus/es/utils").SFCWithInstal
|
|
|
87
93
|
__epPropKey: true;
|
|
88
94
|
};
|
|
89
95
|
}>>, {}>> & Record<string, any>;
|
|
96
|
+
ElDivider: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
97
|
+
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
98
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
99
|
+
readonly borderStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
100
|
+
}, {
|
|
101
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
102
|
+
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
103
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
104
|
+
readonly borderStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
105
|
+
}>> & {
|
|
106
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
107
|
+
}>>;
|
|
108
|
+
ns: {
|
|
109
|
+
namespace: import("vue").ComputedRef<string>;
|
|
110
|
+
b: (blockSuffix?: string) => string;
|
|
111
|
+
e: (element?: string | undefined) => string;
|
|
112
|
+
m: (modifier?: string | undefined) => string;
|
|
113
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
114
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
115
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
116
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
117
|
+
is: {
|
|
118
|
+
(name: string, state: boolean | undefined): string;
|
|
119
|
+
(name: string): string;
|
|
120
|
+
};
|
|
121
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
122
|
+
cssVarName: (name: string) => string;
|
|
123
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
124
|
+
cssVarBlockName: (name: string) => string;
|
|
125
|
+
};
|
|
126
|
+
dividerStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
127
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
|
+
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
129
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
130
|
+
readonly borderStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
131
|
+
}>>, {
|
|
132
|
+
readonly direction: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "vertical" | "horizontal", unknown>;
|
|
133
|
+
readonly borderStyle: string;
|
|
134
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right" | "center", unknown>;
|
|
135
|
+
}>> & Record<string, any>;
|
|
90
136
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
91
137
|
back: () => boolean;
|
|
92
138
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -4,6 +4,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly content: import("../../../utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
5
5
|
}, {
|
|
6
6
|
emit: (event: "back") => void;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
[name: string]: import("vue").Slot | undefined;
|
|
9
|
+
}>;
|
|
7
10
|
t: import("element-plus/es/hooks").Translator;
|
|
8
11
|
ns: {
|
|
9
12
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -23,6 +26,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
26
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
24
27
|
cssVarBlockName: (name: string) => string;
|
|
25
28
|
};
|
|
29
|
+
kls: import("vue").ComputedRef<(string | {
|
|
30
|
+
[x: string]: boolean;
|
|
31
|
+
})[]>;
|
|
26
32
|
handleClick: () => void;
|
|
27
33
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
28
34
|
readonly size: {
|
|
@@ -87,6 +93,46 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
93
|
__epPropKey: true;
|
|
88
94
|
};
|
|
89
95
|
}>>, {}>> & Record<string, any>;
|
|
96
|
+
ElDivider: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
97
|
+
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
98
|
+
readonly contentPosition: import("../../../utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
99
|
+
readonly borderStyle: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
100
|
+
}, {
|
|
101
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
102
|
+
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
103
|
+
readonly contentPosition: import("../../../utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
104
|
+
readonly borderStyle: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
105
|
+
}>> & {
|
|
106
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
107
|
+
}>>;
|
|
108
|
+
ns: {
|
|
109
|
+
namespace: import("vue").ComputedRef<string>;
|
|
110
|
+
b: (blockSuffix?: string) => string;
|
|
111
|
+
e: (element?: string | undefined) => string;
|
|
112
|
+
m: (modifier?: string | undefined) => string;
|
|
113
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
114
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
115
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
116
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
117
|
+
is: {
|
|
118
|
+
(name: string, state: boolean | undefined): string;
|
|
119
|
+
(name: string): string;
|
|
120
|
+
};
|
|
121
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
122
|
+
cssVarName: (name: string) => string;
|
|
123
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
124
|
+
cssVarBlockName: (name: string) => string;
|
|
125
|
+
};
|
|
126
|
+
dividerStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
127
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
|
+
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
129
|
+
readonly contentPosition: import("../../../utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
130
|
+
readonly borderStyle: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
131
|
+
}>>, {
|
|
132
|
+
readonly direction: import("../../../utils").EpPropMergeType<StringConstructor, "vertical" | "horizontal", unknown>;
|
|
133
|
+
readonly borderStyle: string;
|
|
134
|
+
readonly contentPosition: import("../../../utils").EpPropMergeType<StringConstructor, "left" | "right" | "center", unknown>;
|
|
135
|
+
}>> & Record<string, any>;
|
|
90
136
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
91
137
|
back: () => boolean;
|
|
92
138
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|