@element-plus/nightly 0.0.20240302 → 0.0.20240304
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.full.js +11 -4
- 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 +11 -4
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/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/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/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.mjs +2 -2
- package/es/components/affix/src/affix.mjs +117 -26
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +26 -117
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.d.ts +4 -4
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +4 -4
- package/es/components/anchor/index.d.ts +1 -0
- package/es/components/anchor/src/anchor.vue.d.ts +1 -0
- package/es/components/anchor/src/anchor2.mjs +4 -1
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/autocomplete/index.d.ts +65 -65
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
- package/es/components/button/index.d.ts +5 -5
- package/es/components/button/src/button.d.ts +1 -1
- package/es/components/button/src/button.vue.d.ts +5 -5
- package/es/components/button/src/use-button.d.ts +1 -1
- package/es/components/calendar/index.d.ts +5 -5
- package/es/components/calendar/src/calendar.vue.d.ts +5 -5
- 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 +128 -128
- package/es/components/cascader/src/cascader.vue.d.ts +64 -64
- package/es/components/color-picker/index.d.ts +38 -38
- package/es/components/color-picker/src/color-picker.vue.d.ts +38 -38
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
- package/es/components/date-picker/src/panel-utils.d.ts +34 -34
- 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 +14 -14
- package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +12 -12
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/form/index.d.ts +12 -12
- package/es/components/form/src/form-item.d.ts +1 -1
- package/es/components/form/src/form-item.vue.d.ts +5 -5
- package/es/components/image/index.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +1 -1
- package/es/components/index.mjs +4 -4
- package/es/components/input/index.d.ts +12 -12
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +115 -453
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input.vue.d.ts +12 -12
- package/es/components/input/src/input2.mjs +453 -115
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/index.d.ts +45 -45
- package/es/components/input-number/src/input-number.vue.d.ts +45 -45
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +4 -4
- package/es/components/message-box/src/index.vue.d.ts +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/pagination/src/components/jumper.vue.d.ts +12 -12
- package/es/components/pagination/src/components/sizes.vue.d.ts +27 -27
- package/es/components/popconfirm/index.d.ts +23 -23
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
- package/es/components/popover/index.d.ts +18 -18
- package/es/components/popover/src/popover.vue.d.ts +18 -18
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +37 -8
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +8 -37
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/popper/src/content.vue.d.ts +6 -6
- package/es/components/result/index.d.ts +4 -4
- package/es/components/result/src/result.d.ts +1 -1
- package/es/components/result/src/result.vue.d.ts +4 -4
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +27 -27
- package/es/components/select/src/select.vue.d.ts +27 -27
- package/es/components/select/src/useSelect.d.ts +25 -25
- package/es/components/select-v2/index.d.ts +54 -54
- package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +27 -27
- package/es/components/select-v2/src/useSelect.d.ts +25 -25
- package/es/components/slider/index.d.ts +75 -75
- package/es/components/slider/src/button.vue.d.ts +6 -6
- package/es/components/slider/src/composables/use-slide.d.ts +24 -24
- package/es/components/slider/src/slider.vue.d.ts +75 -75
- package/es/components/steps/index.d.ts +16 -16
- package/es/components/steps/src/item.d.ts +1 -1
- package/es/components/steps/src/item.vue.d.ts +4 -4
- package/es/components/steps/src/steps.d.ts +2 -2
- package/es/components/steps/src/steps.vue.d.ts +8 -8
- package/es/components/table/index.d.ts +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +12 -12
- package/es/components/table/src/table.vue.d.ts +1 -1
- package/es/components/tag/index.d.ts +1 -1
- package/es/components/tag/src/tag.vue.d.ts +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +34 -34
- package/es/components/time-select/index.d.ts +114 -114
- package/es/components/time-select/src/time-select.vue.d.ts +57 -57
- package/es/components/tooltip/index.d.ts +6 -6
- package/es/components/tooltip/src/content.vue.d.ts +6 -6
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +6 -6
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/index.d.ts +4 -4
- package/es/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
- package/es/components/tour/index.d.ts +11 -11
- package/es/components/tour/src/content.vue.d.ts +1 -1
- package/es/components/tour/src/step.vue.d.ts +5 -5
- package/es/components/tour/src/tour.vue.d.ts +1 -1
- package/es/components/transfer/index.d.ts +65 -65
- package/es/components/transfer/src/transfer-panel.vue.d.ts +12 -12
- package/es/components/transfer/src/transfer.vue.d.ts +65 -65
- package/es/components/tree-v2/index.d.ts +1 -1
- package/es/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/es/components/upload/index.d.ts +5 -5
- package/es/components/upload/src/upload-content.vue.d.ts +1 -1
- package/es/components/upload/src/upload.vue.d.ts +5 -5
- package/es/index.mjs +4 -4
- package/es/utils/dom/scroll.d.ts +1 -1
- package/es/utils/dom/scroll.mjs +6 -2
- package/es/utils/dom/scroll.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/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +117 -27
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +27 -117
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.d.ts +4 -4
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +4 -4
- package/lib/components/anchor/index.d.ts +1 -0
- package/lib/components/anchor/src/anchor.vue.d.ts +1 -0
- package/lib/components/anchor/src/anchor2.js +4 -1
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/autocomplete/index.d.ts +65 -65
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
- package/lib/components/button/index.d.ts +5 -5
- package/lib/components/button/src/button.d.ts +1 -1
- package/lib/components/button/src/button.vue.d.ts +5 -5
- package/lib/components/button/src/use-button.d.ts +1 -1
- package/lib/components/calendar/index.d.ts +5 -5
- package/lib/components/calendar/src/calendar.vue.d.ts +5 -5
- 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 +128 -128
- package/lib/components/cascader/src/cascader.vue.d.ts +64 -64
- package/lib/components/color-picker/index.d.ts +38 -38
- package/lib/components/color-picker/src/color-picker.vue.d.ts +38 -38
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
- package/lib/components/date-picker/src/panel-utils.d.ts +34 -34
- 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 +14 -14
- package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +12 -12
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/form/index.d.ts +12 -12
- package/lib/components/form/src/form-item.d.ts +1 -1
- package/lib/components/form/src/form-item.vue.d.ts +5 -5
- package/lib/components/image/index.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +1 -1
- package/lib/components/index.js +4 -4
- package/lib/components/input/index.d.ts +12 -12
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +115 -452
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input.vue.d.ts +12 -12
- package/lib/components/input/src/input2.js +452 -115
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/index.d.ts +45 -45
- package/lib/components/input-number/src/input-number.vue.d.ts +45 -45
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +4 -4
- package/lib/components/message-box/src/index.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/pagination/src/components/jumper.vue.d.ts +12 -12
- package/lib/components/pagination/src/components/sizes.vue.d.ts +27 -27
- package/lib/components/popconfirm/index.d.ts +23 -23
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
- package/lib/components/popover/index.d.ts +18 -18
- package/lib/components/popover/src/popover.vue.d.ts +18 -18
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +37 -9
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +9 -37
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/popper/src/content.vue.d.ts +6 -6
- package/lib/components/result/index.d.ts +4 -4
- package/lib/components/result/src/result.d.ts +1 -1
- package/lib/components/result/src/result.vue.d.ts +4 -4
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +27 -27
- package/lib/components/select/src/select.vue.d.ts +27 -27
- package/lib/components/select/src/useSelect.d.ts +25 -25
- package/lib/components/select-v2/index.d.ts +54 -54
- package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +27 -27
- package/lib/components/select-v2/src/useSelect.d.ts +25 -25
- package/lib/components/slider/index.d.ts +75 -75
- package/lib/components/slider/src/button.vue.d.ts +6 -6
- package/lib/components/slider/src/composables/use-slide.d.ts +24 -24
- package/lib/components/slider/src/slider.vue.d.ts +75 -75
- package/lib/components/steps/index.d.ts +16 -16
- package/lib/components/steps/src/item.d.ts +1 -1
- package/lib/components/steps/src/item.vue.d.ts +4 -4
- package/lib/components/steps/src/steps.d.ts +2 -2
- package/lib/components/steps/src/steps.vue.d.ts +8 -8
- package/lib/components/table/index.d.ts +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +12 -12
- package/lib/components/table/src/table.vue.d.ts +1 -1
- package/lib/components/tag/index.d.ts +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +34 -34
- package/lib/components/time-select/index.d.ts +114 -114
- package/lib/components/time-select/src/time-select.vue.d.ts +57 -57
- package/lib/components/tooltip/index.d.ts +6 -6
- package/lib/components/tooltip/src/content.vue.d.ts +6 -6
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +6 -6
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip-v2/index.d.ts +4 -4
- package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
- package/lib/components/tour/index.d.ts +11 -11
- package/lib/components/tour/src/content.vue.d.ts +1 -1
- package/lib/components/tour/src/step.vue.d.ts +5 -5
- package/lib/components/tour/src/tour.vue.d.ts +1 -1
- package/lib/components/transfer/index.d.ts +65 -65
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +12 -12
- package/lib/components/transfer/src/transfer.vue.d.ts +65 -65
- package/lib/components/tree-v2/index.d.ts +1 -1
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/lib/components/upload/index.d.ts +5 -5
- package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +5 -5
- package/lib/index.js +4 -4
- package/lib/utils/dom/scroll.d.ts +1 -1
- package/lib/utils/dom/scroll.js +5 -1
- package/lib/utils/dom/scroll.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 +2 -2
- package/theme-chalk/el-anchor.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/anchor.scss +2 -2
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.mjs","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '../browser'\nimport { easeInOutCubic } from '../easings'\nimport { isWindow } from '../types'\nimport { rAF } from '../raf'\nimport { getStyle } from './style'\n\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\n if (!isClient) return false\n\n const key = (\n {\n undefined: 'overflow',\n true: 'overflow-y',\n false: 'overflow-x',\n } as const\n )[String(isVertical)]!\n const overflow = getStyle(el, key)\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\n}\n\nexport const getScrollContainer = (\n el: HTMLElement,\n isVertical?: boolean\n): Window | HTMLElement | undefined => {\n if (!isClient) return\n\n let parent: HTMLElement = el\n while (parent) {\n if ([window, document, document.documentElement].includes(parent))\n return window\n\n if (isScroll(parent, isVertical)) return parent\n\n parent = parent.parentNode as HTMLElement\n }\n\n return parent\n}\n\nlet scrollBarWidth: number\nexport const getScrollBarWidth = (namespace: string): number => {\n if (!isClient) return 0\n if (scrollBarWidth !== undefined) return scrollBarWidth\n\n const outer = document.createElement('div')\n outer.className = `${namespace}-scrollbar__wrap`\n outer.style.visibility = 'hidden'\n outer.style.width = '100px'\n outer.style.position = 'absolute'\n outer.style.top = '-9999px'\n document.body.appendChild(outer)\n\n const widthNoScroll = outer.offsetWidth\n outer.style.overflow = 'scroll'\n\n const inner = document.createElement('div')\n inner.style.width = '100%'\n outer.appendChild(inner)\n\n const widthWithScroll = inner.offsetWidth\n outer.parentNode?.removeChild(outer)\n scrollBarWidth = widthNoScroll - widthWithScroll\n\n return scrollBarWidth\n}\n\n/**\n * Scroll with in the container element, positioning the **selected** element at the top\n * of the container\n */\nexport function scrollIntoView(\n container: HTMLElement,\n selected: HTMLElement\n): void {\n if (!isClient) return\n\n if (!selected) {\n container.scrollTop = 0\n return\n }\n\n const offsetParents: HTMLElement[] = []\n let pointer = selected.offsetParent\n while (\n pointer !== null &&\n container !== pointer &&\n container.contains(pointer)\n ) {\n offsetParents.push(pointer as HTMLElement)\n pointer = (pointer as HTMLElement).offsetParent\n }\n const top =\n selected.offsetTop +\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\n const bottom = top + selected.offsetHeight\n const viewRectTop = container.scrollTop\n const viewRectBottom = viewRectTop + container.clientHeight\n\n if (top < viewRectTop) {\n container.scrollTop = top\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight\n }\n}\n\nexport function animateScrollTo(\n container: HTMLElement | Window,\n from: number,\n to: number,\n duration: number,\n callback?: unknown\n) {\n const startTime = Date.now()\n\n const scroll = () => {\n const timestamp = Date.now()\n const time = timestamp - startTime\n const nextScrollTop = easeInOutCubic(\n time > duration ? duration : time,\n from,\n to,\n duration\n )\n\n if (isWindow(container)) {\n container.scrollTo(window.pageXOffset, nextScrollTop)\n } else {\n container.scrollTop = nextScrollTop\n }\n if (time < duration) {\n rAF(scroll)\n } else if (typeof callback === 'function') {\n callback()\n }\n }\n\n scroll()\n}\n\nexport const getScrollElement = (\n target: HTMLElement,\n container: HTMLElement | Window\n) => {\n if (isWindow(container)) {\n return target.ownerDocument.documentElement\n }\n return container\n}\n\nexport const getScrollTop = (container: HTMLElement | Window) => {\n if (isWindow(container)) {\n return window.scrollY\n }\n return container.scrollTop\n}\n"],"names":[],"mappings":";;;;;;;AAKY,MAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,UAAU,KAAK;AAC5C,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,GAAG,GAAG;AACd,IAAI,SAAS,EAAE,UAAU;AACzB,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,KAAK,EAAE,YAAY;AACvB,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AACxB,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACrC,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,EAAE;AACU,MAAC,kBAAkB,GAAG,CAAC,EAAE,EAAE,UAAU,KAAK;AACtD,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO;AACX,EAAE,IAAI,MAAM,GAAG,EAAE,CAAC;AAClB,EAAE,OAAO,MAAM,EAAE;AACjB,IAAI,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AY,CAAC;AAC9D,EAAE,IAAI,GAAG,GAAG,WAAW,EAAE;AACzB,IAAI,SAAS,CAAC,SAAS,GAAG,GAAG,CAAC;AAC9B,GAAG,MAAM,IAAI,MAAM,GAAG,cAAc,EAAE;AACtC,IAAI,SAAS,CAAC,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC;AAC1D,GAAG;AACH,CAAC;AACM,SAAS,eAAe,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACzE,EAAE,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AAC/B,EAAE,MAAM,MAAM,GAAG,MAAM;AACvB,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AACjC,IAAI,MAAM,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;AACvC,IAAI,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;AAChG,IAAI,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC7B,MAAM,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC5D,KAAK,MAAM;AACX,MAAM,SAAS,CAAC,SAAS,GAAG,aAAa,CAAC;AAC1C,KAAK;AACL,IAAI,IAAI,IAAI,GAAG,QAAQ,EAAE;AACzB,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"scroll.mjs","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '../browser'\nimport { easeInOutCubic } from '../easings'\nimport { isWindow } from '../types'\nimport { cAF, rAF } from '../raf'\nimport { getStyle } from './style'\n\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\n if (!isClient) return false\n\n const key = (\n {\n undefined: 'overflow',\n true: 'overflow-y',\n false: 'overflow-x',\n } as const\n )[String(isVertical)]!\n const overflow = getStyle(el, key)\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\n}\n\nexport const getScrollContainer = (\n el: HTMLElement,\n isVertical?: boolean\n): Window | HTMLElement | undefined => {\n if (!isClient) return\n\n let parent: HTMLElement = el\n while (parent) {\n if ([window, document, document.documentElement].includes(parent))\n return window\n\n if (isScroll(parent, isVertical)) return parent\n\n parent = parent.parentNode as HTMLElement\n }\n\n return parent\n}\n\nlet scrollBarWidth: number\nexport const getScrollBarWidth = (namespace: string): number => {\n if (!isClient) return 0\n if (scrollBarWidth !== undefined) return scrollBarWidth\n\n const outer = document.createElement('div')\n outer.className = `${namespace}-scrollbar__wrap`\n outer.style.visibility = 'hidden'\n outer.style.width = '100px'\n outer.style.position = 'absolute'\n outer.style.top = '-9999px'\n document.body.appendChild(outer)\n\n const widthNoScroll = outer.offsetWidth\n outer.style.overflow = 'scroll'\n\n const inner = document.createElement('div')\n inner.style.width = '100%'\n outer.appendChild(inner)\n\n const widthWithScroll = inner.offsetWidth\n outer.parentNode?.removeChild(outer)\n scrollBarWidth = widthNoScroll - widthWithScroll\n\n return scrollBarWidth\n}\n\n/**\n * Scroll with in the container element, positioning the **selected** element at the top\n * of the container\n */\nexport function scrollIntoView(\n container: HTMLElement,\n selected: HTMLElement\n): void {\n if (!isClient) return\n\n if (!selected) {\n container.scrollTop = 0\n return\n }\n\n const offsetParents: HTMLElement[] = []\n let pointer = selected.offsetParent\n while (\n pointer !== null &&\n container !== pointer &&\n container.contains(pointer)\n ) {\n offsetParents.push(pointer as HTMLElement)\n pointer = (pointer as HTMLElement).offsetParent\n }\n const top =\n selected.offsetTop +\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\n const bottom = top + selected.offsetHeight\n const viewRectTop = container.scrollTop\n const viewRectBottom = viewRectTop + container.clientHeight\n\n if (top < viewRectTop) {\n container.scrollTop = top\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight\n }\n}\n\nexport function animateScrollTo(\n container: HTMLElement | Window,\n from: number,\n to: number,\n duration: number,\n callback?: unknown\n) {\n const startTime = Date.now()\n\n let handle: number | undefined\n const scroll = () => {\n const timestamp = Date.now()\n const time = timestamp - startTime\n const nextScrollTop = easeInOutCubic(\n time > duration ? duration : time,\n from,\n to,\n duration\n )\n\n if (isWindow(container)) {\n container.scrollTo(window.pageXOffset, nextScrollTop)\n } else {\n container.scrollTop = nextScrollTop\n }\n if (time < duration) {\n handle = rAF(scroll)\n } else if (typeof callback === 'function') {\n callback()\n }\n }\n\n scroll()\n\n return () => {\n handle && cAF(handle)\n }\n}\n\nexport const getScrollElement = (\n target: HTMLElement,\n container: HTMLElement | Window\n) => {\n if (isWindow(container)) {\n return target.ownerDocument.documentElement\n }\n return container\n}\n\nexport const getScrollTop = (container: HTMLElement | Window) => {\n if (isWindow(container)) {\n return window.scrollY\n }\n return container.scrollTop\n}\n"],"names":[],"mappings":";;;;;;;AAKY,MAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,UAAU,KAAK;AAC5C,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,GAAG,GAAG;AACd,IAAI,SAAS,EAAE,UAAU;AACzB,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,KAAK,EAAE,YAAY;AACvB,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AACxB,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACrC,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,EAAE;AACU,MAAC,kBAAkB,GAAG,CAAC,EAAE,EAAE,UAAU,KAAK;AACtD,EAAE,IAAI,CAAC,Q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CAAC;AACJ,EAAE,MAAM,EAAE,CAAC;AACX,EAAE,OAAO,MAAM;AACf,IAAI,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;AAC1B,GAAG,CAAC;AACJ,CAAC;AACW,MAAC,gBAAgB,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK;AACvD,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC3B,IAAI,OAAO,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC;AAChD,GAAG;AACH,EAAE,OAAO,SAAS,CAAC;AACnB,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,SAAS,KAAK;AAC3C,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC3B,IAAI,OAAO,MAAM,CAAC,OAAO,CAAC;AAC1B,GAAG;AACH,EAAE,OAAO,SAAS,CAAC,SAAS,CAAC;AAC7B;;;;"}
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240304";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240304'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var affix$1 = require('./src/
|
|
7
|
-
var affix = require('./src/
|
|
6
|
+
var affix$1 = require('./src/affix.js');
|
|
7
|
+
var affix = require('./src/affix2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElAffix = install.withInstall(affix$1["default"]);
|
|
@@ -2,36 +2,126 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var core = require('@vueuse/core');
|
|
5
7
|
require('../../../utils/index.js');
|
|
6
|
-
require('../../../
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
require('../../../hooks/index.js');
|
|
9
|
+
var affix = require('./affix2.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
+
var style = require('../../../utils/dom/style.js');
|
|
13
|
+
var error = require('../../../utils/error.js');
|
|
14
|
+
var scroll = require('../../../utils/dom/scroll.js');
|
|
10
15
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const COMPONENT_NAME = "ElAffix";
|
|
17
|
+
const __default__ = vue.defineComponent({
|
|
18
|
+
name: COMPONENT_NAME
|
|
19
|
+
});
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
|
+
...__default__,
|
|
22
|
+
props: affix.affixProps,
|
|
23
|
+
emits: affix.affixEmits,
|
|
24
|
+
setup(__props, { expose, emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const ns = index.useNamespace("affix");
|
|
27
|
+
const target = vue.shallowRef();
|
|
28
|
+
const root = vue.shallowRef();
|
|
29
|
+
const scrollContainer = vue.shallowRef();
|
|
30
|
+
const { height: windowHeight } = core.useWindowSize();
|
|
31
|
+
const {
|
|
32
|
+
height: rootHeight,
|
|
33
|
+
width: rootWidth,
|
|
34
|
+
top: rootTop,
|
|
35
|
+
bottom: rootBottom,
|
|
36
|
+
update: updateRoot
|
|
37
|
+
} = core.useElementBounding(root, { windowScroll: false });
|
|
38
|
+
const targetRect = core.useElementBounding(target);
|
|
39
|
+
const fixed = vue.ref(false);
|
|
40
|
+
const scrollTop = vue.ref(0);
|
|
41
|
+
const transform = vue.ref(0);
|
|
42
|
+
const rootStyle = vue.computed(() => {
|
|
43
|
+
return {
|
|
44
|
+
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
45
|
+
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
const affixStyle = vue.computed(() => {
|
|
49
|
+
if (!fixed.value)
|
|
50
|
+
return {};
|
|
51
|
+
const offset = props.offset ? style.addUnit(props.offset) : 0;
|
|
52
|
+
return {
|
|
53
|
+
height: `${rootHeight.value}px`,
|
|
54
|
+
width: `${rootWidth.value}px`,
|
|
55
|
+
top: props.position === "top" ? offset : "",
|
|
56
|
+
bottom: props.position === "bottom" ? offset : "",
|
|
57
|
+
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
58
|
+
zIndex: props.zIndex
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
const update = () => {
|
|
62
|
+
if (!scrollContainer.value)
|
|
63
|
+
return;
|
|
64
|
+
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
65
|
+
if (props.position === "top") {
|
|
66
|
+
if (props.target) {
|
|
67
|
+
const difference = targetRect.bottom.value - props.offset - rootHeight.value;
|
|
68
|
+
fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
|
|
69
|
+
transform.value = difference < 0 ? difference : 0;
|
|
70
|
+
} else {
|
|
71
|
+
fixed.value = props.offset > rootTop.value;
|
|
72
|
+
}
|
|
73
|
+
} else if (props.target) {
|
|
74
|
+
const difference = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
|
|
75
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
|
76
|
+
transform.value = difference < 0 ? -difference : 0;
|
|
77
|
+
} else {
|
|
78
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const handleScroll = () => {
|
|
82
|
+
updateRoot();
|
|
83
|
+
emit("scroll", {
|
|
84
|
+
scrollTop: scrollTop.value,
|
|
85
|
+
fixed: fixed.value
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
vue.watch(fixed, (val) => emit("change", val));
|
|
89
|
+
vue.onMounted(() => {
|
|
90
|
+
var _a;
|
|
91
|
+
if (props.target) {
|
|
92
|
+
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
93
|
+
if (!target.value)
|
|
94
|
+
error.throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
95
|
+
} else {
|
|
96
|
+
target.value = document.documentElement;
|
|
97
|
+
}
|
|
98
|
+
scrollContainer.value = scroll.getScrollContainer(root.value, true);
|
|
99
|
+
updateRoot();
|
|
100
|
+
});
|
|
101
|
+
core.useEventListener(scrollContainer, "scroll", handleScroll);
|
|
102
|
+
vue.watchEffect(update);
|
|
103
|
+
expose({
|
|
104
|
+
update,
|
|
105
|
+
updateRoot
|
|
106
|
+
});
|
|
107
|
+
return (_ctx, _cache) => {
|
|
108
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
109
|
+
ref_key: "root",
|
|
110
|
+
ref: root,
|
|
111
|
+
class: vue.normalizeClass(vue.unref(ns).b()),
|
|
112
|
+
style: vue.normalizeStyle(vue.unref(rootStyle))
|
|
113
|
+
}, [
|
|
114
|
+
vue.createElementVNode("div", {
|
|
115
|
+
class: vue.normalizeClass({ [vue.unref(ns).m("fixed")]: fixed.value }),
|
|
116
|
+
style: vue.normalizeStyle(vue.unref(affixStyle))
|
|
117
|
+
}, [
|
|
118
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
119
|
+
], 6)
|
|
120
|
+
], 6);
|
|
121
|
+
};
|
|
28
122
|
}
|
|
29
123
|
});
|
|
30
|
-
|
|
31
|
-
scroll: ({ scrollTop, fixed }) => types.isNumber(scrollTop) && types.isBoolean(fixed),
|
|
32
|
-
[event.CHANGE_EVENT]: (fixed) => types.isBoolean(fixed)
|
|
33
|
-
};
|
|
124
|
+
var Affix = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "affix.vue"]]);
|
|
34
125
|
|
|
35
|
-
exports
|
|
36
|
-
exports.affixProps = affixProps;
|
|
126
|
+
exports["default"] = Affix;
|
|
37
127
|
//# sourceMappingURL=affix.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix.js","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix.js","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport { addUnit, getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { affixEmits, affixProps } from './affix'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root, { windowScroll: false })\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? addUnit(props.offset) : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n if (props.position === 'top') {\n if (props.target) {\n const difference =\n targetRect.bottom.value - props.offset - rootHeight.value\n fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = props.offset > rootTop.value\n }\n } else if (props.target) {\n const difference =\n windowHeight.value -\n targetRect.top.value -\n props.offset -\n rootHeight.value\n fixed.value =\n windowHeight.value - props.offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - props.offset < rootBottom.value\n }\n}\n\nconst handleScroll = () => {\n updateRoot()\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit('change', val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n /** @description update rootRect info */\n updateRoot,\n})\n</script>\n"],"names":["useNamespace","shallowRef","useWindowSize","useElementBounding","ref","computed","addUnit","watch","onMounted","throwError","getScrollContainer","useEventListener","watchEffect"],"mappings":";;;;;;;;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAA,MAAM,SAASC,cAAwB,EAAA,CAAA;AACvC,IAAA,MAAM,OAAOA,cAA2B,EAAA,CAAA;AACxC,IAAA,MAAM,kBAAkBA,cAAiC,EAAA,CAAA;AACzD,IAAM,MAAA,EAAE,MAAQ,EAAA,YAAA,EAAA,GAAiBC,kBAAc,EAAA,CAAA;AAC/C,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA,UAAA;AAAA,MACR,KAAO,EAAA,SAAA;AAAA,MACP,GAAK,EAAA,OAAA;AAAA,MACL,MAAQ,EAAA,UAAA;AAAA,MACR,MAAQ,EAAA,UAAA;AAAA,KAAA,GACNC,uBAAmB,CAAA,IAAA,EAAM,EAAE,YAAA,EAAc,OAAO,CAAA,CAAA;AACpD,IAAM,MAAA,UAAA,GAAaA,wBAAmB,MAAM,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQC,QAAI,KAAK,CAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAYA,QAAI,CAAC,CAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAYA,QAAI,CAAC,CAAA,CAAA;AAEvB,IAAM,MAAA,SAAA,GAAYC,aAAwB,MAAM;AAC9C,MAAO,OAAA;AAAA,QACL,MAAQ,EAAA,KAAA,CAAM,KAAQ,GAAA,CAAA,EAAG,WAAW,KAAY,CAAA,EAAA,CAAA,GAAA,EAAA;AAAA,QAChD,KAAO,EAAA,KAAA,CAAM,KAAQ,GA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CAAU,MAAM;AACd,MAAA,IAAI;AACF,MAAA,IAAA,KAAO,CACL,MAAA,EAAA;AACF,QAAA,MAAY,CAAA,KAAA,GAAA,CAAA,EAAA,GAAA,QAAA,CAAA,aAAA,CAAA,KAAA,CAAA,MAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,CAAA;AACV,QAAW,IAAA,CAAA,MAAA,CAAA,KAAA;AAAwD,UAChEC,gBAAA,CAAA,cAAA,EAAA,CAAA,uBAAA,EAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACL,OAAA,MAAA;AAAwB,QAC1B,MAAA,CAAA,KAAA,GAAA,QAAA,CAAA,eAAA,CAAA;AACA,OAAA;AACA,MAAW,eAAA,CAAA,KAAA,GAAAC,yBAAA,CAAA,IAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AAAA,MACZ,UAAA,EAAA,CAAA;AAED,KAAiB,CAAA,CAAA;AACjB,IAAAC,qBAAkB,CAAA,eAAA,EAAA,QAAA,EAAA,YAAA,CAAA,CAAA;AAElB,IAAaC,eAAA,CAAA,MAAA,CAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAEA,MAAA;AAAA,MACD,UAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,126 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
require('../../../
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var style = require('../../../utils/dom/style.js');
|
|
13
|
-
var error = require('../../../utils/error.js');
|
|
14
|
-
var scroll = require('../../../utils/dom/scroll.js');
|
|
6
|
+
require('../../../constants/index.js');
|
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
|
+
var types = require('../../../utils/types.js');
|
|
9
|
+
var event = require('../../../constants/event.js');
|
|
15
10
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
width: rootWidth,
|
|
34
|
-
top: rootTop,
|
|
35
|
-
bottom: rootBottom,
|
|
36
|
-
update: updateRoot
|
|
37
|
-
} = core.useElementBounding(root, { windowScroll: false });
|
|
38
|
-
const targetRect = core.useElementBounding(target);
|
|
39
|
-
const fixed = vue.ref(false);
|
|
40
|
-
const scrollTop = vue.ref(0);
|
|
41
|
-
const transform = vue.ref(0);
|
|
42
|
-
const rootStyle = vue.computed(() => {
|
|
43
|
-
return {
|
|
44
|
-
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
45
|
-
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
const affixStyle = vue.computed(() => {
|
|
49
|
-
if (!fixed.value)
|
|
50
|
-
return {};
|
|
51
|
-
const offset = props.offset ? style.addUnit(props.offset) : 0;
|
|
52
|
-
return {
|
|
53
|
-
height: `${rootHeight.value}px`,
|
|
54
|
-
width: `${rootWidth.value}px`,
|
|
55
|
-
top: props.position === "top" ? offset : "",
|
|
56
|
-
bottom: props.position === "bottom" ? offset : "",
|
|
57
|
-
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
58
|
-
zIndex: props.zIndex
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
const update = () => {
|
|
62
|
-
if (!scrollContainer.value)
|
|
63
|
-
return;
|
|
64
|
-
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
65
|
-
if (props.position === "top") {
|
|
66
|
-
if (props.target) {
|
|
67
|
-
const difference = targetRect.bottom.value - props.offset - rootHeight.value;
|
|
68
|
-
fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
|
|
69
|
-
transform.value = difference < 0 ? difference : 0;
|
|
70
|
-
} else {
|
|
71
|
-
fixed.value = props.offset > rootTop.value;
|
|
72
|
-
}
|
|
73
|
-
} else if (props.target) {
|
|
74
|
-
const difference = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
|
|
75
|
-
fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
|
76
|
-
transform.value = difference < 0 ? -difference : 0;
|
|
77
|
-
} else {
|
|
78
|
-
fixed.value = windowHeight.value - props.offset < rootBottom.value;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const handleScroll = () => {
|
|
82
|
-
updateRoot();
|
|
83
|
-
emit("scroll", {
|
|
84
|
-
scrollTop: scrollTop.value,
|
|
85
|
-
fixed: fixed.value
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
vue.watch(fixed, (val) => emit("change", val));
|
|
89
|
-
vue.onMounted(() => {
|
|
90
|
-
var _a;
|
|
91
|
-
if (props.target) {
|
|
92
|
-
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
93
|
-
if (!target.value)
|
|
94
|
-
error.throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
95
|
-
} else {
|
|
96
|
-
target.value = document.documentElement;
|
|
97
|
-
}
|
|
98
|
-
scrollContainer.value = scroll.getScrollContainer(root.value, true);
|
|
99
|
-
updateRoot();
|
|
100
|
-
});
|
|
101
|
-
core.useEventListener(scrollContainer, "scroll", handleScroll);
|
|
102
|
-
vue.watchEffect(update);
|
|
103
|
-
expose({
|
|
104
|
-
update,
|
|
105
|
-
updateRoot
|
|
106
|
-
});
|
|
107
|
-
return (_ctx, _cache) => {
|
|
108
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
109
|
-
ref_key: "root",
|
|
110
|
-
ref: root,
|
|
111
|
-
class: vue.normalizeClass(vue.unref(ns).b()),
|
|
112
|
-
style: vue.normalizeStyle(vue.unref(rootStyle))
|
|
113
|
-
}, [
|
|
114
|
-
vue.createElementVNode("div", {
|
|
115
|
-
class: vue.normalizeClass({ [vue.unref(ns).m("fixed")]: fixed.value }),
|
|
116
|
-
style: vue.normalizeStyle(vue.unref(affixStyle))
|
|
117
|
-
}, [
|
|
118
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
119
|
-
], 6)
|
|
120
|
-
], 6);
|
|
121
|
-
};
|
|
11
|
+
const affixProps = runtime.buildProps({
|
|
12
|
+
zIndex: {
|
|
13
|
+
type: runtime.definePropType([Number, String]),
|
|
14
|
+
default: 100
|
|
15
|
+
},
|
|
16
|
+
target: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
offset: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
position: {
|
|
25
|
+
type: String,
|
|
26
|
+
values: ["top", "bottom"],
|
|
27
|
+
default: "top"
|
|
122
28
|
}
|
|
123
29
|
});
|
|
124
|
-
|
|
30
|
+
const affixEmits = {
|
|
31
|
+
scroll: ({ scrollTop, fixed }) => types.isNumber(scrollTop) && types.isBoolean(fixed),
|
|
32
|
+
[event.CHANGE_EVENT]: (fixed) => types.isBoolean(fixed)
|
|
33
|
+
};
|
|
125
34
|
|
|
126
|
-
exports
|
|
35
|
+
exports.affixEmits = affixEmits;
|
|
36
|
+
exports.affixProps = affixProps;
|
|
127
37
|
//# sourceMappingURL=affix2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":["buildProps","definePropType","isNumber","isBoolean","CHANGE_EVENT"],"mappings":";;;;;;;;;;AAOY,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,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,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAKC,cAAQ,CAAC,SAAS,CAAC,IAAIC,eAAS,CAAC,KAAK,CAAC;AAC3E,EAAE,CAACC,kBAAY,GAAG,CAAC,KAAK,KAAKD,eAAS,CAAC,KAAK,CAAC;AAC7C;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const ElAlert: import("@element-plus/nightly/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
2
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
3
3
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
4
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
4
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "error" | "info", unknown, "info", boolean>;
|
|
5
5
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
6
6
|
readonly closeText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
7
7
|
readonly showIcon: BooleanConstructor;
|
|
@@ -12,7 +12,7 @@ export declare const ElAlert: import("@element-plus/nightly/es/utils").SFCWithIn
|
|
|
12
12
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
14
14
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
15
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
15
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "error" | "info", unknown, "info", boolean>;
|
|
16
16
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
17
17
|
readonly closeText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
18
18
|
readonly showIcon: BooleanConstructor;
|
|
@@ -120,7 +120,7 @@ export declare const ElAlert: import("@element-plus/nightly/es/utils").SFCWithIn
|
|
|
120
120
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
121
121
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
122
122
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
123
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
123
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "error" | "info", unknown, "info", boolean>;
|
|
124
124
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
125
125
|
readonly closeText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
126
126
|
readonly showIcon: BooleanConstructor;
|
|
@@ -129,7 +129,7 @@ export declare const ElAlert: import("@element-plus/nightly/es/utils").SFCWithIn
|
|
|
129
129
|
}>> & {
|
|
130
130
|
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
131
131
|
}, {
|
|
132
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "
|
|
132
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "success" | "warning" | "error" | "info", unknown>;
|
|
133
133
|
readonly title: string;
|
|
134
134
|
readonly description: string;
|
|
135
135
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -3,7 +3,7 @@ export declare const alertEffects: readonly ["light", "dark"];
|
|
|
3
3
|
export declare const alertProps: {
|
|
4
4
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
5
5
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
6
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
6
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "error" | "info", unknown, "info", boolean>;
|
|
7
7
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
8
8
|
readonly closeText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
9
9
|
readonly showIcon: BooleanConstructor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
3
3
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
4
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
4
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "error" | "info", unknown, "info", boolean>;
|
|
5
5
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
6
6
|
readonly closeText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
7
7
|
readonly showIcon: BooleanConstructor;
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
14
14
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
15
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
15
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "error" | "info", unknown, "info", boolean>;
|
|
16
16
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
17
17
|
readonly closeText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
18
18
|
readonly showIcon: BooleanConstructor;
|
|
@@ -120,7 +120,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
120
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
121
121
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
122
122
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
123
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
123
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "error" | "info", unknown, "info", boolean>;
|
|
124
124
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
125
125
|
readonly closeText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
126
126
|
readonly showIcon: BooleanConstructor;
|
|
@@ -129,7 +129,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
129
129
|
}>> & {
|
|
130
130
|
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
131
131
|
}, {
|
|
132
|
-
readonly type: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "
|
|
132
|
+
readonly type: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "success" | "warning" | "error" | "info", unknown>;
|
|
133
133
|
readonly title: string;
|
|
134
134
|
readonly description: string;
|
|
135
135
|
readonly closable: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -59,6 +59,7 @@ export declare const ElAnchor: import("@element-plus/nightly/es/utils").SFCWithI
|
|
|
59
59
|
addLink: (state: import("./src/constants").AnchorLinkState) => void;
|
|
60
60
|
removeLink: (href: string) => void;
|
|
61
61
|
setCurrentAnchor: (href: string) => void;
|
|
62
|
+
clearAnimate: null;
|
|
62
63
|
scrollToAnchor: (href: string) => void;
|
|
63
64
|
scrollTo: (href?: string | undefined) => void;
|
|
64
65
|
handleClick: (e: MouseEvent, href?: string | undefined) => void;
|
|
@@ -60,6 +60,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
60
|
addLink: (state: AnchorLinkState) => void;
|
|
61
61
|
removeLink: (href: string) => void;
|
|
62
62
|
setCurrentAnchor: (href: string) => void;
|
|
63
|
+
clearAnimate: null;
|
|
63
64
|
scrollToAnchor: (href: string) => void;
|
|
64
65
|
scrollTo: (href?: string | undefined) => void;
|
|
65
66
|
handleClick: (e: MouseEvent, href?: string | undefined) => void;
|
|
@@ -51,18 +51,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
51
|
emit("change", href);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
+
let clearAnimate = null;
|
|
54
55
|
const scrollToAnchor = (href) => {
|
|
55
56
|
if (!containerEl.value)
|
|
56
57
|
return;
|
|
57
58
|
const target = element.getElement(href);
|
|
58
59
|
if (!target)
|
|
59
60
|
return;
|
|
61
|
+
if (clearAnimate)
|
|
62
|
+
clearAnimate();
|
|
60
63
|
isScrolling = true;
|
|
61
64
|
const scrollEle = scroll.getScrollElement(target, containerEl.value);
|
|
62
65
|
const distance = position.getOffsetTopDistance(target, scrollEle);
|
|
63
66
|
const max = scrollEle.scrollHeight - scrollEle.clientHeight;
|
|
64
67
|
const to = Math.min(distance - props.offset, max);
|
|
65
|
-
scroll.animateScrollTo(containerEl.value, currentScrollTop, to, props.duration, () => {
|
|
68
|
+
clearAnimate = scroll.animateScrollTo(containerEl.value, currentScrollTop, to, props.duration, () => {
|
|
66
69
|
setTimeout(() => {
|
|
67
70
|
isScrolling = false;
|
|
68
71
|
}, 20);
|