element-plus 2.2.19 → 2.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +709 -554
- package/dist/index.full.min.js +20 -20
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +20 -20
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +710 -555
- 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/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +2 -1
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.d.ts +1 -0
- package/es/components/alert/index.mjs.map +1 -1
- package/es/components/alert/src/alert.d.ts +0 -2
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/instance.d.ts +2 -0
- package/es/components/alert/src/instance.mjs +2 -0
- package/es/components/alert/src/instance.mjs.map +1 -0
- package/es/components/autocomplete/index.d.ts +1 -66
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +1 -66
- package/es/components/calendar/index.d.ts +1 -1
- package/es/components/calendar/src/calendar.vue.d.ts +3 -3
- package/es/components/calendar/src/calendar2.mjs +7 -3
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/use-calendar.d.ts +0 -2
- package/es/components/calendar/src/use-calendar.mjs +31 -36
- package/es/components/calendar/src/use-calendar.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +31 -60
- package/es/components/carousel/index.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item.d.ts +0 -2
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item.vue.d.ts +13 -20
- package/es/components/carousel/src/carousel-item2.mjs +21 -114
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.d.ts +0 -2
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +67 -84
- package/es/components/carousel/src/carousel2.mjs +40 -205
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/carousel/src/instance.d.ts +4 -0
- package/es/components/carousel/src/instance.mjs +2 -0
- package/es/components/carousel/src/instance.mjs.map +1 -0
- package/es/components/carousel/src/use-carousel-item.d.ts +13 -0
- package/es/components/carousel/src/use-carousel-item.mjs +125 -0
- package/es/components/carousel/src/use-carousel-item.mjs.map +1 -0
- package/es/components/carousel/src/use-carousel.d.ts +22 -0
- package/es/components/carousel/src/use-carousel.mjs +211 -0
- package/es/components/carousel/src/use-carousel.mjs.map +1 -0
- package/es/components/cascader/index.d.ts +4 -84
- package/es/components/cascader/src/index.mjs +9 -13
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +2 -42
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +7 -2
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox.mjs +4 -5
- package/es/components/checkbox/src/composables/use-checkbox.mjs.map +1 -1
- package/es/components/collapse/index.d.ts +20 -59
- package/es/components/collapse/index.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item.d.ts +0 -2
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item.vue.d.ts +21 -32
- package/es/components/collapse/src/collapse-item2.mjs +34 -55
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/collapse/src/collapse.d.ts +0 -2
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse.vue.d.ts +6 -25
- package/es/components/collapse/src/collapse2.mjs +5 -39
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/collapse/src/instance.d.ts +4 -0
- package/es/components/collapse/src/instance.mjs +2 -0
- package/es/components/collapse/src/instance.mjs.map +1 -0
- package/es/components/collapse/src/use-collapse-item.d.ts +20 -0
- package/es/components/collapse/src/use-collapse-item.mjs +75 -0
- package/es/components/collapse/src/use-collapse-item.mjs.map +1 -0
- package/es/components/collapse/src/use-collapse.d.ts +9 -0
- package/es/components/collapse/src/use-collapse.mjs +52 -0
- package/es/components/collapse/src/use-collapse.mjs.map +1 -0
- package/es/components/color-picker/index.d.ts +1 -66
- package/es/components/color-picker/src/color-picker.vue.d.ts +1 -66
- package/es/components/date-picker/src/composables/use-month-range-header.mjs +2 -2
- package/es/components/date-picker/src/composables/use-month-range-header.mjs.map +1 -1
- package/es/components/dialog/index.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +1 -1
- package/es/components/drawer/index.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +1 -1
- package/es/components/dropdown/index.d.ts +4 -42
- package/es/components/dropdown/src/dropdown-item.mjs +3 -0
- package/es/components/dropdown/src/dropdown-item.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +1 -0
- package/es/components/dropdown/src/dropdown.mjs +2 -1
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +4 -42
- package/es/components/dropdown/src/dropdown2.mjs +2 -2
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/focus-trap/src/utils.mjs +4 -0
- package/es/components/focus-trap/src/utils.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +2 -0
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input/index.d.ts +2 -0
- package/es/components/input/index.mjs.map +1 -1
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +2 -2
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +1 -42
- package/es/components/popconfirm/index.d.ts +1 -66
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -66
- package/es/components/popover/index.d.ts +1 -66
- package/es/components/popover/src/popover.vue.d.ts +1 -66
- package/es/components/popover/style/css.d.ts +1 -1
- package/es/components/popover/style/css.mjs +1 -1
- package/es/components/popover/style/index.d.ts +1 -1
- package/es/components/popover/style/index.mjs +1 -1
- package/es/components/popper/src/utils.d.ts +0 -4
- package/es/components/popper/src/utils.mjs +1 -2
- package/es/components/popper/src/utils.mjs.map +1 -1
- package/es/components/select/index.d.ts +1 -42
- package/es/components/select/src/select.vue.d.ts +1 -42
- package/es/components/select/src/useSelect.d.ts +1 -42
- package/es/components/select/src/useSelect.mjs +9 -9
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +4 -86
- package/es/components/select-v2/src/select.mjs +2 -2
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +2 -43
- package/es/components/select-v2/src/useSelect.d.ts +2 -43
- package/es/components/select-v2/src/useSelect.mjs +5 -5
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/slider/index.d.ts +0 -120
- package/es/components/slider/src/button.vue.d.ts +0 -24
- package/es/components/slider/src/composables/use-slide.d.ts +0 -96
- package/es/components/slider/src/slider.vue.d.ts +0 -120
- package/es/components/table/src/filter-panel.vue.d.ts +1 -42
- package/es/components/table/src/store/watcher.mjs +10 -0
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table-body/styles-helper.mjs +2 -2
- package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/style.helper.mjs +2 -2
- package/es/components/table/src/table-header/style.helper.mjs.map +1 -1
- package/es/components/table/src/util.d.ts +4 -4
- package/es/components/table/src/util.mjs +44 -31
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/tabs/src/tabs.mjs +14 -22
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +1 -66
- package/es/components/time-select/index.d.ts +4 -168
- package/es/components/time-select/src/time-select.vue.d.ts +2 -84
- package/es/components/tooltip/index.d.ts +0 -24
- package/es/components/tooltip/src/tooltip.d.ts +0 -7
- package/es/components/tooltip/src/tooltip.mjs +0 -7
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +3 -25
- package/es/components/tooltip/src/tooltip2.mjs +5 -19
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tree-v2/index.d.ts +0 -1
- package/es/components/tree-v2/src/tree-node.mjs +2 -2
- package/es/components/tree-v2/src/tree-node.mjs.map +1 -1
- package/es/components/tree-v2/src/tree-node.vue.d.ts +0 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +0 -1
- package/es/components/upload/src/use-handlers.mjs +3 -0
- package/es/components/upload/src/use-handlers.mjs.map +1 -1
- package/es/hooks/index.d.ts +0 -1
- package/es/index.mjs +1 -1
- package/es/utils/dom/style.mjs +4 -4
- package/es/utils/dom/style.mjs.map +1 -1
- package/es/utils/index.mjs +1 -1
- package/es/utils/types.d.ts +1 -0
- package/es/utils/types.mjs +8 -2
- package/es/utils/types.mjs.map +1 -1
- package/es/utils/vue/vnode.mjs +4 -0
- package/es/utils/vue/vnode.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/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +2 -1
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.d.ts +1 -0
- package/lib/components/alert/index.js.map +1 -1
- package/lib/components/alert/src/alert.d.ts +0 -2
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/instance.d.ts +2 -0
- package/lib/components/alert/src/instance.js +3 -0
- package/lib/components/alert/src/instance.js.map +1 -0
- package/lib/components/autocomplete/index.d.ts +1 -66
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +1 -66
- package/lib/components/calendar/index.d.ts +1 -1
- package/lib/components/calendar/src/calendar.vue.d.ts +3 -3
- package/lib/components/calendar/src/calendar2.js +11 -7
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/use-calendar.d.ts +0 -2
- package/lib/components/calendar/src/use-calendar.js +31 -36
- package/lib/components/calendar/src/use-calendar.js.map +1 -1
- package/lib/components/carousel/index.d.ts +31 -60
- package/lib/components/carousel/index.js.map +1 -1
- package/lib/components/carousel/src/carousel-item.d.ts +0 -2
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item.vue.d.ts +13 -20
- package/lib/components/carousel/src/carousel-item2.js +20 -113
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.d.ts +0 -2
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +67 -84
- package/lib/components/carousel/src/carousel2.js +42 -207
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/carousel/src/instance.d.ts +4 -0
- package/lib/components/carousel/src/instance.js +3 -0
- package/lib/components/carousel/src/instance.js.map +1 -0
- package/lib/components/carousel/src/use-carousel-item.d.ts +13 -0
- package/lib/components/carousel/src/use-carousel-item.js +129 -0
- package/lib/components/carousel/src/use-carousel-item.js.map +1 -0
- package/lib/components/carousel/src/use-carousel.d.ts +22 -0
- package/lib/components/carousel/src/use-carousel.js +215 -0
- package/lib/components/carousel/src/use-carousel.js.map +1 -0
- package/lib/components/cascader/index.d.ts +4 -84
- package/lib/components/cascader/src/index.js +8 -12
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +2 -42
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +6 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox.js +4 -5
- package/lib/components/checkbox/src/composables/use-checkbox.js.map +1 -1
- package/lib/components/collapse/index.d.ts +20 -59
- package/lib/components/collapse/index.js.map +1 -1
- package/lib/components/collapse/src/collapse-item.d.ts +0 -2
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item.vue.d.ts +21 -32
- package/lib/components/collapse/src/collapse-item2.js +37 -58
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/collapse/src/collapse.d.ts +0 -2
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse.vue.d.ts +6 -25
- package/lib/components/collapse/src/collapse2.js +4 -38
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/collapse/src/instance.d.ts +4 -0
- package/lib/components/collapse/src/instance.js +3 -0
- package/lib/components/collapse/src/instance.js.map +1 -0
- package/lib/components/collapse/src/use-collapse-item.d.ts +20 -0
- package/lib/components/collapse/src/use-collapse-item.js +80 -0
- package/lib/components/collapse/src/use-collapse-item.js.map +1 -0
- package/lib/components/collapse/src/use-collapse.d.ts +9 -0
- package/lib/components/collapse/src/use-collapse.js +57 -0
- package/lib/components/collapse/src/use-collapse.js.map +1 -0
- package/lib/components/color-picker/index.d.ts +1 -66
- package/lib/components/color-picker/src/color-picker.vue.d.ts +1 -66
- package/lib/components/date-picker/src/composables/use-month-range-header.js +2 -2
- package/lib/components/date-picker/src/composables/use-month-range-header.js.map +1 -1
- package/lib/components/dialog/index.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
- package/lib/components/drawer/index.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +1 -1
- package/lib/components/dropdown/index.d.ts +4 -42
- package/lib/components/dropdown/src/dropdown-item.js +3 -0
- package/lib/components/dropdown/src/dropdown-item.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +1 -0
- package/lib/components/dropdown/src/dropdown.js +2 -1
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +4 -42
- package/lib/components/dropdown/src/dropdown2.js +2 -2
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/focus-trap/src/utils.js +4 -0
- package/lib/components/focus-trap/src/utils.js.map +1 -1
- package/lib/components/form/src/form2.js +2 -0
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input/index.d.ts +2 -0
- package/lib/components/input/index.js.map +1 -1
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +2 -2
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -42
- package/lib/components/popconfirm/index.d.ts +1 -66
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -66
- package/lib/components/popover/index.d.ts +1 -66
- package/lib/components/popover/src/popover.vue.d.ts +1 -66
- package/lib/components/popover/style/css.d.ts +1 -1
- package/lib/components/popover/style/css.js +1 -1
- package/lib/components/popover/style/index.d.ts +1 -1
- package/lib/components/popover/style/index.js +1 -1
- package/lib/components/popper/src/utils.d.ts +0 -4
- package/lib/components/popper/src/utils.js +1 -2
- package/lib/components/popper/src/utils.js.map +1 -1
- package/lib/components/select/index.d.ts +1 -42
- package/lib/components/select/src/select.vue.d.ts +1 -42
- package/lib/components/select/src/useSelect.d.ts +1 -42
- package/lib/components/select/src/useSelect.js +7 -7
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +4 -86
- package/lib/components/select-v2/src/select.js +2 -2
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +2 -43
- package/lib/components/select-v2/src/useSelect.d.ts +2 -43
- package/lib/components/select-v2/src/useSelect.js +5 -5
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +23 -18
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +18 -23
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/slider/index.d.ts +0 -120
- package/lib/components/slider/src/button.vue.d.ts +0 -24
- package/lib/components/slider/src/composables/use-slide.d.ts +0 -96
- package/lib/components/slider/src/slider.vue.d.ts +0 -120
- package/lib/components/table/src/filter-panel.vue.d.ts +1 -42
- package/lib/components/table/src/store/watcher.js +10 -0
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table-body/styles-helper.js +2 -2
- package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
- package/lib/components/table/src/table-header/style.helper.js +2 -2
- package/lib/components/table/src/table-header/style.helper.js.map +1 -1
- package/lib/components/table/src/util.d.ts +4 -4
- package/lib/components/table/src/util.js +44 -31
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/tabs/src/tabs.js +17 -25
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +1 -66
- package/lib/components/time-select/index.d.ts +4 -168
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -84
- package/lib/components/tooltip/index.d.ts +0 -24
- package/lib/components/tooltip/src/tooltip.d.ts +0 -7
- package/lib/components/tooltip/src/tooltip.js +0 -7
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -25
- package/lib/components/tooltip/src/tooltip2.js +4 -18
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tree-v2/index.d.ts +0 -1
- package/lib/components/tree-v2/src/tree-node.js +2 -2
- package/lib/components/tree-v2/src/tree-node.js.map +1 -1
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +0 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +0 -1
- package/lib/components/upload/src/use-handlers.js +3 -0
- package/lib/components/upload/src/use-handlers.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -1
- package/lib/index.js +1 -1
- package/lib/utils/dom/style.js +4 -4
- package/lib/utils/dom/style.js.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/types.d.ts +1 -0
- package/lib/utils/types.js +7 -0
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/vue/vnode.js +4 -0
- package/lib/utils/vue/vnode.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/tags.json +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-image-viewer.css +1 -1
- package/theme-chalk/el-input-number.css +1 -1
- package/theme-chalk/el-loading.css +1 -1
- package/theme-chalk/el-popover.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-slider.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/cascader.scss +2 -0
- package/theme-chalk/src/date-picker/picker.scss +4 -0
- package/theme-chalk/src/image-viewer.scss +1 -0
- package/theme-chalk/src/input-number.scss +1 -1
- package/theme-chalk/src/loading.scss +0 -2
- package/theme-chalk/src/popover.scss +10 -1
- package/theme-chalk/src/select-v2.scss +8 -14
- package/theme-chalk/src/select.scss +33 -30
- package/theme-chalk/src/slider.scss +1 -0
- package/web-types.json +1 -1
- package/es/components/tabs/src/utils/pane.d.ts +0 -22
- package/es/components/tabs/src/utils/pane.mjs +0 -19
- package/es/components/tabs/src/utils/pane.mjs.map +0 -1
- package/lib/components/tabs/src/utils/pane.d.ts +0 -22
- package/lib/components/tabs/src/utils/pane.js +0 -24
- package/lib/components/tabs/src/utils/pane.js.map +0 -1
package/dist/index.full.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! Element Plus v2.2.
|
|
1
|
+
/*! Element Plus v2.2.21 */
|
|
2
2
|
|
|
3
|
-
import { getCurrentScope, onScopeDispose, unref, readonly, shallowRef, watchEffect, ref, watch, getCurrentInstance, onMounted, nextTick, computed as computed$1, openBlock, createElementBlock, createElementVNode, warn, isVNode, Fragment, Comment, inject, provide, onBeforeUnmount, toRef, onUnmounted, isRef, h as h$1, Teleport, onBeforeMount, defineComponent, normalizeClass, normalizeStyle, renderSlot, mergeProps, useSlots, createBlock, Transition, withCtx, withDirectives, resolveDynamicComponent, createCommentVNode, createTextVNode, toDisplayString, createVNode, vShow, useAttrs as useAttrs$1, withModifiers, reactive, onUpdated, cloneVNode, Text, onDeactivated, renderList, withKeys, createSlots, toRefs, normalizeProps, toRaw as toRaw$1, vModelCheckbox, vModelRadio, resolveComponent, onBeforeUpdate, resolveDirective, vModelText, toHandlers, guardReactiveProps, markRaw, effectScope, triggerRef,
|
|
3
|
+
import { getCurrentScope, onScopeDispose, unref, readonly, shallowRef, watchEffect, ref, watch, getCurrentInstance, onMounted, nextTick, computed as computed$1, openBlock, createElementBlock, createElementVNode, warn, isVNode, Fragment, Comment, inject, provide, onBeforeUnmount, toRef, onUnmounted, isRef, h as h$1, Teleport, onBeforeMount, defineComponent, normalizeClass, normalizeStyle, renderSlot, mergeProps, useSlots, createBlock, Transition, withCtx, withDirectives, resolveDynamicComponent, createCommentVNode, createTextVNode, toDisplayString, createVNode, vShow, useAttrs as useAttrs$1, withModifiers, reactive, onUpdated, cloneVNode, Text, onDeactivated, renderList, withKeys, createSlots, toRefs, normalizeProps, toRaw as toRaw$1, vModelCheckbox, vModelRadio, resolveComponent, onBeforeUpdate, resolveDirective, vModelText, toHandlers, guardReactiveProps, markRaw, effectScope, triggerRef, TransitionGroup, createApp, shallowReactive, render } from 'vue';
|
|
4
4
|
|
|
5
5
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
6
6
|
|
|
@@ -7181,6 +7181,27 @@ const globalKey = "__vueuse_ssr_handlers__";
|
|
|
7181
7181
|
_global[globalKey] = _global[globalKey] || {};
|
|
7182
7182
|
_global[globalKey];
|
|
7183
7183
|
|
|
7184
|
+
function useCssVar(prop, target, { window = defaultWindow, initialValue = "" } = {}) {
|
|
7185
|
+
const variable = ref(initialValue);
|
|
7186
|
+
const elRef = computed$1(() => {
|
|
7187
|
+
var _a;
|
|
7188
|
+
return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
|
|
7189
|
+
});
|
|
7190
|
+
watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {
|
|
7191
|
+
var _a;
|
|
7192
|
+
if (el && window) {
|
|
7193
|
+
const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();
|
|
7194
|
+
variable.value = value || initialValue;
|
|
7195
|
+
}
|
|
7196
|
+
}, { immediate: true });
|
|
7197
|
+
watch(variable, (val) => {
|
|
7198
|
+
var _a;
|
|
7199
|
+
if ((_a = elRef.value) == null ? void 0 : _a.style)
|
|
7200
|
+
elRef.value.style.setProperty(resolveUnref(prop), val);
|
|
7201
|
+
});
|
|
7202
|
+
return variable;
|
|
7203
|
+
}
|
|
7204
|
+
|
|
7184
7205
|
function useDocumentVisibility({ document = defaultDocument } = {}) {
|
|
7185
7206
|
if (!document)
|
|
7186
7207
|
return ref("visible");
|
|
@@ -7518,6 +7539,12 @@ const isElement$1 = (e) => {
|
|
|
7518
7539
|
const isPropAbsent = (prop) => {
|
|
7519
7540
|
return isNil(prop);
|
|
7520
7541
|
};
|
|
7542
|
+
const isStringNumber = (val) => {
|
|
7543
|
+
if (!isString(val)) {
|
|
7544
|
+
return false;
|
|
7545
|
+
}
|
|
7546
|
+
return !Number.isNaN(Number(val));
|
|
7547
|
+
};
|
|
7521
7548
|
|
|
7522
7549
|
const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
7523
7550
|
const capitalize = (str) => capitalize$1(str);
|
|
@@ -7585,10 +7612,10 @@ const getStyle = (element, styleName) => {
|
|
|
7585
7612
|
function addUnit(value, defaultUnit = "px") {
|
|
7586
7613
|
if (!value)
|
|
7587
7614
|
return "";
|
|
7588
|
-
if (
|
|
7589
|
-
return value;
|
|
7590
|
-
} else if (isNumber(value)) {
|
|
7615
|
+
if (isNumber(value) || isStringNumber(value)) {
|
|
7591
7616
|
return `${value}${defaultUnit}`;
|
|
7617
|
+
} else if (isString(value)) {
|
|
7618
|
+
return value;
|
|
7592
7619
|
}
|
|
7593
7620
|
}
|
|
7594
7621
|
|
|
@@ -8691,12 +8718,16 @@ const flattedChildren = (children) => {
|
|
|
8691
8718
|
const vNodes = isArray(children) ? children : [children];
|
|
8692
8719
|
const result = [];
|
|
8693
8720
|
vNodes.forEach((child) => {
|
|
8721
|
+
var _a;
|
|
8694
8722
|
if (isArray(child)) {
|
|
8695
8723
|
result.push(...flattedChildren(child));
|
|
8696
8724
|
} else if (isVNode(child) && isArray(child.children)) {
|
|
8697
8725
|
result.push(...flattedChildren(child.children));
|
|
8698
8726
|
} else {
|
|
8699
8727
|
result.push(child);
|
|
8728
|
+
if (isVNode(child) && ((_a = child.component) == null ? void 0 : _a.subTree)) {
|
|
8729
|
+
result.push(...flattedChildren(child.component.subTree));
|
|
8730
|
+
}
|
|
8700
8731
|
}
|
|
8701
8732
|
});
|
|
8702
8733
|
return result;
|
|
@@ -11068,7 +11099,7 @@ const useOrderedChildren = (vm, childComponentName) => {
|
|
|
11068
11099
|
};
|
|
11069
11100
|
};
|
|
11070
11101
|
|
|
11071
|
-
const version$1 = "2.2.
|
|
11102
|
+
const version$1 = "2.2.21";
|
|
11072
11103
|
|
|
11073
11104
|
const makeInstaller = (components = []) => {
|
|
11074
11105
|
const install = (app, options) => {
|
|
@@ -11117,9 +11148,9 @@ var _export_sfc = (sfc, props) => {
|
|
|
11117
11148
|
return target;
|
|
11118
11149
|
};
|
|
11119
11150
|
|
|
11120
|
-
const COMPONENT_NAME$
|
|
11151
|
+
const COMPONENT_NAME$l = "ElAffix";
|
|
11121
11152
|
const __default__$1w = defineComponent({
|
|
11122
|
-
name: COMPONENT_NAME$
|
|
11153
|
+
name: COMPONENT_NAME$l
|
|
11123
11154
|
});
|
|
11124
11155
|
const _sfc_main$2f = /* @__PURE__ */ defineComponent({
|
|
11125
11156
|
...__default__$1w,
|
|
@@ -11152,7 +11183,7 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
|
|
|
11152
11183
|
const affixStyle = computed$1(() => {
|
|
11153
11184
|
if (!fixed.value)
|
|
11154
11185
|
return {};
|
|
11155
|
-
const offset = props.offset ?
|
|
11186
|
+
const offset = props.offset ? addUnit(props.offset) : 0;
|
|
11156
11187
|
return {
|
|
11157
11188
|
height: `${rootHeight.value}px`,
|
|
11158
11189
|
width: `${rootWidth.value}px`,
|
|
@@ -11195,7 +11226,7 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
|
|
|
11195
11226
|
if (props.target) {
|
|
11196
11227
|
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
11197
11228
|
if (!target.value)
|
|
11198
|
-
throwError(COMPONENT_NAME$
|
|
11229
|
+
throwError(COMPONENT_NAME$l, `Target is not existed: ${props.target}`);
|
|
11199
11230
|
} else {
|
|
11200
11231
|
target.value = document.documentElement;
|
|
11201
11232
|
}
|
|
@@ -11576,7 +11607,7 @@ const inputEmits = {
|
|
|
11576
11607
|
|
|
11577
11608
|
const _hoisted_1$13 = ["role"];
|
|
11578
11609
|
const _hoisted_2$G = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"];
|
|
11579
|
-
const _hoisted_3$
|
|
11610
|
+
const _hoisted_3$k = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"];
|
|
11580
11611
|
const __default__$1t = defineComponent({
|
|
11581
11612
|
name: "ElInput",
|
|
11582
11613
|
inheritAttrs: false
|
|
@@ -11967,7 +11998,7 @@ const _sfc_main$2c = /* @__PURE__ */ defineComponent({
|
|
|
11967
11998
|
onBlur: handleBlur,
|
|
11968
11999
|
onChange: handleChange,
|
|
11969
12000
|
onKeydown: handleKeydown
|
|
11970
|
-
}), null, 16, _hoisted_3$
|
|
12001
|
+
}), null, 16, _hoisted_3$k),
|
|
11971
12002
|
unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
|
|
11972
12003
|
key: 0,
|
|
11973
12004
|
style: normalizeStyle(countStyle.value),
|
|
@@ -12027,7 +12058,7 @@ const thumbProps = buildProps({
|
|
|
12027
12058
|
always: Boolean
|
|
12028
12059
|
});
|
|
12029
12060
|
|
|
12030
|
-
const COMPONENT_NAME$
|
|
12061
|
+
const COMPONENT_NAME$k = "Thumb";
|
|
12031
12062
|
const _sfc_main$2b = /* @__PURE__ */ defineComponent({
|
|
12032
12063
|
__name: "thumb",
|
|
12033
12064
|
props: thumbProps,
|
|
@@ -12036,7 +12067,7 @@ const _sfc_main$2b = /* @__PURE__ */ defineComponent({
|
|
|
12036
12067
|
const scrollbar = inject(scrollbarContextKey);
|
|
12037
12068
|
const ns = useNamespace("scrollbar");
|
|
12038
12069
|
if (!scrollbar)
|
|
12039
|
-
throwError(COMPONENT_NAME$
|
|
12070
|
+
throwError(COMPONENT_NAME$k, "can not inject scrollbar context");
|
|
12040
12071
|
const instance = ref();
|
|
12041
12072
|
const thumb = ref();
|
|
12042
12073
|
const thumbState = ref({});
|
|
@@ -12757,6 +12788,10 @@ const tryFocus = (element, shouldSelect) => {
|
|
|
12757
12788
|
element.focus({ preventScroll: true });
|
|
12758
12789
|
lastAutomatedFocusTimestamp.value = window.performance.now();
|
|
12759
12790
|
if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) {
|
|
12791
|
+
if (element.tagName === "INPUT") {
|
|
12792
|
+
element.setSelectionRange(element.value.length, element.value.length);
|
|
12793
|
+
return;
|
|
12794
|
+
}
|
|
12760
12795
|
element.select();
|
|
12761
12796
|
}
|
|
12762
12797
|
}
|
|
@@ -13221,8 +13256,7 @@ function genModifiers(options) {
|
|
|
13221
13256
|
{
|
|
13222
13257
|
name: "computeStyles",
|
|
13223
13258
|
options: {
|
|
13224
|
-
gpuAcceleration
|
|
13225
|
-
adaptive: gpuAcceleration
|
|
13259
|
+
gpuAcceleration
|
|
13226
13260
|
}
|
|
13227
13261
|
}
|
|
13228
13262
|
];
|
|
@@ -13498,13 +13532,6 @@ const useTooltipProps = buildProps({
|
|
|
13498
13532
|
...useTooltipContentProps,
|
|
13499
13533
|
...useTooltipTriggerProps,
|
|
13500
13534
|
...popperArrowProps,
|
|
13501
|
-
openDelay: {
|
|
13502
|
-
type: Number
|
|
13503
|
-
},
|
|
13504
|
-
visibleArrow: {
|
|
13505
|
-
type: Boolean,
|
|
13506
|
-
default: void 0
|
|
13507
|
-
},
|
|
13508
13535
|
showArrow: {
|
|
13509
13536
|
type: Boolean,
|
|
13510
13537
|
default: true
|
|
@@ -13767,14 +13794,6 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
|
|
|
13767
13794
|
setup(__props, { expose, emit }) {
|
|
13768
13795
|
const props = __props;
|
|
13769
13796
|
usePopperContainer();
|
|
13770
|
-
const compatShowAfter = computed$1(() => {
|
|
13771
|
-
if (!isUndefined(props.openDelay)) ;
|
|
13772
|
-
return props.openDelay || props.showAfter;
|
|
13773
|
-
});
|
|
13774
|
-
const compatShowArrow = computed$1(() => {
|
|
13775
|
-
if (!isUndefined(props.visibleArrow)) ;
|
|
13776
|
-
return isBoolean(props.visibleArrow) ? props.visibleArrow : props.showArrow;
|
|
13777
|
-
});
|
|
13778
13797
|
const id = useId();
|
|
13779
13798
|
const popperRef = ref();
|
|
13780
13799
|
const contentRef = ref();
|
|
@@ -13792,7 +13811,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
|
|
|
13792
13811
|
toggleReason
|
|
13793
13812
|
});
|
|
13794
13813
|
const { onOpen, onClose } = useDelayedToggle({
|
|
13795
|
-
showAfter:
|
|
13814
|
+
showAfter: toRef(props, "showAfter"),
|
|
13796
13815
|
hideAfter: toRef(props, "hideAfter"),
|
|
13797
13816
|
open: show,
|
|
13798
13817
|
close: hide
|
|
@@ -13891,7 +13910,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
|
|
|
13891
13910
|
"raw-content": _ctx.rawContent,
|
|
13892
13911
|
"reference-el": _ctx.referenceEl,
|
|
13893
13912
|
"trigger-target-el": _ctx.triggerTargetEl,
|
|
13894
|
-
"show-after":
|
|
13913
|
+
"show-after": _ctx.showAfter,
|
|
13895
13914
|
strategy: _ctx.strategy,
|
|
13896
13915
|
teleported: _ctx.teleported,
|
|
13897
13916
|
transition: _ctx.transition,
|
|
@@ -13906,7 +13925,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
|
|
|
13906
13925
|
innerHTML: _ctx.content
|
|
13907
13926
|
}, null, 8, _hoisted_1$12)) : (openBlock(), createElementBlock("span", _hoisted_2$F, toDisplayString(_ctx.content), 1))
|
|
13908
13927
|
]),
|
|
13909
|
-
|
|
13928
|
+
_ctx.showArrow ? (openBlock(), createBlock(unref(ElPopperArrow), {
|
|
13910
13929
|
key: 0,
|
|
13911
13930
|
"arrow-offset": _ctx.arrowOffset
|
|
13912
13931
|
}, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true)
|
|
@@ -13993,10 +14012,10 @@ const autocompleteEmits = {
|
|
|
13993
14012
|
|
|
13994
14013
|
const _hoisted_1$11 = ["aria-expanded", "aria-owns"];
|
|
13995
14014
|
const _hoisted_2$E = { key: 0 };
|
|
13996
|
-
const _hoisted_3$
|
|
13997
|
-
const COMPONENT_NAME$
|
|
14015
|
+
const _hoisted_3$j = ["id", "aria-selected", "onClick"];
|
|
14016
|
+
const COMPONENT_NAME$j = "ElAutocomplete";
|
|
13998
14017
|
const __default__$1k = defineComponent({
|
|
13999
|
-
name: COMPONENT_NAME$
|
|
14018
|
+
name: COMPONENT_NAME$j,
|
|
14000
14019
|
inheritAttrs: false
|
|
14001
14020
|
});
|
|
14002
14021
|
const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
@@ -14058,7 +14077,7 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
14058
14077
|
suggestions.value = suggestionList;
|
|
14059
14078
|
highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
|
|
14060
14079
|
} else {
|
|
14061
|
-
throwError(COMPONENT_NAME$
|
|
14080
|
+
throwError(COMPONENT_NAME$j, "autocomplete suggestions must be an array");
|
|
14062
14081
|
}
|
|
14063
14082
|
};
|
|
14064
14083
|
loading.value = true;
|
|
@@ -14256,7 +14275,7 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
14256
14275
|
renderSlot(_ctx.$slots, "default", { item }, () => [
|
|
14257
14276
|
createTextVNode(toDisplayString(item[_ctx.valueKey]), 1)
|
|
14258
14277
|
])
|
|
14259
|
-
], 10, _hoisted_3$
|
|
14278
|
+
], 10, _hoisted_3$j);
|
|
14260
14279
|
}), 128))
|
|
14261
14280
|
]),
|
|
14262
14281
|
_: 3
|
|
@@ -14494,9 +14513,9 @@ const useBackTop = (props, emit, componentName) => {
|
|
|
14494
14513
|
};
|
|
14495
14514
|
};
|
|
14496
14515
|
|
|
14497
|
-
const COMPONENT_NAME$
|
|
14516
|
+
const COMPONENT_NAME$i = "ElBacktop";
|
|
14498
14517
|
const __default__$1i = defineComponent({
|
|
14499
|
-
name: COMPONENT_NAME$
|
|
14518
|
+
name: COMPONENT_NAME$i
|
|
14500
14519
|
});
|
|
14501
14520
|
const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
14502
14521
|
...__default__$1i,
|
|
@@ -14505,7 +14524,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
14505
14524
|
setup(__props, { emit }) {
|
|
14506
14525
|
const props = __props;
|
|
14507
14526
|
const ns = useNamespace("backtop");
|
|
14508
|
-
const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME$
|
|
14527
|
+
const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME$i);
|
|
14509
14528
|
const backTopStyle = computed$1(() => ({
|
|
14510
14529
|
right: `${props.right}px`,
|
|
14511
14530
|
bottom: `${props.bottom}px`
|
|
@@ -18386,9 +18405,32 @@ const _sfc_main$1Q = /* @__PURE__ */ defineComponent({
|
|
|
18386
18405
|
});
|
|
18387
18406
|
var DateTable$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["__file", "date-table.vue"]]);
|
|
18388
18407
|
|
|
18408
|
+
const adjacentMonth = (start, end) => {
|
|
18409
|
+
const firstMonthLastDay = start.endOf("month");
|
|
18410
|
+
const lastMonthFirstDay = end.startOf("month");
|
|
18411
|
+
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
|
|
18412
|
+
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18413
|
+
return [
|
|
18414
|
+
[start, firstMonthLastDay],
|
|
18415
|
+
[lastMonthStartDay.startOf("week"), end]
|
|
18416
|
+
];
|
|
18417
|
+
};
|
|
18418
|
+
const threeConsecutiveMonth = (start, end) => {
|
|
18419
|
+
const firstMonthLastDay = start.endOf("month");
|
|
18420
|
+
const secondMonthFirstDay = start.add(1, "month").startOf("month");
|
|
18421
|
+
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
|
|
18422
|
+
const secondMonthLastDay = secondMonthStartDay.endOf("month");
|
|
18423
|
+
const lastMonthFirstDay = end.startOf("month");
|
|
18424
|
+
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18425
|
+
return [
|
|
18426
|
+
[start, firstMonthLastDay],
|
|
18427
|
+
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
|
|
18428
|
+
[lastMonthStartDay.startOf("week"), end]
|
|
18429
|
+
];
|
|
18430
|
+
};
|
|
18389
18431
|
const useCalendar = (props, emit, componentName) => {
|
|
18390
|
-
const
|
|
18391
|
-
const {
|
|
18432
|
+
const slots = useSlots();
|
|
18433
|
+
const { lang } = useLocale();
|
|
18392
18434
|
const selectedDay = ref();
|
|
18393
18435
|
const now = dayjs().locale(lang.value);
|
|
18394
18436
|
const realSelectedDay = computed$1({
|
|
@@ -18425,12 +18467,7 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
18425
18467
|
});
|
|
18426
18468
|
const date = computed$1(() => {
|
|
18427
18469
|
if (!props.modelValue) {
|
|
18428
|
-
|
|
18429
|
-
return realSelectedDay.value;
|
|
18430
|
-
} else if (validatedRange.value.length) {
|
|
18431
|
-
return validatedRange.value[0][0];
|
|
18432
|
-
}
|
|
18433
|
-
return now;
|
|
18470
|
+
return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now);
|
|
18434
18471
|
} else {
|
|
18435
18472
|
return dayjs(props.modelValue).locale(lang.value);
|
|
18436
18473
|
}
|
|
@@ -18439,10 +18476,6 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
18439
18476
|
const nextMonthDayjs = computed$1(() => date.value.add(1, "month").date(1));
|
|
18440
18477
|
const prevYearDayjs = computed$1(() => date.value.subtract(1, "year").date(1));
|
|
18441
18478
|
const nextYearDayjs = computed$1(() => date.value.add(1, "year").date(1));
|
|
18442
|
-
const i18nDate = computed$1(() => {
|
|
18443
|
-
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
18444
|
-
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
18445
|
-
});
|
|
18446
18479
|
const calculateValidatedDateRange = (startDayjs, endDayjs) => {
|
|
18447
18480
|
const firstDay = startDayjs.startOf("week");
|
|
18448
18481
|
const lastDay = endDayjs.endOf("week");
|
|
@@ -18450,27 +18483,10 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
18450
18483
|
const lastMonth = lastDay.get("month");
|
|
18451
18484
|
if (firstMonth === lastMonth) {
|
|
18452
18485
|
return [[firstDay, lastDay]];
|
|
18453
|
-
} else if (firstMonth + 1 === lastMonth) {
|
|
18454
|
-
|
|
18455
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
18456
|
-
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
|
|
18457
|
-
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18458
|
-
return [
|
|
18459
|
-
[firstDay, firstMonthLastDay],
|
|
18460
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
18461
|
-
];
|
|
18486
|
+
} else if ((firstMonth + 1) % 12 === lastMonth) {
|
|
18487
|
+
return adjacentMonth(firstDay, lastDay);
|
|
18462
18488
|
} else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) {
|
|
18463
|
-
|
|
18464
|
-
const secondMonthFirstDay = firstDay.add(1, "month").startOf("month");
|
|
18465
|
-
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
|
|
18466
|
-
const secondMonthLastDay = secondMonthStartDay.endOf("month");
|
|
18467
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
18468
|
-
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18469
|
-
return [
|
|
18470
|
-
[firstDay, firstMonthLastDay],
|
|
18471
|
-
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
|
|
18472
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
18473
|
-
];
|
|
18489
|
+
return threeConsecutiveMonth(firstDay, lastDay);
|
|
18474
18490
|
} else {
|
|
18475
18491
|
return [];
|
|
18476
18492
|
}
|
|
@@ -18498,16 +18514,14 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
18498
18514
|
version: "2.3.0",
|
|
18499
18515
|
ref: "https://element-plus.org/en-US/component/calendar.html#slots",
|
|
18500
18516
|
type: "Slot"
|
|
18501
|
-
}, computed$1(() => !!
|
|
18517
|
+
}, computed$1(() => !!slots.dateCell));
|
|
18502
18518
|
return {
|
|
18503
18519
|
calculateValidatedDateRange,
|
|
18504
18520
|
date,
|
|
18505
18521
|
realSelectedDay,
|
|
18506
18522
|
pickDay,
|
|
18507
18523
|
selectDate,
|
|
18508
|
-
validatedRange
|
|
18509
|
-
t,
|
|
18510
|
-
i18nDate
|
|
18524
|
+
validatedRange
|
|
18511
18525
|
};
|
|
18512
18526
|
};
|
|
18513
18527
|
|
|
@@ -18526,9 +18540,9 @@ const calendarEmits = {
|
|
|
18526
18540
|
[INPUT_EVENT]: (value) => isDate(value)
|
|
18527
18541
|
};
|
|
18528
18542
|
|
|
18529
|
-
const COMPONENT_NAME$
|
|
18543
|
+
const COMPONENT_NAME$h = "ElCalendar";
|
|
18530
18544
|
const __default__$1a = defineComponent({
|
|
18531
|
-
name: COMPONENT_NAME$
|
|
18545
|
+
name: COMPONENT_NAME$h
|
|
18532
18546
|
});
|
|
18533
18547
|
const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
18534
18548
|
...__default__$1a,
|
|
@@ -18543,10 +18557,13 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
18543
18557
|
pickDay,
|
|
18544
18558
|
realSelectedDay,
|
|
18545
18559
|
selectDate,
|
|
18546
|
-
t,
|
|
18547
|
-
i18nDate,
|
|
18548
18560
|
validatedRange
|
|
18549
18561
|
} = useCalendar(props, emit);
|
|
18562
|
+
const { t } = useLocale();
|
|
18563
|
+
const i18nDate = computed$1(() => {
|
|
18564
|
+
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
18565
|
+
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
18566
|
+
});
|
|
18550
18567
|
expose({
|
|
18551
18568
|
selectedDay: realSelectedDay,
|
|
18552
18569
|
pickDay,
|
|
@@ -18758,12 +18775,208 @@ const carouselEmits = {
|
|
|
18758
18775
|
change: (current, prev) => [current, prev].every(isNumber)
|
|
18759
18776
|
};
|
|
18760
18777
|
|
|
18761
|
-
const _hoisted_1$V = ["onMouseenter", "onMouseleave"];
|
|
18762
|
-
const _hoisted_2$A = ["onMouseenter", "onClick"];
|
|
18763
|
-
const _hoisted_3$j = { key: 0 };
|
|
18764
18778
|
const THROTTLE_TIME = 300;
|
|
18779
|
+
const useCarousel = (props, emit, componentName) => {
|
|
18780
|
+
const {
|
|
18781
|
+
children: items,
|
|
18782
|
+
addChild: addItem,
|
|
18783
|
+
removeChild: removeItem
|
|
18784
|
+
} = useOrderedChildren(getCurrentInstance(), "ElCarouselItem");
|
|
18785
|
+
const activeIndex = ref(-1);
|
|
18786
|
+
const timer = ref(null);
|
|
18787
|
+
const hover = ref(false);
|
|
18788
|
+
const root = ref();
|
|
18789
|
+
const arrowDisplay = computed$1(() => props.arrow !== "never" && !unref(isVertical));
|
|
18790
|
+
const hasLabel = computed$1(() => {
|
|
18791
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
18792
|
+
});
|
|
18793
|
+
const isCardType = computed$1(() => props.type === "card");
|
|
18794
|
+
const isVertical = computed$1(() => props.direction === "vertical");
|
|
18795
|
+
const throttledArrowClick = throttle((index) => {
|
|
18796
|
+
setActiveItem(index);
|
|
18797
|
+
}, THROTTLE_TIME, { trailing: true });
|
|
18798
|
+
const throttledIndicatorHover = throttle((index) => {
|
|
18799
|
+
handleIndicatorHover(index);
|
|
18800
|
+
}, THROTTLE_TIME);
|
|
18801
|
+
function pauseTimer() {
|
|
18802
|
+
if (timer.value) {
|
|
18803
|
+
clearInterval(timer.value);
|
|
18804
|
+
timer.value = null;
|
|
18805
|
+
}
|
|
18806
|
+
}
|
|
18807
|
+
function startTimer() {
|
|
18808
|
+
if (props.interval <= 0 || !props.autoplay || timer.value)
|
|
18809
|
+
return;
|
|
18810
|
+
timer.value = setInterval(() => playSlides(), props.interval);
|
|
18811
|
+
}
|
|
18812
|
+
const playSlides = () => {
|
|
18813
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
18814
|
+
activeIndex.value = activeIndex.value + 1;
|
|
18815
|
+
} else if (props.loop) {
|
|
18816
|
+
activeIndex.value = 0;
|
|
18817
|
+
}
|
|
18818
|
+
};
|
|
18819
|
+
function setActiveItem(index) {
|
|
18820
|
+
if (isString(index)) {
|
|
18821
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
18822
|
+
if (filteredItems.length > 0) {
|
|
18823
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
18824
|
+
}
|
|
18825
|
+
}
|
|
18826
|
+
index = Number(index);
|
|
18827
|
+
if (Number.isNaN(index) || index !== Math.floor(index)) {
|
|
18828
|
+
return;
|
|
18829
|
+
}
|
|
18830
|
+
const itemCount = items.value.length;
|
|
18831
|
+
const oldIndex = activeIndex.value;
|
|
18832
|
+
if (index < 0) {
|
|
18833
|
+
activeIndex.value = props.loop ? itemCount - 1 : 0;
|
|
18834
|
+
} else if (index >= itemCount) {
|
|
18835
|
+
activeIndex.value = props.loop ? 0 : itemCount - 1;
|
|
18836
|
+
} else {
|
|
18837
|
+
activeIndex.value = index;
|
|
18838
|
+
}
|
|
18839
|
+
if (oldIndex === activeIndex.value) {
|
|
18840
|
+
resetItemPosition(oldIndex);
|
|
18841
|
+
}
|
|
18842
|
+
resetTimer();
|
|
18843
|
+
}
|
|
18844
|
+
function resetItemPosition(oldIndex) {
|
|
18845
|
+
items.value.forEach((item, index) => {
|
|
18846
|
+
item.translateItem(index, activeIndex.value, oldIndex);
|
|
18847
|
+
});
|
|
18848
|
+
}
|
|
18849
|
+
function itemInStage(item, index) {
|
|
18850
|
+
var _a, _b, _c, _d;
|
|
18851
|
+
const _items = unref(items);
|
|
18852
|
+
const itemCount = _items.length;
|
|
18853
|
+
if (itemCount === 0 || !item.states.inStage)
|
|
18854
|
+
return false;
|
|
18855
|
+
const nextItemIndex = index + 1;
|
|
18856
|
+
const prevItemIndex = index - 1;
|
|
18857
|
+
const lastItemIndex = itemCount - 1;
|
|
18858
|
+
const isLastItemActive = _items[lastItemIndex].states.active;
|
|
18859
|
+
const isFirstItemActive = _items[0].states.active;
|
|
18860
|
+
const isNextItemActive = (_b = (_a = _items[nextItemIndex]) == null ? void 0 : _a.states) == null ? void 0 : _b.active;
|
|
18861
|
+
const isPrevItemActive = (_d = (_c = _items[prevItemIndex]) == null ? void 0 : _c.states) == null ? void 0 : _d.active;
|
|
18862
|
+
if (index === lastItemIndex && isFirstItemActive || isNextItemActive) {
|
|
18863
|
+
return "left";
|
|
18864
|
+
} else if (index === 0 && isLastItemActive || isPrevItemActive) {
|
|
18865
|
+
return "right";
|
|
18866
|
+
}
|
|
18867
|
+
return false;
|
|
18868
|
+
}
|
|
18869
|
+
function handleMouseEnter() {
|
|
18870
|
+
hover.value = true;
|
|
18871
|
+
if (props.pauseOnHover) {
|
|
18872
|
+
pauseTimer();
|
|
18873
|
+
}
|
|
18874
|
+
}
|
|
18875
|
+
function handleMouseLeave() {
|
|
18876
|
+
hover.value = false;
|
|
18877
|
+
startTimer();
|
|
18878
|
+
}
|
|
18879
|
+
function handleButtonEnter(arrow) {
|
|
18880
|
+
if (unref(isVertical))
|
|
18881
|
+
return;
|
|
18882
|
+
items.value.forEach((item, index) => {
|
|
18883
|
+
if (arrow === itemInStage(item, index)) {
|
|
18884
|
+
item.states.hover = true;
|
|
18885
|
+
}
|
|
18886
|
+
});
|
|
18887
|
+
}
|
|
18888
|
+
function handleButtonLeave() {
|
|
18889
|
+
if (unref(isVertical))
|
|
18890
|
+
return;
|
|
18891
|
+
items.value.forEach((item) => {
|
|
18892
|
+
item.states.hover = false;
|
|
18893
|
+
});
|
|
18894
|
+
}
|
|
18895
|
+
function handleIndicatorClick(index) {
|
|
18896
|
+
activeIndex.value = index;
|
|
18897
|
+
}
|
|
18898
|
+
function handleIndicatorHover(index) {
|
|
18899
|
+
if (props.trigger === "hover" && index !== activeIndex.value) {
|
|
18900
|
+
activeIndex.value = index;
|
|
18901
|
+
}
|
|
18902
|
+
}
|
|
18903
|
+
function prev() {
|
|
18904
|
+
setActiveItem(activeIndex.value - 1);
|
|
18905
|
+
}
|
|
18906
|
+
function next() {
|
|
18907
|
+
setActiveItem(activeIndex.value + 1);
|
|
18908
|
+
}
|
|
18909
|
+
function resetTimer() {
|
|
18910
|
+
pauseTimer();
|
|
18911
|
+
startTimer();
|
|
18912
|
+
}
|
|
18913
|
+
watch(() => activeIndex.value, (current, prev2) => {
|
|
18914
|
+
resetItemPosition(prev2);
|
|
18915
|
+
if (prev2 > -1) {
|
|
18916
|
+
emit("change", current, prev2);
|
|
18917
|
+
}
|
|
18918
|
+
});
|
|
18919
|
+
watch(() => props.autoplay, (autoplay) => {
|
|
18920
|
+
autoplay ? startTimer() : pauseTimer();
|
|
18921
|
+
});
|
|
18922
|
+
watch(() => props.loop, () => {
|
|
18923
|
+
setActiveItem(activeIndex.value);
|
|
18924
|
+
});
|
|
18925
|
+
watch(() => props.interval, () => {
|
|
18926
|
+
resetTimer();
|
|
18927
|
+
});
|
|
18928
|
+
watch(() => items.value, () => {
|
|
18929
|
+
if (items.value.length > 0)
|
|
18930
|
+
setActiveItem(props.initialIndex);
|
|
18931
|
+
});
|
|
18932
|
+
const resizeObserver = shallowRef();
|
|
18933
|
+
onMounted(() => {
|
|
18934
|
+
resizeObserver.value = useResizeObserver(root.value, () => {
|
|
18935
|
+
resetItemPosition();
|
|
18936
|
+
});
|
|
18937
|
+
startTimer();
|
|
18938
|
+
});
|
|
18939
|
+
onBeforeUnmount(() => {
|
|
18940
|
+
pauseTimer();
|
|
18941
|
+
if (root.value && resizeObserver.value)
|
|
18942
|
+
resizeObserver.value.stop();
|
|
18943
|
+
});
|
|
18944
|
+
provide(carouselContextKey, {
|
|
18945
|
+
root,
|
|
18946
|
+
isCardType,
|
|
18947
|
+
isVertical,
|
|
18948
|
+
items,
|
|
18949
|
+
loop: props.loop,
|
|
18950
|
+
addItem,
|
|
18951
|
+
removeItem,
|
|
18952
|
+
setActiveItem
|
|
18953
|
+
});
|
|
18954
|
+
return {
|
|
18955
|
+
root,
|
|
18956
|
+
activeIndex,
|
|
18957
|
+
arrowDisplay,
|
|
18958
|
+
hasLabel,
|
|
18959
|
+
hover,
|
|
18960
|
+
isCardType,
|
|
18961
|
+
items,
|
|
18962
|
+
handleButtonEnter,
|
|
18963
|
+
handleButtonLeave,
|
|
18964
|
+
handleIndicatorClick,
|
|
18965
|
+
handleMouseEnter,
|
|
18966
|
+
handleMouseLeave,
|
|
18967
|
+
setActiveItem,
|
|
18968
|
+
prev,
|
|
18969
|
+
next,
|
|
18970
|
+
throttledArrowClick,
|
|
18971
|
+
throttledIndicatorHover
|
|
18972
|
+
};
|
|
18973
|
+
};
|
|
18974
|
+
|
|
18975
|
+
const _hoisted_1$V = ["onMouseenter", "onClick"];
|
|
18976
|
+
const _hoisted_2$A = { key: 0 };
|
|
18977
|
+
const COMPONENT_NAME$g = "ElCarousel";
|
|
18765
18978
|
const __default__$18 = defineComponent({
|
|
18766
|
-
name:
|
|
18979
|
+
name: COMPONENT_NAME$g
|
|
18767
18980
|
});
|
|
18768
18981
|
const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
18769
18982
|
...__default__$18,
|
|
@@ -18771,20 +18984,26 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
18771
18984
|
emits: carouselEmits,
|
|
18772
18985
|
setup(__props, { expose, emit }) {
|
|
18773
18986
|
const props = __props;
|
|
18774
|
-
const ns = useNamespace("carousel");
|
|
18775
18987
|
const {
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
18988
|
+
root,
|
|
18989
|
+
activeIndex,
|
|
18990
|
+
arrowDisplay,
|
|
18991
|
+
hasLabel,
|
|
18992
|
+
hover,
|
|
18993
|
+
isCardType,
|
|
18994
|
+
items,
|
|
18995
|
+
handleButtonEnter,
|
|
18996
|
+
handleButtonLeave,
|
|
18997
|
+
handleIndicatorClick,
|
|
18998
|
+
handleMouseEnter,
|
|
18999
|
+
handleMouseLeave,
|
|
19000
|
+
setActiveItem,
|
|
19001
|
+
prev,
|
|
19002
|
+
next,
|
|
19003
|
+
throttledArrowClick,
|
|
19004
|
+
throttledIndicatorHover
|
|
19005
|
+
} = useCarousel(props, emit);
|
|
19006
|
+
const ns = useNamespace("carousel");
|
|
18788
19007
|
const carouselClasses = computed$1(() => {
|
|
18789
19008
|
const classes = [ns.b(), ns.m(props.direction)];
|
|
18790
19009
|
if (unref(isCardType)) {
|
|
@@ -18794,7 +19013,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
18794
19013
|
});
|
|
18795
19014
|
const indicatorsClasses = computed$1(() => {
|
|
18796
19015
|
const classes = [ns.e("indicators"), ns.em("indicators", props.direction)];
|
|
18797
|
-
if (hasLabel
|
|
19016
|
+
if (unref(hasLabel)) {
|
|
18798
19017
|
classes.push(ns.em("indicators", "labels"));
|
|
18799
19018
|
}
|
|
18800
19019
|
if (props.indicatorPosition === "outside" || unref(isCardType)) {
|
|
@@ -18802,167 +19021,6 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
18802
19021
|
}
|
|
18803
19022
|
return classes;
|
|
18804
19023
|
});
|
|
18805
|
-
const isCardType = computed$1(() => props.type === "card");
|
|
18806
|
-
const isVertical = computed$1(() => props.direction === "vertical");
|
|
18807
|
-
const throttledArrowClick = throttle((index) => {
|
|
18808
|
-
setActiveItem(index);
|
|
18809
|
-
}, THROTTLE_TIME, { trailing: true });
|
|
18810
|
-
const throttledIndicatorHover = throttle((index) => {
|
|
18811
|
-
handleIndicatorHover(index);
|
|
18812
|
-
}, THROTTLE_TIME);
|
|
18813
|
-
function pauseTimer() {
|
|
18814
|
-
if (timer.value) {
|
|
18815
|
-
clearInterval(timer.value);
|
|
18816
|
-
timer.value = null;
|
|
18817
|
-
}
|
|
18818
|
-
}
|
|
18819
|
-
function startTimer() {
|
|
18820
|
-
if (props.interval <= 0 || !props.autoplay || timer.value)
|
|
18821
|
-
return;
|
|
18822
|
-
timer.value = setInterval(() => playSlides(), props.interval);
|
|
18823
|
-
}
|
|
18824
|
-
const playSlides = () => {
|
|
18825
|
-
if (activeIndex.value < items.value.length - 1) {
|
|
18826
|
-
activeIndex.value = activeIndex.value + 1;
|
|
18827
|
-
} else if (props.loop) {
|
|
18828
|
-
activeIndex.value = 0;
|
|
18829
|
-
}
|
|
18830
|
-
};
|
|
18831
|
-
function setActiveItem(index) {
|
|
18832
|
-
if (isString(index)) {
|
|
18833
|
-
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
18834
|
-
if (filteredItems.length > 0) {
|
|
18835
|
-
index = items.value.indexOf(filteredItems[0]);
|
|
18836
|
-
}
|
|
18837
|
-
}
|
|
18838
|
-
index = Number(index);
|
|
18839
|
-
if (Number.isNaN(index) || index !== Math.floor(index)) {
|
|
18840
|
-
return;
|
|
18841
|
-
}
|
|
18842
|
-
const itemCount = items.value.length;
|
|
18843
|
-
const oldIndex = activeIndex.value;
|
|
18844
|
-
if (index < 0) {
|
|
18845
|
-
activeIndex.value = props.loop ? itemCount - 1 : 0;
|
|
18846
|
-
} else if (index >= itemCount) {
|
|
18847
|
-
activeIndex.value = props.loop ? 0 : itemCount - 1;
|
|
18848
|
-
} else {
|
|
18849
|
-
activeIndex.value = index;
|
|
18850
|
-
}
|
|
18851
|
-
if (oldIndex === activeIndex.value) {
|
|
18852
|
-
resetItemPosition(oldIndex);
|
|
18853
|
-
}
|
|
18854
|
-
resetTimer();
|
|
18855
|
-
}
|
|
18856
|
-
function resetItemPosition(oldIndex) {
|
|
18857
|
-
items.value.forEach((item, index) => {
|
|
18858
|
-
item.translateItem(index, activeIndex.value, oldIndex);
|
|
18859
|
-
});
|
|
18860
|
-
}
|
|
18861
|
-
function itemInStage(item, index) {
|
|
18862
|
-
var _a, _b, _c, _d;
|
|
18863
|
-
const _items = unref(items);
|
|
18864
|
-
const itemCount = _items.length;
|
|
18865
|
-
if (itemCount === 0 || !item.states.inStage)
|
|
18866
|
-
return false;
|
|
18867
|
-
const nextItemIndex = index + 1;
|
|
18868
|
-
const prevItemIndex = index - 1;
|
|
18869
|
-
const lastItemIndex = itemCount - 1;
|
|
18870
|
-
const isLastItemActive = _items[lastItemIndex].states.active;
|
|
18871
|
-
const isFirstItemActive = _items[0].states.active;
|
|
18872
|
-
const isNextItemActive = (_b = (_a = _items[nextItemIndex]) == null ? void 0 : _a.states) == null ? void 0 : _b.active;
|
|
18873
|
-
const isPrevItemActive = (_d = (_c = _items[prevItemIndex]) == null ? void 0 : _c.states) == null ? void 0 : _d.active;
|
|
18874
|
-
if (index === lastItemIndex && isFirstItemActive || isNextItemActive) {
|
|
18875
|
-
return "left";
|
|
18876
|
-
} else if (index === 0 && isLastItemActive || isPrevItemActive) {
|
|
18877
|
-
return "right";
|
|
18878
|
-
}
|
|
18879
|
-
return false;
|
|
18880
|
-
}
|
|
18881
|
-
function handleMouseEnter() {
|
|
18882
|
-
hover.value = true;
|
|
18883
|
-
if (props.pauseOnHover) {
|
|
18884
|
-
pauseTimer();
|
|
18885
|
-
}
|
|
18886
|
-
}
|
|
18887
|
-
function handleMouseLeave() {
|
|
18888
|
-
hover.value = false;
|
|
18889
|
-
startTimer();
|
|
18890
|
-
}
|
|
18891
|
-
function handleButtonEnter(arrow) {
|
|
18892
|
-
if (unref(isVertical))
|
|
18893
|
-
return;
|
|
18894
|
-
items.value.forEach((item, index) => {
|
|
18895
|
-
if (arrow === itemInStage(item, index)) {
|
|
18896
|
-
item.states.hover = true;
|
|
18897
|
-
}
|
|
18898
|
-
});
|
|
18899
|
-
}
|
|
18900
|
-
function handleButtonLeave() {
|
|
18901
|
-
if (unref(isVertical))
|
|
18902
|
-
return;
|
|
18903
|
-
items.value.forEach((item) => {
|
|
18904
|
-
item.states.hover = false;
|
|
18905
|
-
});
|
|
18906
|
-
}
|
|
18907
|
-
function handleIndicatorClick(index) {
|
|
18908
|
-
activeIndex.value = index;
|
|
18909
|
-
}
|
|
18910
|
-
function handleIndicatorHover(index) {
|
|
18911
|
-
if (props.trigger === "hover" && index !== activeIndex.value) {
|
|
18912
|
-
activeIndex.value = index;
|
|
18913
|
-
}
|
|
18914
|
-
}
|
|
18915
|
-
function prev() {
|
|
18916
|
-
setActiveItem(activeIndex.value - 1);
|
|
18917
|
-
}
|
|
18918
|
-
function next() {
|
|
18919
|
-
setActiveItem(activeIndex.value + 1);
|
|
18920
|
-
}
|
|
18921
|
-
function resetTimer() {
|
|
18922
|
-
pauseTimer();
|
|
18923
|
-
startTimer();
|
|
18924
|
-
}
|
|
18925
|
-
watch(() => activeIndex.value, (current, prev2) => {
|
|
18926
|
-
resetItemPosition(prev2);
|
|
18927
|
-
if (prev2 > -1) {
|
|
18928
|
-
emit("change", current, prev2);
|
|
18929
|
-
}
|
|
18930
|
-
});
|
|
18931
|
-
watch(() => props.autoplay, (autoplay) => {
|
|
18932
|
-
autoplay ? startTimer() : pauseTimer();
|
|
18933
|
-
});
|
|
18934
|
-
watch(() => props.loop, () => {
|
|
18935
|
-
setActiveItem(activeIndex.value);
|
|
18936
|
-
});
|
|
18937
|
-
watch(() => props.interval, () => {
|
|
18938
|
-
resetTimer();
|
|
18939
|
-
});
|
|
18940
|
-
watch(() => items.value, () => {
|
|
18941
|
-
if (items.value.length > 0)
|
|
18942
|
-
setActiveItem(props.initialIndex);
|
|
18943
|
-
});
|
|
18944
|
-
const resizeObserver = shallowRef();
|
|
18945
|
-
onMounted(() => {
|
|
18946
|
-
resizeObserver.value = useResizeObserver(root.value, () => {
|
|
18947
|
-
resetItemPosition();
|
|
18948
|
-
});
|
|
18949
|
-
startTimer();
|
|
18950
|
-
});
|
|
18951
|
-
onBeforeUnmount(() => {
|
|
18952
|
-
pauseTimer();
|
|
18953
|
-
if (root.value && resizeObserver.value)
|
|
18954
|
-
resizeObserver.value.stop();
|
|
18955
|
-
});
|
|
18956
|
-
provide(carouselContextKey, {
|
|
18957
|
-
root,
|
|
18958
|
-
isCardType,
|
|
18959
|
-
isVertical,
|
|
18960
|
-
items,
|
|
18961
|
-
loop: props.loop,
|
|
18962
|
-
addItem,
|
|
18963
|
-
removeItem,
|
|
18964
|
-
setActiveItem
|
|
18965
|
-
});
|
|
18966
19024
|
expose({
|
|
18967
19025
|
setActiveItem,
|
|
18968
19026
|
prev,
|
|
@@ -18973,8 +19031,8 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
18973
19031
|
ref_key: "root",
|
|
18974
19032
|
ref: root,
|
|
18975
19033
|
class: normalizeClass(unref(carouselClasses)),
|
|
18976
|
-
onMouseenter: withModifiers(handleMouseEnter, ["stop"]),
|
|
18977
|
-
onMouseleave: withModifiers(handleMouseLeave, ["stop"])
|
|
19034
|
+
onMouseenter: _cache[6] || (_cache[6] = withModifiers((...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args), ["stop"])),
|
|
19035
|
+
onMouseleave: _cache[7] || (_cache[7] = withModifiers((...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args), ["stop"]))
|
|
18978
19036
|
}, [
|
|
18979
19037
|
createElementVNode("div", {
|
|
18980
19038
|
class: normalizeClass(unref(ns).e("container")),
|
|
@@ -18989,9 +19047,9 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
18989
19047
|
withDirectives(createElementVNode("button", {
|
|
18990
19048
|
type: "button",
|
|
18991
19049
|
class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "left")]),
|
|
18992
|
-
onMouseenter: _cache[0] || (_cache[0] = ($event) => handleButtonEnter("left")),
|
|
18993
|
-
onMouseleave: handleButtonLeave,
|
|
18994
|
-
onClick: _cache[
|
|
19050
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => unref(handleButtonEnter)("left")),
|
|
19051
|
+
onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
|
|
19052
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) - 1), ["stop"]))
|
|
18995
19053
|
}, [
|
|
18996
19054
|
createVNode(unref(ElIcon), null, {
|
|
18997
19055
|
default: withCtx(() => [
|
|
@@ -19002,7 +19060,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
19002
19060
|
], 34), [
|
|
19003
19061
|
[
|
|
19004
19062
|
vShow,
|
|
19005
|
-
(_ctx.arrow === "always" || hover
|
|
19063
|
+
(_ctx.arrow === "always" || unref(hover)) && (props.loop || unref(activeIndex) > 0)
|
|
19006
19064
|
]
|
|
19007
19065
|
])
|
|
19008
19066
|
]),
|
|
@@ -19017,9 +19075,9 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
19017
19075
|
withDirectives(createElementVNode("button", {
|
|
19018
19076
|
type: "button",
|
|
19019
19077
|
class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "right")]),
|
|
19020
|
-
onMouseenter: _cache[
|
|
19021
|
-
onMouseleave: handleButtonLeave,
|
|
19022
|
-
onClick: _cache[
|
|
19078
|
+
onMouseenter: _cache[3] || (_cache[3] = ($event) => unref(handleButtonEnter)("right")),
|
|
19079
|
+
onMouseleave: _cache[4] || (_cache[4] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
|
|
19080
|
+
onClick: _cache[5] || (_cache[5] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) + 1), ["stop"]))
|
|
19023
19081
|
}, [
|
|
19024
19082
|
createVNode(unref(ElIcon), null, {
|
|
19025
19083
|
default: withCtx(() => [
|
|
@@ -19030,7 +19088,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
19030
19088
|
], 34), [
|
|
19031
19089
|
[
|
|
19032
19090
|
vShow,
|
|
19033
|
-
(_ctx.arrow === "always" || hover
|
|
19091
|
+
(_ctx.arrow === "always" || unref(hover)) && (props.loop || unref(activeIndex) < unref(items).length - 1)
|
|
19034
19092
|
]
|
|
19035
19093
|
])
|
|
19036
19094
|
]),
|
|
@@ -19048,20 +19106,20 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
19048
19106
|
class: normalizeClass([
|
|
19049
19107
|
unref(ns).e("indicator"),
|
|
19050
19108
|
unref(ns).em("indicator", _ctx.direction),
|
|
19051
|
-
unref(ns).is("active", index === activeIndex
|
|
19109
|
+
unref(ns).is("active", index === unref(activeIndex))
|
|
19052
19110
|
]),
|
|
19053
19111
|
onMouseenter: ($event) => unref(throttledIndicatorHover)(index),
|
|
19054
|
-
onClick: withModifiers(($event) => handleIndicatorClick(index), ["stop"])
|
|
19112
|
+
onClick: withModifiers(($event) => unref(handleIndicatorClick)(index), ["stop"])
|
|
19055
19113
|
}, [
|
|
19056
19114
|
createElementVNode("button", {
|
|
19057
19115
|
class: normalizeClass(unref(ns).e("button"))
|
|
19058
19116
|
}, [
|
|
19059
|
-
unref(hasLabel) ? (openBlock(), createElementBlock("span",
|
|
19117
|
+
unref(hasLabel) ? (openBlock(), createElementBlock("span", _hoisted_2$A, toDisplayString(item.props.label), 1)) : createCommentVNode("v-if", true)
|
|
19060
19118
|
], 2)
|
|
19061
|
-
], 42,
|
|
19119
|
+
], 42, _hoisted_1$V);
|
|
19062
19120
|
}), 128))
|
|
19063
19121
|
], 2)) : createCommentVNode("v-if", true)
|
|
19064
|
-
],
|
|
19122
|
+
], 34);
|
|
19065
19123
|
};
|
|
19066
19124
|
}
|
|
19067
19125
|
});
|
|
@@ -19075,7 +19133,113 @@ const carouselItemProps = buildProps({
|
|
|
19075
19133
|
}
|
|
19076
19134
|
});
|
|
19077
19135
|
|
|
19078
|
-
const
|
|
19136
|
+
const useCarouselItem = (props, componentName) => {
|
|
19137
|
+
const carouselContext = inject(carouselContextKey);
|
|
19138
|
+
const instance = getCurrentInstance();
|
|
19139
|
+
const CARD_SCALE = 0.83;
|
|
19140
|
+
const hover = ref(false);
|
|
19141
|
+
const translate = ref(0);
|
|
19142
|
+
const scale = ref(1);
|
|
19143
|
+
const active = ref(false);
|
|
19144
|
+
const ready = ref(false);
|
|
19145
|
+
const inStage = ref(false);
|
|
19146
|
+
const animating = ref(false);
|
|
19147
|
+
const { isCardType, isVertical } = carouselContext;
|
|
19148
|
+
function processIndex(index, activeIndex, length) {
|
|
19149
|
+
const lastItemIndex = length - 1;
|
|
19150
|
+
const prevItemIndex = activeIndex - 1;
|
|
19151
|
+
const nextItemIndex = activeIndex + 1;
|
|
19152
|
+
const halfItemIndex = length / 2;
|
|
19153
|
+
if (activeIndex === 0 && index === lastItemIndex) {
|
|
19154
|
+
return -1;
|
|
19155
|
+
} else if (activeIndex === lastItemIndex && index === 0) {
|
|
19156
|
+
return length;
|
|
19157
|
+
} else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {
|
|
19158
|
+
return length + 1;
|
|
19159
|
+
} else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {
|
|
19160
|
+
return -2;
|
|
19161
|
+
}
|
|
19162
|
+
return index;
|
|
19163
|
+
}
|
|
19164
|
+
function calcCardTranslate(index, activeIndex) {
|
|
19165
|
+
var _a;
|
|
19166
|
+
const parentWidth = ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetWidth) || 0;
|
|
19167
|
+
if (inStage.value) {
|
|
19168
|
+
return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
|
|
19169
|
+
} else if (index < activeIndex) {
|
|
19170
|
+
return -(1 + CARD_SCALE) * parentWidth / 4;
|
|
19171
|
+
} else {
|
|
19172
|
+
return (3 + CARD_SCALE) * parentWidth / 4;
|
|
19173
|
+
}
|
|
19174
|
+
}
|
|
19175
|
+
function calcTranslate(index, activeIndex, isVertical2) {
|
|
19176
|
+
const rootEl = carouselContext.root.value;
|
|
19177
|
+
if (!rootEl)
|
|
19178
|
+
return 0;
|
|
19179
|
+
const distance = (isVertical2 ? rootEl.offsetHeight : rootEl.offsetWidth) || 0;
|
|
19180
|
+
return distance * (index - activeIndex);
|
|
19181
|
+
}
|
|
19182
|
+
const translateItem = (index, activeIndex, oldIndex) => {
|
|
19183
|
+
var _a;
|
|
19184
|
+
const _isCardType = unref(isCardType);
|
|
19185
|
+
const carouselItemLength = (_a = carouselContext.items.value.length) != null ? _a : Number.NaN;
|
|
19186
|
+
const isActive = index === activeIndex;
|
|
19187
|
+
if (!_isCardType && !isUndefined(oldIndex)) {
|
|
19188
|
+
animating.value = isActive || index === oldIndex;
|
|
19189
|
+
}
|
|
19190
|
+
if (!isActive && carouselItemLength > 2 && carouselContext.loop) {
|
|
19191
|
+
index = processIndex(index, activeIndex, carouselItemLength);
|
|
19192
|
+
}
|
|
19193
|
+
const _isVertical = unref(isVertical);
|
|
19194
|
+
active.value = isActive;
|
|
19195
|
+
if (_isCardType) {
|
|
19196
|
+
inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
19197
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
19198
|
+
scale.value = unref(active) ? 1 : CARD_SCALE;
|
|
19199
|
+
} else {
|
|
19200
|
+
translate.value = calcTranslate(index, activeIndex, _isVertical);
|
|
19201
|
+
}
|
|
19202
|
+
ready.value = true;
|
|
19203
|
+
};
|
|
19204
|
+
function handleItemClick() {
|
|
19205
|
+
if (carouselContext && unref(isCardType)) {
|
|
19206
|
+
const index = carouselContext.items.value.findIndex(({ uid }) => uid === instance.uid);
|
|
19207
|
+
carouselContext.setActiveItem(index);
|
|
19208
|
+
}
|
|
19209
|
+
}
|
|
19210
|
+
onMounted(() => {
|
|
19211
|
+
carouselContext.addItem({
|
|
19212
|
+
props,
|
|
19213
|
+
states: reactive({
|
|
19214
|
+
hover,
|
|
19215
|
+
translate,
|
|
19216
|
+
scale,
|
|
19217
|
+
active,
|
|
19218
|
+
ready,
|
|
19219
|
+
inStage,
|
|
19220
|
+
animating
|
|
19221
|
+
}),
|
|
19222
|
+
uid: instance.uid,
|
|
19223
|
+
translateItem
|
|
19224
|
+
});
|
|
19225
|
+
});
|
|
19226
|
+
onUnmounted(() => {
|
|
19227
|
+
carouselContext.removeItem(instance.uid);
|
|
19228
|
+
});
|
|
19229
|
+
return {
|
|
19230
|
+
active,
|
|
19231
|
+
animating,
|
|
19232
|
+
hover,
|
|
19233
|
+
inStage,
|
|
19234
|
+
isVertical,
|
|
19235
|
+
translate,
|
|
19236
|
+
isCardType,
|
|
19237
|
+
scale,
|
|
19238
|
+
ready,
|
|
19239
|
+
handleItemClick
|
|
19240
|
+
};
|
|
19241
|
+
};
|
|
19242
|
+
|
|
19079
19243
|
const __default__$17 = defineComponent({
|
|
19080
19244
|
name: "ElCarouselItem"
|
|
19081
19245
|
});
|
|
@@ -19085,16 +19249,18 @@ const _sfc_main$1M = /* @__PURE__ */ defineComponent({
|
|
|
19085
19249
|
setup(__props) {
|
|
19086
19250
|
const props = __props;
|
|
19087
19251
|
const ns = useNamespace("carousel");
|
|
19088
|
-
const
|
|
19089
|
-
|
|
19090
|
-
|
|
19091
|
-
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19252
|
+
const {
|
|
19253
|
+
active,
|
|
19254
|
+
animating,
|
|
19255
|
+
hover,
|
|
19256
|
+
inStage,
|
|
19257
|
+
isVertical,
|
|
19258
|
+
translate,
|
|
19259
|
+
isCardType,
|
|
19260
|
+
scale,
|
|
19261
|
+
ready,
|
|
19262
|
+
handleItemClick
|
|
19263
|
+
} = useCarouselItem(props);
|
|
19098
19264
|
const itemStyle = computed$1(() => {
|
|
19099
19265
|
const translateType = `translate${unref(isVertical) ? "Y" : "X"}`;
|
|
19100
19266
|
const _translate = `${translateType}(${unref(translate)}px)`;
|
|
@@ -19104,109 +19270,28 @@ const _sfc_main$1M = /* @__PURE__ */ defineComponent({
|
|
|
19104
19270
|
transform
|
|
19105
19271
|
};
|
|
19106
19272
|
});
|
|
19107
|
-
function processIndex(index, activeIndex, length) {
|
|
19108
|
-
const lastItemIndex = length - 1;
|
|
19109
|
-
const prevItemIndex = activeIndex - 1;
|
|
19110
|
-
const nextItemIndex = activeIndex + 1;
|
|
19111
|
-
const halfItemIndex = length / 2;
|
|
19112
|
-
if (activeIndex === 0 && index === lastItemIndex) {
|
|
19113
|
-
return -1;
|
|
19114
|
-
} else if (activeIndex === lastItemIndex && index === 0) {
|
|
19115
|
-
return length;
|
|
19116
|
-
} else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {
|
|
19117
|
-
return length + 1;
|
|
19118
|
-
} else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {
|
|
19119
|
-
return -2;
|
|
19120
|
-
}
|
|
19121
|
-
return index;
|
|
19122
|
-
}
|
|
19123
|
-
function calcCardTranslate(index, activeIndex) {
|
|
19124
|
-
var _a;
|
|
19125
|
-
const parentWidth = ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetWidth) || 0;
|
|
19126
|
-
if (inStage.value) {
|
|
19127
|
-
return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
|
|
19128
|
-
} else if (index < activeIndex) {
|
|
19129
|
-
return -(1 + CARD_SCALE) * parentWidth / 4;
|
|
19130
|
-
} else {
|
|
19131
|
-
return (3 + CARD_SCALE) * parentWidth / 4;
|
|
19132
|
-
}
|
|
19133
|
-
}
|
|
19134
|
-
function calcTranslate(index, activeIndex, isVertical2) {
|
|
19135
|
-
const rootEl = carouselContext.root.value;
|
|
19136
|
-
if (!rootEl)
|
|
19137
|
-
return 0;
|
|
19138
|
-
const distance = (isVertical2 ? rootEl.offsetHeight : rootEl.offsetWidth) || 0;
|
|
19139
|
-
return distance * (index - activeIndex);
|
|
19140
|
-
}
|
|
19141
|
-
const translateItem = (index, activeIndex, oldIndex) => {
|
|
19142
|
-
var _a;
|
|
19143
|
-
const _isCardType = unref(isCardType);
|
|
19144
|
-
const carouselItemLength = (_a = carouselContext.items.value.length) != null ? _a : Number.NaN;
|
|
19145
|
-
const isActive = index === activeIndex;
|
|
19146
|
-
if (!_isCardType && !isUndefined(oldIndex)) {
|
|
19147
|
-
animating.value = isActive || index === oldIndex;
|
|
19148
|
-
}
|
|
19149
|
-
if (!isActive && carouselItemLength > 2 && carouselContext.loop) {
|
|
19150
|
-
index = processIndex(index, activeIndex, carouselItemLength);
|
|
19151
|
-
}
|
|
19152
|
-
const _isVertical = unref(isVertical);
|
|
19153
|
-
active.value = isActive;
|
|
19154
|
-
if (_isCardType) {
|
|
19155
|
-
inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
19156
|
-
translate.value = calcCardTranslate(index, activeIndex);
|
|
19157
|
-
scale.value = unref(active) ? 1 : CARD_SCALE;
|
|
19158
|
-
} else {
|
|
19159
|
-
translate.value = calcTranslate(index, activeIndex, _isVertical);
|
|
19160
|
-
}
|
|
19161
|
-
ready.value = true;
|
|
19162
|
-
};
|
|
19163
|
-
function handleItemClick() {
|
|
19164
|
-
if (carouselContext && unref(isCardType)) {
|
|
19165
|
-
const index = carouselContext.items.value.findIndex(({ uid }) => uid === instance.uid);
|
|
19166
|
-
carouselContext.setActiveItem(index);
|
|
19167
|
-
}
|
|
19168
|
-
}
|
|
19169
|
-
onMounted(() => {
|
|
19170
|
-
carouselContext.addItem({
|
|
19171
|
-
props,
|
|
19172
|
-
states: reactive({
|
|
19173
|
-
hover,
|
|
19174
|
-
translate,
|
|
19175
|
-
scale,
|
|
19176
|
-
active,
|
|
19177
|
-
ready,
|
|
19178
|
-
inStage,
|
|
19179
|
-
animating
|
|
19180
|
-
}),
|
|
19181
|
-
uid: instance.uid,
|
|
19182
|
-
translateItem
|
|
19183
|
-
});
|
|
19184
|
-
});
|
|
19185
|
-
onUnmounted(() => {
|
|
19186
|
-
carouselContext.removeItem(instance.uid);
|
|
19187
|
-
});
|
|
19188
19273
|
return (_ctx, _cache) => {
|
|
19189
19274
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
19190
19275
|
class: normalizeClass([
|
|
19191
19276
|
unref(ns).e("item"),
|
|
19192
|
-
unref(ns).is("active", active
|
|
19193
|
-
unref(ns).is("in-stage", inStage
|
|
19194
|
-
unref(ns).is("hover", hover
|
|
19195
|
-
unref(ns).is("animating", animating
|
|
19277
|
+
unref(ns).is("active", unref(active)),
|
|
19278
|
+
unref(ns).is("in-stage", unref(inStage)),
|
|
19279
|
+
unref(ns).is("hover", unref(hover)),
|
|
19280
|
+
unref(ns).is("animating", unref(animating)),
|
|
19196
19281
|
{ [unref(ns).em("item", "card")]: unref(isCardType) }
|
|
19197
19282
|
]),
|
|
19198
19283
|
style: normalizeStyle(unref(itemStyle)),
|
|
19199
|
-
onClick: handleItemClick
|
|
19284
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(handleItemClick) && unref(handleItemClick)(...args))
|
|
19200
19285
|
}, [
|
|
19201
19286
|
unref(isCardType) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
19202
19287
|
key: 0,
|
|
19203
19288
|
class: normalizeClass(unref(ns).e("mask"))
|
|
19204
19289
|
}, null, 2)), [
|
|
19205
|
-
[vShow, !active
|
|
19290
|
+
[vShow, !unref(active)]
|
|
19206
19291
|
]) : createCommentVNode("v-if", true),
|
|
19207
19292
|
renderSlot(_ctx.$slots, "default")
|
|
19208
19293
|
], 6)), [
|
|
19209
|
-
[vShow, ready
|
|
19294
|
+
[vShow, unref(ready)]
|
|
19210
19295
|
]);
|
|
19211
19296
|
};
|
|
19212
19297
|
}
|
|
@@ -19365,7 +19450,11 @@ const useCheckboxStatus = (props, slots, { model }) => {
|
|
|
19365
19450
|
if (isBoolean(value)) {
|
|
19366
19451
|
return value;
|
|
19367
19452
|
} else if (isArray(value)) {
|
|
19368
|
-
|
|
19453
|
+
if (isObject$1(props.label)) {
|
|
19454
|
+
return value.map(toRaw$1).some((o) => isEqual$1(o, props.label));
|
|
19455
|
+
} else {
|
|
19456
|
+
return value.map(toRaw$1).includes(props.label);
|
|
19457
|
+
}
|
|
19369
19458
|
} else if (value !== null && value !== void 0) {
|
|
19370
19459
|
return value === props.trueLabel;
|
|
19371
19460
|
} else {
|
|
@@ -20996,12 +21085,6 @@ var Tag = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["__file", "tag.vue"]]);
|
|
|
20996
21085
|
|
|
20997
21086
|
const ElTag = withInstall(Tag);
|
|
20998
21087
|
|
|
20999
|
-
const DEFAULT_INPUT_HEIGHT = 40;
|
|
21000
|
-
const INPUT_HEIGHT_MAP = {
|
|
21001
|
-
large: 36,
|
|
21002
|
-
default: 32,
|
|
21003
|
-
small: 28
|
|
21004
|
-
};
|
|
21005
21088
|
const popperOptions = {
|
|
21006
21089
|
modifiers: [
|
|
21007
21090
|
{
|
|
@@ -21115,6 +21198,7 @@ const _sfc_main$1B = defineComponent({
|
|
|
21115
21198
|
const isOnComposition = ref(false);
|
|
21116
21199
|
const isDisabled = computed$1(() => props.disabled || (form == null ? void 0 : form.disabled));
|
|
21117
21200
|
const inputPlaceholder = computed$1(() => props.placeholder || t("el.cascader.placeholder"));
|
|
21201
|
+
const currentPlaceholder = computed$1(() => searchInputValue.value || presentTags.value.length > 0 ? "" : inputPlaceholder.value);
|
|
21118
21202
|
const realSize = useSize();
|
|
21119
21203
|
const tagSize = computed$1(() => ["small"].includes(realSize.value) ? "small" : "default");
|
|
21120
21204
|
const multiple = computed$1(() => !!props.props.multiple);
|
|
@@ -21132,7 +21216,7 @@ const _sfc_main$1B = defineComponent({
|
|
|
21132
21216
|
const presentText = computed$1(() => {
|
|
21133
21217
|
const { showAllLevels, separator } = props;
|
|
21134
21218
|
const nodes = checkedNodes.value;
|
|
21135
|
-
return nodes.length ? multiple.value ? "
|
|
21219
|
+
return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
|
|
21136
21220
|
});
|
|
21137
21221
|
const checkedValue = computed$1({
|
|
21138
21222
|
get() {
|
|
@@ -21393,10 +21477,10 @@ const _sfc_main$1B = defineComponent({
|
|
|
21393
21477
|
});
|
|
21394
21478
|
watch(presentText, syncPresentTextValue, { immediate: true });
|
|
21395
21479
|
onMounted(() => {
|
|
21396
|
-
|
|
21397
|
-
const
|
|
21398
|
-
inputInitialHeight =
|
|
21399
|
-
useResizeObserver(
|
|
21480
|
+
const inputInner = input.value.input;
|
|
21481
|
+
const inputInnerHeight = Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
|
|
21482
|
+
inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
|
|
21483
|
+
useResizeObserver(inputInner, updateStyle);
|
|
21400
21484
|
});
|
|
21401
21485
|
return {
|
|
21402
21486
|
popperOptions,
|
|
@@ -21409,6 +21493,7 @@ const _sfc_main$1B = defineComponent({
|
|
|
21409
21493
|
popperVisible,
|
|
21410
21494
|
inputHover,
|
|
21411
21495
|
inputPlaceholder,
|
|
21496
|
+
currentPlaceholder,
|
|
21412
21497
|
filtering,
|
|
21413
21498
|
presentText,
|
|
21414
21499
|
checkedValue,
|
|
@@ -21498,7 +21583,7 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
21498
21583
|
ref: "input",
|
|
21499
21584
|
modelValue: _ctx.inputValue,
|
|
21500
21585
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.inputValue = $event),
|
|
21501
|
-
placeholder: _ctx.
|
|
21586
|
+
placeholder: _ctx.currentPlaceholder,
|
|
21502
21587
|
readonly: _ctx.readonly,
|
|
21503
21588
|
disabled: _ctx.isDisabled,
|
|
21504
21589
|
"validate-event": false,
|
|
@@ -21839,6 +21924,46 @@ const collapseEmits = {
|
|
|
21839
21924
|
[CHANGE_EVENT]: emitChangeFn
|
|
21840
21925
|
};
|
|
21841
21926
|
|
|
21927
|
+
const useCollapse = (props, emit) => {
|
|
21928
|
+
const activeNames = ref(castArray$1(props.modelValue));
|
|
21929
|
+
const setActiveNames = (_activeNames) => {
|
|
21930
|
+
activeNames.value = _activeNames;
|
|
21931
|
+
const value = props.accordion ? activeNames.value[0] : activeNames.value;
|
|
21932
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
21933
|
+
emit(CHANGE_EVENT, value);
|
|
21934
|
+
};
|
|
21935
|
+
const handleItemClick = (name) => {
|
|
21936
|
+
if (props.accordion) {
|
|
21937
|
+
setActiveNames([activeNames.value[0] === name ? "" : name]);
|
|
21938
|
+
} else {
|
|
21939
|
+
const _activeNames = [...activeNames.value];
|
|
21940
|
+
const index = _activeNames.indexOf(name);
|
|
21941
|
+
if (index > -1) {
|
|
21942
|
+
_activeNames.splice(index, 1);
|
|
21943
|
+
} else {
|
|
21944
|
+
_activeNames.push(name);
|
|
21945
|
+
}
|
|
21946
|
+
setActiveNames(_activeNames);
|
|
21947
|
+
}
|
|
21948
|
+
};
|
|
21949
|
+
watch(() => props.modelValue, () => activeNames.value = castArray$1(props.modelValue), { deep: true });
|
|
21950
|
+
provide(collapseContextKey, {
|
|
21951
|
+
activeNames,
|
|
21952
|
+
handleItemClick
|
|
21953
|
+
});
|
|
21954
|
+
return {
|
|
21955
|
+
activeNames,
|
|
21956
|
+
setActiveNames
|
|
21957
|
+
};
|
|
21958
|
+
};
|
|
21959
|
+
const useCollapseDOM = () => {
|
|
21960
|
+
const ns = useNamespace("collapse");
|
|
21961
|
+
const rootKls = computed$1(() => ns.b());
|
|
21962
|
+
return {
|
|
21963
|
+
rootKls
|
|
21964
|
+
};
|
|
21965
|
+
};
|
|
21966
|
+
|
|
21842
21967
|
const __default__$Z = defineComponent({
|
|
21843
21968
|
name: "ElCollapse"
|
|
21844
21969
|
});
|
|
@@ -21848,42 +21973,15 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
21848
21973
|
emits: collapseEmits,
|
|
21849
21974
|
setup(__props, { expose, emit }) {
|
|
21850
21975
|
const props = __props;
|
|
21851
|
-
const
|
|
21852
|
-
const
|
|
21853
|
-
const setActiveNames = (_activeNames) => {
|
|
21854
|
-
activeNames.value = _activeNames;
|
|
21855
|
-
const value = props.accordion ? activeNames.value[0] : activeNames.value;
|
|
21856
|
-
emit(UPDATE_MODEL_EVENT, value);
|
|
21857
|
-
emit(CHANGE_EVENT, value);
|
|
21858
|
-
};
|
|
21859
|
-
const handleItemClick = (name) => {
|
|
21860
|
-
if (props.accordion) {
|
|
21861
|
-
setActiveNames([
|
|
21862
|
-
(activeNames.value[0] || activeNames.value[0] === 0) && activeNames.value[0] === name ? "" : name
|
|
21863
|
-
]);
|
|
21864
|
-
} else {
|
|
21865
|
-
const _activeNames = [...activeNames.value];
|
|
21866
|
-
const index = _activeNames.indexOf(name);
|
|
21867
|
-
if (index > -1) {
|
|
21868
|
-
_activeNames.splice(index, 1);
|
|
21869
|
-
} else {
|
|
21870
|
-
_activeNames.push(name);
|
|
21871
|
-
}
|
|
21872
|
-
setActiveNames(_activeNames);
|
|
21873
|
-
}
|
|
21874
|
-
};
|
|
21875
|
-
watch(() => props.modelValue, () => activeNames.value = castArray$1(props.modelValue), { deep: true });
|
|
21876
|
-
provide(collapseContextKey, {
|
|
21877
|
-
activeNames,
|
|
21878
|
-
handleItemClick
|
|
21879
|
-
});
|
|
21976
|
+
const { activeNames, setActiveNames } = useCollapse(props, emit);
|
|
21977
|
+
const { rootKls } = useCollapseDOM();
|
|
21880
21978
|
expose({
|
|
21881
21979
|
activeNames,
|
|
21882
21980
|
setActiveNames
|
|
21883
21981
|
});
|
|
21884
21982
|
return (_ctx, _cache) => {
|
|
21885
21983
|
return openBlock(), createElementBlock("div", {
|
|
21886
|
-
class: normalizeClass(unref(
|
|
21984
|
+
class: normalizeClass(unref(rootKls)),
|
|
21887
21985
|
role: "tablist",
|
|
21888
21986
|
"aria-multiselectable": "true"
|
|
21889
21987
|
}, [
|
|
@@ -21983,8 +22081,73 @@ const collapseItemProps = buildProps({
|
|
|
21983
22081
|
disabled: Boolean
|
|
21984
22082
|
});
|
|
21985
22083
|
|
|
22084
|
+
const useCollapseItem = (props) => {
|
|
22085
|
+
const collapse = inject(collapseContextKey);
|
|
22086
|
+
const focusing = ref(false);
|
|
22087
|
+
const isClick = ref(false);
|
|
22088
|
+
const id = ref(generateId());
|
|
22089
|
+
const isActive = computed$1(() => collapse == null ? void 0 : collapse.activeNames.value.includes(props.name));
|
|
22090
|
+
const handleFocus = () => {
|
|
22091
|
+
setTimeout(() => {
|
|
22092
|
+
if (!isClick.value) {
|
|
22093
|
+
focusing.value = true;
|
|
22094
|
+
} else {
|
|
22095
|
+
isClick.value = false;
|
|
22096
|
+
}
|
|
22097
|
+
}, 50);
|
|
22098
|
+
};
|
|
22099
|
+
const handleHeaderClick = () => {
|
|
22100
|
+
if (props.disabled)
|
|
22101
|
+
return;
|
|
22102
|
+
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22103
|
+
focusing.value = false;
|
|
22104
|
+
isClick.value = true;
|
|
22105
|
+
};
|
|
22106
|
+
const handleEnterClick = () => {
|
|
22107
|
+
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22108
|
+
};
|
|
22109
|
+
return {
|
|
22110
|
+
focusing,
|
|
22111
|
+
id,
|
|
22112
|
+
isActive,
|
|
22113
|
+
handleFocus,
|
|
22114
|
+
handleHeaderClick,
|
|
22115
|
+
handleEnterClick
|
|
22116
|
+
};
|
|
22117
|
+
};
|
|
22118
|
+
const useCollapseItemDOM = (props, { focusing, isActive, id }) => {
|
|
22119
|
+
const ns = useNamespace("collapse");
|
|
22120
|
+
const rootKls = computed$1(() => [
|
|
22121
|
+
ns.b("item"),
|
|
22122
|
+
ns.is("active", unref(isActive)),
|
|
22123
|
+
ns.is("disabled", props.disabled)
|
|
22124
|
+
]);
|
|
22125
|
+
const headKls = computed$1(() => [
|
|
22126
|
+
ns.be("item", "header"),
|
|
22127
|
+
ns.is("active", unref(isActive)),
|
|
22128
|
+
{ focusing: unref(focusing) && !props.disabled }
|
|
22129
|
+
]);
|
|
22130
|
+
const arrowKls = computed$1(() => [
|
|
22131
|
+
ns.be("item", "arrow"),
|
|
22132
|
+
ns.is("active", unref(isActive))
|
|
22133
|
+
]);
|
|
22134
|
+
const itemWrapperKls = computed$1(() => ns.be("item", "wrap"));
|
|
22135
|
+
const itemContentKls = computed$1(() => ns.be("item", "content"));
|
|
22136
|
+
const scopedContentId = computed$1(() => ns.b(`content-${unref(id)}`));
|
|
22137
|
+
const scopedHeadId = computed$1(() => ns.b(`head-${unref(id)}`));
|
|
22138
|
+
return {
|
|
22139
|
+
arrowKls,
|
|
22140
|
+
headKls,
|
|
22141
|
+
rootKls,
|
|
22142
|
+
itemWrapperKls,
|
|
22143
|
+
itemContentKls,
|
|
22144
|
+
scopedContentId,
|
|
22145
|
+
scopedHeadId
|
|
22146
|
+
};
|
|
22147
|
+
};
|
|
22148
|
+
|
|
21986
22149
|
const _hoisted_1$N = ["aria-expanded", "aria-controls", "aria-describedby"];
|
|
21987
|
-
const _hoisted_2$v = ["id", "tabindex"
|
|
22150
|
+
const _hoisted_2$v = ["id", "tabindex"];
|
|
21988
22151
|
const _hoisted_3$g = ["id", "aria-hidden", "aria-labelledby"];
|
|
21989
22152
|
const __default__$X = defineComponent({
|
|
21990
22153
|
name: "ElCollapseItem"
|
|
@@ -21994,67 +22157,51 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
21994
22157
|
props: collapseItemProps,
|
|
21995
22158
|
setup(__props, { expose }) {
|
|
21996
22159
|
const props = __props;
|
|
21997
|
-
const
|
|
21998
|
-
|
|
21999
|
-
|
|
22000
|
-
|
|
22001
|
-
|
|
22002
|
-
|
|
22003
|
-
|
|
22004
|
-
|
|
22005
|
-
|
|
22006
|
-
|
|
22007
|
-
|
|
22008
|
-
|
|
22009
|
-
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
|
|
22013
|
-
|
|
22014
|
-
return;
|
|
22015
|
-
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22016
|
-
focusing.value = false;
|
|
22017
|
-
isClick.value = true;
|
|
22018
|
-
};
|
|
22019
|
-
const handleEnterClick = () => {
|
|
22020
|
-
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22021
|
-
};
|
|
22160
|
+
const {
|
|
22161
|
+
focusing,
|
|
22162
|
+
id,
|
|
22163
|
+
isActive,
|
|
22164
|
+
handleFocus,
|
|
22165
|
+
handleHeaderClick,
|
|
22166
|
+
handleEnterClick
|
|
22167
|
+
} = useCollapseItem(props);
|
|
22168
|
+
const {
|
|
22169
|
+
arrowKls,
|
|
22170
|
+
headKls,
|
|
22171
|
+
rootKls,
|
|
22172
|
+
itemWrapperKls,
|
|
22173
|
+
itemContentKls,
|
|
22174
|
+
scopedContentId,
|
|
22175
|
+
scopedHeadId
|
|
22176
|
+
} = useCollapseItemDOM(props, { focusing, isActive, id });
|
|
22022
22177
|
expose({
|
|
22023
22178
|
isActive
|
|
22024
22179
|
});
|
|
22025
22180
|
return (_ctx, _cache) => {
|
|
22026
22181
|
return openBlock(), createElementBlock("div", {
|
|
22027
|
-
class: normalizeClass(
|
|
22028
|
-
unref(ns).b("item"),
|
|
22029
|
-
unref(ns).is("active", unref(isActive)),
|
|
22030
|
-
unref(ns).is("disabled", _ctx.disabled)
|
|
22031
|
-
])
|
|
22182
|
+
class: normalizeClass(unref(rootKls))
|
|
22032
22183
|
}, [
|
|
22033
22184
|
createElementVNode("div", {
|
|
22034
22185
|
role: "tab",
|
|
22035
22186
|
"aria-expanded": unref(isActive),
|
|
22036
|
-
"aria-controls": unref(
|
|
22037
|
-
"aria-describedby": unref(
|
|
22187
|
+
"aria-controls": unref(scopedContentId),
|
|
22188
|
+
"aria-describedby": unref(scopedContentId)
|
|
22038
22189
|
}, [
|
|
22039
22190
|
createElementVNode("div", {
|
|
22040
|
-
id: unref(
|
|
22041
|
-
class: normalizeClass(
|
|
22042
|
-
unref(ns).be("item", "header"),
|
|
22043
|
-
unref(ns).is("active", unref(isActive)),
|
|
22044
|
-
{ focusing: focusing.value && !_ctx.disabled }
|
|
22045
|
-
]),
|
|
22191
|
+
id: unref(scopedHeadId),
|
|
22192
|
+
class: normalizeClass(unref(headKls)),
|
|
22046
22193
|
role: "button",
|
|
22047
22194
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
22048
|
-
onClick: handleHeaderClick,
|
|
22049
|
-
onKeypress: withKeys(withModifiers(handleEnterClick, ["stop", "prevent"]), ["space", "enter"]),
|
|
22050
|
-
onFocus: handleFocus,
|
|
22051
|
-
onBlur: _cache[
|
|
22195
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)),
|
|
22196
|
+
onKeypress: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop", "prevent"]), ["space", "enter"])),
|
|
22197
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
|
|
22198
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false)
|
|
22052
22199
|
}, [
|
|
22053
22200
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
22054
22201
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
22055
22202
|
]),
|
|
22056
22203
|
createVNode(unref(ElIcon), {
|
|
22057
|
-
class: normalizeClass(
|
|
22204
|
+
class: normalizeClass(unref(arrowKls))
|
|
22058
22205
|
}, {
|
|
22059
22206
|
default: withCtx(() => [
|
|
22060
22207
|
createVNode(unref(arrow_right_default))
|
|
@@ -22066,14 +22213,14 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
22066
22213
|
createVNode(unref(_CollapseTransition), null, {
|
|
22067
22214
|
default: withCtx(() => [
|
|
22068
22215
|
withDirectives(createElementVNode("div", {
|
|
22069
|
-
id: unref(
|
|
22070
|
-
class: normalizeClass(unref(
|
|
22216
|
+
id: unref(scopedContentId),
|
|
22217
|
+
class: normalizeClass(unref(itemWrapperKls)),
|
|
22071
22218
|
role: "tabpanel",
|
|
22072
22219
|
"aria-hidden": !unref(isActive),
|
|
22073
|
-
"aria-labelledby": unref(
|
|
22220
|
+
"aria-labelledby": unref(scopedHeadId)
|
|
22074
22221
|
}, [
|
|
22075
22222
|
createElementVNode("div", {
|
|
22076
|
-
class: normalizeClass(unref(
|
|
22223
|
+
class: normalizeClass(unref(itemContentKls))
|
|
22077
22224
|
}, [
|
|
22078
22225
|
renderSlot(_ctx.$slots, "default")
|
|
22079
22226
|
], 2)
|
|
@@ -25752,12 +25899,12 @@ const useMonthRangeHeader = ({
|
|
|
25752
25899
|
const { t } = useLocale();
|
|
25753
25900
|
const leftPrevYear = () => {
|
|
25754
25901
|
leftDate.value = leftDate.value.subtract(1, "year");
|
|
25755
|
-
if (!unlinkPanels) {
|
|
25902
|
+
if (!unlinkPanels.value) {
|
|
25756
25903
|
rightDate.value = rightDate.value.subtract(1, "year");
|
|
25757
25904
|
}
|
|
25758
25905
|
};
|
|
25759
25906
|
const rightNextYear = () => {
|
|
25760
|
-
if (!unlinkPanels) {
|
|
25907
|
+
if (!unlinkPanels.value) {
|
|
25761
25908
|
leftDate.value = leftDate.value.add(1, "year");
|
|
25762
25909
|
}
|
|
25763
25910
|
rightDate.value = rightDate.value.add(1, "year");
|
|
@@ -27631,7 +27778,8 @@ const dropdownProps = buildProps({
|
|
|
27631
27778
|
},
|
|
27632
27779
|
buttonProps: {
|
|
27633
27780
|
type: definePropType(Object)
|
|
27634
|
-
}
|
|
27781
|
+
},
|
|
27782
|
+
teleported: useTooltipContentProps.teleported
|
|
27635
27783
|
});
|
|
27636
27784
|
const dropdownItemProps = buildProps({
|
|
27637
27785
|
command: {
|
|
@@ -27829,7 +27977,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27829
27977
|
"virtual-triggering": _ctx.splitButton,
|
|
27830
27978
|
disabled: _ctx.disabled,
|
|
27831
27979
|
transition: `${_ctx.ns.namespace.value}-zoom-in-top`,
|
|
27832
|
-
teleported:
|
|
27980
|
+
teleported: _ctx.teleported,
|
|
27833
27981
|
pure: "",
|
|
27834
27982
|
persistent: "",
|
|
27835
27983
|
onBeforeShow: _ctx.handleBeforeShowTooltip,
|
|
@@ -27882,7 +28030,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27882
28030
|
}, 8, ["id", "tabindex"])
|
|
27883
28031
|
])
|
|
27884
28032
|
} : void 0
|
|
27885
|
-
]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "onBeforeShow", "onShow", "onBeforeHide"]),
|
|
28033
|
+
]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "onBeforeShow", "onShow", "onBeforeHide"]),
|
|
27886
28034
|
_ctx.splitButton ? (openBlock(), createBlock(_component_el_button_group, { key: 0 }, {
|
|
27887
28035
|
default: withCtx(() => [
|
|
27888
28036
|
createVNode(_component_el_button, mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, {
|
|
@@ -28061,6 +28209,9 @@ const _sfc_main$12 = defineComponent({
|
|
|
28061
28209
|
onItemLeave(e);
|
|
28062
28210
|
}));
|
|
28063
28211
|
const handleClick = composeEventHandlers((e) => {
|
|
28212
|
+
if (props.disabled) {
|
|
28213
|
+
return;
|
|
28214
|
+
}
|
|
28064
28215
|
emit("click", e);
|
|
28065
28216
|
return e.type !== "keydown" && e.defaultPrevented;
|
|
28066
28217
|
}, (e) => {
|
|
@@ -28621,6 +28772,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
28621
28772
|
}
|
|
28622
28773
|
return result;
|
|
28623
28774
|
} catch (e) {
|
|
28775
|
+
if (e instanceof Error)
|
|
28776
|
+
throw e;
|
|
28624
28777
|
const invalidFields = e;
|
|
28625
28778
|
if (props.scrollToError) {
|
|
28626
28779
|
scrollToField(Object.keys(invalidFields)[0]);
|
|
@@ -30990,7 +31143,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
30990
31143
|
const increase = () => {
|
|
30991
31144
|
if (props.readonly || inputNumberDisabled.value || maxDisabled.value)
|
|
30992
31145
|
return;
|
|
30993
|
-
const value =
|
|
31146
|
+
const value = Number(displayValue.value) || 0;
|
|
30994
31147
|
const newVal = ensurePrecision(value);
|
|
30995
31148
|
setCurrentValue(newVal);
|
|
30996
31149
|
emit(INPUT_EVENT, data.currentValue);
|
|
@@ -30998,7 +31151,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
30998
31151
|
const decrease = () => {
|
|
30999
31152
|
if (props.readonly || inputNumberDisabled.value || minDisabled.value)
|
|
31000
31153
|
return;
|
|
31001
|
-
const value =
|
|
31154
|
+
const value = Number(displayValue.value) || 0;
|
|
31002
31155
|
const newVal = ensurePrecision(value, -1);
|
|
31003
31156
|
setCurrentValue(newVal);
|
|
31004
31157
|
emit(INPUT_EVENT, data.currentValue);
|
|
@@ -32754,10 +32907,10 @@ const useSelect$3 = (props, states, ctx) => {
|
|
|
32754
32907
|
if (!val) {
|
|
32755
32908
|
if (props.filterable) {
|
|
32756
32909
|
if (isFunction(props.filterMethod)) {
|
|
32757
|
-
props.filterMethod();
|
|
32910
|
+
props.filterMethod("");
|
|
32758
32911
|
}
|
|
32759
32912
|
if (isFunction(props.remoteMethod)) {
|
|
32760
|
-
props.remoteMethod();
|
|
32913
|
+
props.remoteMethod("");
|
|
32761
32914
|
}
|
|
32762
32915
|
}
|
|
32763
32916
|
input.value && input.value.blur();
|
|
@@ -32828,7 +32981,7 @@ const useSelect$3 = (props, states, ctx) => {
|
|
|
32828
32981
|
flush: "post"
|
|
32829
32982
|
});
|
|
32830
32983
|
watch(() => states.hoverIndex, (val) => {
|
|
32831
|
-
if (
|
|
32984
|
+
if (isNumber(val) && val > -1) {
|
|
32832
32985
|
hoverOption.value = optionsArray.value[val] || {};
|
|
32833
32986
|
} else {
|
|
32834
32987
|
hoverOption.value = {};
|
|
@@ -32857,7 +33010,7 @@ const useSelect$3 = (props, states, ctx) => {
|
|
|
32857
33010
|
const handleQueryChange = async (val) => {
|
|
32858
33011
|
if (states.previousQuery === val || states.isOnComposition)
|
|
32859
33012
|
return;
|
|
32860
|
-
if (states.previousQuery === null && (
|
|
33013
|
+
if (states.previousQuery === null && (isFunction(props.filterMethod) || isFunction(props.remoteMethod))) {
|
|
32861
33014
|
states.previousQuery = val;
|
|
32862
33015
|
return;
|
|
32863
33016
|
}
|
|
@@ -32876,10 +33029,10 @@ const useSelect$3 = (props, states, ctx) => {
|
|
|
32876
33029
|
resetInputHeight();
|
|
32877
33030
|
});
|
|
32878
33031
|
}
|
|
32879
|
-
if (props.remote &&
|
|
33032
|
+
if (props.remote && isFunction(props.remoteMethod)) {
|
|
32880
33033
|
states.hoverIndex = -1;
|
|
32881
33034
|
props.remoteMethod(val);
|
|
32882
|
-
} else if (
|
|
33035
|
+
} else if (isFunction(props.filterMethod)) {
|
|
32883
33036
|
props.filterMethod(val);
|
|
32884
33037
|
triggerRef(groupQueryChange);
|
|
32885
33038
|
} else {
|
|
@@ -33035,7 +33188,7 @@ const useSelect$3 = (props, states, ctx) => {
|
|
|
33035
33188
|
const deleteSelected = (event) => {
|
|
33036
33189
|
event.stopPropagation();
|
|
33037
33190
|
const value = props.multiple ? [] : "";
|
|
33038
|
-
if (
|
|
33191
|
+
if (!isString(value)) {
|
|
33039
33192
|
for (const item of states.selected) {
|
|
33040
33193
|
if (item.isDisabled)
|
|
33041
33194
|
value.push(item.value);
|
|
@@ -38138,7 +38291,7 @@ const useSelect$1 = (props, emit) => {
|
|
|
38138
38291
|
selectWidth: 200,
|
|
38139
38292
|
initialInputHeight: 0,
|
|
38140
38293
|
previousQuery: null,
|
|
38141
|
-
previousValue:
|
|
38294
|
+
previousValue: void 0,
|
|
38142
38295
|
query: "",
|
|
38143
38296
|
selectedLabel: "",
|
|
38144
38297
|
softFocus: false,
|
|
@@ -38327,7 +38480,7 @@ const useSelect$1 = (props, emit) => {
|
|
|
38327
38480
|
const update = (val) => {
|
|
38328
38481
|
emit(UPDATE_MODEL_EVENT, val);
|
|
38329
38482
|
emitChange(val);
|
|
38330
|
-
states.previousValue = val.toString();
|
|
38483
|
+
states.previousValue = val == null ? void 0 : val.toString();
|
|
38331
38484
|
};
|
|
38332
38485
|
const getValueIndex = (arr = [], value) => {
|
|
38333
38486
|
if (!isObject$1(value)) {
|
|
@@ -38493,7 +38646,7 @@ const useSelect$1 = (props, emit) => {
|
|
|
38493
38646
|
if (isArray(props.modelValue)) {
|
|
38494
38647
|
emptyValue = [];
|
|
38495
38648
|
} else {
|
|
38496
|
-
emptyValue =
|
|
38649
|
+
emptyValue = void 0;
|
|
38497
38650
|
}
|
|
38498
38651
|
states.softFocus = true;
|
|
38499
38652
|
if (props.multiple) {
|
|
@@ -38613,7 +38766,7 @@ const useSelect$1 = (props, emit) => {
|
|
|
38613
38766
|
});
|
|
38614
38767
|
} else {
|
|
38615
38768
|
states.cachedOptions = [];
|
|
38616
|
-
states.previousValue =
|
|
38769
|
+
states.previousValue = void 0;
|
|
38617
38770
|
}
|
|
38618
38771
|
} else {
|
|
38619
38772
|
if (hasModelValue.value) {
|
|
@@ -38628,7 +38781,7 @@ const useSelect$1 = (props, emit) => {
|
|
|
38628
38781
|
}
|
|
38629
38782
|
} else {
|
|
38630
38783
|
states.selectedLabel = "";
|
|
38631
|
-
states.previousValue =
|
|
38784
|
+
states.previousValue = void 0;
|
|
38632
38785
|
}
|
|
38633
38786
|
}
|
|
38634
38787
|
clearAllNewOption();
|
|
@@ -38809,7 +38962,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38809
38962
|
ref: "selectionRef",
|
|
38810
38963
|
class: normalizeClass([
|
|
38811
38964
|
_ctx.nsSelectV2.e("wrapper"),
|
|
38812
|
-
_ctx.nsSelectV2.is("focused", _ctx.states.isComposing),
|
|
38965
|
+
_ctx.nsSelectV2.is("focused", _ctx.states.isComposing || _ctx.expanded),
|
|
38813
38966
|
_ctx.nsSelectV2.is("hovering", _ctx.states.comboBoxHovering),
|
|
38814
38967
|
_ctx.nsSelectV2.is("filterable", _ctx.filterable),
|
|
38815
38968
|
_ctx.nsSelectV2.is("disabled", _ctx.selectDisabled)
|
|
@@ -39046,7 +39199,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39046
39199
|
key: 3,
|
|
39047
39200
|
class: normalizeClass([
|
|
39048
39201
|
_ctx.nsSelectV2.e("placeholder"),
|
|
39049
|
-
_ctx.nsSelectV2.is("transparent", _ctx.
|
|
39202
|
+
_ctx.nsSelectV2.is("transparent", _ctx.multiple ? _ctx.modelValue.length === 0 : !_ctx.hasModelValue)
|
|
39050
39203
|
])
|
|
39051
39204
|
}, toDisplayString(_ctx.currentPlaceholder), 3)) : createCommentVNode("v-if", true),
|
|
39052
39205
|
createElementVNode("span", {
|
|
@@ -41171,26 +41324,27 @@ function toggleRowStatus(statusArr, row, newVal) {
|
|
|
41171
41324
|
let changed = false;
|
|
41172
41325
|
const index = statusArr.indexOf(row);
|
|
41173
41326
|
const included = index !== -1;
|
|
41174
|
-
const
|
|
41175
|
-
|
|
41176
|
-
|
|
41177
|
-
|
|
41178
|
-
|
|
41179
|
-
|
|
41327
|
+
const toggleStatus = (type) => {
|
|
41328
|
+
if (type === "add") {
|
|
41329
|
+
statusArr.push(row);
|
|
41330
|
+
} else {
|
|
41331
|
+
statusArr.splice(index, 1);
|
|
41332
|
+
}
|
|
41180
41333
|
changed = true;
|
|
41334
|
+
if (isArray(row.children)) {
|
|
41335
|
+
row.children.forEach((item) => {
|
|
41336
|
+
toggleRowStatus(statusArr, item, newVal != null ? newVal : !included);
|
|
41337
|
+
});
|
|
41338
|
+
}
|
|
41181
41339
|
};
|
|
41182
|
-
if (
|
|
41340
|
+
if (isBoolean(newVal)) {
|
|
41183
41341
|
if (newVal && !included) {
|
|
41184
|
-
|
|
41342
|
+
toggleStatus("add");
|
|
41185
41343
|
} else if (!newVal && included) {
|
|
41186
|
-
|
|
41344
|
+
toggleStatus("remove");
|
|
41187
41345
|
}
|
|
41188
41346
|
} else {
|
|
41189
|
-
|
|
41190
|
-
removeRow();
|
|
41191
|
-
} else {
|
|
41192
|
-
addRow();
|
|
41193
|
-
}
|
|
41347
|
+
included ? toggleStatus("remove") : toggleStatus("add");
|
|
41194
41348
|
}
|
|
41195
41349
|
return changed;
|
|
41196
41350
|
}
|
|
@@ -41283,22 +41437,29 @@ function createTablePopper(parentNode, trigger, popperContent, popperOptions, to
|
|
|
41283
41437
|
scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper);
|
|
41284
41438
|
return popperInstance;
|
|
41285
41439
|
}
|
|
41440
|
+
function getCurrentColumns(column) {
|
|
41441
|
+
if (column.children) {
|
|
41442
|
+
return flatMap(column.children, getCurrentColumns);
|
|
41443
|
+
} else {
|
|
41444
|
+
return [column];
|
|
41445
|
+
}
|
|
41446
|
+
}
|
|
41447
|
+
function getColSpan(colSpan, column) {
|
|
41448
|
+
return colSpan + column.colSpan;
|
|
41449
|
+
}
|
|
41286
41450
|
const isFixedColumn = (index, fixed, store, realColumns) => {
|
|
41287
41451
|
let start = 0;
|
|
41288
41452
|
let after = index;
|
|
41453
|
+
const columns = store.states.columns.value;
|
|
41289
41454
|
if (realColumns) {
|
|
41290
|
-
|
|
41291
|
-
|
|
41292
|
-
|
|
41293
|
-
|
|
41294
|
-
start += realColumns[i].colSpan;
|
|
41295
|
-
}
|
|
41296
|
-
after = start + realColumns[index].colSpan - 1;
|
|
41455
|
+
const curColumns = getCurrentColumns(realColumns[index]);
|
|
41456
|
+
const preColumns = columns.slice(0, columns.indexOf(curColumns[0]));
|
|
41457
|
+
start = preColumns.reduce(getColSpan, 0);
|
|
41458
|
+
after = start + curColumns.reduce(getColSpan, 0) - 1;
|
|
41297
41459
|
} else {
|
|
41298
41460
|
start = index;
|
|
41299
41461
|
}
|
|
41300
41462
|
let fixedLayout;
|
|
41301
|
-
const columns = store.states.columns;
|
|
41302
41463
|
switch (fixed) {
|
|
41303
41464
|
case "left":
|
|
41304
41465
|
if (after < store.states.fixedLeafColumnsLength.value) {
|
|
@@ -41306,14 +41467,14 @@ const isFixedColumn = (index, fixed, store, realColumns) => {
|
|
|
41306
41467
|
}
|
|
41307
41468
|
break;
|
|
41308
41469
|
case "right":
|
|
41309
|
-
if (start >= columns.
|
|
41470
|
+
if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) {
|
|
41310
41471
|
fixedLayout = "right";
|
|
41311
41472
|
}
|
|
41312
41473
|
break;
|
|
41313
41474
|
default:
|
|
41314
41475
|
if (after < store.states.fixedLeafColumnsLength.value) {
|
|
41315
41476
|
fixedLayout = "left";
|
|
41316
|
-
} else if (start >= columns.
|
|
41477
|
+
} else if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) {
|
|
41317
41478
|
fixedLayout = "right";
|
|
41318
41479
|
}
|
|
41319
41480
|
}
|
|
@@ -41325,11 +41486,11 @@ const isFixedColumn = (index, fixed, store, realColumns) => {
|
|
|
41325
41486
|
};
|
|
41326
41487
|
const getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset = 0) => {
|
|
41327
41488
|
const classes = [];
|
|
41328
|
-
const { direction, start } = isFixedColumn(index, fixed, store, realColumns);
|
|
41489
|
+
const { direction, start, after } = isFixedColumn(index, fixed, store, realColumns);
|
|
41329
41490
|
if (direction) {
|
|
41330
41491
|
const isLeft = direction === "left";
|
|
41331
41492
|
classes.push(`${namespace}-fixed-column--${direction}`);
|
|
41332
|
-
if (isLeft &&
|
|
41493
|
+
if (isLeft && after + offset === store.states.fixedLeafColumnsLength.value - 1) {
|
|
41333
41494
|
classes.push("is-last-column");
|
|
41334
41495
|
} else if (!isLeft && start - offset === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) {
|
|
41335
41496
|
classes.push("is-first-column");
|
|
@@ -41341,7 +41502,11 @@ function getOffset(offset, column) {
|
|
|
41341
41502
|
return offset + (column.realWidth === null || Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth);
|
|
41342
41503
|
}
|
|
41343
41504
|
const getFixedColumnOffset = (index, fixed, store, realColumns) => {
|
|
41344
|
-
const {
|
|
41505
|
+
const {
|
|
41506
|
+
direction,
|
|
41507
|
+
start = 0,
|
|
41508
|
+
after = 0
|
|
41509
|
+
} = isFixedColumn(index, fixed, store, realColumns);
|
|
41345
41510
|
if (!direction) {
|
|
41346
41511
|
return;
|
|
41347
41512
|
}
|
|
@@ -41349,9 +41514,9 @@ const getFixedColumnOffset = (index, fixed, store, realColumns) => {
|
|
|
41349
41514
|
const isLeft = direction === "left";
|
|
41350
41515
|
const columns = store.states.columns.value;
|
|
41351
41516
|
if (isLeft) {
|
|
41352
|
-
styles.left = columns.slice(0,
|
|
41517
|
+
styles.left = columns.slice(0, start).reduce(getOffset, 0);
|
|
41353
41518
|
} else {
|
|
41354
|
-
styles.right = columns.slice(
|
|
41519
|
+
styles.right = columns.slice(after + 1).reverse().reduce(getOffset, 0);
|
|
41355
41520
|
}
|
|
41356
41521
|
return styles;
|
|
41357
41522
|
};
|
|
@@ -41737,7 +41902,17 @@ function useWatcher$1() {
|
|
|
41737
41902
|
if (!rowKey.value)
|
|
41738
41903
|
throw new Error("[ElTable] prop row-key is required");
|
|
41739
41904
|
};
|
|
41905
|
+
const updateChildFixed = (column) => {
|
|
41906
|
+
var _a2;
|
|
41907
|
+
(_a2 = column.children) == null ? void 0 : _a2.forEach((childColumn) => {
|
|
41908
|
+
childColumn.fixed = column.fixed;
|
|
41909
|
+
updateChildFixed(childColumn);
|
|
41910
|
+
});
|
|
41911
|
+
};
|
|
41740
41912
|
const updateColumns = () => {
|
|
41913
|
+
_columns.value.forEach((column) => {
|
|
41914
|
+
updateChildFixed(column);
|
|
41915
|
+
});
|
|
41741
41916
|
fixedColumns.value = _columns.value.filter((column) => column.fixed === true || column.fixed === "left");
|
|
41742
41917
|
rightFixedColumns.value = _columns.value.filter((column) => column.fixed === "right");
|
|
41743
41918
|
if (fixedColumns.value.length > 0 && _columns.value[0] && _columns.value[0].type === "selection" && !_columns.value[0].fixed) {
|
|
@@ -43037,13 +43212,13 @@ function useStyle$2(props) {
|
|
|
43037
43212
|
column
|
|
43038
43213
|
});
|
|
43039
43214
|
}
|
|
43040
|
-
const fixedStyle =
|
|
43215
|
+
const fixedStyle = getFixedColumnOffset(columnIndex, column.fixed, props.store, row);
|
|
43041
43216
|
ensurePosition(fixedStyle, "left");
|
|
43042
43217
|
ensurePosition(fixedStyle, "right");
|
|
43043
43218
|
return Object.assign({}, headerCellStyles, fixedStyle);
|
|
43044
43219
|
};
|
|
43045
43220
|
const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
|
|
43046
|
-
const fixedClasses =
|
|
43221
|
+
const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, column.fixed, props.store, row);
|
|
43047
43222
|
const classes = [
|
|
43048
43223
|
column.id,
|
|
43049
43224
|
column.order,
|
|
@@ -43441,13 +43616,13 @@ function useStyles$1(props) {
|
|
|
43441
43616
|
column
|
|
43442
43617
|
});
|
|
43443
43618
|
}
|
|
43444
|
-
const fixedStyle =
|
|
43619
|
+
const fixedStyle = getFixedColumnOffset(columnIndex, props == null ? void 0 : props.fixed, props.store);
|
|
43445
43620
|
ensurePosition(fixedStyle, "left");
|
|
43446
43621
|
ensurePosition(fixedStyle, "right");
|
|
43447
43622
|
return Object.assign({}, cellStyles, fixedStyle);
|
|
43448
43623
|
};
|
|
43449
43624
|
const getCellClass = (rowIndex, columnIndex, row, column, offset) => {
|
|
43450
|
-
const fixedClasses =
|
|
43625
|
+
const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, props == null ? void 0 : props.fixed, props.store, void 0, offset);
|
|
43451
43626
|
const classes = [column.id, column.align, column.className, ...fixedClasses];
|
|
43452
43627
|
const cellClassName = parent == null ? void 0 : parent.props.cellClassName;
|
|
43453
43628
|
if (typeof cellClassName === "string") {
|
|
@@ -47743,19 +47918,6 @@ const TabNav = defineComponent({
|
|
|
47743
47918
|
}
|
|
47744
47919
|
});
|
|
47745
47920
|
|
|
47746
|
-
const getTabPanes = (vm) => {
|
|
47747
|
-
const nodes = flattedChildren(vm.subTree);
|
|
47748
|
-
return nodes.filter((n) => {
|
|
47749
|
-
var _a;
|
|
47750
|
-
return isVNode(n) && ((_a = n.type) == null ? void 0 : _a.name) === "ElTabPane" && !!n.component;
|
|
47751
|
-
});
|
|
47752
|
-
};
|
|
47753
|
-
const getOrderedPanes = (vm, panes) => {
|
|
47754
|
-
const nodes = getTabPanes(vm);
|
|
47755
|
-
const uids = nodes.map((n) => n.component.uid);
|
|
47756
|
-
return uids.map((uid) => panes[uid]).filter((p) => !!p);
|
|
47757
|
-
};
|
|
47758
|
-
|
|
47759
47921
|
const tabsProps = buildProps({
|
|
47760
47922
|
type: {
|
|
47761
47923
|
type: String,
|
|
@@ -47801,11 +47963,13 @@ var Tabs = defineComponent({
|
|
|
47801
47963
|
expose
|
|
47802
47964
|
}) {
|
|
47803
47965
|
var _a, _b;
|
|
47804
|
-
const vm = getCurrentInstance();
|
|
47805
47966
|
const ns = useNamespace("tabs");
|
|
47967
|
+
const {
|
|
47968
|
+
children: panes,
|
|
47969
|
+
addChild: registerPane,
|
|
47970
|
+
removeChild: unregisterPane
|
|
47971
|
+
} = useOrderedChildren(getCurrentInstance(), "ElTabPane");
|
|
47806
47972
|
const nav$ = ref();
|
|
47807
|
-
const panes = shallowReactive({});
|
|
47808
|
-
const orderedPanes = shallowRef([]);
|
|
47809
47973
|
const currentName = ref((_b = (_a = props.modelValue) != null ? _a : props.activeName) != null ? _b : "0");
|
|
47810
47974
|
const changeCurrentName = (value) => {
|
|
47811
47975
|
currentName.value = value;
|
|
@@ -47857,22 +48021,12 @@ var Tabs = defineComponent({
|
|
|
47857
48021
|
await nextTick();
|
|
47858
48022
|
(_a2 = nav$.value) == null ? void 0 : _a2.scrollToActiveTab();
|
|
47859
48023
|
});
|
|
47860
|
-
{
|
|
47861
|
-
|
|
47862
|
-
|
|
47863
|
-
|
|
47864
|
-
|
|
47865
|
-
|
|
47866
|
-
delete panes[uid];
|
|
47867
|
-
orderedPanes.value = getOrderedPanes(vm, panes);
|
|
47868
|
-
};
|
|
47869
|
-
provide(tabsRootContextKey, {
|
|
47870
|
-
props,
|
|
47871
|
-
currentName,
|
|
47872
|
-
registerPane,
|
|
47873
|
-
unregisterPane
|
|
47874
|
-
});
|
|
47875
|
-
}
|
|
48024
|
+
provide(tabsRootContextKey, {
|
|
48025
|
+
props,
|
|
48026
|
+
currentName,
|
|
48027
|
+
registerPane,
|
|
48028
|
+
unregisterPane
|
|
48029
|
+
});
|
|
47876
48030
|
expose({
|
|
47877
48031
|
currentName
|
|
47878
48032
|
});
|
|
@@ -47897,7 +48051,7 @@ var Tabs = defineComponent({
|
|
|
47897
48051
|
"currentName": currentName.value,
|
|
47898
48052
|
"editable": props.editable,
|
|
47899
48053
|
"type": props.type,
|
|
47900
|
-
"panes":
|
|
48054
|
+
"panes": panes.value,
|
|
47901
48055
|
"stretch": props.stretch,
|
|
47902
48056
|
"onTabClick": handleTabClick,
|
|
47903
48057
|
"onTabRemove": handleTabRemove
|
|
@@ -51943,7 +52097,6 @@ var ElNodeContent = defineComponent({
|
|
|
51943
52097
|
});
|
|
51944
52098
|
|
|
51945
52099
|
const _hoisted_1$6 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick"];
|
|
51946
|
-
const DEFAULT_ICON = "caret-right";
|
|
51947
52100
|
const __default__$7 = defineComponent({
|
|
51948
52101
|
name: "ElTreeNode"
|
|
51949
52102
|
});
|
|
@@ -51961,7 +52114,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
51961
52114
|
});
|
|
51962
52115
|
const icon = computed$1(() => {
|
|
51963
52116
|
var _a;
|
|
51964
|
-
return (_a = tree == null ? void 0 : tree.props.icon) != null ? _a :
|
|
52117
|
+
return (_a = tree == null ? void 0 : tree.props.icon) != null ? _a : caret_right_default;
|
|
51965
52118
|
});
|
|
51966
52119
|
const handleClick = (e) => {
|
|
51967
52120
|
emit("click", props.node, e);
|
|
@@ -52841,6 +52994,8 @@ const useHandlers = (props, uploadRef) => {
|
|
|
52841
52994
|
props.onChange(file, uploadFiles.value);
|
|
52842
52995
|
};
|
|
52843
52996
|
const handleStart = (file) => {
|
|
52997
|
+
if (isNil(file.uid))
|
|
52998
|
+
file.uid = genFileId();
|
|
52844
52999
|
const uploadFile = {
|
|
52845
53000
|
name: file.name,
|
|
52846
53001
|
percentage: 0,
|