@element-plus/nightly 0.0.20240418 → 0.0.20240419
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.full.js +30 -6
- package/dist/index.full.min.js +18 -18
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +30 -6
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.d.ts +4 -4
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.mjs +36 -96
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert.vue.d.ts +4 -4
- package/es/components/alert/src/alert2.mjs +96 -36
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/autocomplete/index.d.ts +65 -65
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
- package/es/components/badge/index.d.ts +36 -0
- package/es/components/badge/src/badge.d.ts +12 -0
- package/es/components/badge/src/badge.mjs +6 -0
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.d.ts +36 -0
- package/es/components/badge/src/badge2.mjs +20 -3
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/button/index.d.ts +5 -5
- package/es/components/button/src/button.d.ts +1 -1
- package/es/components/button/src/button.vue.d.ts +5 -5
- package/es/components/button/src/use-button.d.ts +1 -1
- package/es/components/calendar/index.d.ts +5 -5
- package/es/components/calendar/src/calendar.vue.d.ts +5 -5
- package/es/components/carousel/index.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/index.d.ts +130 -130
- package/es/components/cascader/src/cascader.vue.d.ts +65 -65
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +17 -35
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +35 -17
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +38 -38
- package/es/components/color-picker/src/color-picker.vue.d.ts +38 -38
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
- package/es/components/date-picker/src/panel-utils.d.ts +34 -34
- package/es/components/dialog/index.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +1 -1
- package/es/components/drawer/index.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +1 -1
- package/es/components/dropdown/index.d.ts +14 -14
- package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +12 -12
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/form/index.d.ts +12 -12
- package/es/components/form/src/form-item.d.ts +1 -1
- package/es/components/form/src/form-item.vue.d.ts +5 -5
- package/es/components/image/index.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +1 -1
- package/es/components/index.mjs +4 -4
- package/es/components/input/index.d.ts +12 -12
- package/es/components/input/src/input.vue.d.ts +12 -12
- package/es/components/input-number/index.d.ts +45 -45
- package/es/components/input-number/src/input-number.vue.d.ts +45 -45
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +40 -4
- package/es/components/message-box/src/index.vue.d.ts +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/pagination/src/components/jumper.vue.d.ts +12 -12
- package/es/components/pagination/src/components/sizes.vue.d.ts +27 -27
- package/es/components/popconfirm/index.d.ts +23 -23
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
- package/es/components/popover/index.d.ts +18 -18
- package/es/components/popover/src/popover.vue.d.ts +18 -18
- package/es/components/popper/src/content.vue.d.ts +6 -6
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +205 -59
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +59 -205
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/result/index.d.ts +4 -4
- package/es/components/result/src/result.d.ts +1 -1
- package/es/components/result/src/result.vue.d.ts +4 -4
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +27 -27
- package/es/components/select/src/select.vue.d.ts +27 -27
- package/es/components/select/src/useSelect.d.ts +25 -25
- package/es/components/select-v2/index.d.ts +54 -54
- package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +27 -27
- package/es/components/select-v2/src/useSelect.d.ts +25 -25
- package/es/components/slider/index.d.ts +75 -75
- package/es/components/slider/src/button.vue.d.ts +6 -6
- package/es/components/slider/src/composables/use-slide.d.ts +24 -24
- package/es/components/slider/src/slider.vue.d.ts +75 -75
- package/es/components/steps/index.d.ts +16 -16
- package/es/components/steps/src/item.d.ts +1 -1
- package/es/components/steps/src/item.vue.d.ts +4 -4
- package/es/components/steps/src/steps.d.ts +2 -2
- package/es/components/steps/src/steps.vue.d.ts +8 -8
- package/es/components/table/index.d.ts +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +12 -12
- package/es/components/table/src/table-body/events-helper.mjs +2 -1
- package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -0
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +1 -1
- package/es/components/tag/index.d.ts +1 -1
- package/es/components/tag/src/tag.vue.d.ts +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +34 -34
- package/es/components/time-select/index.d.ts +114 -114
- package/es/components/time-select/src/time-select.vue.d.ts +57 -57
- package/es/components/tooltip/index.d.ts +6 -6
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/content.vue.d.ts +6 -6
- package/es/components/tooltip/src/tooltip.mjs +170 -31
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +6 -6
- package/es/components/tooltip/src/tooltip2.mjs +31 -170
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.d.ts +4 -4
- package/es/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
- package/es/components/tour/index.d.ts +11 -11
- package/es/components/tour/index.mjs +1 -1
- package/es/components/tour/src/content.vue.d.ts +1 -1
- package/es/components/tour/src/step.mjs +169 -44
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step.vue.d.ts +5 -5
- package/es/components/tour/src/step2.mjs +44 -169
- package/es/components/tour/src/step2.mjs.map +1 -1
- package/es/components/tour/src/tour.vue.d.ts +1 -1
- package/es/components/transfer/index.d.ts +65 -65
- package/es/components/transfer/src/transfer-panel.vue.d.ts +12 -12
- package/es/components/transfer/src/transfer.vue.d.ts +65 -65
- package/es/components/tree-v2/index.d.ts +1 -1
- package/es/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/es/components/upload/index.d.ts +5 -5
- package/es/components/upload/src/upload-content.vue.d.ts +1 -1
- package/es/components/upload/src/upload.vue.d.ts +5 -5
- package/es/index.mjs +4 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.d.ts +4 -4
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.js +37 -95
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +4 -4
- package/lib/components/alert/src/alert2.js +95 -37
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/autocomplete/index.d.ts +65 -65
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
- package/lib/components/badge/index.d.ts +36 -0
- package/lib/components/badge/src/badge.d.ts +12 -0
- package/lib/components/badge/src/badge.js +6 -0
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +36 -0
- package/lib/components/badge/src/badge2.js +20 -3
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.d.ts +5 -5
- package/lib/components/button/src/button.d.ts +1 -1
- package/lib/components/button/src/button.vue.d.ts +5 -5
- package/lib/components/button/src/use-button.d.ts +1 -1
- package/lib/components/calendar/index.d.ts +5 -5
- package/lib/components/calendar/src/calendar.vue.d.ts +5 -5
- package/lib/components/carousel/index.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/index.d.ts +130 -130
- package/lib/components/cascader/src/cascader.vue.d.ts +65 -65
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +18 -35
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +35 -18
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +38 -38
- package/lib/components/color-picker/src/color-picker.vue.d.ts +38 -38
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
- package/lib/components/date-picker/src/panel-utils.d.ts +34 -34
- package/lib/components/dialog/index.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
- package/lib/components/drawer/index.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +1 -1
- package/lib/components/dropdown/index.d.ts +14 -14
- package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +12 -12
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/form/index.d.ts +12 -12
- package/lib/components/form/src/form-item.d.ts +1 -1
- package/lib/components/form/src/form-item.vue.d.ts +5 -5
- package/lib/components/image/index.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +1 -1
- package/lib/components/index.js +4 -4
- package/lib/components/input/index.d.ts +12 -12
- package/lib/components/input/src/input.vue.d.ts +12 -12
- package/lib/components/input-number/index.d.ts +45 -45
- package/lib/components/input-number/src/input-number.vue.d.ts +45 -45
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +40 -4
- package/lib/components/message-box/src/index.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/pagination/src/components/jumper.vue.d.ts +12 -12
- package/lib/components/pagination/src/components/sizes.vue.d.ts +27 -27
- package/lib/components/popconfirm/index.d.ts +23 -23
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
- package/lib/components/popover/index.d.ts +18 -18
- package/lib/components/popover/src/popover.vue.d.ts +18 -18
- package/lib/components/popper/src/content.vue.d.ts +6 -6
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +205 -59
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +59 -205
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/result/index.d.ts +4 -4
- package/lib/components/result/src/result.d.ts +1 -1
- package/lib/components/result/src/result.vue.d.ts +4 -4
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +27 -27
- package/lib/components/select/src/select.vue.d.ts +27 -27
- package/lib/components/select/src/useSelect.d.ts +25 -25
- package/lib/components/select-v2/index.d.ts +54 -54
- package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +27 -27
- package/lib/components/select-v2/src/useSelect.d.ts +25 -25
- package/lib/components/slider/index.d.ts +75 -75
- package/lib/components/slider/src/button.vue.d.ts +6 -6
- package/lib/components/slider/src/composables/use-slide.d.ts +24 -24
- package/lib/components/slider/src/slider.vue.d.ts +75 -75
- package/lib/components/steps/index.d.ts +16 -16
- package/lib/components/steps/src/item.d.ts +1 -1
- package/lib/components/steps/src/item.vue.d.ts +4 -4
- package/lib/components/steps/src/steps.d.ts +2 -2
- package/lib/components/steps/src/steps.vue.d.ts +8 -8
- package/lib/components/table/index.d.ts +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +12 -12
- package/lib/components/table/src/table-body/events-helper.js +2 -1
- package/lib/components/table/src/table-body/events-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +1 -0
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +1 -1
- package/lib/components/tag/index.d.ts +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +34 -34
- package/lib/components/time-select/index.d.ts +114 -114
- package/lib/components/time-select/src/time-select.vue.d.ts +57 -57
- package/lib/components/tooltip/index.d.ts +6 -6
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/content.vue.d.ts +6 -6
- package/lib/components/tooltip/src/tooltip.js +170 -35
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +6 -6
- package/lib/components/tooltip/src/tooltip2.js +35 -170
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/index.d.ts +4 -4
- package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
- package/lib/components/tour/index.d.ts +11 -11
- package/lib/components/tour/index.js +1 -1
- package/lib/components/tour/src/content.vue.d.ts +1 -1
- package/lib/components/tour/src/step.js +168 -44
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step.vue.d.ts +5 -5
- package/lib/components/tour/src/step2.js +44 -168
- package/lib/components/tour/src/step2.js.map +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +1 -1
- package/lib/components/transfer/index.d.ts +65 -65
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +12 -12
- package/lib/components/transfer/src/transfer.vue.d.ts +65 -65
- package/lib/components/tree-v2/index.d.ts +1 -1
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/lib/components/upload/index.d.ts +5 -5
- package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +5 -5
- package/lib/index.js +4 -4
- package/lib/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/web-types.json +1 -1
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
__epPropKey: true;
|
|
30
30
|
};
|
|
31
31
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
32
|
-
readonly status: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "
|
|
32
|
+
readonly status: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "error" | "wait" | "finish" | "process", unknown, "", boolean>;
|
|
33
33
|
}, {
|
|
34
34
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
35
35
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
__epPropKey: true;
|
|
41
41
|
};
|
|
42
42
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
43
|
-
readonly status: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "
|
|
43
|
+
readonly status: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "error" | "wait" | "finish" | "process", unknown, "", boolean>;
|
|
44
44
|
}>> & {
|
|
45
45
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
46
46
|
}>>;
|
|
@@ -160,10 +160,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
160
160
|
__epPropKey: true;
|
|
161
161
|
};
|
|
162
162
|
readonly description: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
163
|
-
readonly status: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "
|
|
163
|
+
readonly status: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "error" | "wait" | "finish" | "process", unknown, "", boolean>;
|
|
164
164
|
}>>, {
|
|
165
165
|
readonly title: string;
|
|
166
166
|
readonly description: string;
|
|
167
|
-
readonly status: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "
|
|
167
|
+
readonly status: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "error" | "wait" | "finish" | "process", unknown>;
|
|
168
168
|
}>;
|
|
169
169
|
export default _default;
|
|
@@ -16,8 +16,8 @@ export declare const stepsProps: {
|
|
|
16
16
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
17
|
__epPropKey: true;
|
|
18
18
|
};
|
|
19
|
-
readonly finishStatus: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
20
|
-
readonly processStatus: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "
|
|
19
|
+
readonly finishStatus: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "finish", boolean>;
|
|
20
|
+
readonly processStatus: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "process", boolean>;
|
|
21
21
|
};
|
|
22
22
|
export declare type StepsProps = ExtractPropTypes<typeof stepsProps>;
|
|
23
23
|
export declare const stepsEmits: {
|
|
@@ -15,8 +15,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
16
16
|
__epPropKey: true;
|
|
17
17
|
};
|
|
18
|
-
readonly finishStatus: import("../../../utils").EpPropFinalized<StringConstructor, "
|
|
19
|
-
readonly processStatus: import("../../../utils").EpPropFinalized<StringConstructor, "
|
|
18
|
+
readonly finishStatus: import("../../../utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "finish", boolean>;
|
|
19
|
+
readonly processStatus: import("../../../utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "process", boolean>;
|
|
20
20
|
}, {
|
|
21
21
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
readonly space: import("../../../utils").EpPropFinalized<readonly [NumberConstructor, StringConstructor], unknown, unknown, "", boolean>;
|
|
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
35
|
__epPropKey: true;
|
|
36
36
|
};
|
|
37
|
-
readonly finishStatus: import("../../../utils").EpPropFinalized<StringConstructor, "
|
|
38
|
-
readonly processStatus: import("../../../utils").EpPropFinalized<StringConstructor, "
|
|
37
|
+
readonly finishStatus: import("../../../utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "finish", boolean>;
|
|
38
|
+
readonly processStatus: import("../../../utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "process", boolean>;
|
|
39
39
|
}>> & {
|
|
40
40
|
onChange?: ((newVal: number, oldVal: number) => any) | undefined;
|
|
41
41
|
}>>;
|
|
@@ -79,15 +79,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
80
80
|
__epPropKey: true;
|
|
81
81
|
};
|
|
82
|
-
readonly finishStatus: import("../../../utils").EpPropFinalized<StringConstructor, "
|
|
83
|
-
readonly processStatus: import("../../../utils").EpPropFinalized<StringConstructor, "
|
|
82
|
+
readonly finishStatus: import("../../../utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "finish", boolean>;
|
|
83
|
+
readonly processStatus: import("../../../utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "process", boolean>;
|
|
84
84
|
}>> & {
|
|
85
85
|
onChange?: ((newVal: number, oldVal: number) => any) | undefined;
|
|
86
86
|
}, {
|
|
87
87
|
readonly direction: import("../../../utils").EpPropMergeType<StringConstructor, "vertical" | "horizontal", unknown>;
|
|
88
88
|
readonly active: number;
|
|
89
89
|
readonly space: import("../../../utils").EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>;
|
|
90
|
-
readonly finishStatus: import("../../../utils").EpPropMergeType<StringConstructor, "
|
|
91
|
-
readonly processStatus: import("../../../utils").EpPropMergeType<StringConstructor, "
|
|
90
|
+
readonly finishStatus: import("../../../utils").EpPropMergeType<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown>;
|
|
91
|
+
readonly processStatus: import("../../../utils").EpPropMergeType<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown>;
|
|
92
92
|
}>;
|
|
93
93
|
export default _default;
|
|
@@ -177,7 +177,7 @@ export declare const ElTable: import("@element-plus/nightly/es/utils").SFCWithIn
|
|
|
177
177
|
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
178
178
|
setScrollLeft: (left?: number | undefined) => void;
|
|
179
179
|
setScrollTop: (top?: number | undefined) => void;
|
|
180
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select
|
|
180
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select-all" | "expand-change" | "current-change" | "select" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], "select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
181
181
|
data: {
|
|
182
182
|
type: import("vue").PropType<any[]>;
|
|
183
183
|
default: () => never[];
|
|
@@ -2416,7 +2416,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2416
2416
|
readonly popperOptions: import("../../../utils").EpPropFinalized<(new (...args: any[]) => Partial<import("@element-plus/nightly/es/components/popper").Options>) | (() => Partial<import("@element-plus/nightly/es/components/popper").Options>) | ((new (...args: any[]) => Partial<import("@element-plus/nightly/es/components/popper").Options>) | (() => Partial<import("@element-plus/nightly/es/components/popper").Options>))[], unknown, unknown, () => {}, boolean>;
|
|
2417
2417
|
readonly strategy: import("../../../utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
2418
2418
|
}, {
|
|
2419
|
-
emit: ((event: "
|
|
2419
|
+
emit: ((event: "close") => void) & ((event: "focus") => void) & ((event: "blur") => void) & ((event: "mouseleave", evt: MouseEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void);
|
|
2420
2420
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
2421
2421
|
readonly id: StringConstructor;
|
|
2422
2422
|
readonly style: {
|
|
@@ -2666,10 +2666,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2666
2666
|
readonly strategy: import("../../../utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
2667
2667
|
}>> & {
|
|
2668
2668
|
onClose?: (() => any) | undefined;
|
|
2669
|
-
onBlur?: (() => any) | undefined;
|
|
2670
2669
|
onFocus?: (() => any) | undefined;
|
|
2671
|
-
|
|
2670
|
+
onBlur?: (() => any) | undefined;
|
|
2672
2671
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
2672
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
2673
2673
|
}>>;
|
|
2674
2674
|
focusStartRef: import("vue").Ref<HTMLElement | "container" | "first" | undefined>;
|
|
2675
2675
|
trapped: import("vue").Ref<boolean>;
|
|
@@ -2738,7 +2738,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2738
2738
|
};
|
|
2739
2739
|
}, {
|
|
2740
2740
|
onKeydown: (e: KeyboardEvent) => void;
|
|
2741
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
2741
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested")[], "focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2742
2742
|
loop: BooleanConstructor;
|
|
2743
2743
|
trapped: BooleanConstructor;
|
|
2744
2744
|
focusTrapEl: PropType<HTMLElement>;
|
|
@@ -3013,10 +3013,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3013
3013
|
readonly strategy: import("../../../utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
3014
3014
|
}>> & {
|
|
3015
3015
|
onClose?: (() => any) | undefined;
|
|
3016
|
-
onBlur?: (() => any) | undefined;
|
|
3017
3016
|
onFocus?: (() => any) | undefined;
|
|
3018
|
-
|
|
3017
|
+
onBlur?: (() => any) | undefined;
|
|
3019
3018
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
3019
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
3020
3020
|
}, {
|
|
3021
3021
|
readonly offset: number;
|
|
3022
3022
|
readonly effect: string;
|
|
@@ -5369,7 +5369,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5369
5369
|
readonly popperOptions: import("../../../utils").EpPropFinalized<(new (...args: any[]) => Partial<import("@element-plus/nightly/es/components/popper").Options>) | (() => Partial<import("@element-plus/nightly/es/components/popper").Options>) | ((new (...args: any[]) => Partial<import("@element-plus/nightly/es/components/popper").Options>) | (() => Partial<import("@element-plus/nightly/es/components/popper").Options>))[], unknown, unknown, () => {}, boolean>;
|
|
5370
5370
|
readonly strategy: import("../../../utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
5371
5371
|
}, {
|
|
5372
|
-
emit: ((event: "
|
|
5372
|
+
emit: ((event: "close") => void) & ((event: "focus") => void) & ((event: "blur") => void) & ((event: "mouseleave", evt: MouseEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void);
|
|
5373
5373
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
5374
5374
|
readonly id: StringConstructor;
|
|
5375
5375
|
readonly style: {
|
|
@@ -5619,10 +5619,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5619
5619
|
readonly strategy: import("../../../utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
5620
5620
|
}>> & {
|
|
5621
5621
|
onClose?: (() => any) | undefined;
|
|
5622
|
-
onBlur?: (() => any) | undefined;
|
|
5623
5622
|
onFocus?: (() => any) | undefined;
|
|
5624
|
-
|
|
5623
|
+
onBlur?: (() => any) | undefined;
|
|
5625
5624
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
5625
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
5626
5626
|
}>>;
|
|
5627
5627
|
focusStartRef: import("vue").Ref<HTMLElement | "container" | "first" | undefined>;
|
|
5628
5628
|
trapped: import("vue").Ref<boolean>;
|
|
@@ -5691,7 +5691,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5691
5691
|
};
|
|
5692
5692
|
}, {
|
|
5693
5693
|
onKeydown: (e: KeyboardEvent) => void;
|
|
5694
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
5694
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested")[], "focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5695
5695
|
loop: BooleanConstructor;
|
|
5696
5696
|
trapped: BooleanConstructor;
|
|
5697
5697
|
focusTrapEl: PropType<HTMLElement>;
|
|
@@ -5966,10 +5966,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5966
5966
|
readonly strategy: import("../../../utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
5967
5967
|
}>> & {
|
|
5968
5968
|
onClose?: (() => any) | undefined;
|
|
5969
|
-
onBlur?: (() => any) | undefined;
|
|
5970
5969
|
onFocus?: (() => any) | undefined;
|
|
5971
|
-
|
|
5970
|
+
onBlur?: (() => any) | undefined;
|
|
5972
5971
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
5972
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
5973
5973
|
}, {
|
|
5974
5974
|
readonly offset: number;
|
|
5975
5975
|
readonly effect: string;
|
|
@@ -92,6 +92,7 @@ function useEvents(props) {
|
|
|
92
92
|
let rangeWidth = range.getBoundingClientRect().width;
|
|
93
93
|
let rangeHeight = range.getBoundingClientRect().height;
|
|
94
94
|
const offsetWidth = rangeWidth - Math.floor(rangeWidth);
|
|
95
|
+
const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect();
|
|
95
96
|
if (offsetWidth < 1e-3) {
|
|
96
97
|
rangeWidth = Math.floor(rangeWidth);
|
|
97
98
|
}
|
|
@@ -102,7 +103,7 @@ function useEvents(props) {
|
|
|
102
103
|
const { top, left, right, bottom } = getPadding(cellChild);
|
|
103
104
|
const horizontalPadding = left + right;
|
|
104
105
|
const verticalPadding = top + bottom;
|
|
105
|
-
if (rangeWidth + horizontalPadding >
|
|
106
|
+
if (rangeWidth + horizontalPadding > cellChildWidth || rangeHeight + verticalPadding > cellChildHeight || cellChild.scrollWidth > cellChildWidth) {
|
|
106
107
|
createTablePopper(tooltipOptions, cell.innerText || cell.textContent, cell, table);
|
|
107
108
|
}
|
|
108
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-helper.mjs","sources":["../../../../../../../packages/components/table/src/table-body/events-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport { h, inject, ref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { addClass, hasClass, removeClass } from '@element-plus/utils'\nimport { createTablePopper, getCell, getColumnByCell } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableBodyProps } from './defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\n\nfunction useEvents<T>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const tooltipContent = ref('')\n const tooltipTrigger = ref(h('div'))\n const handleEvent = (event: Event, row: T, name: string) => {\n const table = parent\n const cell = getCell(event)\n let column: TableColumnCtx<T>\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n if (column) {\n table?.emit(`cell-${name}`, row, column, cell, event)\n }\n }\n table?.emit(`row-${name}`, row, column, event)\n }\n const handleDoubleClick = (event: Event, row: T) => {\n handleEvent(event, row, 'dblclick')\n }\n const handleClick = (event: Event, row: T) => {\n props.store.commit('setCurrentRow', row)\n handleEvent(event, row, 'click')\n }\n const handleContextMenu = (event: Event, row: T) => {\n handleEvent(event, row, 'contextmenu')\n }\n const handleMouseEnter = debounce((index: number) => {\n props.store.commit('setHoverRow', index)\n }, 30)\n const handleMouseLeave = debounce(() => {\n props.store.commit('setHoverRow', null)\n }, 30)\n const getPadding = (el: HTMLElement) => {\n const style = window.getComputedStyle(el, null)\n const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0\n const paddingRight = Number.parseInt(style.paddingRight, 10) || 0\n const paddingTop = Number.parseInt(style.paddingTop, 10) || 0\n const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0\n return {\n left: paddingLeft,\n right: paddingRight,\n top: paddingTop,\n bottom: paddingBottom,\n }\n }\n\n const toggleRowClassByCell = (\n rowSpan: number,\n event: MouseEvent,\n toggle: (el: Element, cls: string) => void\n ) => {\n let node = event.target.parentNode\n while (rowSpan > 1) {\n node = node?.nextSibling\n if (!node || node.nodeName !== 'TR') break\n toggle(node, 'hover-row hover-fixed-row')\n rowSpan--\n }\n }\n\n const handleCellMouseEnter = (\n event: MouseEvent,\n row: T,\n tooltipOptions: TableOverflowTooltipOptions\n ) => {\n const table = parent\n const cell = getCell(event)\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n const column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, addClass)\n }\n const hoverState = (table.hoverState = { cell, column, row })\n table?.emit(\n 'cell-mouse-enter',\n hoverState.row,\n hoverState.column,\n hoverState.cell,\n event\n )\n }\n\n if (!tooltipOptions) {\n return\n }\n\n // 判断是否text-overflow, 如果是就显示tooltip\n const cellChild = (event.target as HTMLElement).querySelector(\n '.cell'\n ) as HTMLElement\n if (\n !(\n hasClass(cellChild, `${namespace}-tooltip`) &&\n cellChild.childNodes.length\n )\n ) {\n return\n }\n // use range width instead of scrollWidth to determine whether the text is overflowing\n // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3\n const range = document.createRange()\n range.setStart(cellChild, 0)\n range.setEnd(cellChild, cellChild.childNodes.length)\n /** detail: https://github.com/element-plus/element-plus/issues/10790\n * What went wrong?\n * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:\n * - Expected: 188\n * - Actual: 188.00000762939453\n */\n let rangeWidth = range.getBoundingClientRect().width\n let rangeHeight = range.getBoundingClientRect().height\n const offsetWidth = rangeWidth - Math.floor(rangeWidth)\n if (offsetWidth < 0.001) {\n rangeWidth = Math.floor(rangeWidth)\n }\n const offsetHeight = rangeHeight - Math.floor(rangeHeight)\n if (offsetHeight < 0.001) {\n rangeHeight = Math.floor(rangeHeight)\n }\n\n const { top, left, right, bottom } = getPadding(cellChild)\n const horizontalPadding = left + right\n const verticalPadding = top + bottom\n if (\n rangeWidth + horizontalPadding > cellChild.offsetWidth ||\n rangeHeight + verticalPadding > cellChild.offsetHeight ||\n cellChild.scrollWidth > cellChild.offsetWidth\n ) {\n createTablePopper(\n tooltipOptions,\n cell.innerText || cell.textContent,\n cell,\n table\n )\n }\n }\n const handleCellMouseLeave = (event) => {\n const cell = getCell(event)\n if (!cell) return\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, removeClass)\n }\n const oldHoverState = parent?.hoverState\n parent?.emit(\n 'cell-mouse-leave',\n oldHoverState?.row,\n oldHoverState?.column,\n oldHoverState?.cell,\n event\n )\n }\n\n return {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n hand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,KAAK,KAAK;AAC1C,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,IAAI;AACb,MAAM,OAAO;AACb,IAAI,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE;AAC1B,MAAM,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;AAC7D,KAAK;AACL,IAAI,MAAM,aAAa,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC;AACtE,IAAI,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACrO,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,iBAAiB;AACrB,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,oBAAoB;AACxB,IAAI,oBAAoB;AACxB,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"events-helper.mjs","sources":["../../../../../../../packages/components/table/src/table-body/events-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport { h, inject, ref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { addClass, hasClass, removeClass } from '@element-plus/utils'\nimport { createTablePopper, getCell, getColumnByCell } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableBodyProps } from './defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\n\nfunction useEvents<T>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const tooltipContent = ref('')\n const tooltipTrigger = ref(h('div'))\n const handleEvent = (event: Event, row: T, name: string) => {\n const table = parent\n const cell = getCell(event)\n let column: TableColumnCtx<T>\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n if (column) {\n table?.emit(`cell-${name}`, row, column, cell, event)\n }\n }\n table?.emit(`row-${name}`, row, column, event)\n }\n const handleDoubleClick = (event: Event, row: T) => {\n handleEvent(event, row, 'dblclick')\n }\n const handleClick = (event: Event, row: T) => {\n props.store.commit('setCurrentRow', row)\n handleEvent(event, row, 'click')\n }\n const handleContextMenu = (event: Event, row: T) => {\n handleEvent(event, row, 'contextmenu')\n }\n const handleMouseEnter = debounce((index: number) => {\n props.store.commit('setHoverRow', index)\n }, 30)\n const handleMouseLeave = debounce(() => {\n props.store.commit('setHoverRow', null)\n }, 30)\n const getPadding = (el: HTMLElement) => {\n const style = window.getComputedStyle(el, null)\n const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0\n const paddingRight = Number.parseInt(style.paddingRight, 10) || 0\n const paddingTop = Number.parseInt(style.paddingTop, 10) || 0\n const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0\n return {\n left: paddingLeft,\n right: paddingRight,\n top: paddingTop,\n bottom: paddingBottom,\n }\n }\n\n const toggleRowClassByCell = (\n rowSpan: number,\n event: MouseEvent,\n toggle: (el: Element, cls: string) => void\n ) => {\n let node = event.target.parentNode\n while (rowSpan > 1) {\n node = node?.nextSibling\n if (!node || node.nodeName !== 'TR') break\n toggle(node, 'hover-row hover-fixed-row')\n rowSpan--\n }\n }\n\n const handleCellMouseEnter = (\n event: MouseEvent,\n row: T,\n tooltipOptions: TableOverflowTooltipOptions\n ) => {\n const table = parent\n const cell = getCell(event)\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n const column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, addClass)\n }\n const hoverState = (table.hoverState = { cell, column, row })\n table?.emit(\n 'cell-mouse-enter',\n hoverState.row,\n hoverState.column,\n hoverState.cell,\n event\n )\n }\n\n if (!tooltipOptions) {\n return\n }\n\n // 判断是否text-overflow, 如果是就显示tooltip\n const cellChild = (event.target as HTMLElement).querySelector(\n '.cell'\n ) as HTMLElement\n if (\n !(\n hasClass(cellChild, `${namespace}-tooltip`) &&\n cellChild.childNodes.length\n )\n ) {\n return\n }\n // use range width instead of scrollWidth to determine whether the text is overflowing\n // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3\n const range = document.createRange()\n range.setStart(cellChild, 0)\n range.setEnd(cellChild, cellChild.childNodes.length)\n /** detail: https://github.com/element-plus/element-plus/issues/10790\n * What went wrong?\n * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:\n * - Expected: 188\n * - Actual: 188.00000762939453\n */\n let rangeWidth = range.getBoundingClientRect().width\n let rangeHeight = range.getBoundingClientRect().height\n const offsetWidth = rangeWidth - Math.floor(rangeWidth)\n const { width: cellChildWidth, height: cellChildHeight } =\n cellChild.getBoundingClientRect()\n if (offsetWidth < 0.001) {\n rangeWidth = Math.floor(rangeWidth)\n }\n const offsetHeight = rangeHeight - Math.floor(rangeHeight)\n if (offsetHeight < 0.001) {\n rangeHeight = Math.floor(rangeHeight)\n }\n\n const { top, left, right, bottom } = getPadding(cellChild)\n const horizontalPadding = left + right\n const verticalPadding = top + bottom\n if (\n rangeWidth + horizontalPadding > cellChildWidth ||\n rangeHeight + verticalPadding > cellChildHeight ||\n cellChild.scrollWidth > cellChildWidth\n ) {\n createTablePopper(\n tooltipOptions,\n cell.innerText || cell.textContent,\n cell,\n table\n )\n }\n }\n const handleCellMouseLeave = (event) => {\n const cell = getCell(event)\n if (!cell) return\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, removeClass)\n }\n const oldHoverState = parent?.hoverState\n parent?.emit(\n 'cell-mouse-leave',\n oldHoverState?.row,\n oldHoverState?.column,\n oldHoverState?.cell,\n event\n )\n }\n\n return {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useEvents\n"],"names":[],"mappings":";;;;;;;AAKA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC7C,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AACjC,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACvC,EAAE,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,KAAK;AAC5C,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC;AACzB,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,MAAM,SAAS,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;AAC1G,IAAI,IAAI,IAAI,EAAE;AACd,MAAM,MAAM,GAAG,eAAe,CAAC;AAC/B,QAAQ,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK;AACjD,OAAO,EAAE,IAAI,EAAE,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ACxB,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -42,6 +42,7 @@ var TableBody = defineComponent({
|
|
|
42
42
|
}, []);
|
|
43
43
|
indexes.forEach((rowIndex) => {
|
|
44
44
|
var _a2;
|
|
45
|
+
rowNum = newVal;
|
|
45
46
|
while (rowNum > 0) {
|
|
46
47
|
const preChildNodes = (_a2 = rows[rowNum - 1]) == null ? void 0 : _a2.childNodes;
|
|
47
48
|
if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onUnmounted,\n watch,\n} from 'vue'\nimport { addClass, isClient, rAF, removeClass } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport useLayoutObserver from '../layout-observer'\nimport { removePopper } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useRender from './render-helper'\nimport defaultProps from './defaults'\n\nimport type { VNode } from 'vue'\n\nexport default defineComponent({\n name: 'ElTableBody',\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance()\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n const { wrappedRowRender, tooltipContent, tooltipTrigger } =\n useRender(props)\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)\n\n const hoveredCellList = []\n watch(props.store.states.hoverRow, (newVal: any, oldVal: any) => {\n const el = instance?.vnode.el as HTMLElement\n const rows = Array.from(el?.children || []).filter((e) =>\n e?.classList.contains(`${ns.e('row')}`)\n )\n\n // hover rowSpan > 1 choose the whole row\n let rowNum = newVal\n const childNodes = rows[rowNum]?.childNodes\n if (childNodes?.length) {\n let control = 0\n const indexes = Array.from(childNodes).reduce((acc, item, index) => {\n // drop colsSpan\n if (childNodes[index]?.colSpan > 1) {\n control = childNodes[index]?.colSpan\n }\n if (item.nodeName !== 'TD' && control === 0) {\n acc.push(index)\n }\n control > 0 && control--\n return acc\n }, [])\n\n indexes.forEach((rowIndex) => {\n while (rowNum > 0) {\n // find from previous\n const preChildNodes = rows[rowNum - 1]?.childNodes\n if (\n preChildNodes[rowIndex] &&\n preChildNodes[rowIndex].nodeName === 'TD' &&\n preChildNodes[rowIndex].rowSpan > 1\n ) {\n addClass(preChildNodes[rowIndex], 'hover-cell')\n hoveredCellList.push(preChildNodes[rowIndex])\n break\n }\n rowNum--\n }\n })\n } else {\n hoveredCellList.forEach((item) => removeClass(item, 'hover-cell'))\n hoveredCellList.length = 0\n }\n if (!props.store.states.isComplex.value || !isClient) return\n\n rAF(() => {\n // just get first level children; fix #9723\n const oldRow = rows[oldVal]\n const newRow = rows[newVal]\n // when there is fixed row, hover on rowSpan > 1 should not clear the class\n if (oldRow && !oldRow.classList.contains('hover-fixed-row')) {\n removeClass(oldRow, 'hover-row')\n }\n if (newRow) {\n addClass(newRow, 'hover-row')\n }\n })\n })\n\n onUnmounted(() => {\n removePopper?.()\n })\n\n return {\n ns,\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n },\n render() {\n const { wrappedRowRender, store } = this\n const data = store.states.data.value || []\n // Why do we need tabIndex: -1 ?\n // If you set the tabindex attribute on an element ,\n // then its child content cannot be scrolled with the arrow keys,\n // unless you set tabindex on the content too\n // See https://github.com/facebook/react/issues/25462#issuecomment-1274775248 or https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes/tabindex\n return h('tbody', { tabIndex: -1 }, [\n data.reduce((acc: VNode[], row) => {\n return acc.concat(wrappedRowRender(row, acc.length))\n }, []),\n ])\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,gBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KA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EAAE;AACR,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;AAC7C,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC/C,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;AACxC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAChC,QAAQ,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D,OAAO,EAAE,EAAE,CAAC;AACZ,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onUnmounted,\n watch,\n} from 'vue'\nimport { addClass, isClient, rAF, removeClass } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport useLayoutObserver from '../layout-observer'\nimport { removePopper } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useRender from './render-helper'\nimport defaultProps from './defaults'\n\nimport type { VNode } from 'vue'\n\nexport default defineComponent({\n name: 'ElTableBody',\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance()\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n const { wrappedRowRender, tooltipContent, tooltipTrigger } =\n useRender(props)\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)\n\n const hoveredCellList = []\n watch(props.store.states.hoverRow, (newVal: any, oldVal: any) => {\n const el = instance?.vnode.el as HTMLElement\n const rows = Array.from(el?.children || []).filter((e) =>\n e?.classList.contains(`${ns.e('row')}`)\n )\n\n // hover rowSpan > 1 choose the whole row\n let rowNum = newVal\n const childNodes = rows[rowNum]?.childNodes\n if (childNodes?.length) {\n let control = 0\n const indexes = Array.from(childNodes).reduce((acc, item, index) => {\n // drop colsSpan\n if (childNodes[index]?.colSpan > 1) {\n control = childNodes[index]?.colSpan\n }\n if (item.nodeName !== 'TD' && control === 0) {\n acc.push(index)\n }\n control > 0 && control--\n return acc\n }, [])\n\n indexes.forEach((rowIndex) => {\n rowNum = newVal\n while (rowNum > 0) {\n // find from previous\n const preChildNodes = rows[rowNum - 1]?.childNodes\n if (\n preChildNodes[rowIndex] &&\n preChildNodes[rowIndex].nodeName === 'TD' &&\n preChildNodes[rowIndex].rowSpan > 1\n ) {\n addClass(preChildNodes[rowIndex], 'hover-cell')\n hoveredCellList.push(preChildNodes[rowIndex])\n break\n }\n rowNum--\n }\n })\n } else {\n hoveredCellList.forEach((item) => removeClass(item, 'hover-cell'))\n hoveredCellList.length = 0\n }\n if (!props.store.states.isComplex.value || !isClient) return\n\n rAF(() => {\n // just get first level children; fix #9723\n const oldRow = rows[oldVal]\n const newRow = rows[newVal]\n // when there is fixed row, hover on rowSpan > 1 should not clear the class\n if (oldRow && !oldRow.classList.contains('hover-fixed-row')) {\n removeClass(oldRow, 'hover-row')\n }\n if (newRow) {\n addClass(newRow, 'hover-row')\n }\n })\n })\n\n onUnmounted(() => {\n removePopper?.()\n })\n\n return {\n ns,\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n },\n render() {\n const { wrappedRowRender, store } = this\n const data = store.states.data.value || []\n // Why do we need tabIndex: -1 ?\n // If you set the tabindex attribute on an element ,\n // then its child content cannot be scrolled with the arrow keys,\n // unless you set tabindex on the content too\n // See https://github.com/facebook/react/issues/25462#issuecomment-1274775248 or https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes/tabindex\n return h('tbody', { tabIndex: -1 }, [\n data.reduce((acc: VNode[], row) => {\n return acc.concat(wrappedRowRender(row, acc.length))\n }, []),\n ])\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,gBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE;AACf,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC/C,IAAI,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AAClF,IAAI,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,MAAM,eAAe,GAAG,EAAE,CAAC;AAC/B,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK;AAC3D,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,MAAM,EAAE,GAAG,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/D,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC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AU,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACxC,SAAS;AACT,OAAO,CAAC,CAAC;AACT,KAAK,CAAC,CAAC;AACP,IAAI,WAAW,CAAC,MAAM;AACtB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,CAAC,EAAE,GAAG,YAAY,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,MAAM,EAAE;AACR,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;AAC7C,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC/C,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;AACxC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAChC,QAAQ,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D,OAAO,EAAE,EAAE,CAAC;AACZ,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
@@ -218,7 +218,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
218
218
|
* @description set vertical scroll position
|
|
219
219
|
*/
|
|
220
220
|
setScrollTop: (top?: number | undefined) => void;
|
|
221
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select
|
|
221
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select-all" | "expand-change" | "current-change" | "select" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], "select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
222
222
|
data: {
|
|
223
223
|
type: import("vue").PropType<any[]>;
|
|
224
224
|
default: () => never[];
|
|
@@ -31,7 +31,7 @@ export declare const ElTag: import("@element-plus/nightly/es/utils").SFCWithInst
|
|
|
31
31
|
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
32
32
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
33
33
|
}>>;
|
|
34
|
-
emit: ((event: "
|
|
34
|
+
emit: ((event: "close", evt: MouseEvent) => void) & ((event: "click", evt: MouseEvent) => void);
|
|
35
35
|
tagSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
36
36
|
ns: {
|
|
37
37
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
32
32
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
33
33
|
}>>;
|
|
34
|
-
emit: ((event: "
|
|
34
|
+
emit: ((event: "close", evt: MouseEvent) => void) & ((event: "click", evt: MouseEvent) => void);
|
|
35
35
|
tagSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
36
36
|
ns: {
|
|
37
37
|
namespace: import("vue").ComputedRef<string>;
|