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.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Element Plus v2.2.
|
|
1
|
+
/*! Element Plus v2.2.21 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -7185,6 +7185,27 @@
|
|
|
7185
7185
|
_global[globalKey] = _global[globalKey] || {};
|
|
7186
7186
|
_global[globalKey];
|
|
7187
7187
|
|
|
7188
|
+
function useCssVar(prop, target, { window = defaultWindow, initialValue = "" } = {}) {
|
|
7189
|
+
const variable = vue.ref(initialValue);
|
|
7190
|
+
const elRef = vue.computed(() => {
|
|
7191
|
+
var _a;
|
|
7192
|
+
return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
|
|
7193
|
+
});
|
|
7194
|
+
vue.watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {
|
|
7195
|
+
var _a;
|
|
7196
|
+
if (el && window) {
|
|
7197
|
+
const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();
|
|
7198
|
+
variable.value = value || initialValue;
|
|
7199
|
+
}
|
|
7200
|
+
}, { immediate: true });
|
|
7201
|
+
vue.watch(variable, (val) => {
|
|
7202
|
+
var _a;
|
|
7203
|
+
if ((_a = elRef.value) == null ? void 0 : _a.style)
|
|
7204
|
+
elRef.value.style.setProperty(resolveUnref(prop), val);
|
|
7205
|
+
});
|
|
7206
|
+
return variable;
|
|
7207
|
+
}
|
|
7208
|
+
|
|
7188
7209
|
function useDocumentVisibility({ document = defaultDocument } = {}) {
|
|
7189
7210
|
if (!document)
|
|
7190
7211
|
return vue.ref("visible");
|
|
@@ -7522,6 +7543,12 @@
|
|
|
7522
7543
|
const isPropAbsent = (prop) => {
|
|
7523
7544
|
return isNil(prop);
|
|
7524
7545
|
};
|
|
7546
|
+
const isStringNumber = (val) => {
|
|
7547
|
+
if (!isString(val)) {
|
|
7548
|
+
return false;
|
|
7549
|
+
}
|
|
7550
|
+
return !Number.isNaN(Number(val));
|
|
7551
|
+
};
|
|
7525
7552
|
|
|
7526
7553
|
const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
7527
7554
|
const capitalize = (str) => capitalize$1(str);
|
|
@@ -7589,10 +7616,10 @@
|
|
|
7589
7616
|
function addUnit(value, defaultUnit = "px") {
|
|
7590
7617
|
if (!value)
|
|
7591
7618
|
return "";
|
|
7592
|
-
if (
|
|
7593
|
-
return value;
|
|
7594
|
-
} else if (isNumber(value)) {
|
|
7619
|
+
if (isNumber(value) || isStringNumber(value)) {
|
|
7595
7620
|
return `${value}${defaultUnit}`;
|
|
7621
|
+
} else if (isString(value)) {
|
|
7622
|
+
return value;
|
|
7596
7623
|
}
|
|
7597
7624
|
}
|
|
7598
7625
|
|
|
@@ -8695,12 +8722,16 @@
|
|
|
8695
8722
|
const vNodes = isArray(children) ? children : [children];
|
|
8696
8723
|
const result = [];
|
|
8697
8724
|
vNodes.forEach((child) => {
|
|
8725
|
+
var _a;
|
|
8698
8726
|
if (isArray(child)) {
|
|
8699
8727
|
result.push(...flattedChildren(child));
|
|
8700
8728
|
} else if (vue.isVNode(child) && isArray(child.children)) {
|
|
8701
8729
|
result.push(...flattedChildren(child.children));
|
|
8702
8730
|
} else {
|
|
8703
8731
|
result.push(child);
|
|
8732
|
+
if (vue.isVNode(child) && ((_a = child.component) == null ? void 0 : _a.subTree)) {
|
|
8733
|
+
result.push(...flattedChildren(child.component.subTree));
|
|
8734
|
+
}
|
|
8704
8735
|
}
|
|
8705
8736
|
});
|
|
8706
8737
|
return result;
|
|
@@ -11072,7 +11103,7 @@
|
|
|
11072
11103
|
};
|
|
11073
11104
|
};
|
|
11074
11105
|
|
|
11075
|
-
const version$1 = "2.2.
|
|
11106
|
+
const version$1 = "2.2.21";
|
|
11076
11107
|
|
|
11077
11108
|
const makeInstaller = (components = []) => {
|
|
11078
11109
|
const install = (app, options) => {
|
|
@@ -11121,9 +11152,9 @@
|
|
|
11121
11152
|
return target;
|
|
11122
11153
|
};
|
|
11123
11154
|
|
|
11124
|
-
const COMPONENT_NAME$
|
|
11155
|
+
const COMPONENT_NAME$l = "ElAffix";
|
|
11125
11156
|
const __default__$1w = vue.defineComponent({
|
|
11126
|
-
name: COMPONENT_NAME$
|
|
11157
|
+
name: COMPONENT_NAME$l
|
|
11127
11158
|
});
|
|
11128
11159
|
const _sfc_main$2f = /* @__PURE__ */ vue.defineComponent({
|
|
11129
11160
|
...__default__$1w,
|
|
@@ -11156,7 +11187,7 @@
|
|
|
11156
11187
|
const affixStyle = vue.computed(() => {
|
|
11157
11188
|
if (!fixed.value)
|
|
11158
11189
|
return {};
|
|
11159
|
-
const offset = props.offset ?
|
|
11190
|
+
const offset = props.offset ? addUnit(props.offset) : 0;
|
|
11160
11191
|
return {
|
|
11161
11192
|
height: `${rootHeight.value}px`,
|
|
11162
11193
|
width: `${rootWidth.value}px`,
|
|
@@ -11199,7 +11230,7 @@
|
|
|
11199
11230
|
if (props.target) {
|
|
11200
11231
|
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
11201
11232
|
if (!target.value)
|
|
11202
|
-
throwError(COMPONENT_NAME$
|
|
11233
|
+
throwError(COMPONENT_NAME$l, `Target is not existed: ${props.target}`);
|
|
11203
11234
|
} else {
|
|
11204
11235
|
target.value = document.documentElement;
|
|
11205
11236
|
}
|
|
@@ -11580,7 +11611,7 @@
|
|
|
11580
11611
|
|
|
11581
11612
|
const _hoisted_1$13 = ["role"];
|
|
11582
11613
|
const _hoisted_2$G = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"];
|
|
11583
|
-
const _hoisted_3$
|
|
11614
|
+
const _hoisted_3$k = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"];
|
|
11584
11615
|
const __default__$1t = vue.defineComponent({
|
|
11585
11616
|
name: "ElInput",
|
|
11586
11617
|
inheritAttrs: false
|
|
@@ -11971,7 +12002,7 @@
|
|
|
11971
12002
|
onBlur: handleBlur,
|
|
11972
12003
|
onChange: handleChange,
|
|
11973
12004
|
onKeydown: handleKeydown
|
|
11974
|
-
}), null, 16, _hoisted_3$
|
|
12005
|
+
}), null, 16, _hoisted_3$k),
|
|
11975
12006
|
vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
11976
12007
|
key: 0,
|
|
11977
12008
|
style: vue.normalizeStyle(countStyle.value),
|
|
@@ -12031,7 +12062,7 @@
|
|
|
12031
12062
|
always: Boolean
|
|
12032
12063
|
});
|
|
12033
12064
|
|
|
12034
|
-
const COMPONENT_NAME$
|
|
12065
|
+
const COMPONENT_NAME$k = "Thumb";
|
|
12035
12066
|
const _sfc_main$2b = /* @__PURE__ */ vue.defineComponent({
|
|
12036
12067
|
__name: "thumb",
|
|
12037
12068
|
props: thumbProps,
|
|
@@ -12040,7 +12071,7 @@
|
|
|
12040
12071
|
const scrollbar = vue.inject(scrollbarContextKey);
|
|
12041
12072
|
const ns = useNamespace("scrollbar");
|
|
12042
12073
|
if (!scrollbar)
|
|
12043
|
-
throwError(COMPONENT_NAME$
|
|
12074
|
+
throwError(COMPONENT_NAME$k, "can not inject scrollbar context");
|
|
12044
12075
|
const instance = vue.ref();
|
|
12045
12076
|
const thumb = vue.ref();
|
|
12046
12077
|
const thumbState = vue.ref({});
|
|
@@ -12761,6 +12792,10 @@
|
|
|
12761
12792
|
element.focus({ preventScroll: true });
|
|
12762
12793
|
lastAutomatedFocusTimestamp.value = window.performance.now();
|
|
12763
12794
|
if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) {
|
|
12795
|
+
if (element.tagName === "INPUT") {
|
|
12796
|
+
element.setSelectionRange(element.value.length, element.value.length);
|
|
12797
|
+
return;
|
|
12798
|
+
}
|
|
12764
12799
|
element.select();
|
|
12765
12800
|
}
|
|
12766
12801
|
}
|
|
@@ -13225,8 +13260,7 @@
|
|
|
13225
13260
|
{
|
|
13226
13261
|
name: "computeStyles",
|
|
13227
13262
|
options: {
|
|
13228
|
-
gpuAcceleration
|
|
13229
|
-
adaptive: gpuAcceleration
|
|
13263
|
+
gpuAcceleration
|
|
13230
13264
|
}
|
|
13231
13265
|
}
|
|
13232
13266
|
];
|
|
@@ -13502,13 +13536,6 @@
|
|
|
13502
13536
|
...useTooltipContentProps,
|
|
13503
13537
|
...useTooltipTriggerProps,
|
|
13504
13538
|
...popperArrowProps,
|
|
13505
|
-
openDelay: {
|
|
13506
|
-
type: Number
|
|
13507
|
-
},
|
|
13508
|
-
visibleArrow: {
|
|
13509
|
-
type: Boolean,
|
|
13510
|
-
default: void 0
|
|
13511
|
-
},
|
|
13512
13539
|
showArrow: {
|
|
13513
13540
|
type: Boolean,
|
|
13514
13541
|
default: true
|
|
@@ -13771,14 +13798,6 @@
|
|
|
13771
13798
|
setup(__props, { expose, emit }) {
|
|
13772
13799
|
const props = __props;
|
|
13773
13800
|
usePopperContainer();
|
|
13774
|
-
const compatShowAfter = vue.computed(() => {
|
|
13775
|
-
if (!isUndefined(props.openDelay)) ;
|
|
13776
|
-
return props.openDelay || props.showAfter;
|
|
13777
|
-
});
|
|
13778
|
-
const compatShowArrow = vue.computed(() => {
|
|
13779
|
-
if (!isUndefined(props.visibleArrow)) ;
|
|
13780
|
-
return isBoolean(props.visibleArrow) ? props.visibleArrow : props.showArrow;
|
|
13781
|
-
});
|
|
13782
13801
|
const id = useId();
|
|
13783
13802
|
const popperRef = vue.ref();
|
|
13784
13803
|
const contentRef = vue.ref();
|
|
@@ -13796,7 +13815,7 @@
|
|
|
13796
13815
|
toggleReason
|
|
13797
13816
|
});
|
|
13798
13817
|
const { onOpen, onClose } = useDelayedToggle({
|
|
13799
|
-
showAfter:
|
|
13818
|
+
showAfter: vue.toRef(props, "showAfter"),
|
|
13800
13819
|
hideAfter: vue.toRef(props, "hideAfter"),
|
|
13801
13820
|
open: show,
|
|
13802
13821
|
close: hide
|
|
@@ -13895,7 +13914,7 @@
|
|
|
13895
13914
|
"raw-content": _ctx.rawContent,
|
|
13896
13915
|
"reference-el": _ctx.referenceEl,
|
|
13897
13916
|
"trigger-target-el": _ctx.triggerTargetEl,
|
|
13898
|
-
"show-after":
|
|
13917
|
+
"show-after": _ctx.showAfter,
|
|
13899
13918
|
strategy: _ctx.strategy,
|
|
13900
13919
|
teleported: _ctx.teleported,
|
|
13901
13920
|
transition: _ctx.transition,
|
|
@@ -13910,7 +13929,7 @@
|
|
|
13910
13929
|
innerHTML: _ctx.content
|
|
13911
13930
|
}, null, 8, _hoisted_1$12)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$F, vue.toDisplayString(_ctx.content), 1))
|
|
13912
13931
|
]),
|
|
13913
|
-
|
|
13932
|
+
_ctx.showArrow ? (vue.openBlock(), vue.createBlock(vue.unref(ElPopperArrow), {
|
|
13914
13933
|
key: 0,
|
|
13915
13934
|
"arrow-offset": _ctx.arrowOffset
|
|
13916
13935
|
}, null, 8, ["arrow-offset"])) : vue.createCommentVNode("v-if", true)
|
|
@@ -13997,10 +14016,10 @@
|
|
|
13997
14016
|
|
|
13998
14017
|
const _hoisted_1$11 = ["aria-expanded", "aria-owns"];
|
|
13999
14018
|
const _hoisted_2$E = { key: 0 };
|
|
14000
|
-
const _hoisted_3$
|
|
14001
|
-
const COMPONENT_NAME$
|
|
14019
|
+
const _hoisted_3$j = ["id", "aria-selected", "onClick"];
|
|
14020
|
+
const COMPONENT_NAME$j = "ElAutocomplete";
|
|
14002
14021
|
const __default__$1k = vue.defineComponent({
|
|
14003
|
-
name: COMPONENT_NAME$
|
|
14022
|
+
name: COMPONENT_NAME$j,
|
|
14004
14023
|
inheritAttrs: false
|
|
14005
14024
|
});
|
|
14006
14025
|
const _sfc_main$20 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -14062,7 +14081,7 @@
|
|
|
14062
14081
|
suggestions.value = suggestionList;
|
|
14063
14082
|
highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
|
|
14064
14083
|
} else {
|
|
14065
|
-
throwError(COMPONENT_NAME$
|
|
14084
|
+
throwError(COMPONENT_NAME$j, "autocomplete suggestions must be an array");
|
|
14066
14085
|
}
|
|
14067
14086
|
};
|
|
14068
14087
|
loading.value = true;
|
|
@@ -14260,7 +14279,7 @@
|
|
|
14260
14279
|
vue.renderSlot(_ctx.$slots, "default", { item }, () => [
|
|
14261
14280
|
vue.createTextVNode(vue.toDisplayString(item[_ctx.valueKey]), 1)
|
|
14262
14281
|
])
|
|
14263
|
-
], 10, _hoisted_3$
|
|
14282
|
+
], 10, _hoisted_3$j);
|
|
14264
14283
|
}), 128))
|
|
14265
14284
|
]),
|
|
14266
14285
|
_: 3
|
|
@@ -14498,9 +14517,9 @@
|
|
|
14498
14517
|
};
|
|
14499
14518
|
};
|
|
14500
14519
|
|
|
14501
|
-
const COMPONENT_NAME$
|
|
14520
|
+
const COMPONENT_NAME$i = "ElBacktop";
|
|
14502
14521
|
const __default__$1i = vue.defineComponent({
|
|
14503
|
-
name: COMPONENT_NAME$
|
|
14522
|
+
name: COMPONENT_NAME$i
|
|
14504
14523
|
});
|
|
14505
14524
|
const _sfc_main$1_ = /* @__PURE__ */ vue.defineComponent({
|
|
14506
14525
|
...__default__$1i,
|
|
@@ -14509,7 +14528,7 @@
|
|
|
14509
14528
|
setup(__props, { emit }) {
|
|
14510
14529
|
const props = __props;
|
|
14511
14530
|
const ns = useNamespace("backtop");
|
|
14512
|
-
const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME$
|
|
14531
|
+
const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME$i);
|
|
14513
14532
|
const backTopStyle = vue.computed(() => ({
|
|
14514
14533
|
right: `${props.right}px`,
|
|
14515
14534
|
bottom: `${props.bottom}px`
|
|
@@ -18390,9 +18409,32 @@
|
|
|
18390
18409
|
});
|
|
18391
18410
|
var DateTable$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["__file", "date-table.vue"]]);
|
|
18392
18411
|
|
|
18412
|
+
const adjacentMonth = (start, end) => {
|
|
18413
|
+
const firstMonthLastDay = start.endOf("month");
|
|
18414
|
+
const lastMonthFirstDay = end.startOf("month");
|
|
18415
|
+
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
|
|
18416
|
+
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18417
|
+
return [
|
|
18418
|
+
[start, firstMonthLastDay],
|
|
18419
|
+
[lastMonthStartDay.startOf("week"), end]
|
|
18420
|
+
];
|
|
18421
|
+
};
|
|
18422
|
+
const threeConsecutiveMonth = (start, end) => {
|
|
18423
|
+
const firstMonthLastDay = start.endOf("month");
|
|
18424
|
+
const secondMonthFirstDay = start.add(1, "month").startOf("month");
|
|
18425
|
+
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
|
|
18426
|
+
const secondMonthLastDay = secondMonthStartDay.endOf("month");
|
|
18427
|
+
const lastMonthFirstDay = end.startOf("month");
|
|
18428
|
+
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18429
|
+
return [
|
|
18430
|
+
[start, firstMonthLastDay],
|
|
18431
|
+
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
|
|
18432
|
+
[lastMonthStartDay.startOf("week"), end]
|
|
18433
|
+
];
|
|
18434
|
+
};
|
|
18393
18435
|
const useCalendar = (props, emit, componentName) => {
|
|
18394
|
-
const
|
|
18395
|
-
const {
|
|
18436
|
+
const slots = vue.useSlots();
|
|
18437
|
+
const { lang } = useLocale();
|
|
18396
18438
|
const selectedDay = vue.ref();
|
|
18397
18439
|
const now = dayjs().locale(lang.value);
|
|
18398
18440
|
const realSelectedDay = vue.computed({
|
|
@@ -18429,12 +18471,7 @@
|
|
|
18429
18471
|
});
|
|
18430
18472
|
const date = vue.computed(() => {
|
|
18431
18473
|
if (!props.modelValue) {
|
|
18432
|
-
|
|
18433
|
-
return realSelectedDay.value;
|
|
18434
|
-
} else if (validatedRange.value.length) {
|
|
18435
|
-
return validatedRange.value[0][0];
|
|
18436
|
-
}
|
|
18437
|
-
return now;
|
|
18474
|
+
return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now);
|
|
18438
18475
|
} else {
|
|
18439
18476
|
return dayjs(props.modelValue).locale(lang.value);
|
|
18440
18477
|
}
|
|
@@ -18443,10 +18480,6 @@
|
|
|
18443
18480
|
const nextMonthDayjs = vue.computed(() => date.value.add(1, "month").date(1));
|
|
18444
18481
|
const prevYearDayjs = vue.computed(() => date.value.subtract(1, "year").date(1));
|
|
18445
18482
|
const nextYearDayjs = vue.computed(() => date.value.add(1, "year").date(1));
|
|
18446
|
-
const i18nDate = vue.computed(() => {
|
|
18447
|
-
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
18448
|
-
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
18449
|
-
});
|
|
18450
18483
|
const calculateValidatedDateRange = (startDayjs, endDayjs) => {
|
|
18451
18484
|
const firstDay = startDayjs.startOf("week");
|
|
18452
18485
|
const lastDay = endDayjs.endOf("week");
|
|
@@ -18454,27 +18487,10 @@
|
|
|
18454
18487
|
const lastMonth = lastDay.get("month");
|
|
18455
18488
|
if (firstMonth === lastMonth) {
|
|
18456
18489
|
return [[firstDay, lastDay]];
|
|
18457
|
-
} else if (firstMonth + 1 === lastMonth) {
|
|
18458
|
-
|
|
18459
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
18460
|
-
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
|
|
18461
|
-
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18462
|
-
return [
|
|
18463
|
-
[firstDay, firstMonthLastDay],
|
|
18464
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
18465
|
-
];
|
|
18490
|
+
} else if ((firstMonth + 1) % 12 === lastMonth) {
|
|
18491
|
+
return adjacentMonth(firstDay, lastDay);
|
|
18466
18492
|
} else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) {
|
|
18467
|
-
|
|
18468
|
-
const secondMonthFirstDay = firstDay.add(1, "month").startOf("month");
|
|
18469
|
-
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
|
|
18470
|
-
const secondMonthLastDay = secondMonthStartDay.endOf("month");
|
|
18471
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
18472
|
-
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
18473
|
-
return [
|
|
18474
|
-
[firstDay, firstMonthLastDay],
|
|
18475
|
-
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
|
|
18476
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
18477
|
-
];
|
|
18493
|
+
return threeConsecutiveMonth(firstDay, lastDay);
|
|
18478
18494
|
} else {
|
|
18479
18495
|
return [];
|
|
18480
18496
|
}
|
|
@@ -18502,16 +18518,14 @@
|
|
|
18502
18518
|
version: "2.3.0",
|
|
18503
18519
|
ref: "https://element-plus.org/en-US/component/calendar.html#slots",
|
|
18504
18520
|
type: "Slot"
|
|
18505
|
-
}, vue.computed(() => !!
|
|
18521
|
+
}, vue.computed(() => !!slots.dateCell));
|
|
18506
18522
|
return {
|
|
18507
18523
|
calculateValidatedDateRange,
|
|
18508
18524
|
date,
|
|
18509
18525
|
realSelectedDay,
|
|
18510
18526
|
pickDay,
|
|
18511
18527
|
selectDate,
|
|
18512
|
-
validatedRange
|
|
18513
|
-
t,
|
|
18514
|
-
i18nDate
|
|
18528
|
+
validatedRange
|
|
18515
18529
|
};
|
|
18516
18530
|
};
|
|
18517
18531
|
|
|
@@ -18530,9 +18544,9 @@
|
|
|
18530
18544
|
[INPUT_EVENT]: (value) => isDate(value)
|
|
18531
18545
|
};
|
|
18532
18546
|
|
|
18533
|
-
const COMPONENT_NAME$
|
|
18547
|
+
const COMPONENT_NAME$h = "ElCalendar";
|
|
18534
18548
|
const __default__$1a = vue.defineComponent({
|
|
18535
|
-
name: COMPONENT_NAME$
|
|
18549
|
+
name: COMPONENT_NAME$h
|
|
18536
18550
|
});
|
|
18537
18551
|
const _sfc_main$1P = /* @__PURE__ */ vue.defineComponent({
|
|
18538
18552
|
...__default__$1a,
|
|
@@ -18547,10 +18561,13 @@
|
|
|
18547
18561
|
pickDay,
|
|
18548
18562
|
realSelectedDay,
|
|
18549
18563
|
selectDate,
|
|
18550
|
-
t,
|
|
18551
|
-
i18nDate,
|
|
18552
18564
|
validatedRange
|
|
18553
18565
|
} = useCalendar(props, emit);
|
|
18566
|
+
const { t } = useLocale();
|
|
18567
|
+
const i18nDate = vue.computed(() => {
|
|
18568
|
+
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
18569
|
+
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
18570
|
+
});
|
|
18554
18571
|
expose({
|
|
18555
18572
|
selectedDay: realSelectedDay,
|
|
18556
18573
|
pickDay,
|
|
@@ -18762,12 +18779,208 @@
|
|
|
18762
18779
|
change: (current, prev) => [current, prev].every(isNumber)
|
|
18763
18780
|
};
|
|
18764
18781
|
|
|
18765
|
-
const _hoisted_1$V = ["onMouseenter", "onMouseleave"];
|
|
18766
|
-
const _hoisted_2$A = ["onMouseenter", "onClick"];
|
|
18767
|
-
const _hoisted_3$j = { key: 0 };
|
|
18768
18782
|
const THROTTLE_TIME = 300;
|
|
18783
|
+
const useCarousel = (props, emit, componentName) => {
|
|
18784
|
+
const {
|
|
18785
|
+
children: items,
|
|
18786
|
+
addChild: addItem,
|
|
18787
|
+
removeChild: removeItem
|
|
18788
|
+
} = useOrderedChildren(vue.getCurrentInstance(), "ElCarouselItem");
|
|
18789
|
+
const activeIndex = vue.ref(-1);
|
|
18790
|
+
const timer = vue.ref(null);
|
|
18791
|
+
const hover = vue.ref(false);
|
|
18792
|
+
const root = vue.ref();
|
|
18793
|
+
const arrowDisplay = vue.computed(() => props.arrow !== "never" && !vue.unref(isVertical));
|
|
18794
|
+
const hasLabel = vue.computed(() => {
|
|
18795
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
18796
|
+
});
|
|
18797
|
+
const isCardType = vue.computed(() => props.type === "card");
|
|
18798
|
+
const isVertical = vue.computed(() => props.direction === "vertical");
|
|
18799
|
+
const throttledArrowClick = throttle((index) => {
|
|
18800
|
+
setActiveItem(index);
|
|
18801
|
+
}, THROTTLE_TIME, { trailing: true });
|
|
18802
|
+
const throttledIndicatorHover = throttle((index) => {
|
|
18803
|
+
handleIndicatorHover(index);
|
|
18804
|
+
}, THROTTLE_TIME);
|
|
18805
|
+
function pauseTimer() {
|
|
18806
|
+
if (timer.value) {
|
|
18807
|
+
clearInterval(timer.value);
|
|
18808
|
+
timer.value = null;
|
|
18809
|
+
}
|
|
18810
|
+
}
|
|
18811
|
+
function startTimer() {
|
|
18812
|
+
if (props.interval <= 0 || !props.autoplay || timer.value)
|
|
18813
|
+
return;
|
|
18814
|
+
timer.value = setInterval(() => playSlides(), props.interval);
|
|
18815
|
+
}
|
|
18816
|
+
const playSlides = () => {
|
|
18817
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
18818
|
+
activeIndex.value = activeIndex.value + 1;
|
|
18819
|
+
} else if (props.loop) {
|
|
18820
|
+
activeIndex.value = 0;
|
|
18821
|
+
}
|
|
18822
|
+
};
|
|
18823
|
+
function setActiveItem(index) {
|
|
18824
|
+
if (isString(index)) {
|
|
18825
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
18826
|
+
if (filteredItems.length > 0) {
|
|
18827
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
18828
|
+
}
|
|
18829
|
+
}
|
|
18830
|
+
index = Number(index);
|
|
18831
|
+
if (Number.isNaN(index) || index !== Math.floor(index)) {
|
|
18832
|
+
return;
|
|
18833
|
+
}
|
|
18834
|
+
const itemCount = items.value.length;
|
|
18835
|
+
const oldIndex = activeIndex.value;
|
|
18836
|
+
if (index < 0) {
|
|
18837
|
+
activeIndex.value = props.loop ? itemCount - 1 : 0;
|
|
18838
|
+
} else if (index >= itemCount) {
|
|
18839
|
+
activeIndex.value = props.loop ? 0 : itemCount - 1;
|
|
18840
|
+
} else {
|
|
18841
|
+
activeIndex.value = index;
|
|
18842
|
+
}
|
|
18843
|
+
if (oldIndex === activeIndex.value) {
|
|
18844
|
+
resetItemPosition(oldIndex);
|
|
18845
|
+
}
|
|
18846
|
+
resetTimer();
|
|
18847
|
+
}
|
|
18848
|
+
function resetItemPosition(oldIndex) {
|
|
18849
|
+
items.value.forEach((item, index) => {
|
|
18850
|
+
item.translateItem(index, activeIndex.value, oldIndex);
|
|
18851
|
+
});
|
|
18852
|
+
}
|
|
18853
|
+
function itemInStage(item, index) {
|
|
18854
|
+
var _a, _b, _c, _d;
|
|
18855
|
+
const _items = vue.unref(items);
|
|
18856
|
+
const itemCount = _items.length;
|
|
18857
|
+
if (itemCount === 0 || !item.states.inStage)
|
|
18858
|
+
return false;
|
|
18859
|
+
const nextItemIndex = index + 1;
|
|
18860
|
+
const prevItemIndex = index - 1;
|
|
18861
|
+
const lastItemIndex = itemCount - 1;
|
|
18862
|
+
const isLastItemActive = _items[lastItemIndex].states.active;
|
|
18863
|
+
const isFirstItemActive = _items[0].states.active;
|
|
18864
|
+
const isNextItemActive = (_b = (_a = _items[nextItemIndex]) == null ? void 0 : _a.states) == null ? void 0 : _b.active;
|
|
18865
|
+
const isPrevItemActive = (_d = (_c = _items[prevItemIndex]) == null ? void 0 : _c.states) == null ? void 0 : _d.active;
|
|
18866
|
+
if (index === lastItemIndex && isFirstItemActive || isNextItemActive) {
|
|
18867
|
+
return "left";
|
|
18868
|
+
} else if (index === 0 && isLastItemActive || isPrevItemActive) {
|
|
18869
|
+
return "right";
|
|
18870
|
+
}
|
|
18871
|
+
return false;
|
|
18872
|
+
}
|
|
18873
|
+
function handleMouseEnter() {
|
|
18874
|
+
hover.value = true;
|
|
18875
|
+
if (props.pauseOnHover) {
|
|
18876
|
+
pauseTimer();
|
|
18877
|
+
}
|
|
18878
|
+
}
|
|
18879
|
+
function handleMouseLeave() {
|
|
18880
|
+
hover.value = false;
|
|
18881
|
+
startTimer();
|
|
18882
|
+
}
|
|
18883
|
+
function handleButtonEnter(arrow) {
|
|
18884
|
+
if (vue.unref(isVertical))
|
|
18885
|
+
return;
|
|
18886
|
+
items.value.forEach((item, index) => {
|
|
18887
|
+
if (arrow === itemInStage(item, index)) {
|
|
18888
|
+
item.states.hover = true;
|
|
18889
|
+
}
|
|
18890
|
+
});
|
|
18891
|
+
}
|
|
18892
|
+
function handleButtonLeave() {
|
|
18893
|
+
if (vue.unref(isVertical))
|
|
18894
|
+
return;
|
|
18895
|
+
items.value.forEach((item) => {
|
|
18896
|
+
item.states.hover = false;
|
|
18897
|
+
});
|
|
18898
|
+
}
|
|
18899
|
+
function handleIndicatorClick(index) {
|
|
18900
|
+
activeIndex.value = index;
|
|
18901
|
+
}
|
|
18902
|
+
function handleIndicatorHover(index) {
|
|
18903
|
+
if (props.trigger === "hover" && index !== activeIndex.value) {
|
|
18904
|
+
activeIndex.value = index;
|
|
18905
|
+
}
|
|
18906
|
+
}
|
|
18907
|
+
function prev() {
|
|
18908
|
+
setActiveItem(activeIndex.value - 1);
|
|
18909
|
+
}
|
|
18910
|
+
function next() {
|
|
18911
|
+
setActiveItem(activeIndex.value + 1);
|
|
18912
|
+
}
|
|
18913
|
+
function resetTimer() {
|
|
18914
|
+
pauseTimer();
|
|
18915
|
+
startTimer();
|
|
18916
|
+
}
|
|
18917
|
+
vue.watch(() => activeIndex.value, (current, prev2) => {
|
|
18918
|
+
resetItemPosition(prev2);
|
|
18919
|
+
if (prev2 > -1) {
|
|
18920
|
+
emit("change", current, prev2);
|
|
18921
|
+
}
|
|
18922
|
+
});
|
|
18923
|
+
vue.watch(() => props.autoplay, (autoplay) => {
|
|
18924
|
+
autoplay ? startTimer() : pauseTimer();
|
|
18925
|
+
});
|
|
18926
|
+
vue.watch(() => props.loop, () => {
|
|
18927
|
+
setActiveItem(activeIndex.value);
|
|
18928
|
+
});
|
|
18929
|
+
vue.watch(() => props.interval, () => {
|
|
18930
|
+
resetTimer();
|
|
18931
|
+
});
|
|
18932
|
+
vue.watch(() => items.value, () => {
|
|
18933
|
+
if (items.value.length > 0)
|
|
18934
|
+
setActiveItem(props.initialIndex);
|
|
18935
|
+
});
|
|
18936
|
+
const resizeObserver = vue.shallowRef();
|
|
18937
|
+
vue.onMounted(() => {
|
|
18938
|
+
resizeObserver.value = useResizeObserver(root.value, () => {
|
|
18939
|
+
resetItemPosition();
|
|
18940
|
+
});
|
|
18941
|
+
startTimer();
|
|
18942
|
+
});
|
|
18943
|
+
vue.onBeforeUnmount(() => {
|
|
18944
|
+
pauseTimer();
|
|
18945
|
+
if (root.value && resizeObserver.value)
|
|
18946
|
+
resizeObserver.value.stop();
|
|
18947
|
+
});
|
|
18948
|
+
vue.provide(carouselContextKey, {
|
|
18949
|
+
root,
|
|
18950
|
+
isCardType,
|
|
18951
|
+
isVertical,
|
|
18952
|
+
items,
|
|
18953
|
+
loop: props.loop,
|
|
18954
|
+
addItem,
|
|
18955
|
+
removeItem,
|
|
18956
|
+
setActiveItem
|
|
18957
|
+
});
|
|
18958
|
+
return {
|
|
18959
|
+
root,
|
|
18960
|
+
activeIndex,
|
|
18961
|
+
arrowDisplay,
|
|
18962
|
+
hasLabel,
|
|
18963
|
+
hover,
|
|
18964
|
+
isCardType,
|
|
18965
|
+
items,
|
|
18966
|
+
handleButtonEnter,
|
|
18967
|
+
handleButtonLeave,
|
|
18968
|
+
handleIndicatorClick,
|
|
18969
|
+
handleMouseEnter,
|
|
18970
|
+
handleMouseLeave,
|
|
18971
|
+
setActiveItem,
|
|
18972
|
+
prev,
|
|
18973
|
+
next,
|
|
18974
|
+
throttledArrowClick,
|
|
18975
|
+
throttledIndicatorHover
|
|
18976
|
+
};
|
|
18977
|
+
};
|
|
18978
|
+
|
|
18979
|
+
const _hoisted_1$V = ["onMouseenter", "onClick"];
|
|
18980
|
+
const _hoisted_2$A = { key: 0 };
|
|
18981
|
+
const COMPONENT_NAME$g = "ElCarousel";
|
|
18769
18982
|
const __default__$18 = vue.defineComponent({
|
|
18770
|
-
name:
|
|
18983
|
+
name: COMPONENT_NAME$g
|
|
18771
18984
|
});
|
|
18772
18985
|
const _sfc_main$1N = /* @__PURE__ */ vue.defineComponent({
|
|
18773
18986
|
...__default__$18,
|
|
@@ -18775,20 +18988,26 @@
|
|
|
18775
18988
|
emits: carouselEmits,
|
|
18776
18989
|
setup(__props, { expose, emit }) {
|
|
18777
18990
|
const props = __props;
|
|
18778
|
-
const ns = useNamespace("carousel");
|
|
18779
18991
|
const {
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18992
|
+
root,
|
|
18993
|
+
activeIndex,
|
|
18994
|
+
arrowDisplay,
|
|
18995
|
+
hasLabel,
|
|
18996
|
+
hover,
|
|
18997
|
+
isCardType,
|
|
18998
|
+
items,
|
|
18999
|
+
handleButtonEnter,
|
|
19000
|
+
handleButtonLeave,
|
|
19001
|
+
handleIndicatorClick,
|
|
19002
|
+
handleMouseEnter,
|
|
19003
|
+
handleMouseLeave,
|
|
19004
|
+
setActiveItem,
|
|
19005
|
+
prev,
|
|
19006
|
+
next,
|
|
19007
|
+
throttledArrowClick,
|
|
19008
|
+
throttledIndicatorHover
|
|
19009
|
+
} = useCarousel(props, emit);
|
|
19010
|
+
const ns = useNamespace("carousel");
|
|
18792
19011
|
const carouselClasses = vue.computed(() => {
|
|
18793
19012
|
const classes = [ns.b(), ns.m(props.direction)];
|
|
18794
19013
|
if (vue.unref(isCardType)) {
|
|
@@ -18798,7 +19017,7 @@
|
|
|
18798
19017
|
});
|
|
18799
19018
|
const indicatorsClasses = vue.computed(() => {
|
|
18800
19019
|
const classes = [ns.e("indicators"), ns.em("indicators", props.direction)];
|
|
18801
|
-
if (hasLabel
|
|
19020
|
+
if (vue.unref(hasLabel)) {
|
|
18802
19021
|
classes.push(ns.em("indicators", "labels"));
|
|
18803
19022
|
}
|
|
18804
19023
|
if (props.indicatorPosition === "outside" || vue.unref(isCardType)) {
|
|
@@ -18806,167 +19025,6 @@
|
|
|
18806
19025
|
}
|
|
18807
19026
|
return classes;
|
|
18808
19027
|
});
|
|
18809
|
-
const isCardType = vue.computed(() => props.type === "card");
|
|
18810
|
-
const isVertical = vue.computed(() => props.direction === "vertical");
|
|
18811
|
-
const throttledArrowClick = throttle((index) => {
|
|
18812
|
-
setActiveItem(index);
|
|
18813
|
-
}, THROTTLE_TIME, { trailing: true });
|
|
18814
|
-
const throttledIndicatorHover = throttle((index) => {
|
|
18815
|
-
handleIndicatorHover(index);
|
|
18816
|
-
}, THROTTLE_TIME);
|
|
18817
|
-
function pauseTimer() {
|
|
18818
|
-
if (timer.value) {
|
|
18819
|
-
clearInterval(timer.value);
|
|
18820
|
-
timer.value = null;
|
|
18821
|
-
}
|
|
18822
|
-
}
|
|
18823
|
-
function startTimer() {
|
|
18824
|
-
if (props.interval <= 0 || !props.autoplay || timer.value)
|
|
18825
|
-
return;
|
|
18826
|
-
timer.value = setInterval(() => playSlides(), props.interval);
|
|
18827
|
-
}
|
|
18828
|
-
const playSlides = () => {
|
|
18829
|
-
if (activeIndex.value < items.value.length - 1) {
|
|
18830
|
-
activeIndex.value = activeIndex.value + 1;
|
|
18831
|
-
} else if (props.loop) {
|
|
18832
|
-
activeIndex.value = 0;
|
|
18833
|
-
}
|
|
18834
|
-
};
|
|
18835
|
-
function setActiveItem(index) {
|
|
18836
|
-
if (isString(index)) {
|
|
18837
|
-
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
18838
|
-
if (filteredItems.length > 0) {
|
|
18839
|
-
index = items.value.indexOf(filteredItems[0]);
|
|
18840
|
-
}
|
|
18841
|
-
}
|
|
18842
|
-
index = Number(index);
|
|
18843
|
-
if (Number.isNaN(index) || index !== Math.floor(index)) {
|
|
18844
|
-
return;
|
|
18845
|
-
}
|
|
18846
|
-
const itemCount = items.value.length;
|
|
18847
|
-
const oldIndex = activeIndex.value;
|
|
18848
|
-
if (index < 0) {
|
|
18849
|
-
activeIndex.value = props.loop ? itemCount - 1 : 0;
|
|
18850
|
-
} else if (index >= itemCount) {
|
|
18851
|
-
activeIndex.value = props.loop ? 0 : itemCount - 1;
|
|
18852
|
-
} else {
|
|
18853
|
-
activeIndex.value = index;
|
|
18854
|
-
}
|
|
18855
|
-
if (oldIndex === activeIndex.value) {
|
|
18856
|
-
resetItemPosition(oldIndex);
|
|
18857
|
-
}
|
|
18858
|
-
resetTimer();
|
|
18859
|
-
}
|
|
18860
|
-
function resetItemPosition(oldIndex) {
|
|
18861
|
-
items.value.forEach((item, index) => {
|
|
18862
|
-
item.translateItem(index, activeIndex.value, oldIndex);
|
|
18863
|
-
});
|
|
18864
|
-
}
|
|
18865
|
-
function itemInStage(item, index) {
|
|
18866
|
-
var _a, _b, _c, _d;
|
|
18867
|
-
const _items = vue.unref(items);
|
|
18868
|
-
const itemCount = _items.length;
|
|
18869
|
-
if (itemCount === 0 || !item.states.inStage)
|
|
18870
|
-
return false;
|
|
18871
|
-
const nextItemIndex = index + 1;
|
|
18872
|
-
const prevItemIndex = index - 1;
|
|
18873
|
-
const lastItemIndex = itemCount - 1;
|
|
18874
|
-
const isLastItemActive = _items[lastItemIndex].states.active;
|
|
18875
|
-
const isFirstItemActive = _items[0].states.active;
|
|
18876
|
-
const isNextItemActive = (_b = (_a = _items[nextItemIndex]) == null ? void 0 : _a.states) == null ? void 0 : _b.active;
|
|
18877
|
-
const isPrevItemActive = (_d = (_c = _items[prevItemIndex]) == null ? void 0 : _c.states) == null ? void 0 : _d.active;
|
|
18878
|
-
if (index === lastItemIndex && isFirstItemActive || isNextItemActive) {
|
|
18879
|
-
return "left";
|
|
18880
|
-
} else if (index === 0 && isLastItemActive || isPrevItemActive) {
|
|
18881
|
-
return "right";
|
|
18882
|
-
}
|
|
18883
|
-
return false;
|
|
18884
|
-
}
|
|
18885
|
-
function handleMouseEnter() {
|
|
18886
|
-
hover.value = true;
|
|
18887
|
-
if (props.pauseOnHover) {
|
|
18888
|
-
pauseTimer();
|
|
18889
|
-
}
|
|
18890
|
-
}
|
|
18891
|
-
function handleMouseLeave() {
|
|
18892
|
-
hover.value = false;
|
|
18893
|
-
startTimer();
|
|
18894
|
-
}
|
|
18895
|
-
function handleButtonEnter(arrow) {
|
|
18896
|
-
if (vue.unref(isVertical))
|
|
18897
|
-
return;
|
|
18898
|
-
items.value.forEach((item, index) => {
|
|
18899
|
-
if (arrow === itemInStage(item, index)) {
|
|
18900
|
-
item.states.hover = true;
|
|
18901
|
-
}
|
|
18902
|
-
});
|
|
18903
|
-
}
|
|
18904
|
-
function handleButtonLeave() {
|
|
18905
|
-
if (vue.unref(isVertical))
|
|
18906
|
-
return;
|
|
18907
|
-
items.value.forEach((item) => {
|
|
18908
|
-
item.states.hover = false;
|
|
18909
|
-
});
|
|
18910
|
-
}
|
|
18911
|
-
function handleIndicatorClick(index) {
|
|
18912
|
-
activeIndex.value = index;
|
|
18913
|
-
}
|
|
18914
|
-
function handleIndicatorHover(index) {
|
|
18915
|
-
if (props.trigger === "hover" && index !== activeIndex.value) {
|
|
18916
|
-
activeIndex.value = index;
|
|
18917
|
-
}
|
|
18918
|
-
}
|
|
18919
|
-
function prev() {
|
|
18920
|
-
setActiveItem(activeIndex.value - 1);
|
|
18921
|
-
}
|
|
18922
|
-
function next() {
|
|
18923
|
-
setActiveItem(activeIndex.value + 1);
|
|
18924
|
-
}
|
|
18925
|
-
function resetTimer() {
|
|
18926
|
-
pauseTimer();
|
|
18927
|
-
startTimer();
|
|
18928
|
-
}
|
|
18929
|
-
vue.watch(() => activeIndex.value, (current, prev2) => {
|
|
18930
|
-
resetItemPosition(prev2);
|
|
18931
|
-
if (prev2 > -1) {
|
|
18932
|
-
emit("change", current, prev2);
|
|
18933
|
-
}
|
|
18934
|
-
});
|
|
18935
|
-
vue.watch(() => props.autoplay, (autoplay) => {
|
|
18936
|
-
autoplay ? startTimer() : pauseTimer();
|
|
18937
|
-
});
|
|
18938
|
-
vue.watch(() => props.loop, () => {
|
|
18939
|
-
setActiveItem(activeIndex.value);
|
|
18940
|
-
});
|
|
18941
|
-
vue.watch(() => props.interval, () => {
|
|
18942
|
-
resetTimer();
|
|
18943
|
-
});
|
|
18944
|
-
vue.watch(() => items.value, () => {
|
|
18945
|
-
if (items.value.length > 0)
|
|
18946
|
-
setActiveItem(props.initialIndex);
|
|
18947
|
-
});
|
|
18948
|
-
const resizeObserver = vue.shallowRef();
|
|
18949
|
-
vue.onMounted(() => {
|
|
18950
|
-
resizeObserver.value = useResizeObserver(root.value, () => {
|
|
18951
|
-
resetItemPosition();
|
|
18952
|
-
});
|
|
18953
|
-
startTimer();
|
|
18954
|
-
});
|
|
18955
|
-
vue.onBeforeUnmount(() => {
|
|
18956
|
-
pauseTimer();
|
|
18957
|
-
if (root.value && resizeObserver.value)
|
|
18958
|
-
resizeObserver.value.stop();
|
|
18959
|
-
});
|
|
18960
|
-
vue.provide(carouselContextKey, {
|
|
18961
|
-
root,
|
|
18962
|
-
isCardType,
|
|
18963
|
-
isVertical,
|
|
18964
|
-
items,
|
|
18965
|
-
loop: props.loop,
|
|
18966
|
-
addItem,
|
|
18967
|
-
removeItem,
|
|
18968
|
-
setActiveItem
|
|
18969
|
-
});
|
|
18970
19028
|
expose({
|
|
18971
19029
|
setActiveItem,
|
|
18972
19030
|
prev,
|
|
@@ -18977,8 +19035,8 @@
|
|
|
18977
19035
|
ref_key: "root",
|
|
18978
19036
|
ref: root,
|
|
18979
19037
|
class: vue.normalizeClass(vue.unref(carouselClasses)),
|
|
18980
|
-
onMouseenter: vue.withModifiers(handleMouseEnter, ["stop"]),
|
|
18981
|
-
onMouseleave: vue.withModifiers(handleMouseLeave, ["stop"])
|
|
19038
|
+
onMouseenter: _cache[6] || (_cache[6] = vue.withModifiers((...args) => vue.unref(handleMouseEnter) && vue.unref(handleMouseEnter)(...args), ["stop"])),
|
|
19039
|
+
onMouseleave: _cache[7] || (_cache[7] = vue.withModifiers((...args) => vue.unref(handleMouseLeave) && vue.unref(handleMouseLeave)(...args), ["stop"]))
|
|
18982
19040
|
}, [
|
|
18983
19041
|
vue.createElementVNode("div", {
|
|
18984
19042
|
class: vue.normalizeClass(vue.unref(ns).e("container")),
|
|
@@ -18993,9 +19051,9 @@
|
|
|
18993
19051
|
vue.withDirectives(vue.createElementVNode("button", {
|
|
18994
19052
|
type: "button",
|
|
18995
19053
|
class: vue.normalizeClass([vue.unref(ns).e("arrow"), vue.unref(ns).em("arrow", "left")]),
|
|
18996
|
-
onMouseenter: _cache[0] || (_cache[0] = ($event) => handleButtonEnter("left")),
|
|
18997
|
-
onMouseleave: handleButtonLeave,
|
|
18998
|
-
onClick: _cache[
|
|
19054
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => vue.unref(handleButtonEnter)("left")),
|
|
19055
|
+
onMouseleave: _cache[1] || (_cache[1] = (...args) => vue.unref(handleButtonLeave) && vue.unref(handleButtonLeave)(...args)),
|
|
19056
|
+
onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => vue.unref(throttledArrowClick)(vue.unref(activeIndex) - 1), ["stop"]))
|
|
18999
19057
|
}, [
|
|
19000
19058
|
vue.createVNode(vue.unref(ElIcon), null, {
|
|
19001
19059
|
default: vue.withCtx(() => [
|
|
@@ -19006,7 +19064,7 @@
|
|
|
19006
19064
|
], 34), [
|
|
19007
19065
|
[
|
|
19008
19066
|
vue.vShow,
|
|
19009
|
-
(_ctx.arrow === "always" || hover
|
|
19067
|
+
(_ctx.arrow === "always" || vue.unref(hover)) && (props.loop || vue.unref(activeIndex) > 0)
|
|
19010
19068
|
]
|
|
19011
19069
|
])
|
|
19012
19070
|
]),
|
|
@@ -19021,9 +19079,9 @@
|
|
|
19021
19079
|
vue.withDirectives(vue.createElementVNode("button", {
|
|
19022
19080
|
type: "button",
|
|
19023
19081
|
class: vue.normalizeClass([vue.unref(ns).e("arrow"), vue.unref(ns).em("arrow", "right")]),
|
|
19024
|
-
onMouseenter: _cache[
|
|
19025
|
-
onMouseleave: handleButtonLeave,
|
|
19026
|
-
onClick: _cache[
|
|
19082
|
+
onMouseenter: _cache[3] || (_cache[3] = ($event) => vue.unref(handleButtonEnter)("right")),
|
|
19083
|
+
onMouseleave: _cache[4] || (_cache[4] = (...args) => vue.unref(handleButtonLeave) && vue.unref(handleButtonLeave)(...args)),
|
|
19084
|
+
onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => vue.unref(throttledArrowClick)(vue.unref(activeIndex) + 1), ["stop"]))
|
|
19027
19085
|
}, [
|
|
19028
19086
|
vue.createVNode(vue.unref(ElIcon), null, {
|
|
19029
19087
|
default: vue.withCtx(() => [
|
|
@@ -19034,7 +19092,7 @@
|
|
|
19034
19092
|
], 34), [
|
|
19035
19093
|
[
|
|
19036
19094
|
vue.vShow,
|
|
19037
|
-
(_ctx.arrow === "always" || hover
|
|
19095
|
+
(_ctx.arrow === "always" || vue.unref(hover)) && (props.loop || vue.unref(activeIndex) < vue.unref(items).length - 1)
|
|
19038
19096
|
]
|
|
19039
19097
|
])
|
|
19040
19098
|
]),
|
|
@@ -19052,20 +19110,20 @@
|
|
|
19052
19110
|
class: vue.normalizeClass([
|
|
19053
19111
|
vue.unref(ns).e("indicator"),
|
|
19054
19112
|
vue.unref(ns).em("indicator", _ctx.direction),
|
|
19055
|
-
vue.unref(ns).is("active", index === activeIndex
|
|
19113
|
+
vue.unref(ns).is("active", index === vue.unref(activeIndex))
|
|
19056
19114
|
]),
|
|
19057
19115
|
onMouseenter: ($event) => vue.unref(throttledIndicatorHover)(index),
|
|
19058
|
-
onClick: vue.withModifiers(($event) => handleIndicatorClick(index), ["stop"])
|
|
19116
|
+
onClick: vue.withModifiers(($event) => vue.unref(handleIndicatorClick)(index), ["stop"])
|
|
19059
19117
|
}, [
|
|
19060
19118
|
vue.createElementVNode("button", {
|
|
19061
19119
|
class: vue.normalizeClass(vue.unref(ns).e("button"))
|
|
19062
19120
|
}, [
|
|
19063
|
-
vue.unref(hasLabel) ? (vue.openBlock(), vue.createElementBlock("span",
|
|
19121
|
+
vue.unref(hasLabel) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$A, vue.toDisplayString(item.props.label), 1)) : vue.createCommentVNode("v-if", true)
|
|
19064
19122
|
], 2)
|
|
19065
|
-
], 42,
|
|
19123
|
+
], 42, _hoisted_1$V);
|
|
19066
19124
|
}), 128))
|
|
19067
19125
|
], 2)) : vue.createCommentVNode("v-if", true)
|
|
19068
|
-
],
|
|
19126
|
+
], 34);
|
|
19069
19127
|
};
|
|
19070
19128
|
}
|
|
19071
19129
|
});
|
|
@@ -19079,7 +19137,113 @@
|
|
|
19079
19137
|
}
|
|
19080
19138
|
});
|
|
19081
19139
|
|
|
19082
|
-
const
|
|
19140
|
+
const useCarouselItem = (props, componentName) => {
|
|
19141
|
+
const carouselContext = vue.inject(carouselContextKey);
|
|
19142
|
+
const instance = vue.getCurrentInstance();
|
|
19143
|
+
const CARD_SCALE = 0.83;
|
|
19144
|
+
const hover = vue.ref(false);
|
|
19145
|
+
const translate = vue.ref(0);
|
|
19146
|
+
const scale = vue.ref(1);
|
|
19147
|
+
const active = vue.ref(false);
|
|
19148
|
+
const ready = vue.ref(false);
|
|
19149
|
+
const inStage = vue.ref(false);
|
|
19150
|
+
const animating = vue.ref(false);
|
|
19151
|
+
const { isCardType, isVertical } = carouselContext;
|
|
19152
|
+
function processIndex(index, activeIndex, length) {
|
|
19153
|
+
const lastItemIndex = length - 1;
|
|
19154
|
+
const prevItemIndex = activeIndex - 1;
|
|
19155
|
+
const nextItemIndex = activeIndex + 1;
|
|
19156
|
+
const halfItemIndex = length / 2;
|
|
19157
|
+
if (activeIndex === 0 && index === lastItemIndex) {
|
|
19158
|
+
return -1;
|
|
19159
|
+
} else if (activeIndex === lastItemIndex && index === 0) {
|
|
19160
|
+
return length;
|
|
19161
|
+
} else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {
|
|
19162
|
+
return length + 1;
|
|
19163
|
+
} else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {
|
|
19164
|
+
return -2;
|
|
19165
|
+
}
|
|
19166
|
+
return index;
|
|
19167
|
+
}
|
|
19168
|
+
function calcCardTranslate(index, activeIndex) {
|
|
19169
|
+
var _a;
|
|
19170
|
+
const parentWidth = ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetWidth) || 0;
|
|
19171
|
+
if (inStage.value) {
|
|
19172
|
+
return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
|
|
19173
|
+
} else if (index < activeIndex) {
|
|
19174
|
+
return -(1 + CARD_SCALE) * parentWidth / 4;
|
|
19175
|
+
} else {
|
|
19176
|
+
return (3 + CARD_SCALE) * parentWidth / 4;
|
|
19177
|
+
}
|
|
19178
|
+
}
|
|
19179
|
+
function calcTranslate(index, activeIndex, isVertical2) {
|
|
19180
|
+
const rootEl = carouselContext.root.value;
|
|
19181
|
+
if (!rootEl)
|
|
19182
|
+
return 0;
|
|
19183
|
+
const distance = (isVertical2 ? rootEl.offsetHeight : rootEl.offsetWidth) || 0;
|
|
19184
|
+
return distance * (index - activeIndex);
|
|
19185
|
+
}
|
|
19186
|
+
const translateItem = (index, activeIndex, oldIndex) => {
|
|
19187
|
+
var _a;
|
|
19188
|
+
const _isCardType = vue.unref(isCardType);
|
|
19189
|
+
const carouselItemLength = (_a = carouselContext.items.value.length) != null ? _a : Number.NaN;
|
|
19190
|
+
const isActive = index === activeIndex;
|
|
19191
|
+
if (!_isCardType && !isUndefined(oldIndex)) {
|
|
19192
|
+
animating.value = isActive || index === oldIndex;
|
|
19193
|
+
}
|
|
19194
|
+
if (!isActive && carouselItemLength > 2 && carouselContext.loop) {
|
|
19195
|
+
index = processIndex(index, activeIndex, carouselItemLength);
|
|
19196
|
+
}
|
|
19197
|
+
const _isVertical = vue.unref(isVertical);
|
|
19198
|
+
active.value = isActive;
|
|
19199
|
+
if (_isCardType) {
|
|
19200
|
+
inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
19201
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
19202
|
+
scale.value = vue.unref(active) ? 1 : CARD_SCALE;
|
|
19203
|
+
} else {
|
|
19204
|
+
translate.value = calcTranslate(index, activeIndex, _isVertical);
|
|
19205
|
+
}
|
|
19206
|
+
ready.value = true;
|
|
19207
|
+
};
|
|
19208
|
+
function handleItemClick() {
|
|
19209
|
+
if (carouselContext && vue.unref(isCardType)) {
|
|
19210
|
+
const index = carouselContext.items.value.findIndex(({ uid }) => uid === instance.uid);
|
|
19211
|
+
carouselContext.setActiveItem(index);
|
|
19212
|
+
}
|
|
19213
|
+
}
|
|
19214
|
+
vue.onMounted(() => {
|
|
19215
|
+
carouselContext.addItem({
|
|
19216
|
+
props,
|
|
19217
|
+
states: vue.reactive({
|
|
19218
|
+
hover,
|
|
19219
|
+
translate,
|
|
19220
|
+
scale,
|
|
19221
|
+
active,
|
|
19222
|
+
ready,
|
|
19223
|
+
inStage,
|
|
19224
|
+
animating
|
|
19225
|
+
}),
|
|
19226
|
+
uid: instance.uid,
|
|
19227
|
+
translateItem
|
|
19228
|
+
});
|
|
19229
|
+
});
|
|
19230
|
+
vue.onUnmounted(() => {
|
|
19231
|
+
carouselContext.removeItem(instance.uid);
|
|
19232
|
+
});
|
|
19233
|
+
return {
|
|
19234
|
+
active,
|
|
19235
|
+
animating,
|
|
19236
|
+
hover,
|
|
19237
|
+
inStage,
|
|
19238
|
+
isVertical,
|
|
19239
|
+
translate,
|
|
19240
|
+
isCardType,
|
|
19241
|
+
scale,
|
|
19242
|
+
ready,
|
|
19243
|
+
handleItemClick
|
|
19244
|
+
};
|
|
19245
|
+
};
|
|
19246
|
+
|
|
19083
19247
|
const __default__$17 = vue.defineComponent({
|
|
19084
19248
|
name: "ElCarouselItem"
|
|
19085
19249
|
});
|
|
@@ -19089,16 +19253,18 @@
|
|
|
19089
19253
|
setup(__props) {
|
|
19090
19254
|
const props = __props;
|
|
19091
19255
|
const ns = useNamespace("carousel");
|
|
19092
|
-
const
|
|
19093
|
-
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19256
|
+
const {
|
|
19257
|
+
active,
|
|
19258
|
+
animating,
|
|
19259
|
+
hover,
|
|
19260
|
+
inStage,
|
|
19261
|
+
isVertical,
|
|
19262
|
+
translate,
|
|
19263
|
+
isCardType,
|
|
19264
|
+
scale,
|
|
19265
|
+
ready,
|
|
19266
|
+
handleItemClick
|
|
19267
|
+
} = useCarouselItem(props);
|
|
19102
19268
|
const itemStyle = vue.computed(() => {
|
|
19103
19269
|
const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
|
|
19104
19270
|
const _translate = `${translateType}(${vue.unref(translate)}px)`;
|
|
@@ -19108,109 +19274,28 @@
|
|
|
19108
19274
|
transform
|
|
19109
19275
|
};
|
|
19110
19276
|
});
|
|
19111
|
-
function processIndex(index, activeIndex, length) {
|
|
19112
|
-
const lastItemIndex = length - 1;
|
|
19113
|
-
const prevItemIndex = activeIndex - 1;
|
|
19114
|
-
const nextItemIndex = activeIndex + 1;
|
|
19115
|
-
const halfItemIndex = length / 2;
|
|
19116
|
-
if (activeIndex === 0 && index === lastItemIndex) {
|
|
19117
|
-
return -1;
|
|
19118
|
-
} else if (activeIndex === lastItemIndex && index === 0) {
|
|
19119
|
-
return length;
|
|
19120
|
-
} else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {
|
|
19121
|
-
return length + 1;
|
|
19122
|
-
} else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {
|
|
19123
|
-
return -2;
|
|
19124
|
-
}
|
|
19125
|
-
return index;
|
|
19126
|
-
}
|
|
19127
|
-
function calcCardTranslate(index, activeIndex) {
|
|
19128
|
-
var _a;
|
|
19129
|
-
const parentWidth = ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetWidth) || 0;
|
|
19130
|
-
if (inStage.value) {
|
|
19131
|
-
return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
|
|
19132
|
-
} else if (index < activeIndex) {
|
|
19133
|
-
return -(1 + CARD_SCALE) * parentWidth / 4;
|
|
19134
|
-
} else {
|
|
19135
|
-
return (3 + CARD_SCALE) * parentWidth / 4;
|
|
19136
|
-
}
|
|
19137
|
-
}
|
|
19138
|
-
function calcTranslate(index, activeIndex, isVertical2) {
|
|
19139
|
-
const rootEl = carouselContext.root.value;
|
|
19140
|
-
if (!rootEl)
|
|
19141
|
-
return 0;
|
|
19142
|
-
const distance = (isVertical2 ? rootEl.offsetHeight : rootEl.offsetWidth) || 0;
|
|
19143
|
-
return distance * (index - activeIndex);
|
|
19144
|
-
}
|
|
19145
|
-
const translateItem = (index, activeIndex, oldIndex) => {
|
|
19146
|
-
var _a;
|
|
19147
|
-
const _isCardType = vue.unref(isCardType);
|
|
19148
|
-
const carouselItemLength = (_a = carouselContext.items.value.length) != null ? _a : Number.NaN;
|
|
19149
|
-
const isActive = index === activeIndex;
|
|
19150
|
-
if (!_isCardType && !isUndefined(oldIndex)) {
|
|
19151
|
-
animating.value = isActive || index === oldIndex;
|
|
19152
|
-
}
|
|
19153
|
-
if (!isActive && carouselItemLength > 2 && carouselContext.loop) {
|
|
19154
|
-
index = processIndex(index, activeIndex, carouselItemLength);
|
|
19155
|
-
}
|
|
19156
|
-
const _isVertical = vue.unref(isVertical);
|
|
19157
|
-
active.value = isActive;
|
|
19158
|
-
if (_isCardType) {
|
|
19159
|
-
inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
19160
|
-
translate.value = calcCardTranslate(index, activeIndex);
|
|
19161
|
-
scale.value = vue.unref(active) ? 1 : CARD_SCALE;
|
|
19162
|
-
} else {
|
|
19163
|
-
translate.value = calcTranslate(index, activeIndex, _isVertical);
|
|
19164
|
-
}
|
|
19165
|
-
ready.value = true;
|
|
19166
|
-
};
|
|
19167
|
-
function handleItemClick() {
|
|
19168
|
-
if (carouselContext && vue.unref(isCardType)) {
|
|
19169
|
-
const index = carouselContext.items.value.findIndex(({ uid }) => uid === instance.uid);
|
|
19170
|
-
carouselContext.setActiveItem(index);
|
|
19171
|
-
}
|
|
19172
|
-
}
|
|
19173
|
-
vue.onMounted(() => {
|
|
19174
|
-
carouselContext.addItem({
|
|
19175
|
-
props,
|
|
19176
|
-
states: vue.reactive({
|
|
19177
|
-
hover,
|
|
19178
|
-
translate,
|
|
19179
|
-
scale,
|
|
19180
|
-
active,
|
|
19181
|
-
ready,
|
|
19182
|
-
inStage,
|
|
19183
|
-
animating
|
|
19184
|
-
}),
|
|
19185
|
-
uid: instance.uid,
|
|
19186
|
-
translateItem
|
|
19187
|
-
});
|
|
19188
|
-
});
|
|
19189
|
-
vue.onUnmounted(() => {
|
|
19190
|
-
carouselContext.removeItem(instance.uid);
|
|
19191
|
-
});
|
|
19192
19277
|
return (_ctx, _cache) => {
|
|
19193
19278
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
19194
19279
|
class: vue.normalizeClass([
|
|
19195
19280
|
vue.unref(ns).e("item"),
|
|
19196
|
-
vue.unref(ns).is("active", active
|
|
19197
|
-
vue.unref(ns).is("in-stage", inStage
|
|
19198
|
-
vue.unref(ns).is("hover", hover
|
|
19199
|
-
vue.unref(ns).is("animating", animating
|
|
19281
|
+
vue.unref(ns).is("active", vue.unref(active)),
|
|
19282
|
+
vue.unref(ns).is("in-stage", vue.unref(inStage)),
|
|
19283
|
+
vue.unref(ns).is("hover", vue.unref(hover)),
|
|
19284
|
+
vue.unref(ns).is("animating", vue.unref(animating)),
|
|
19200
19285
|
{ [vue.unref(ns).em("item", "card")]: vue.unref(isCardType) }
|
|
19201
19286
|
]),
|
|
19202
19287
|
style: vue.normalizeStyle(vue.unref(itemStyle)),
|
|
19203
|
-
onClick: handleItemClick
|
|
19288
|
+
onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleItemClick) && vue.unref(handleItemClick)(...args))
|
|
19204
19289
|
}, [
|
|
19205
19290
|
vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
19206
19291
|
key: 0,
|
|
19207
19292
|
class: vue.normalizeClass(vue.unref(ns).e("mask"))
|
|
19208
19293
|
}, null, 2)), [
|
|
19209
|
-
[vue.vShow, !active
|
|
19294
|
+
[vue.vShow, !vue.unref(active)]
|
|
19210
19295
|
]) : vue.createCommentVNode("v-if", true),
|
|
19211
19296
|
vue.renderSlot(_ctx.$slots, "default")
|
|
19212
19297
|
], 6)), [
|
|
19213
|
-
[vue.vShow, ready
|
|
19298
|
+
[vue.vShow, vue.unref(ready)]
|
|
19214
19299
|
]);
|
|
19215
19300
|
};
|
|
19216
19301
|
}
|
|
@@ -19369,7 +19454,11 @@
|
|
|
19369
19454
|
if (isBoolean(value)) {
|
|
19370
19455
|
return value;
|
|
19371
19456
|
} else if (isArray(value)) {
|
|
19372
|
-
|
|
19457
|
+
if (isObject$1(props.label)) {
|
|
19458
|
+
return value.map(vue.toRaw).some((o) => isEqual$1(o, props.label));
|
|
19459
|
+
} else {
|
|
19460
|
+
return value.map(vue.toRaw).includes(props.label);
|
|
19461
|
+
}
|
|
19373
19462
|
} else if (value !== null && value !== void 0) {
|
|
19374
19463
|
return value === props.trueLabel;
|
|
19375
19464
|
} else {
|
|
@@ -21000,12 +21089,6 @@
|
|
|
21000
21089
|
|
|
21001
21090
|
const ElTag = withInstall(Tag);
|
|
21002
21091
|
|
|
21003
|
-
const DEFAULT_INPUT_HEIGHT = 40;
|
|
21004
|
-
const INPUT_HEIGHT_MAP = {
|
|
21005
|
-
large: 36,
|
|
21006
|
-
default: 32,
|
|
21007
|
-
small: 28
|
|
21008
|
-
};
|
|
21009
21092
|
const popperOptions = {
|
|
21010
21093
|
modifiers: [
|
|
21011
21094
|
{
|
|
@@ -21119,6 +21202,7 @@
|
|
|
21119
21202
|
const isOnComposition = vue.ref(false);
|
|
21120
21203
|
const isDisabled = vue.computed(() => props.disabled || (form == null ? void 0 : form.disabled));
|
|
21121
21204
|
const inputPlaceholder = vue.computed(() => props.placeholder || t("el.cascader.placeholder"));
|
|
21205
|
+
const currentPlaceholder = vue.computed(() => searchInputValue.value || presentTags.value.length > 0 ? "" : inputPlaceholder.value);
|
|
21122
21206
|
const realSize = useSize();
|
|
21123
21207
|
const tagSize = vue.computed(() => ["small"].includes(realSize.value) ? "small" : "default");
|
|
21124
21208
|
const multiple = vue.computed(() => !!props.props.multiple);
|
|
@@ -21136,7 +21220,7 @@
|
|
|
21136
21220
|
const presentText = vue.computed(() => {
|
|
21137
21221
|
const { showAllLevels, separator } = props;
|
|
21138
21222
|
const nodes = checkedNodes.value;
|
|
21139
|
-
return nodes.length ? multiple.value ? "
|
|
21223
|
+
return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
|
|
21140
21224
|
});
|
|
21141
21225
|
const checkedValue = vue.computed({
|
|
21142
21226
|
get() {
|
|
@@ -21397,10 +21481,10 @@
|
|
|
21397
21481
|
});
|
|
21398
21482
|
vue.watch(presentText, syncPresentTextValue, { immediate: true });
|
|
21399
21483
|
vue.onMounted(() => {
|
|
21400
|
-
|
|
21401
|
-
const
|
|
21402
|
-
inputInitialHeight =
|
|
21403
|
-
useResizeObserver(
|
|
21484
|
+
const inputInner = input.value.input;
|
|
21485
|
+
const inputInnerHeight = Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
|
|
21486
|
+
inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
|
|
21487
|
+
useResizeObserver(inputInner, updateStyle);
|
|
21404
21488
|
});
|
|
21405
21489
|
return {
|
|
21406
21490
|
popperOptions,
|
|
@@ -21413,6 +21497,7 @@
|
|
|
21413
21497
|
popperVisible,
|
|
21414
21498
|
inputHover,
|
|
21415
21499
|
inputPlaceholder,
|
|
21500
|
+
currentPlaceholder,
|
|
21416
21501
|
filtering,
|
|
21417
21502
|
presentText,
|
|
21418
21503
|
checkedValue,
|
|
@@ -21502,7 +21587,7 @@
|
|
|
21502
21587
|
ref: "input",
|
|
21503
21588
|
modelValue: _ctx.inputValue,
|
|
21504
21589
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.inputValue = $event),
|
|
21505
|
-
placeholder: _ctx.
|
|
21590
|
+
placeholder: _ctx.currentPlaceholder,
|
|
21506
21591
|
readonly: _ctx.readonly,
|
|
21507
21592
|
disabled: _ctx.isDisabled,
|
|
21508
21593
|
"validate-event": false,
|
|
@@ -21843,6 +21928,46 @@
|
|
|
21843
21928
|
[CHANGE_EVENT]: emitChangeFn
|
|
21844
21929
|
};
|
|
21845
21930
|
|
|
21931
|
+
const useCollapse = (props, emit) => {
|
|
21932
|
+
const activeNames = vue.ref(castArray$1(props.modelValue));
|
|
21933
|
+
const setActiveNames = (_activeNames) => {
|
|
21934
|
+
activeNames.value = _activeNames;
|
|
21935
|
+
const value = props.accordion ? activeNames.value[0] : activeNames.value;
|
|
21936
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
21937
|
+
emit(CHANGE_EVENT, value);
|
|
21938
|
+
};
|
|
21939
|
+
const handleItemClick = (name) => {
|
|
21940
|
+
if (props.accordion) {
|
|
21941
|
+
setActiveNames([activeNames.value[0] === name ? "" : name]);
|
|
21942
|
+
} else {
|
|
21943
|
+
const _activeNames = [...activeNames.value];
|
|
21944
|
+
const index = _activeNames.indexOf(name);
|
|
21945
|
+
if (index > -1) {
|
|
21946
|
+
_activeNames.splice(index, 1);
|
|
21947
|
+
} else {
|
|
21948
|
+
_activeNames.push(name);
|
|
21949
|
+
}
|
|
21950
|
+
setActiveNames(_activeNames);
|
|
21951
|
+
}
|
|
21952
|
+
};
|
|
21953
|
+
vue.watch(() => props.modelValue, () => activeNames.value = castArray$1(props.modelValue), { deep: true });
|
|
21954
|
+
vue.provide(collapseContextKey, {
|
|
21955
|
+
activeNames,
|
|
21956
|
+
handleItemClick
|
|
21957
|
+
});
|
|
21958
|
+
return {
|
|
21959
|
+
activeNames,
|
|
21960
|
+
setActiveNames
|
|
21961
|
+
};
|
|
21962
|
+
};
|
|
21963
|
+
const useCollapseDOM = () => {
|
|
21964
|
+
const ns = useNamespace("collapse");
|
|
21965
|
+
const rootKls = vue.computed(() => ns.b());
|
|
21966
|
+
return {
|
|
21967
|
+
rootKls
|
|
21968
|
+
};
|
|
21969
|
+
};
|
|
21970
|
+
|
|
21846
21971
|
const __default__$Z = vue.defineComponent({
|
|
21847
21972
|
name: "ElCollapse"
|
|
21848
21973
|
});
|
|
@@ -21852,42 +21977,15 @@
|
|
|
21852
21977
|
emits: collapseEmits,
|
|
21853
21978
|
setup(__props, { expose, emit }) {
|
|
21854
21979
|
const props = __props;
|
|
21855
|
-
const
|
|
21856
|
-
const
|
|
21857
|
-
const setActiveNames = (_activeNames) => {
|
|
21858
|
-
activeNames.value = _activeNames;
|
|
21859
|
-
const value = props.accordion ? activeNames.value[0] : activeNames.value;
|
|
21860
|
-
emit(UPDATE_MODEL_EVENT, value);
|
|
21861
|
-
emit(CHANGE_EVENT, value);
|
|
21862
|
-
};
|
|
21863
|
-
const handleItemClick = (name) => {
|
|
21864
|
-
if (props.accordion) {
|
|
21865
|
-
setActiveNames([
|
|
21866
|
-
(activeNames.value[0] || activeNames.value[0] === 0) && activeNames.value[0] === name ? "" : name
|
|
21867
|
-
]);
|
|
21868
|
-
} else {
|
|
21869
|
-
const _activeNames = [...activeNames.value];
|
|
21870
|
-
const index = _activeNames.indexOf(name);
|
|
21871
|
-
if (index > -1) {
|
|
21872
|
-
_activeNames.splice(index, 1);
|
|
21873
|
-
} else {
|
|
21874
|
-
_activeNames.push(name);
|
|
21875
|
-
}
|
|
21876
|
-
setActiveNames(_activeNames);
|
|
21877
|
-
}
|
|
21878
|
-
};
|
|
21879
|
-
vue.watch(() => props.modelValue, () => activeNames.value = castArray$1(props.modelValue), { deep: true });
|
|
21880
|
-
vue.provide(collapseContextKey, {
|
|
21881
|
-
activeNames,
|
|
21882
|
-
handleItemClick
|
|
21883
|
-
});
|
|
21980
|
+
const { activeNames, setActiveNames } = useCollapse(props, emit);
|
|
21981
|
+
const { rootKls } = useCollapseDOM();
|
|
21884
21982
|
expose({
|
|
21885
21983
|
activeNames,
|
|
21886
21984
|
setActiveNames
|
|
21887
21985
|
});
|
|
21888
21986
|
return (_ctx, _cache) => {
|
|
21889
21987
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
21890
|
-
class: vue.normalizeClass(vue.unref(
|
|
21988
|
+
class: vue.normalizeClass(vue.unref(rootKls)),
|
|
21891
21989
|
role: "tablist",
|
|
21892
21990
|
"aria-multiselectable": "true"
|
|
21893
21991
|
}, [
|
|
@@ -21987,8 +22085,73 @@
|
|
|
21987
22085
|
disabled: Boolean
|
|
21988
22086
|
});
|
|
21989
22087
|
|
|
22088
|
+
const useCollapseItem = (props) => {
|
|
22089
|
+
const collapse = vue.inject(collapseContextKey);
|
|
22090
|
+
const focusing = vue.ref(false);
|
|
22091
|
+
const isClick = vue.ref(false);
|
|
22092
|
+
const id = vue.ref(generateId());
|
|
22093
|
+
const isActive = vue.computed(() => collapse == null ? void 0 : collapse.activeNames.value.includes(props.name));
|
|
22094
|
+
const handleFocus = () => {
|
|
22095
|
+
setTimeout(() => {
|
|
22096
|
+
if (!isClick.value) {
|
|
22097
|
+
focusing.value = true;
|
|
22098
|
+
} else {
|
|
22099
|
+
isClick.value = false;
|
|
22100
|
+
}
|
|
22101
|
+
}, 50);
|
|
22102
|
+
};
|
|
22103
|
+
const handleHeaderClick = () => {
|
|
22104
|
+
if (props.disabled)
|
|
22105
|
+
return;
|
|
22106
|
+
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22107
|
+
focusing.value = false;
|
|
22108
|
+
isClick.value = true;
|
|
22109
|
+
};
|
|
22110
|
+
const handleEnterClick = () => {
|
|
22111
|
+
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22112
|
+
};
|
|
22113
|
+
return {
|
|
22114
|
+
focusing,
|
|
22115
|
+
id,
|
|
22116
|
+
isActive,
|
|
22117
|
+
handleFocus,
|
|
22118
|
+
handleHeaderClick,
|
|
22119
|
+
handleEnterClick
|
|
22120
|
+
};
|
|
22121
|
+
};
|
|
22122
|
+
const useCollapseItemDOM = (props, { focusing, isActive, id }) => {
|
|
22123
|
+
const ns = useNamespace("collapse");
|
|
22124
|
+
const rootKls = vue.computed(() => [
|
|
22125
|
+
ns.b("item"),
|
|
22126
|
+
ns.is("active", vue.unref(isActive)),
|
|
22127
|
+
ns.is("disabled", props.disabled)
|
|
22128
|
+
]);
|
|
22129
|
+
const headKls = vue.computed(() => [
|
|
22130
|
+
ns.be("item", "header"),
|
|
22131
|
+
ns.is("active", vue.unref(isActive)),
|
|
22132
|
+
{ focusing: vue.unref(focusing) && !props.disabled }
|
|
22133
|
+
]);
|
|
22134
|
+
const arrowKls = vue.computed(() => [
|
|
22135
|
+
ns.be("item", "arrow"),
|
|
22136
|
+
ns.is("active", vue.unref(isActive))
|
|
22137
|
+
]);
|
|
22138
|
+
const itemWrapperKls = vue.computed(() => ns.be("item", "wrap"));
|
|
22139
|
+
const itemContentKls = vue.computed(() => ns.be("item", "content"));
|
|
22140
|
+
const scopedContentId = vue.computed(() => ns.b(`content-${vue.unref(id)}`));
|
|
22141
|
+
const scopedHeadId = vue.computed(() => ns.b(`head-${vue.unref(id)}`));
|
|
22142
|
+
return {
|
|
22143
|
+
arrowKls,
|
|
22144
|
+
headKls,
|
|
22145
|
+
rootKls,
|
|
22146
|
+
itemWrapperKls,
|
|
22147
|
+
itemContentKls,
|
|
22148
|
+
scopedContentId,
|
|
22149
|
+
scopedHeadId
|
|
22150
|
+
};
|
|
22151
|
+
};
|
|
22152
|
+
|
|
21990
22153
|
const _hoisted_1$N = ["aria-expanded", "aria-controls", "aria-describedby"];
|
|
21991
|
-
const _hoisted_2$v = ["id", "tabindex"
|
|
22154
|
+
const _hoisted_2$v = ["id", "tabindex"];
|
|
21992
22155
|
const _hoisted_3$g = ["id", "aria-hidden", "aria-labelledby"];
|
|
21993
22156
|
const __default__$X = vue.defineComponent({
|
|
21994
22157
|
name: "ElCollapseItem"
|
|
@@ -21998,67 +22161,51 @@
|
|
|
21998
22161
|
props: collapseItemProps,
|
|
21999
22162
|
setup(__props, { expose }) {
|
|
22000
22163
|
const props = __props;
|
|
22001
|
-
const
|
|
22002
|
-
|
|
22003
|
-
|
|
22004
|
-
|
|
22005
|
-
|
|
22006
|
-
|
|
22007
|
-
|
|
22008
|
-
|
|
22009
|
-
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
|
|
22013
|
-
|
|
22014
|
-
|
|
22015
|
-
|
|
22016
|
-
|
|
22017
|
-
|
|
22018
|
-
return;
|
|
22019
|
-
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22020
|
-
focusing.value = false;
|
|
22021
|
-
isClick.value = true;
|
|
22022
|
-
};
|
|
22023
|
-
const handleEnterClick = () => {
|
|
22024
|
-
collapse == null ? void 0 : collapse.handleItemClick(props.name);
|
|
22025
|
-
};
|
|
22164
|
+
const {
|
|
22165
|
+
focusing,
|
|
22166
|
+
id,
|
|
22167
|
+
isActive,
|
|
22168
|
+
handleFocus,
|
|
22169
|
+
handleHeaderClick,
|
|
22170
|
+
handleEnterClick
|
|
22171
|
+
} = useCollapseItem(props);
|
|
22172
|
+
const {
|
|
22173
|
+
arrowKls,
|
|
22174
|
+
headKls,
|
|
22175
|
+
rootKls,
|
|
22176
|
+
itemWrapperKls,
|
|
22177
|
+
itemContentKls,
|
|
22178
|
+
scopedContentId,
|
|
22179
|
+
scopedHeadId
|
|
22180
|
+
} = useCollapseItemDOM(props, { focusing, isActive, id });
|
|
22026
22181
|
expose({
|
|
22027
22182
|
isActive
|
|
22028
22183
|
});
|
|
22029
22184
|
return (_ctx, _cache) => {
|
|
22030
22185
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
22031
|
-
class: vue.normalizeClass(
|
|
22032
|
-
vue.unref(ns).b("item"),
|
|
22033
|
-
vue.unref(ns).is("active", vue.unref(isActive)),
|
|
22034
|
-
vue.unref(ns).is("disabled", _ctx.disabled)
|
|
22035
|
-
])
|
|
22186
|
+
class: vue.normalizeClass(vue.unref(rootKls))
|
|
22036
22187
|
}, [
|
|
22037
22188
|
vue.createElementVNode("div", {
|
|
22038
22189
|
role: "tab",
|
|
22039
22190
|
"aria-expanded": vue.unref(isActive),
|
|
22040
|
-
"aria-controls": vue.unref(
|
|
22041
|
-
"aria-describedby": vue.unref(
|
|
22191
|
+
"aria-controls": vue.unref(scopedContentId),
|
|
22192
|
+
"aria-describedby": vue.unref(scopedContentId)
|
|
22042
22193
|
}, [
|
|
22043
22194
|
vue.createElementVNode("div", {
|
|
22044
|
-
id: vue.unref(
|
|
22045
|
-
class: vue.normalizeClass(
|
|
22046
|
-
vue.unref(ns).be("item", "header"),
|
|
22047
|
-
vue.unref(ns).is("active", vue.unref(isActive)),
|
|
22048
|
-
{ focusing: focusing.value && !_ctx.disabled }
|
|
22049
|
-
]),
|
|
22195
|
+
id: vue.unref(scopedHeadId),
|
|
22196
|
+
class: vue.normalizeClass(vue.unref(headKls)),
|
|
22050
22197
|
role: "button",
|
|
22051
22198
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
22052
|
-
onClick: handleHeaderClick,
|
|
22053
|
-
onKeypress: vue.withKeys(vue.withModifiers(handleEnterClick, ["stop", "prevent"]), ["space", "enter"]),
|
|
22054
|
-
onFocus: handleFocus,
|
|
22055
|
-
onBlur: _cache[
|
|
22199
|
+
onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleHeaderClick) && vue.unref(handleHeaderClick)(...args)),
|
|
22200
|
+
onKeypress: _cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers((...args) => vue.unref(handleEnterClick) && vue.unref(handleEnterClick)(...args), ["stop", "prevent"]), ["space", "enter"])),
|
|
22201
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => vue.unref(handleFocus) && vue.unref(handleFocus)(...args)),
|
|
22202
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false)
|
|
22056
22203
|
}, [
|
|
22057
22204
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
22058
22205
|
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
22059
22206
|
]),
|
|
22060
22207
|
vue.createVNode(vue.unref(ElIcon), {
|
|
22061
|
-
class: vue.normalizeClass(
|
|
22208
|
+
class: vue.normalizeClass(vue.unref(arrowKls))
|
|
22062
22209
|
}, {
|
|
22063
22210
|
default: vue.withCtx(() => [
|
|
22064
22211
|
vue.createVNode(vue.unref(arrow_right_default))
|
|
@@ -22070,14 +22217,14 @@
|
|
|
22070
22217
|
vue.createVNode(vue.unref(_CollapseTransition), null, {
|
|
22071
22218
|
default: vue.withCtx(() => [
|
|
22072
22219
|
vue.withDirectives(vue.createElementVNode("div", {
|
|
22073
|
-
id: vue.unref(
|
|
22074
|
-
class: vue.normalizeClass(vue.unref(
|
|
22220
|
+
id: vue.unref(scopedContentId),
|
|
22221
|
+
class: vue.normalizeClass(vue.unref(itemWrapperKls)),
|
|
22075
22222
|
role: "tabpanel",
|
|
22076
22223
|
"aria-hidden": !vue.unref(isActive),
|
|
22077
|
-
"aria-labelledby": vue.unref(
|
|
22224
|
+
"aria-labelledby": vue.unref(scopedHeadId)
|
|
22078
22225
|
}, [
|
|
22079
22226
|
vue.createElementVNode("div", {
|
|
22080
|
-
class: vue.normalizeClass(vue.unref(
|
|
22227
|
+
class: vue.normalizeClass(vue.unref(itemContentKls))
|
|
22081
22228
|
}, [
|
|
22082
22229
|
vue.renderSlot(_ctx.$slots, "default")
|
|
22083
22230
|
], 2)
|
|
@@ -25756,12 +25903,12 @@
|
|
|
25756
25903
|
const { t } = useLocale();
|
|
25757
25904
|
const leftPrevYear = () => {
|
|
25758
25905
|
leftDate.value = leftDate.value.subtract(1, "year");
|
|
25759
|
-
if (!unlinkPanels) {
|
|
25906
|
+
if (!unlinkPanels.value) {
|
|
25760
25907
|
rightDate.value = rightDate.value.subtract(1, "year");
|
|
25761
25908
|
}
|
|
25762
25909
|
};
|
|
25763
25910
|
const rightNextYear = () => {
|
|
25764
|
-
if (!unlinkPanels) {
|
|
25911
|
+
if (!unlinkPanels.value) {
|
|
25765
25912
|
leftDate.value = leftDate.value.add(1, "year");
|
|
25766
25913
|
}
|
|
25767
25914
|
rightDate.value = rightDate.value.add(1, "year");
|
|
@@ -27635,7 +27782,8 @@
|
|
|
27635
27782
|
},
|
|
27636
27783
|
buttonProps: {
|
|
27637
27784
|
type: definePropType(Object)
|
|
27638
|
-
}
|
|
27785
|
+
},
|
|
27786
|
+
teleported: useTooltipContentProps.teleported
|
|
27639
27787
|
});
|
|
27640
27788
|
const dropdownItemProps = buildProps({
|
|
27641
27789
|
command: {
|
|
@@ -27833,7 +27981,7 @@
|
|
|
27833
27981
|
"virtual-triggering": _ctx.splitButton,
|
|
27834
27982
|
disabled: _ctx.disabled,
|
|
27835
27983
|
transition: `${_ctx.ns.namespace.value}-zoom-in-top`,
|
|
27836
|
-
teleported:
|
|
27984
|
+
teleported: _ctx.teleported,
|
|
27837
27985
|
pure: "",
|
|
27838
27986
|
persistent: "",
|
|
27839
27987
|
onBeforeShow: _ctx.handleBeforeShowTooltip,
|
|
@@ -27886,7 +28034,7 @@
|
|
|
27886
28034
|
}, 8, ["id", "tabindex"])
|
|
27887
28035
|
])
|
|
27888
28036
|
} : void 0
|
|
27889
|
-
]), 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"]),
|
|
28037
|
+
]), 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"]),
|
|
27890
28038
|
_ctx.splitButton ? (vue.openBlock(), vue.createBlock(_component_el_button_group, { key: 0 }, {
|
|
27891
28039
|
default: vue.withCtx(() => [
|
|
27892
28040
|
vue.createVNode(_component_el_button, vue.mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, {
|
|
@@ -28065,6 +28213,9 @@
|
|
|
28065
28213
|
onItemLeave(e);
|
|
28066
28214
|
}));
|
|
28067
28215
|
const handleClick = composeEventHandlers((e) => {
|
|
28216
|
+
if (props.disabled) {
|
|
28217
|
+
return;
|
|
28218
|
+
}
|
|
28068
28219
|
emit("click", e);
|
|
28069
28220
|
return e.type !== "keydown" && e.defaultPrevented;
|
|
28070
28221
|
}, (e) => {
|
|
@@ -28625,6 +28776,8 @@
|
|
|
28625
28776
|
}
|
|
28626
28777
|
return result;
|
|
28627
28778
|
} catch (e) {
|
|
28779
|
+
if (e instanceof Error)
|
|
28780
|
+
throw e;
|
|
28628
28781
|
const invalidFields = e;
|
|
28629
28782
|
if (props.scrollToError) {
|
|
28630
28783
|
scrollToField(Object.keys(invalidFields)[0]);
|
|
@@ -30994,7 +31147,7 @@
|
|
|
30994
31147
|
const increase = () => {
|
|
30995
31148
|
if (props.readonly || inputNumberDisabled.value || maxDisabled.value)
|
|
30996
31149
|
return;
|
|
30997
|
-
const value =
|
|
31150
|
+
const value = Number(displayValue.value) || 0;
|
|
30998
31151
|
const newVal = ensurePrecision(value);
|
|
30999
31152
|
setCurrentValue(newVal);
|
|
31000
31153
|
emit(INPUT_EVENT, data.currentValue);
|
|
@@ -31002,7 +31155,7 @@
|
|
|
31002
31155
|
const decrease = () => {
|
|
31003
31156
|
if (props.readonly || inputNumberDisabled.value || minDisabled.value)
|
|
31004
31157
|
return;
|
|
31005
|
-
const value =
|
|
31158
|
+
const value = Number(displayValue.value) || 0;
|
|
31006
31159
|
const newVal = ensurePrecision(value, -1);
|
|
31007
31160
|
setCurrentValue(newVal);
|
|
31008
31161
|
emit(INPUT_EVENT, data.currentValue);
|
|
@@ -32758,10 +32911,10 @@
|
|
|
32758
32911
|
if (!val) {
|
|
32759
32912
|
if (props.filterable) {
|
|
32760
32913
|
if (isFunction(props.filterMethod)) {
|
|
32761
|
-
props.filterMethod();
|
|
32914
|
+
props.filterMethod("");
|
|
32762
32915
|
}
|
|
32763
32916
|
if (isFunction(props.remoteMethod)) {
|
|
32764
|
-
props.remoteMethod();
|
|
32917
|
+
props.remoteMethod("");
|
|
32765
32918
|
}
|
|
32766
32919
|
}
|
|
32767
32920
|
input.value && input.value.blur();
|
|
@@ -32832,7 +32985,7 @@
|
|
|
32832
32985
|
flush: "post"
|
|
32833
32986
|
});
|
|
32834
32987
|
vue.watch(() => states.hoverIndex, (val) => {
|
|
32835
|
-
if (
|
|
32988
|
+
if (isNumber(val) && val > -1) {
|
|
32836
32989
|
hoverOption.value = optionsArray.value[val] || {};
|
|
32837
32990
|
} else {
|
|
32838
32991
|
hoverOption.value = {};
|
|
@@ -32861,7 +33014,7 @@
|
|
|
32861
33014
|
const handleQueryChange = async (val) => {
|
|
32862
33015
|
if (states.previousQuery === val || states.isOnComposition)
|
|
32863
33016
|
return;
|
|
32864
|
-
if (states.previousQuery === null && (
|
|
33017
|
+
if (states.previousQuery === null && (isFunction(props.filterMethod) || isFunction(props.remoteMethod))) {
|
|
32865
33018
|
states.previousQuery = val;
|
|
32866
33019
|
return;
|
|
32867
33020
|
}
|
|
@@ -32880,10 +33033,10 @@
|
|
|
32880
33033
|
resetInputHeight();
|
|
32881
33034
|
});
|
|
32882
33035
|
}
|
|
32883
|
-
if (props.remote &&
|
|
33036
|
+
if (props.remote && isFunction(props.remoteMethod)) {
|
|
32884
33037
|
states.hoverIndex = -1;
|
|
32885
33038
|
props.remoteMethod(val);
|
|
32886
|
-
} else if (
|
|
33039
|
+
} else if (isFunction(props.filterMethod)) {
|
|
32887
33040
|
props.filterMethod(val);
|
|
32888
33041
|
vue.triggerRef(groupQueryChange);
|
|
32889
33042
|
} else {
|
|
@@ -33039,7 +33192,7 @@
|
|
|
33039
33192
|
const deleteSelected = (event) => {
|
|
33040
33193
|
event.stopPropagation();
|
|
33041
33194
|
const value = props.multiple ? [] : "";
|
|
33042
|
-
if (
|
|
33195
|
+
if (!isString(value)) {
|
|
33043
33196
|
for (const item of states.selected) {
|
|
33044
33197
|
if (item.isDisabled)
|
|
33045
33198
|
value.push(item.value);
|
|
@@ -38142,7 +38295,7 @@
|
|
|
38142
38295
|
selectWidth: 200,
|
|
38143
38296
|
initialInputHeight: 0,
|
|
38144
38297
|
previousQuery: null,
|
|
38145
|
-
previousValue:
|
|
38298
|
+
previousValue: void 0,
|
|
38146
38299
|
query: "",
|
|
38147
38300
|
selectedLabel: "",
|
|
38148
38301
|
softFocus: false,
|
|
@@ -38331,7 +38484,7 @@
|
|
|
38331
38484
|
const update = (val) => {
|
|
38332
38485
|
emit(UPDATE_MODEL_EVENT, val);
|
|
38333
38486
|
emitChange(val);
|
|
38334
|
-
states.previousValue = val.toString();
|
|
38487
|
+
states.previousValue = val == null ? void 0 : val.toString();
|
|
38335
38488
|
};
|
|
38336
38489
|
const getValueIndex = (arr = [], value) => {
|
|
38337
38490
|
if (!isObject$1(value)) {
|
|
@@ -38497,7 +38650,7 @@
|
|
|
38497
38650
|
if (isArray(props.modelValue)) {
|
|
38498
38651
|
emptyValue = [];
|
|
38499
38652
|
} else {
|
|
38500
|
-
emptyValue =
|
|
38653
|
+
emptyValue = void 0;
|
|
38501
38654
|
}
|
|
38502
38655
|
states.softFocus = true;
|
|
38503
38656
|
if (props.multiple) {
|
|
@@ -38617,7 +38770,7 @@
|
|
|
38617
38770
|
});
|
|
38618
38771
|
} else {
|
|
38619
38772
|
states.cachedOptions = [];
|
|
38620
|
-
states.previousValue =
|
|
38773
|
+
states.previousValue = void 0;
|
|
38621
38774
|
}
|
|
38622
38775
|
} else {
|
|
38623
38776
|
if (hasModelValue.value) {
|
|
@@ -38632,7 +38785,7 @@
|
|
|
38632
38785
|
}
|
|
38633
38786
|
} else {
|
|
38634
38787
|
states.selectedLabel = "";
|
|
38635
|
-
states.previousValue =
|
|
38788
|
+
states.previousValue = void 0;
|
|
38636
38789
|
}
|
|
38637
38790
|
}
|
|
38638
38791
|
clearAllNewOption();
|
|
@@ -38813,7 +38966,7 @@
|
|
|
38813
38966
|
ref: "selectionRef",
|
|
38814
38967
|
class: vue.normalizeClass([
|
|
38815
38968
|
_ctx.nsSelectV2.e("wrapper"),
|
|
38816
|
-
_ctx.nsSelectV2.is("focused", _ctx.states.isComposing),
|
|
38969
|
+
_ctx.nsSelectV2.is("focused", _ctx.states.isComposing || _ctx.expanded),
|
|
38817
38970
|
_ctx.nsSelectV2.is("hovering", _ctx.states.comboBoxHovering),
|
|
38818
38971
|
_ctx.nsSelectV2.is("filterable", _ctx.filterable),
|
|
38819
38972
|
_ctx.nsSelectV2.is("disabled", _ctx.selectDisabled)
|
|
@@ -39050,7 +39203,7 @@
|
|
|
39050
39203
|
key: 3,
|
|
39051
39204
|
class: vue.normalizeClass([
|
|
39052
39205
|
_ctx.nsSelectV2.e("placeholder"),
|
|
39053
|
-
_ctx.nsSelectV2.is("transparent", _ctx.
|
|
39206
|
+
_ctx.nsSelectV2.is("transparent", _ctx.multiple ? _ctx.modelValue.length === 0 : !_ctx.hasModelValue)
|
|
39054
39207
|
])
|
|
39055
39208
|
}, vue.toDisplayString(_ctx.currentPlaceholder), 3)) : vue.createCommentVNode("v-if", true),
|
|
39056
39209
|
vue.createElementVNode("span", {
|
|
@@ -41175,26 +41328,27 @@
|
|
|
41175
41328
|
let changed = false;
|
|
41176
41329
|
const index = statusArr.indexOf(row);
|
|
41177
41330
|
const included = index !== -1;
|
|
41178
|
-
const
|
|
41179
|
-
|
|
41180
|
-
|
|
41181
|
-
|
|
41182
|
-
|
|
41183
|
-
|
|
41331
|
+
const toggleStatus = (type) => {
|
|
41332
|
+
if (type === "add") {
|
|
41333
|
+
statusArr.push(row);
|
|
41334
|
+
} else {
|
|
41335
|
+
statusArr.splice(index, 1);
|
|
41336
|
+
}
|
|
41184
41337
|
changed = true;
|
|
41338
|
+
if (isArray(row.children)) {
|
|
41339
|
+
row.children.forEach((item) => {
|
|
41340
|
+
toggleRowStatus(statusArr, item, newVal != null ? newVal : !included);
|
|
41341
|
+
});
|
|
41342
|
+
}
|
|
41185
41343
|
};
|
|
41186
|
-
if (
|
|
41344
|
+
if (isBoolean(newVal)) {
|
|
41187
41345
|
if (newVal && !included) {
|
|
41188
|
-
|
|
41346
|
+
toggleStatus("add");
|
|
41189
41347
|
} else if (!newVal && included) {
|
|
41190
|
-
|
|
41348
|
+
toggleStatus("remove");
|
|
41191
41349
|
}
|
|
41192
41350
|
} else {
|
|
41193
|
-
|
|
41194
|
-
removeRow();
|
|
41195
|
-
} else {
|
|
41196
|
-
addRow();
|
|
41197
|
-
}
|
|
41351
|
+
included ? toggleStatus("remove") : toggleStatus("add");
|
|
41198
41352
|
}
|
|
41199
41353
|
return changed;
|
|
41200
41354
|
}
|
|
@@ -41287,22 +41441,29 @@
|
|
|
41287
41441
|
scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper);
|
|
41288
41442
|
return popperInstance;
|
|
41289
41443
|
}
|
|
41444
|
+
function getCurrentColumns(column) {
|
|
41445
|
+
if (column.children) {
|
|
41446
|
+
return flatMap(column.children, getCurrentColumns);
|
|
41447
|
+
} else {
|
|
41448
|
+
return [column];
|
|
41449
|
+
}
|
|
41450
|
+
}
|
|
41451
|
+
function getColSpan(colSpan, column) {
|
|
41452
|
+
return colSpan + column.colSpan;
|
|
41453
|
+
}
|
|
41290
41454
|
const isFixedColumn = (index, fixed, store, realColumns) => {
|
|
41291
41455
|
let start = 0;
|
|
41292
41456
|
let after = index;
|
|
41457
|
+
const columns = store.states.columns.value;
|
|
41293
41458
|
if (realColumns) {
|
|
41294
|
-
|
|
41295
|
-
|
|
41296
|
-
|
|
41297
|
-
|
|
41298
|
-
start += realColumns[i].colSpan;
|
|
41299
|
-
}
|
|
41300
|
-
after = start + realColumns[index].colSpan - 1;
|
|
41459
|
+
const curColumns = getCurrentColumns(realColumns[index]);
|
|
41460
|
+
const preColumns = columns.slice(0, columns.indexOf(curColumns[0]));
|
|
41461
|
+
start = preColumns.reduce(getColSpan, 0);
|
|
41462
|
+
after = start + curColumns.reduce(getColSpan, 0) - 1;
|
|
41301
41463
|
} else {
|
|
41302
41464
|
start = index;
|
|
41303
41465
|
}
|
|
41304
41466
|
let fixedLayout;
|
|
41305
|
-
const columns = store.states.columns;
|
|
41306
41467
|
switch (fixed) {
|
|
41307
41468
|
case "left":
|
|
41308
41469
|
if (after < store.states.fixedLeafColumnsLength.value) {
|
|
@@ -41310,14 +41471,14 @@
|
|
|
41310
41471
|
}
|
|
41311
41472
|
break;
|
|
41312
41473
|
case "right":
|
|
41313
|
-
if (start >= columns.
|
|
41474
|
+
if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) {
|
|
41314
41475
|
fixedLayout = "right";
|
|
41315
41476
|
}
|
|
41316
41477
|
break;
|
|
41317
41478
|
default:
|
|
41318
41479
|
if (after < store.states.fixedLeafColumnsLength.value) {
|
|
41319
41480
|
fixedLayout = "left";
|
|
41320
|
-
} else if (start >= columns.
|
|
41481
|
+
} else if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) {
|
|
41321
41482
|
fixedLayout = "right";
|
|
41322
41483
|
}
|
|
41323
41484
|
}
|
|
@@ -41329,11 +41490,11 @@
|
|
|
41329
41490
|
};
|
|
41330
41491
|
const getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset = 0) => {
|
|
41331
41492
|
const classes = [];
|
|
41332
|
-
const { direction, start } = isFixedColumn(index, fixed, store, realColumns);
|
|
41493
|
+
const { direction, start, after } = isFixedColumn(index, fixed, store, realColumns);
|
|
41333
41494
|
if (direction) {
|
|
41334
41495
|
const isLeft = direction === "left";
|
|
41335
41496
|
classes.push(`${namespace}-fixed-column--${direction}`);
|
|
41336
|
-
if (isLeft &&
|
|
41497
|
+
if (isLeft && after + offset === store.states.fixedLeafColumnsLength.value - 1) {
|
|
41337
41498
|
classes.push("is-last-column");
|
|
41338
41499
|
} else if (!isLeft && start - offset === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) {
|
|
41339
41500
|
classes.push("is-first-column");
|
|
@@ -41345,7 +41506,11 @@
|
|
|
41345
41506
|
return offset + (column.realWidth === null || Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth);
|
|
41346
41507
|
}
|
|
41347
41508
|
const getFixedColumnOffset = (index, fixed, store, realColumns) => {
|
|
41348
|
-
const {
|
|
41509
|
+
const {
|
|
41510
|
+
direction,
|
|
41511
|
+
start = 0,
|
|
41512
|
+
after = 0
|
|
41513
|
+
} = isFixedColumn(index, fixed, store, realColumns);
|
|
41349
41514
|
if (!direction) {
|
|
41350
41515
|
return;
|
|
41351
41516
|
}
|
|
@@ -41353,9 +41518,9 @@
|
|
|
41353
41518
|
const isLeft = direction === "left";
|
|
41354
41519
|
const columns = store.states.columns.value;
|
|
41355
41520
|
if (isLeft) {
|
|
41356
|
-
styles.left = columns.slice(0,
|
|
41521
|
+
styles.left = columns.slice(0, start).reduce(getOffset, 0);
|
|
41357
41522
|
} else {
|
|
41358
|
-
styles.right = columns.slice(
|
|
41523
|
+
styles.right = columns.slice(after + 1).reverse().reduce(getOffset, 0);
|
|
41359
41524
|
}
|
|
41360
41525
|
return styles;
|
|
41361
41526
|
};
|
|
@@ -41741,7 +41906,17 @@
|
|
|
41741
41906
|
if (!rowKey.value)
|
|
41742
41907
|
throw new Error("[ElTable] prop row-key is required");
|
|
41743
41908
|
};
|
|
41909
|
+
const updateChildFixed = (column) => {
|
|
41910
|
+
var _a2;
|
|
41911
|
+
(_a2 = column.children) == null ? void 0 : _a2.forEach((childColumn) => {
|
|
41912
|
+
childColumn.fixed = column.fixed;
|
|
41913
|
+
updateChildFixed(childColumn);
|
|
41914
|
+
});
|
|
41915
|
+
};
|
|
41744
41916
|
const updateColumns = () => {
|
|
41917
|
+
_columns.value.forEach((column) => {
|
|
41918
|
+
updateChildFixed(column);
|
|
41919
|
+
});
|
|
41745
41920
|
fixedColumns.value = _columns.value.filter((column) => column.fixed === true || column.fixed === "left");
|
|
41746
41921
|
rightFixedColumns.value = _columns.value.filter((column) => column.fixed === "right");
|
|
41747
41922
|
if (fixedColumns.value.length > 0 && _columns.value[0] && _columns.value[0].type === "selection" && !_columns.value[0].fixed) {
|
|
@@ -43041,13 +43216,13 @@
|
|
|
43041
43216
|
column
|
|
43042
43217
|
});
|
|
43043
43218
|
}
|
|
43044
|
-
const fixedStyle =
|
|
43219
|
+
const fixedStyle = getFixedColumnOffset(columnIndex, column.fixed, props.store, row);
|
|
43045
43220
|
ensurePosition(fixedStyle, "left");
|
|
43046
43221
|
ensurePosition(fixedStyle, "right");
|
|
43047
43222
|
return Object.assign({}, headerCellStyles, fixedStyle);
|
|
43048
43223
|
};
|
|
43049
43224
|
const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
|
|
43050
|
-
const fixedClasses =
|
|
43225
|
+
const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, column.fixed, props.store, row);
|
|
43051
43226
|
const classes = [
|
|
43052
43227
|
column.id,
|
|
43053
43228
|
column.order,
|
|
@@ -43445,13 +43620,13 @@
|
|
|
43445
43620
|
column
|
|
43446
43621
|
});
|
|
43447
43622
|
}
|
|
43448
|
-
const fixedStyle =
|
|
43623
|
+
const fixedStyle = getFixedColumnOffset(columnIndex, props == null ? void 0 : props.fixed, props.store);
|
|
43449
43624
|
ensurePosition(fixedStyle, "left");
|
|
43450
43625
|
ensurePosition(fixedStyle, "right");
|
|
43451
43626
|
return Object.assign({}, cellStyles, fixedStyle);
|
|
43452
43627
|
};
|
|
43453
43628
|
const getCellClass = (rowIndex, columnIndex, row, column, offset) => {
|
|
43454
|
-
const fixedClasses =
|
|
43629
|
+
const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, props == null ? void 0 : props.fixed, props.store, void 0, offset);
|
|
43455
43630
|
const classes = [column.id, column.align, column.className, ...fixedClasses];
|
|
43456
43631
|
const cellClassName = parent == null ? void 0 : parent.props.cellClassName;
|
|
43457
43632
|
if (typeof cellClassName === "string") {
|
|
@@ -47747,19 +47922,6 @@
|
|
|
47747
47922
|
}
|
|
47748
47923
|
});
|
|
47749
47924
|
|
|
47750
|
-
const getTabPanes = (vm) => {
|
|
47751
|
-
const nodes = flattedChildren(vm.subTree);
|
|
47752
|
-
return nodes.filter((n) => {
|
|
47753
|
-
var _a;
|
|
47754
|
-
return vue.isVNode(n) && ((_a = n.type) == null ? void 0 : _a.name) === "ElTabPane" && !!n.component;
|
|
47755
|
-
});
|
|
47756
|
-
};
|
|
47757
|
-
const getOrderedPanes = (vm, panes) => {
|
|
47758
|
-
const nodes = getTabPanes(vm);
|
|
47759
|
-
const uids = nodes.map((n) => n.component.uid);
|
|
47760
|
-
return uids.map((uid) => panes[uid]).filter((p) => !!p);
|
|
47761
|
-
};
|
|
47762
|
-
|
|
47763
47925
|
const tabsProps = buildProps({
|
|
47764
47926
|
type: {
|
|
47765
47927
|
type: String,
|
|
@@ -47805,11 +47967,13 @@
|
|
|
47805
47967
|
expose
|
|
47806
47968
|
}) {
|
|
47807
47969
|
var _a, _b;
|
|
47808
|
-
const vm = vue.getCurrentInstance();
|
|
47809
47970
|
const ns = useNamespace("tabs");
|
|
47971
|
+
const {
|
|
47972
|
+
children: panes,
|
|
47973
|
+
addChild: registerPane,
|
|
47974
|
+
removeChild: unregisterPane
|
|
47975
|
+
} = useOrderedChildren(vue.getCurrentInstance(), "ElTabPane");
|
|
47810
47976
|
const nav$ = vue.ref();
|
|
47811
|
-
const panes = vue.shallowReactive({});
|
|
47812
|
-
const orderedPanes = vue.shallowRef([]);
|
|
47813
47977
|
const currentName = vue.ref((_b = (_a = props.modelValue) != null ? _a : props.activeName) != null ? _b : "0");
|
|
47814
47978
|
const changeCurrentName = (value) => {
|
|
47815
47979
|
currentName.value = value;
|
|
@@ -47861,22 +48025,12 @@
|
|
|
47861
48025
|
await vue.nextTick();
|
|
47862
48026
|
(_a2 = nav$.value) == null ? void 0 : _a2.scrollToActiveTab();
|
|
47863
48027
|
});
|
|
47864
|
-
{
|
|
47865
|
-
|
|
47866
|
-
|
|
47867
|
-
|
|
47868
|
-
|
|
47869
|
-
|
|
47870
|
-
delete panes[uid];
|
|
47871
|
-
orderedPanes.value = getOrderedPanes(vm, panes);
|
|
47872
|
-
};
|
|
47873
|
-
vue.provide(tabsRootContextKey, {
|
|
47874
|
-
props,
|
|
47875
|
-
currentName,
|
|
47876
|
-
registerPane,
|
|
47877
|
-
unregisterPane
|
|
47878
|
-
});
|
|
47879
|
-
}
|
|
48028
|
+
vue.provide(tabsRootContextKey, {
|
|
48029
|
+
props,
|
|
48030
|
+
currentName,
|
|
48031
|
+
registerPane,
|
|
48032
|
+
unregisterPane
|
|
48033
|
+
});
|
|
47880
48034
|
expose({
|
|
47881
48035
|
currentName
|
|
47882
48036
|
});
|
|
@@ -47901,7 +48055,7 @@
|
|
|
47901
48055
|
"currentName": currentName.value,
|
|
47902
48056
|
"editable": props.editable,
|
|
47903
48057
|
"type": props.type,
|
|
47904
|
-
"panes":
|
|
48058
|
+
"panes": panes.value,
|
|
47905
48059
|
"stretch": props.stretch,
|
|
47906
48060
|
"onTabClick": handleTabClick,
|
|
47907
48061
|
"onTabRemove": handleTabRemove
|
|
@@ -51947,7 +52101,6 @@
|
|
|
51947
52101
|
});
|
|
51948
52102
|
|
|
51949
52103
|
const _hoisted_1$6 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick"];
|
|
51950
|
-
const DEFAULT_ICON = "caret-right";
|
|
51951
52104
|
const __default__$7 = vue.defineComponent({
|
|
51952
52105
|
name: "ElTreeNode"
|
|
51953
52106
|
});
|
|
@@ -51965,7 +52118,7 @@
|
|
|
51965
52118
|
});
|
|
51966
52119
|
const icon = vue.computed(() => {
|
|
51967
52120
|
var _a;
|
|
51968
|
-
return (_a = tree == null ? void 0 : tree.props.icon) != null ? _a :
|
|
52121
|
+
return (_a = tree == null ? void 0 : tree.props.icon) != null ? _a : caret_right_default;
|
|
51969
52122
|
});
|
|
51970
52123
|
const handleClick = (e) => {
|
|
51971
52124
|
emit("click", props.node, e);
|
|
@@ -52845,6 +52998,8 @@
|
|
|
52845
52998
|
props.onChange(file, uploadFiles.value);
|
|
52846
52999
|
};
|
|
52847
53000
|
const handleStart = (file) => {
|
|
53001
|
+
if (isNil(file.uid))
|
|
53002
|
+
file.uid = genFileId();
|
|
52848
53003
|
const uploadFile = {
|
|
52849
53004
|
name: file.name,
|
|
52850
53005
|
percentage: 0,
|