element-plus 2.2.10 → 2.2.11
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 +456 -266
- package/dist/index.full.min.js +14 -14
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +1066 -876
- 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 +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/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -100
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +100 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +1 -0
- package/es/components/carousel/src/carousel.vue.d.ts +1 -0
- package/es/components/carousel/src/carousel2.mjs +3 -2
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader/src/index.mjs +0 -1
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +4 -4
- package/es/components/checkbox/src/checkbox-group.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +10 -9
- package/es/components/color-picker/src/draggable.mjs +10 -12
- package/es/components/color-picker/src/draggable.mjs.map +1 -1
- package/es/components/color-picker/src/index.mjs +0 -1
- package/es/components/color-picker/src/index.mjs.map +1 -1
- package/es/components/dropdown/src/useDropdown.mjs +3 -3
- package/es/components/dropdown/src/useDropdown.mjs.map +1 -1
- package/es/components/dropdown/style/css.d.ts +2 -1
- package/es/components/dropdown/style/css.mjs +2 -1
- package/es/components/dropdown/style/css.mjs.map +1 -1
- package/es/components/dropdown/style/index.d.ts +2 -1
- package/es/components/dropdown/style/index.mjs +2 -1
- package/es/components/dropdown/style/index.mjs.map +1 -1
- package/es/components/image/index.d.ts +4 -1
- package/es/components/image/src/image.d.ts +1 -0
- package/es/components/image/src/image.mjs +2 -1
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +4 -1
- package/es/components/image/src/image2.mjs +1 -0
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/menu/src/menu.mjs +0 -5
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/message-box/src/index.mjs +2 -3
- package/es/components/message-box/src/index.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +4 -10
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -2
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select-v2/src/select.mjs +4 -5
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/slider/index.d.ts +5 -0
- package/es/components/slider/src/button.vue.d.ts +1 -0
- package/es/components/slider/src/button2.mjs +12 -11
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/composables/use-slide.d.ts +4 -0
- package/es/components/slider/src/composables/use-slider-button.d.ts +1 -0
- package/es/components/slider/src/composables/use-slider-button.mjs +1 -0
- package/es/components/slider/src/composables/use-slider-button.mjs.map +1 -1
- package/es/components/slider/src/slider.vue.d.ts +5 -0
- package/es/components/table/src/filter-panel.mjs +0 -1
- package/es/components/table/src/filter-panel.mjs.map +1 -1
- package/es/components/table/src/table/defaults.mjs +1 -3
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +12 -9
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table.mjs +1 -0
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +6 -5
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +20 -20
- package/es/components/transfer/src/transfer-panel.vue.d.ts +4 -4
- package/es/components/transfer/src/transfer.vue.d.ts +20 -20
- package/es/components/tree/src/model/useKeydown.mjs +3 -7
- package/es/components/tree/src/model/useKeydown.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-grid.mjs +1 -1
- package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
- package/es/directives/mousewheel/index.mjs.map +1 -1
- package/es/hooks/use-escape-keydown/index.mjs +6 -6
- package/es/hooks/use-escape-keydown/index.mjs.map +1 -1
- package/es/hooks/use-lockscreen/index.mjs +9 -5
- package/es/hooks/use-lockscreen/index.mjs.map +1 -1
- package/es/index.mjs +1 -1
- package/es/make-installer.mjs.map +1 -1
- package/es/utils/dom/event.d.ts +0 -6
- package/es/utils/dom/event.mjs +1 -20
- package/es/utils/dom/event.mjs.map +1 -1
- package/es/utils/dom/index.mjs +1 -1
- package/es/utils/dom/scroll.d.ts +1 -1
- package/es/utils/dom/scroll.mjs +2 -2
- package/es/utils/dom/scroll.mjs.map +1 -1
- package/es/utils/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -100
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +100 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/carousel/index.d.ts +1 -0
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -0
- package/lib/components/carousel/src/carousel2.js +3 -2
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader/src/index.js +0 -1
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +4 -4
- package/lib/components/checkbox/src/checkbox-group.js +1 -1
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +10 -9
- package/lib/components/color-picker/src/draggable.js +15 -17
- package/lib/components/color-picker/src/draggable.js.map +1 -1
- package/lib/components/color-picker/src/index.js +0 -1
- package/lib/components/color-picker/src/index.js.map +1 -1
- package/lib/components/dropdown/src/useDropdown.js +3 -3
- package/lib/components/dropdown/src/useDropdown.js.map +1 -1
- package/lib/components/dropdown/style/css.d.ts +2 -1
- package/lib/components/dropdown/style/css.js +2 -1
- package/lib/components/dropdown/style/css.js.map +1 -1
- package/lib/components/dropdown/style/index.d.ts +2 -1
- package/lib/components/dropdown/style/index.js +2 -1
- package/lib/components/dropdown/style/index.js.map +1 -1
- package/lib/components/image/index.d.ts +4 -1
- package/lib/components/image/src/image.d.ts +1 -0
- package/lib/components/image/src/image.js +2 -1
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +4 -1
- package/lib/components/image/src/image2.js +1 -0
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/menu/src/menu.js +0 -5
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/message-box/src/index.js +2 -3
- package/lib/components/message-box/src/index.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +2 -8
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js.map +1 -1
- package/lib/components/select/src/select.js +1 -2
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select-v2/src/select.js +4 -5
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/slider/index.d.ts +5 -0
- package/lib/components/slider/src/button.vue.d.ts +1 -0
- package/lib/components/slider/src/button2.js +11 -10
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/composables/use-slide.d.ts +4 -0
- package/lib/components/slider/src/composables/use-slider-button.d.ts +1 -0
- package/lib/components/slider/src/composables/use-slider-button.js +1 -0
- package/lib/components/slider/src/composables/use-slider-button.js.map +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +5 -0
- package/lib/components/table/src/filter-panel.js +0 -1
- package/lib/components/table/src/filter-panel.js.map +1 -1
- package/lib/components/table/src/table/defaults.js +1 -3
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +12 -9
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table.js +1 -0
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +6 -5
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/transfer/index.d.ts +20 -20
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +4 -4
- package/lib/components/transfer/src/transfer.vue.d.ts +20 -20
- package/lib/components/tree/src/model/useKeydown.js +2 -6
- package/lib/components/tree/src/model/useKeydown.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.js +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
- package/lib/directives/mousewheel/index.js.map +1 -1
- package/lib/hooks/use-escape-keydown/index.js +6 -6
- package/lib/hooks/use-escape-keydown/index.js.map +1 -1
- package/lib/hooks/use-lockscreen/index.js +9 -5
- package/lib/hooks/use-lockscreen/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/make-installer.js.map +1 -1
- package/lib/utils/dom/event.d.ts +0 -6
- package/lib/utils/dom/event.js +0 -22
- package/lib/utils/dom/event.js.map +1 -1
- package/lib/utils/dom/index.js +0 -3
- package/lib/utils/dom/index.js.map +1 -1
- package/lib/utils/dom/scroll.d.ts +1 -1
- package/lib/utils/dom/scroll.js +2 -2
- package/lib/utils/dom/scroll.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 +3 -3
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/el-table-v2.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/date-picker/picker.scss +4 -5
- package/theme-chalk/src/rate.scss +1 -0
- package/theme-chalk/src/table-v2.scss +3 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-lockscreen/index.ts"],"sourcesContent":["import { isRef, onScopeDispose, watch } from 'vue'\n\nimport { isClient } from '@vueuse/core'\nimport {\n addClass,\n getScrollBarWidth,\n getStyle,\n hasClass,\n removeClass,\n throwError,\n} from '@element-plus/utils'\n\nimport type { Ref } from 'vue'\n\n/**\n * Hook that monitoring the ref value to lock or unlock the screen.\n * When the trigger became true, it assumes modal is now opened and vice versa.\n * @param trigger {Ref<boolean>}\n */\nexport const useLockscreen = (trigger: Ref<boolean>) => {\n if (!isRef(trigger)) {\n throwError(\n '[useLockscreen]',\n 'You need to pass a ref param to this function'\n )\n }\n if (!isClient || hasClass(document.body,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-lockscreen/index.ts"],"sourcesContent":["import { isRef, onScopeDispose, watch } from 'vue'\n\nimport { computed } from '@vue/reactivity'\nimport { isClient } from '@vueuse/core'\nimport {\n addClass,\n getScrollBarWidth,\n getStyle,\n hasClass,\n removeClass,\n throwError,\n} from '@element-plus/utils'\nimport { useNamespace } from '../use-namespace'\n\nimport type { Ref } from 'vue'\n\n/**\n * Hook that monitoring the ref value to lock or unlock the screen.\n * When the trigger became true, it assumes modal is now opened and vice versa.\n * @param trigger {Ref<boolean>}\n */\nexport const useLockscreen = (trigger: Ref<boolean>) => {\n if (!isRef(trigger)) {\n throwError(\n '[useLockscreen]',\n 'You need to pass a ref param to this function'\n )\n }\n\n const ns = useNamespace('popup')\n\n const hiddenCls = computed(() => ns.bm('parent', 'hidden'))\n\n if (!isClient || hasClass(document.body, hiddenCls.value)) {\n return\n }\n\n let scrollBarWidth = 0\n let withoutHiddenClass = false\n let bodyPaddingRight = '0'\n let computedBodyPaddingRight = 0\n\n const cleanup = () => {\n removeClass(document.body, hiddenCls.value)\n if (withoutHiddenClass) {\n document.body.style.paddingRight = bodyPaddingRight\n }\n }\n watch(trigger, (val) => {\n if (!val) {\n cleanup()\n return\n }\n\n withoutHiddenClass = !hasClass(document.body, hiddenCls.value)\n if (withoutHiddenClass) {\n bodyPaddingRight = document.body.style.paddingRight\n computedBodyPaddingRight = Number.parseInt(\n getStyle(document.body, 'paddingRight'),\n 10\n )\n }\n scrollBarWidth = getScrollBarWidth(ns.namespace.value)\n const bodyHasOverflow =\n document.documentElement.clientHeight < document.body.scrollHeight\n const bodyOverflowY = getStyle(document.body, 'overflowY')\n if (\n scrollBarWidth > 0 &&\n (bodyHasOverflow || bodyOverflowY === 'scroll') &&\n withoutHiddenClass\n ) {\n document.body.style.paddingRight = `${\n computedBodyPaddingRight + scrollBarWidth\n }px`\n }\n addClass(document.body, hiddenCls.value)\n })\n onScopeDispose(() => cleanup())\n}\n"],"names":[],"mappings":";;;;;;;;;AAYY,MAAC,aAAa,GAAG,CAAC,OAAO,KAAK;AAC1C,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;AACvB,IAAI,UAAU,CAAC,iBAAiB,EAAE,+CAA+C,CAAC,CAAC;AACnF,GAAG;AACH,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACnC,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC9D,EAAE,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE;AAC7D,IAAI,OAAO;AACX,GAAG;AACH,EAAE,IAAI,cAAc,GAAG,CAAC,CAAC;AACzB,EAAE,IAAI,kBAAkB,GAAG,KAAK,CAAC;AACjC,EAAE,IAAI,gBAAgB,GAAG,GAAG,CAAC;AAC7B,EAAE,IAAI,wBAAwB,GAAG,CAAC,CAAC;AACnC,EAAE,MAAM,OAAO,GAAG,MAAM;AACxB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAChD,IAAI,IAAI,kBAAkB,EAAE;AAC5B,MAAM,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAC1D,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK;AAC1B,IAAI,IAAI,CAAC,GAAG,EAAE;AACd,MAAM,OAAO,EAAE,CAAC;AAChB,MAAM,OAAO;AACb,KAAK;AACL,IAAI,kBAAkB,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,IAAI,IAAI,kBAAkB,EAAE;AAC5B,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;AAC1D,MAAM,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9F,KAAK;AACL,IAAI,cAAc,GAAG,iBAAiB,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC3D,IAAI,MAAM,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;AAC/F,IAAI,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAC/D,IAAI,IAAI,cAAc,GAAG,CAAC,KAAK,eAAe,IAAI,aAAa,KAAK,QAAQ,CAAC,IAAI,kBAAkB,EAAE;AACrG,MAAM,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,EAAE,wBAAwB,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC;AAC1F,KAAK;AACL,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAC7C,GAAG,CAAC,CAAC;AACL,EAAE,cAAc,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;AAClC;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ export { autocompleteEmits, autocompleteProps } from './components/autocomplete/
|
|
|
15
15
|
export { ElAutocomplete } from './components/autocomplete/index.mjs';
|
|
16
16
|
export { avatarEmits, avatarProps } from './components/avatar/src/avatar.mjs';
|
|
17
17
|
export { ElAvatar } from './components/avatar/index.mjs';
|
|
18
|
-
export { backtopEmits, backtopProps } from './components/backtop/src/
|
|
18
|
+
export { backtopEmits, backtopProps } from './components/backtop/src/backtop.mjs';
|
|
19
19
|
export { ElBacktop } from './components/backtop/index.mjs';
|
|
20
20
|
export { badgeProps } from './components/badge/src/badge.mjs';
|
|
21
21
|
export { ElBadge } from './components/badge/index.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-installer.mjs","sources":["../../../packages/element-plus/make-installer.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"make-installer.mjs","sources":["../../../packages/element-plus/make-installer.ts"],"sourcesContent":["import { provideGlobalConfig } from '@element-plus/hooks'\nimport { INSTALLED_KEY } from '@element-plus/constants'\nimport { version } from './version'\n\nimport type { App, Plugin } from '@vue/runtime-core'\nimport type { ConfigProviderContext } from '@element-plus/tokens'\n\nexport const makeInstaller = (components: Plugin[] = []) => {\n const install = (app: App, options?: ConfigProviderContext) => {\n if (app[INSTALLED_KEY]) return\n\n app[INSTALLED_KEY] = true\n components.forEach((c) => app.use(c))\n\n if (options) provideGlobalConfig(options, app, true)\n }\n\n return {\n version,\n install,\n }\n}\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,aAAa,GAAG,CAAC,UAAU,GAAG,EAAE,KAAK;AAClD,EAAE,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK;AACpC,IAAI,IAAI,GAAG,CAAC,aAAa,CAAC;AAC1B,MAAM,OAAO;AACb,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;AAC9B,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1C,IAAI,IAAI,OAAO;AACf,MAAM,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAC9C,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
|
package/es/utils/dom/event.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/** @deprecated use `element.addEventListener` instead */
|
|
2
|
-
export declare const on: (element: HTMLElement | Document | Window | Element, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
|
|
3
|
-
/** @deprecated use `element.addEventListener` instead */
|
|
4
|
-
export declare const off: (element: HTMLElement | Document | Window | Element, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
|
|
5
|
-
/** @deprecated use `element.addEventListener` instead */
|
|
6
|
-
export declare const once: (el: HTMLElement, event: string, fn: EventListener) => void;
|
|
7
1
|
export declare const composeEventHandlers: <E>(theirsHandler?: ((event: E) => boolean | void) | undefined, oursHandler?: ((event: E) => void) | undefined, { checkForDefaultPrevented }?: {
|
|
8
2
|
checkForDefaultPrevented?: boolean | undefined;
|
|
9
3
|
}) => (event: E) => void;
|
package/es/utils/dom/event.mjs
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
const on = (element, event, handler, useCapture = false) => {
|
|
2
|
-
if (element && event && handler) {
|
|
3
|
-
element == null ? void 0 : element.addEventListener(event, handler, useCapture);
|
|
4
|
-
}
|
|
5
|
-
};
|
|
6
|
-
const off = (element, event, handler, useCapture = false) => {
|
|
7
|
-
if (element && event && handler) {
|
|
8
|
-
element == null ? void 0 : element.removeEventListener(event, handler, useCapture);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
const once = (el, event, fn) => {
|
|
12
|
-
const listener = function(...args) {
|
|
13
|
-
if (fn) {
|
|
14
|
-
fn.apply(this, args);
|
|
15
|
-
}
|
|
16
|
-
off(el, event, listener);
|
|
17
|
-
};
|
|
18
|
-
on(el, event, listener);
|
|
19
|
-
};
|
|
20
1
|
const composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => {
|
|
21
2
|
const handleEvent = (event) => {
|
|
22
3
|
const shouldPrevent = theirsHandler == null ? void 0 : theirsHandler(event);
|
|
@@ -30,5 +11,5 @@ const whenMouse = (handler) => {
|
|
|
30
11
|
return (e) => e.pointerType === "mouse" ? handler(e) : void 0;
|
|
31
12
|
};
|
|
32
13
|
|
|
33
|
-
export { composeEventHandlers,
|
|
14
|
+
export { composeEventHandlers, whenMouse };
|
|
34
15
|
//# sourceMappingURL=event.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.mjs","sources":["../../../../../packages/utils/dom/event.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"event.mjs","sources":["../../../../../packages/utils/dom/event.ts"],"sourcesContent":["export const composeEventHandlers = <E>(\n theirsHandler?: (event: E) => boolean | void,\n oursHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) => {\n const handleEvent = (event: E) => {\n const shouldPrevent = theirsHandler?.(event)\n\n if (checkForDefaultPrevented === false || !shouldPrevent) {\n return oursHandler?.(event)\n }\n }\n return handleEvent\n}\n\ntype WhenMouseHandler = (e: PointerEvent) => any\nexport const whenMouse = (handler: WhenMouseHandler): WhenMouseHandler => {\n return (e: PointerEvent) =>\n e.pointerType === 'mouse' ? handler(e) : undefined\n}\n"],"names":[],"mappings":"AAAY,MAAC,oBAAoB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,EAAE,wBAAwB,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK;AAC9G,EAAE,MAAM,WAAW,GAAG,CAAC,KAAK,KAAK;AACjC,IAAI,MAAM,aAAa,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAChF,IAAI,IAAI,wBAAwB,KAAK,KAAK,IAAI,CAAC,aAAa,EAAE;AAC9D,MAAM,OAAO,WAAW,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;AAC/D,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO,WAAW,CAAC;AACrB,EAAE;AACU,MAAC,SAAS,GAAG,CAAC,OAAO,KAAK;AACtC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;AAChE;;;;"}
|
package/es/utils/dom/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from './aria.mjs';
|
|
2
|
-
export { composeEventHandlers,
|
|
2
|
+
export { composeEventHandlers, whenMouse } from './event.mjs';
|
|
3
3
|
export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from './position.mjs';
|
|
4
4
|
export { addResizeListener, removeResizeListener } from './resize-event.mjs';
|
|
5
5
|
export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from './scroll.mjs';
|
package/es/utils/dom/scroll.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const isScroll: (el: HTMLElement, isVertical?: boolean | undefined) => boolean;
|
|
2
2
|
export declare const getScrollContainer: (el: HTMLElement, isVertical?: boolean | undefined) => Window | HTMLElement | undefined;
|
|
3
|
-
export declare const getScrollBarWidth: () => number;
|
|
3
|
+
export declare const getScrollBarWidth: (namespace: string) => number;
|
|
4
4
|
/**
|
|
5
5
|
* Scroll with in the container element, positioning the **selected** element at the top
|
|
6
6
|
* of the container
|
package/es/utils/dom/scroll.mjs
CHANGED
|
@@ -26,14 +26,14 @@ const getScrollContainer = (el, isVertical) => {
|
|
|
26
26
|
return parent;
|
|
27
27
|
};
|
|
28
28
|
let scrollBarWidth;
|
|
29
|
-
const getScrollBarWidth = () => {
|
|
29
|
+
const getScrollBarWidth = (namespace) => {
|
|
30
30
|
var _a;
|
|
31
31
|
if (!isClient)
|
|
32
32
|
return 0;
|
|
33
33
|
if (scrollBarWidth !== void 0)
|
|
34
34
|
return scrollBarWidth;
|
|
35
35
|
const outer = document.createElement("div");
|
|
36
|
-
outer.className =
|
|
36
|
+
outer.className = `${namespace}-scrollbar__wrap`;
|
|
37
37
|
outer.style.visibility = "hidden";
|
|
38
38
|
outer.style.width = "100px";
|
|
39
39
|
outer.style.position = "absolute";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.mjs","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '@vueuse/core'\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 = (): number => {\n if (!isClient) return 0\n if (scrollBarWidth !== undefined) return scrollBarWidth\n\n const outer = document.createElement('div')\n
|
|
1
|
+
{"version":3,"file":"scroll.mjs","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '@vueuse/core'\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"],"names":[],"mappings":"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"}
|
package/es/utils/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ export { escapeStringRegexp } from './strings.mjs';
|
|
|
13
13
|
export { isElement, isEmpty, isPropAbsent, isUndefined } from './types.mjs';
|
|
14
14
|
export { mutable } from './typescript.mjs';
|
|
15
15
|
export { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from './dom/aria.mjs';
|
|
16
|
-
export { composeEventHandlers,
|
|
16
|
+
export { composeEventHandlers, whenMouse } from './dom/event.mjs';
|
|
17
17
|
export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from './dom/position.mjs';
|
|
18
18
|
export { addResizeListener, removeResizeListener } from './dom/resize-event.mjs';
|
|
19
19
|
export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from './dom/scroll.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.2.
|
|
1
|
+
export declare const version = "2.2.11";
|
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 = '2.2.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.2.11'\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 backtop$1 = require('./src/
|
|
7
|
-
var backtop = require('./src/
|
|
6
|
+
var backtop$1 = require('./src/backtop2.js');
|
|
7
|
+
var backtop = require('./src/backtop.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElBacktop = install.withInstall(backtop$1["default"]);
|
|
@@ -2,106 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
22
|
-
...__default__,
|
|
23
|
-
props: backtop.backtopProps,
|
|
24
|
-
emits: backtop.backtopEmits,
|
|
25
|
-
setup(__props, { emit }) {
|
|
26
|
-
const props = __props;
|
|
27
|
-
const COMPONENT_NAME = "ElBacktop";
|
|
28
|
-
const ns = index.useNamespace("backtop");
|
|
29
|
-
const el = vue.shallowRef();
|
|
30
|
-
const container = vue.shallowRef();
|
|
31
|
-
const visible = vue.ref(false);
|
|
32
|
-
const backTopStyle = vue.computed(() => ({
|
|
33
|
-
right: `${props.right}px`,
|
|
34
|
-
bottom: `${props.bottom}px`
|
|
35
|
-
}));
|
|
36
|
-
const scrollToTop = () => {
|
|
37
|
-
if (!el.value)
|
|
38
|
-
return;
|
|
39
|
-
const beginTime = Date.now();
|
|
40
|
-
const beginValue = el.value.scrollTop;
|
|
41
|
-
const frameFunc = () => {
|
|
42
|
-
if (!el.value)
|
|
43
|
-
return;
|
|
44
|
-
const progress = (Date.now() - beginTime) / 500;
|
|
45
|
-
if (progress < 1) {
|
|
46
|
-
el.value.scrollTop = beginValue * (1 - animation.easeInOutCubic(progress));
|
|
47
|
-
requestAnimationFrame(frameFunc);
|
|
48
|
-
} else {
|
|
49
|
-
el.value.scrollTop = 0;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
requestAnimationFrame(frameFunc);
|
|
53
|
-
};
|
|
54
|
-
const handleScroll = () => {
|
|
55
|
-
if (el.value)
|
|
56
|
-
visible.value = el.value.scrollTop >= props.visibilityHeight;
|
|
57
|
-
};
|
|
58
|
-
const handleClick = (event) => {
|
|
59
|
-
scrollToTop();
|
|
60
|
-
emit("click", event);
|
|
61
|
-
};
|
|
62
|
-
const handleScrollThrottled = core.useThrottleFn(handleScroll, 300);
|
|
63
|
-
core.useEventListener(container, "scroll", handleScrollThrottled);
|
|
64
|
-
vue.onMounted(() => {
|
|
65
|
-
var _a;
|
|
66
|
-
container.value = document;
|
|
67
|
-
el.value = document.documentElement;
|
|
68
|
-
if (props.target) {
|
|
69
|
-
el.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
70
|
-
if (!el.value) {
|
|
71
|
-
error.throwError(COMPONENT_NAME, `target is not existed: ${props.target}`);
|
|
72
|
-
}
|
|
73
|
-
container.value = el.value;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
return (_ctx, _cache) => {
|
|
77
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
78
|
-
name: `${vue.unref(ns).namespace.value}-fade-in`
|
|
79
|
-
}, {
|
|
80
|
-
default: vue.withCtx(() => [
|
|
81
|
-
visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
82
|
-
key: 0,
|
|
83
|
-
style: vue.normalizeStyle(vue.unref(backTopStyle)),
|
|
84
|
-
class: vue.normalizeClass(vue.unref(ns).b()),
|
|
85
|
-
onClick: vue.withModifiers(handleClick, ["stop"])
|
|
86
|
-
}, [
|
|
87
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
88
|
-
vue.createVNode(vue.unref(index$1.ElIcon), {
|
|
89
|
-
class: vue.normalizeClass(vue.unref(ns).e("icon"))
|
|
90
|
-
}, {
|
|
91
|
-
default: vue.withCtx(() => [
|
|
92
|
-
vue.createVNode(vue.unref(iconsVue.CaretTop))
|
|
93
|
-
]),
|
|
94
|
-
_: 1
|
|
95
|
-
}, 8, ["class"])
|
|
96
|
-
])
|
|
97
|
-
], 14, _hoisted_1)) : vue.createCommentVNode("v-if", true)
|
|
98
|
-
]),
|
|
99
|
-
_: 3
|
|
100
|
-
}, 8, ["name"]);
|
|
101
|
-
};
|
|
5
|
+
const backtopProps = {
|
|
6
|
+
visibilityHeight: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 200
|
|
9
|
+
},
|
|
10
|
+
target: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
right: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 40
|
|
17
|
+
},
|
|
18
|
+
bottom: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 40
|
|
102
21
|
}
|
|
103
|
-
}
|
|
104
|
-
|
|
22
|
+
};
|
|
23
|
+
const backtopEmits = {
|
|
24
|
+
click: (evt) => evt instanceof MouseEvent
|
|
25
|
+
};
|
|
105
26
|
|
|
106
|
-
exports
|
|
27
|
+
exports.backtopEmits = backtopEmits;
|
|
28
|
+
exports.backtopProps = backtopProps;
|
|
107
29
|
//# sourceMappingURL=backtop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backtop.js","sources":["../../../../../../packages/components/backtop/src/backtop.
|
|
1
|
+
{"version":3,"file":"backtop.js","sources":["../../../../../../packages/components/backtop/src/backtop.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport type Backtop from './backtop.vue'\n\nexport const backtopProps = {\n visibilityHeight: {\n type: Number,\n default: 200,\n },\n target: {\n type: String,\n default: '',\n },\n right: {\n type: Number,\n default: 40,\n },\n bottom: {\n type: Number,\n default: 40,\n },\n} as const\nexport type BacktopProps = ExtractPropTypes<typeof backtopProps>\n\nexport const backtopEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type BacktopEmits = typeof backtopEmits\n\nexport type BacktopInstance = InstanceType<typeof Backtop>\n"],"names":[],"mappings":";;;;AAAY,MAAC,YAAY,GAAG;AAC5B,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE;AACU,MAAC,YAAY,GAAG;AAC5B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;"}
|
|
@@ -2,28 +2,106 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
default: 40
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const backtopEmits = {
|
|
24
|
-
click: (evt) => evt instanceof MouseEvent
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var core = require('@vueuse/core');
|
|
7
|
+
var index$1 = require('../../icon/index.js');
|
|
8
|
+
require('../../../utils/index.js');
|
|
9
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
10
|
+
require('../../../hooks/index.js');
|
|
11
|
+
var backtop = require('./backtop.js');
|
|
12
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
14
|
+
var animation = require('../../../utils/animation.js');
|
|
15
|
+
var error = require('../../../utils/error.js');
|
|
16
|
+
|
|
17
|
+
const _hoisted_1 = ["onClick"];
|
|
18
|
+
const __default__ = {
|
|
19
|
+
name: "ElBacktop"
|
|
25
20
|
};
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
22
|
+
...__default__,
|
|
23
|
+
props: backtop.backtopProps,
|
|
24
|
+
emits: backtop.backtopEmits,
|
|
25
|
+
setup(__props, { emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const COMPONENT_NAME = "ElBacktop";
|
|
28
|
+
const ns = index.useNamespace("backtop");
|
|
29
|
+
const el = vue.shallowRef();
|
|
30
|
+
const container = vue.shallowRef();
|
|
31
|
+
const visible = vue.ref(false);
|
|
32
|
+
const backTopStyle = vue.computed(() => ({
|
|
33
|
+
right: `${props.right}px`,
|
|
34
|
+
bottom: `${props.bottom}px`
|
|
35
|
+
}));
|
|
36
|
+
const scrollToTop = () => {
|
|
37
|
+
if (!el.value)
|
|
38
|
+
return;
|
|
39
|
+
const beginTime = Date.now();
|
|
40
|
+
const beginValue = el.value.scrollTop;
|
|
41
|
+
const frameFunc = () => {
|
|
42
|
+
if (!el.value)
|
|
43
|
+
return;
|
|
44
|
+
const progress = (Date.now() - beginTime) / 500;
|
|
45
|
+
if (progress < 1) {
|
|
46
|
+
el.value.scrollTop = beginValue * (1 - animation.easeInOutCubic(progress));
|
|
47
|
+
requestAnimationFrame(frameFunc);
|
|
48
|
+
} else {
|
|
49
|
+
el.value.scrollTop = 0;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
requestAnimationFrame(frameFunc);
|
|
53
|
+
};
|
|
54
|
+
const handleScroll = () => {
|
|
55
|
+
if (el.value)
|
|
56
|
+
visible.value = el.value.scrollTop >= props.visibilityHeight;
|
|
57
|
+
};
|
|
58
|
+
const handleClick = (event) => {
|
|
59
|
+
scrollToTop();
|
|
60
|
+
emit("click", event);
|
|
61
|
+
};
|
|
62
|
+
const handleScrollThrottled = core.useThrottleFn(handleScroll, 300);
|
|
63
|
+
core.useEventListener(container, "scroll", handleScrollThrottled);
|
|
64
|
+
vue.onMounted(() => {
|
|
65
|
+
var _a;
|
|
66
|
+
container.value = document;
|
|
67
|
+
el.value = document.documentElement;
|
|
68
|
+
if (props.target) {
|
|
69
|
+
el.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
70
|
+
if (!el.value) {
|
|
71
|
+
error.throwError(COMPONENT_NAME, `target is not existed: ${props.target}`);
|
|
72
|
+
}
|
|
73
|
+
container.value = el.value;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return (_ctx, _cache) => {
|
|
77
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
78
|
+
name: `${vue.unref(ns).namespace.value}-fade-in`
|
|
79
|
+
}, {
|
|
80
|
+
default: vue.withCtx(() => [
|
|
81
|
+
visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
82
|
+
key: 0,
|
|
83
|
+
style: vue.normalizeStyle(vue.unref(backTopStyle)),
|
|
84
|
+
class: vue.normalizeClass(vue.unref(ns).b()),
|
|
85
|
+
onClick: vue.withModifiers(handleClick, ["stop"])
|
|
86
|
+
}, [
|
|
87
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
88
|
+
vue.createVNode(vue.unref(index$1.ElIcon), {
|
|
89
|
+
class: vue.normalizeClass(vue.unref(ns).e("icon"))
|
|
90
|
+
}, {
|
|
91
|
+
default: vue.withCtx(() => [
|
|
92
|
+
vue.createVNode(vue.unref(iconsVue.CaretTop))
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
}, 8, ["class"])
|
|
96
|
+
])
|
|
97
|
+
], 14, _hoisted_1)) : vue.createCommentVNode("v-if", true)
|
|
98
|
+
]),
|
|
99
|
+
_: 3
|
|
100
|
+
}, 8, ["name"]);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
var Backtop = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/backtop/src/backtop.vue"]]);
|
|
26
105
|
|
|
27
|
-
exports
|
|
28
|
-
exports.backtopProps = backtopProps;
|
|
106
|
+
exports["default"] = Backtop;
|
|
29
107
|
//# sourceMappingURL=backtop2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backtop2.js","sources":["../../../../../../packages/components/backtop/src/backtop.
|
|
1
|
+
{"version":3,"file":"backtop2.js","sources":["../../../../../../packages/components/backtop/src/backtop.vue"],"sourcesContent":["<template>\n <transition :name=\"`${ns.namespace.value}-fade-in`\">\n <div\n v-if=\"visible\"\n :style=\"backTopStyle\"\n :class=\"ns.b()\"\n @click.stop=\"handleClick\"\n >\n <slot>\n <el-icon :class=\"ns.e('icon')\"><caret-top /></el-icon>\n </slot>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef } from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { easeInOutCubic, throwError } from '@element-plus/utils'\nimport { CaretTop } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { backtopEmits, backtopProps } from './backtop'\n\nconst COMPONENT_NAME = 'ElBacktop'\n\ndefineOptions({\n name: 'ElBacktop',\n})\n\nconst props = defineProps(backtopProps)\nconst emit = defineEmits(backtopEmits)\n\nconst ns = useNamespace('backtop')\nconst el = shallowRef<HTMLElement>()\nconst container = shallowRef<Document | HTMLElement>()\nconst visible = ref(false)\n\nconst backTopStyle = computed(() => ({\n right: `${props.right}px`,\n bottom: `${props.bottom}px`,\n}))\n\nconst scrollToTop = () => {\n // TODO: use https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo, with behavior: 'smooth'\n\n if (!el.value) return\n const beginTime = Date.now()\n const beginValue = el.value.scrollTop\n const frameFunc = () => {\n if (!el.value) return\n const progress = (Date.now() - beginTime) / 500\n if (progress < 1) {\n el.value.scrollTop = beginValue * (1 - easeInOutCubic(progress))\n requestAnimationFrame(frameFunc)\n } else {\n el.value.scrollTop = 0\n }\n }\n requestAnimationFrame(frameFunc)\n}\nconst handleScroll = () => {\n if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight\n}\nconst handleClick = (event: MouseEvent) => {\n scrollToTop()\n emit('click', event)\n}\n\nconst handleScrollThrottled = useThrottleFn(handleScroll, 300)\n\nuseEventListener(container, 'scroll', handleScrollThrottled)\nonMounted(() => {\n container.value = document\n el.value = document.documentElement\n\n if (props.target) {\n el.value = document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!el.value) {\n throwError(COMPONENT_NAME, `target is not existed: ${props.target}`)\n }\n container.value = el.value\n }\n})\n</script>\n"],"names":["useNamespace","shallowRef","ref","computed","easeInOutCubic","useThrottleFn","useEventListener","onMounted","throwError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAA,MAAA,cAAA,GAAA,WAAA,CAAA;AASA,IAAA,MAAA,EAAA,GAAAA,mBAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,KAAAC,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAAA,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,OAAA,GAAAC,QAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,GAAAC,aAAA,OAAA;AAAA,MACA,KAAA,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA,EAAA,CAAA;AAAA,MACA,MAAA,EAAA,GAAA,KAAA,CAAA,MAAA,CAAA,EAAA,CAAA;AAAA,KACA,CAAA,CAAA,CAAA;AAEA,IAAA,MAAA,cAAA,MAAA;AAGA,MAAA,IAAA,CAAA,EAAA,CAAA,KAAA;AAAA,QAAA,OAAA;AACA,MAAA,MAAA,SAAA,GAAA,KAAA,GAAA,EAAA,CAAA;AACA,MAAA,MAAA,UAAA,GAAA,GAAA,KAAA,CAAA,SAAA,CAAA;AACA,MAAA,MAAA,YAAA,MAAA;AACA,QAAA,IAAA,CAAA,EAAA,CAAA,KAAA;AAAA,UAAA,OAAA;AACA,QAAA,MAAA,QAAA,GAAA,CAAA,IAAA,CAAA,GAAA,EAAA,GAAA,SAAA,IAAA,GAAA,CAAA;AACA,QAAA,IAAA,WAAA,CAAA,EAAA;AACA,UAAA,EAAA,CAAA,KAAA,CAAA,SAAA,GAAA,UAAA,IAAA,CAAA,GAAAC,yBAAA,QAAA,CAAA,CAAA,CAAA;AACA,UAAA,qBAAA,CAAA,SAAA,CAAA,CAAA;AAAA,SACA,MAAA;AACA,UAAA,EAAA,CAAA,MAAA,SAAA,GAAA,CAAA,CAAA;AAAA,SACA;AAAA,OACA,CAAA;AACA,MAAA,qBAAA,CAAA,SAAA,CAAA,CAAA;AAAA,KACA,CAAA;AACA,IAAA,MAAA,eAAA,MAAA;AACA,MAAA,IAAA,EAAA,CAAA,KAAA;AAAA,QAAA,OAAA,CAAA,KAAA,GAAA,EAAA,CAAA,KAAA,CAAA,SAAA,IAAA,KAAA,CAAA,gBAAA,CAAA;AAAA,KACA,CAAA;AACA,IAAA,MAAA,WAAA,GAAA,CAAA,KAAA,KAAA;AACA,MAAA,WAAA,EAAA,CAAA;AACA,MAAA,IAAA,CAAA,SAAA,KAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAEA,IAAA,MAAA,qBAAA,GAAAC,kBAAA,CAAA,YAAA,EAAA,GAAA,CAAA,CAAA;AAEA,IAAAC,qBAAA,CAAA,SAAA,EAAA,UAAA,qBAAA,CAAA,CAAA;AACA,IAAAC,aAAA,CAAA,MAAA;AACA,MAAA,IAAA,EAAA,CAAA;AACA,MAAA,eAAA,GAAA,QAAA,CAAA;AAEA,MAAA,EAAA,CAAA,QAAA,QAAA,CAAA,eAAA,CAAA;AACA,MAAA,IAAA,KAAA,CAAA,MAAA,EAAA;AACA,QAAA,EAAA,CAAA,KAAA,GAAA,CAAA,EAAA,GAAA,QAAA,CAAA,aAAA,CAAA,KAAA,CAAA,MAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,CAAA;AACA,QAAA,IAAA,CAAA,EAAA,CAAA,KAAA,EAAA;AAAA,UACAC,gBAAA,CAAA,cAAA,EAAA,CAAA,uBAAA,EAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACA,SAAA;AAAA,QACA,SAAA,CAAA,KAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAAA,OACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -78,6 +78,7 @@ export declare const ElCarousel: import("element-plus/es/utils").SFCWithInstall<
|
|
|
78
78
|
translateItem: (index: number, activeIndex: number, oldIndex?: number | undefined) => void;
|
|
79
79
|
}[]>;
|
|
80
80
|
arrowDisplay: import("vue").ComputedRef<boolean>;
|
|
81
|
+
interval: import("vue").ComputedRef<number>;
|
|
81
82
|
hasLabel: import("vue").ComputedRef<boolean>;
|
|
82
83
|
carouselClasses: import("vue").ComputedRef<string[]>;
|
|
83
84
|
indicatorsClasses: import("vue").ComputedRef<string[]>;
|
|
@@ -79,6 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
translateItem: (index: number, activeIndex: number, oldIndex?: number | undefined) => void;
|
|
80
80
|
}[]>;
|
|
81
81
|
arrowDisplay: import("vue").ComputedRef<boolean>;
|
|
82
|
+
interval: import("vue").ComputedRef<number>;
|
|
82
83
|
hasLabel: import("vue").ComputedRef<boolean>;
|
|
83
84
|
carouselClasses: import("vue").ComputedRef<string[]>;
|
|
84
85
|
indicatorsClasses: import("vue").ComputedRef<string[]>;
|
|
@@ -38,6 +38,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
38
38
|
const root = vue.ref();
|
|
39
39
|
const items = vue.ref([]);
|
|
40
40
|
const arrowDisplay = vue.computed(() => props.arrow !== "never" && !vue.unref(isVertical));
|
|
41
|
+
const interval = vue.computed(() => props.interval);
|
|
41
42
|
const hasLabel = vue.computed(() => {
|
|
42
43
|
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
43
44
|
});
|
|
@@ -73,9 +74,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
function startTimer() {
|
|
76
|
-
if (
|
|
77
|
+
if (interval.value <= 0 || !props.autoplay || timer.value)
|
|
77
78
|
return;
|
|
78
|
-
timer.value = setInterval(() => playSlides(),
|
|
79
|
+
timer.value = setInterval(() => playSlides(), interval.value);
|
|
79
80
|
}
|
|
80
81
|
const playSlides = () => {
|
|
81
82
|
if (activeIndex.value < items.value.length - 1) {
|