element-plus 2.6.2 → 2.7.0
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 +1168 -821
- package/dist/index.full.min.js +22 -22
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +18 -18
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +1161 -822
- 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 +13 -13
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.js.map +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.min.mjs.map +1 -1
- package/dist/locale/ru.mjs +13 -13
- 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/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/alert/index.d.ts +4 -4
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +4 -4
- package/es/components/autocomplete/index.d.ts +65 -65
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
- package/es/components/badge/index.d.ts +44 -0
- package/es/components/badge/src/badge.d.ts +15 -1
- package/es/components/badge/src/badge.mjs +12 -1
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.d.ts +45 -0
- package/es/components/badge/src/badge2.mjs +17 -3
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/button/index.d.ts +6 -5
- package/es/components/button/src/button.d.ts +1 -1
- package/es/components/button/src/button.vue.d.ts +6 -5
- package/es/components/button/src/button2.mjs +15 -14
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/button/src/use-button.d.ts +1 -1
- package/es/components/calendar/index.d.ts +6 -5
- package/es/components/calendar/src/calendar.vue.d.ts +7 -6
- 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 +158 -142
- package/es/components/cascader/src/cascader.d.ts +4 -2
- package/es/components/cascader/src/cascader.mjs +5 -3
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +79 -71
- package/es/components/cascader/src/cascader2.mjs +5 -2
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +39 -38
- package/es/components/color-picker/src/color-picker.vue.d.ts +39 -38
- package/es/components/config-provider/index.d.ts +6 -1
- package/es/components/config-provider/src/config-provider-props.d.ts +2 -0
- package/es/components/config-provider/src/config-provider-props.mjs +3 -1
- package/es/components/config-provider/src/config-provider-props.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +6 -1
- package/es/components/config-provider/src/hooks/use-global-config.mjs +1 -2
- package/es/components/config-provider/src/hooks/use-global-config.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +10 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +18 -17
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +2 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +18 -17
- package/es/components/date-picker/src/date-picker.d.ts +5 -0
- package/es/components/date-picker/src/panel-utils.d.ts +36 -34
- package/es/components/date-picker/src/props/date-picker.d.ts +2 -0
- 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/icon/style/css.d.ts +0 -1
- package/es/components/icon/style/css.mjs +0 -1
- package/es/components/icon/style/css.mjs.map +1 -1
- package/es/components/icon/style/index.d.ts +0 -1
- package/es/components/icon/style/index.mjs +0 -1
- package/es/components/icon/style/index.mjs.map +1 -1
- package/es/components/image/index.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +4 -2
- package/es/components/index.mjs.map +1 -1
- 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 +46 -46
- package/es/components/input-number/src/input-number.vue.d.ts +46 -46
- package/es/components/input-number/src/input-number2.mjs +17 -13
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/input-number/style/css.d.ts +1 -1
- package/es/components/input-number/style/css.mjs +1 -1
- package/es/components/input-number/style/index.d.ts +1 -1
- package/es/components/input-number/style/index.mjs +1 -1
- package/es/components/message/src/message.d.ts +12 -7
- package/es/components/message/src/message.mjs +6 -1
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +80 -22
- package/es/components/message/src/message2.mjs +1 -0
- package/es/components/message/src/message2.mjs.map +1 -1
- 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 +32 -27
- package/es/components/popconfirm/index.d.ts +24 -23
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +24 -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/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/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar2.mjs +1 -1
- package/es/components/scrollbar/src/thumb.mjs +130 -11
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +11 -130
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/segmented/index.d.ts +115 -0
- package/es/components/segmented/index.mjs +9 -0
- package/es/components/segmented/index.mjs.map +1 -0
- package/es/components/segmented/src/segmented.d.ts +26 -0
- package/es/components/segmented/src/segmented.mjs +170 -0
- package/es/components/segmented/src/segmented.mjs.map +1 -0
- package/es/components/segmented/src/segmented.vue.d.ts +115 -0
- package/es/components/segmented/src/segmented2.mjs +36 -0
- package/es/components/segmented/src/segmented2.mjs.map +1 -0
- package/es/components/segmented/src/types.d.ts +6 -0
- package/es/components/segmented/src/types.mjs +2 -0
- package/es/components/segmented/src/types.mjs.map +1 -0
- package/es/components/segmented/style/css.d.ts +2 -0
- package/es/components/segmented/style/css.mjs +3 -0
- package/es/components/segmented/style/css.mjs.map +1 -0
- package/es/components/segmented/style/index.d.ts +2 -0
- package/es/components/segmented/style/index.mjs +3 -0
- package/es/components/segmented/style/index.mjs.map +1 -0
- package/es/components/select/index.d.ts +32 -27
- package/es/components/select/src/select.d.ts +2 -0
- package/es/components/select/src/select.mjs +3 -1
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +32 -27
- package/es/components/select/src/useSelect.d.ts +25 -25
- package/es/components/select/src/useSelect.mjs +9 -7
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +64 -54
- package/es/components/select-v2/src/defaults.d.ts +2 -0
- package/es/components/select-v2/src/defaults.mjs +3 -1
- package/es/components/select-v2/src/defaults.mjs.map +1 -1
- package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +32 -27
- package/es/components/select-v2/src/useSelect.d.ts +25 -25
- package/es/components/select-v2/src/useSelect.mjs +9 -8
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/slider/index.d.ts +76 -76
- 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 +76 -76
- 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/index.mjs +7 -4
- 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/table-v2/src/composables/use-row.d.ts +7 -4
- package/es/components/table-v2/src/composables/use-row.mjs +20 -4
- package/es/components/table-v2/src/composables/use-row.mjs.map +1 -1
- package/es/components/table-v2/src/renderers/row.d.ts +3 -2
- package/es/components/table-v2/src/renderers/row.mjs +22 -4
- package/es/components/table-v2/src/renderers/row.mjs.map +1 -1
- package/es/components/table-v2/src/table-v2.mjs +0 -3
- package/es/components/table-v2/src/table-v2.mjs.map +1 -1
- package/es/components/table-v2/src/tokens.d.ts +0 -2
- package/es/components/table-v2/src/tokens.mjs.map +1 -1
- package/es/components/table-v2/src/use-table.d.ts +0 -1
- package/es/components/table-v2/src/use-table.mjs +10 -5
- package/es/components/table-v2/src/use-table.mjs.map +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/index.d.ts +10 -0
- package/es/components/time-picker/src/common/picker.mjs +6 -4
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +42 -34
- package/es/components/time-picker/src/common/props.d.ts +2 -30
- package/es/components/time-picker/src/common/props.mjs +3 -1
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +5 -0
- package/es/components/time-select/index.d.ts +148 -114
- package/es/components/time-select/src/time-select.d.ts +2 -0
- package/es/components/time-select/src/time-select.mjs +3 -1
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +74 -57
- package/es/components/time-select/src/time-select2.mjs +3 -1
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/index.d.ts +6 -6
- package/es/components/tooltip/src/content.vue.d.ts +6 -6
- package/es/components/tooltip/src/tooltip.vue.d.ts +6 -6
- 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 +13 -11
- package/es/components/tour/src/content.vue.d.ts +1 -1
- package/es/components/tour/src/step.vue.d.ts +6 -5
- package/es/components/tour/src/tour.vue.d.ts +1 -1
- package/es/components/transfer/index.d.ts +66 -65
- package/es/components/transfer/src/transfer-panel.vue.d.ts +12 -12
- package/es/components/transfer/src/transfer.vue.d.ts +66 -65
- package/es/components/tree/index.d.ts +16 -0
- package/es/components/tree/src/model/node.d.ts +2 -0
- package/es/components/tree/src/model/node.mjs +17 -1
- package/es/components/tree/src/model/node.mjs.map +1 -1
- package/es/components/tree/src/model/useDragNode.mjs +6 -0
- package/es/components/tree/src/model/useDragNode.mjs.map +1 -1
- package/es/components/tree/src/tree-node.mjs +1 -0
- package/es/components/tree/src/tree-node.mjs.map +1 -1
- package/es/components/tree/src/tree.vue.d.ts +8 -0
- 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/index.mjs +1 -1
- package/es/components/upload/src/upload-content.vue.d.ts +1 -1
- package/es/components/upload/src/upload-list.mjs +29 -178
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +178 -29
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +5 -5
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/index.mjs.map +1 -1
- package/es/hooks/use-empty-values/index.d.ts +13 -0
- package/es/hooks/use-empty-values/index.mjs +50 -0
- package/es/hooks/use-empty-values/index.mjs.map +1 -0
- package/es/index.mjs +5 -2
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/ru.mjs +12 -12
- package/es/locale/lang/ru.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/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/alert/index.d.ts +4 -4
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +4 -4
- package/lib/components/autocomplete/index.d.ts +65 -65
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
- package/lib/components/badge/index.d.ts +44 -0
- package/lib/components/badge/src/badge.d.ts +15 -1
- package/lib/components/badge/src/badge.js +11 -0
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +45 -0
- package/lib/components/badge/src/badge2.js +16 -2
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.d.ts +6 -5
- package/lib/components/button/src/button.d.ts +1 -1
- package/lib/components/button/src/button.vue.d.ts +6 -5
- package/lib/components/button/src/button2.js +14 -13
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/button/src/use-button.d.ts +1 -1
- package/lib/components/calendar/index.d.ts +6 -5
- package/lib/components/calendar/src/calendar.vue.d.ts +7 -6
- 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 +158 -142
- package/lib/components/cascader/src/cascader.d.ts +4 -2
- package/lib/components/cascader/src/cascader.js +5 -3
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +79 -71
- package/lib/components/cascader/src/cascader2.js +23 -20
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +39 -38
- package/lib/components/color-picker/src/color-picker.vue.d.ts +39 -38
- package/lib/components/config-provider/index.d.ts +6 -1
- package/lib/components/config-provider/src/config-provider-props.d.ts +2 -0
- package/lib/components/config-provider/src/config-provider-props.js +3 -1
- package/lib/components/config-provider/src/config-provider-props.js.map +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +6 -1
- package/lib/components/config-provider/src/hooks/use-global-config.js +1 -2
- package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +10 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +18 -17
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +2 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +18 -17
- package/lib/components/date-picker/src/date-picker.d.ts +5 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +36 -34
- package/lib/components/date-picker/src/props/date-picker.d.ts +2 -0
- 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/icon/style/css.d.ts +0 -1
- package/lib/components/icon/style/css.js +0 -1
- package/lib/components/icon/style/css.js.map +1 -1
- package/lib/components/icon/style/index.d.ts +0 -1
- package/lib/components/icon/style/index.js +0 -1
- package/lib/components/icon/style/index.js.map +1 -1
- package/lib/components/image/index.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +20 -15
- package/lib/components/index.js.map +1 -1
- 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 +46 -46
- package/lib/components/input-number/src/input-number.vue.d.ts +46 -46
- package/lib/components/input-number/src/input-number2.js +16 -12
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/input-number/style/css.d.ts +1 -1
- package/lib/components/input-number/style/css.js +1 -1
- package/lib/components/input-number/style/index.d.ts +1 -1
- package/lib/components/input-number/style/index.js +1 -1
- package/lib/components/message/src/message.d.ts +12 -7
- package/lib/components/message/src/message.js +6 -1
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +80 -22
- package/lib/components/message/src/message2.js +1 -0
- package/lib/components/message/src/message2.js.map +1 -1
- 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 +32 -27
- package/lib/components/popconfirm/index.d.ts +24 -23
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +24 -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/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/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar2.js +1 -1
- package/lib/components/scrollbar/src/thumb.js +130 -11
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +11 -130
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/segmented/index.d.ts +115 -0
- package/lib/components/segmented/index.js +16 -0
- package/lib/components/segmented/index.js.map +1 -0
- package/lib/components/segmented/src/segmented.d.ts +26 -0
- package/lib/components/segmented/src/segmented.js +174 -0
- package/lib/components/segmented/src/segmented.js.map +1 -0
- package/lib/components/segmented/src/segmented.vue.d.ts +115 -0
- package/lib/components/segmented/src/segmented2.js +41 -0
- package/lib/components/segmented/src/segmented2.js.map +1 -0
- package/lib/components/segmented/src/types.d.ts +6 -0
- package/lib/components/segmented/src/types.js +3 -0
- package/lib/components/segmented/src/types.js.map +1 -0
- package/lib/components/segmented/style/css.d.ts +2 -0
- package/lib/components/segmented/style/css.js +6 -0
- package/lib/components/segmented/style/css.js.map +1 -0
- package/lib/components/segmented/style/index.d.ts +2 -0
- package/lib/components/segmented/style/index.js +6 -0
- package/lib/components/segmented/style/index.js.map +1 -0
- package/lib/components/select/index.d.ts +32 -27
- package/lib/components/select/src/select.d.ts +2 -0
- package/lib/components/select/src/select.js +3 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +32 -27
- package/lib/components/select/src/useSelect.d.ts +25 -25
- package/lib/components/select/src/useSelect.js +8 -6
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +64 -54
- package/lib/components/select-v2/src/defaults.d.ts +2 -0
- package/lib/components/select-v2/src/defaults.js +3 -1
- package/lib/components/select-v2/src/defaults.js.map +1 -1
- package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +32 -27
- package/lib/components/select-v2/src/useSelect.d.ts +25 -25
- package/lib/components/select-v2/src/useSelect.js +10 -9
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/slider/index.d.ts +76 -76
- 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 +76 -76
- 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/index.js +7 -4
- 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/table-v2/src/composables/use-row.d.ts +7 -4
- package/lib/components/table-v2/src/composables/use-row.js +20 -4
- package/lib/components/table-v2/src/composables/use-row.js.map +1 -1
- package/lib/components/table-v2/src/renderers/row.d.ts +3 -2
- package/lib/components/table-v2/src/renderers/row.js +22 -4
- package/lib/components/table-v2/src/renderers/row.js.map +1 -1
- package/lib/components/table-v2/src/table-v2.js +0 -3
- package/lib/components/table-v2/src/table-v2.js.map +1 -1
- package/lib/components/table-v2/src/tokens.d.ts +0 -2
- package/lib/components/table-v2/src/tokens.js.map +1 -1
- package/lib/components/table-v2/src/use-table.d.ts +0 -1
- package/lib/components/table-v2/src/use-table.js +9 -4
- package/lib/components/table-v2/src/use-table.js.map +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/index.d.ts +10 -0
- package/lib/components/time-picker/src/common/picker.js +15 -13
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +42 -34
- package/lib/components/time-picker/src/common/props.d.ts +2 -30
- package/lib/components/time-picker/src/common/props.js +3 -1
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +5 -0
- package/lib/components/time-select/index.d.ts +148 -114
- package/lib/components/time-select/src/time-select.d.ts +2 -0
- package/lib/components/time-select/src/time-select.js +3 -1
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +74 -57
- package/lib/components/time-select/src/time-select2.js +3 -1
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/index.d.ts +6 -6
- package/lib/components/tooltip/src/content.vue.d.ts +6 -6
- package/lib/components/tooltip/src/tooltip.vue.d.ts +6 -6
- 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 +13 -11
- package/lib/components/tour/src/content.vue.d.ts +1 -1
- package/lib/components/tour/src/step.vue.d.ts +6 -5
- package/lib/components/tour/src/tour.vue.d.ts +1 -1
- package/lib/components/transfer/index.d.ts +66 -65
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +12 -12
- package/lib/components/transfer/src/transfer.vue.d.ts +66 -65
- package/lib/components/tree/index.d.ts +16 -0
- package/lib/components/tree/src/model/node.d.ts +2 -0
- package/lib/components/tree/src/model/node.js +17 -1
- package/lib/components/tree/src/model/node.js.map +1 -1
- package/lib/components/tree/src/model/useDragNode.js +6 -0
- package/lib/components/tree/src/model/useDragNode.js.map +1 -1
- package/lib/components/tree/src/tree-node.js +1 -0
- package/lib/components/tree/src/tree-node.js.map +1 -1
- package/lib/components/tree/src/tree.vue.d.ts +8 -0
- 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/index.js +1 -1
- package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/src/upload-list.js +30 -178
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +178 -30
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +5 -5
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +6 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-empty-values/index.d.ts +13 -0
- package/lib/hooks/use-empty-values/index.js +58 -0
- package/lib/hooks/use-empty-values/index.js.map +1 -0
- package/lib/index.js +118 -107
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/ru.js +12 -12
- package/lib/locale/lang/ru.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-input-number.css +1 -1
- package/theme-chalk/el-message.css +1 -1
- package/theme-chalk/el-segmented.css +1 -0
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +19 -0
- package/theme-chalk/src/index.scss +2 -1
- package/theme-chalk/src/input-number.scss +5 -3
- package/theme-chalk/src/message.scss +6 -0
- package/theme-chalk/src/segmented.scss +160 -0
- 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/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
32
|
-
readonly status: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "
|
|
32
|
+
readonly status: import("element-plus/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/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/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
43
|
-
readonly status: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "
|
|
43
|
+
readonly status: import("element-plus/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/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
163
|
-
readonly status: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "
|
|
163
|
+
readonly status: import("element-plus/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/es/utils").EpPropMergeType<StringConstructor, "" | "
|
|
167
|
+
readonly status: import("element-plus/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/es/utils").EpPropFinalized<StringConstructor, "
|
|
20
|
-
readonly processStatus: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "
|
|
19
|
+
readonly finishStatus: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "finish", boolean>;
|
|
20
|
+
readonly processStatus: import("element-plus/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/es/utils").SFCWithInstall<imp
|
|
|
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/es/components/popper").Options>) | (() => Partial<import("element-plus/es/components/popper").Options>) | ((new (...args: any[]) => Partial<import("element-plus/es/components/popper").Options>) | (() => Partial<import("element-plus/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/es/components/popper").Options>) | (() => Partial<import("element-plus/es/components/popper").Options>) | ((new (...args: any[]) => Partial<import("element-plus/es/components/popper").Options>) | (() => Partial<import("element-plus/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;
|
|
@@ -32,20 +32,23 @@ var TableBody = vue.defineComponent({
|
|
|
32
32
|
let rowNum = newVal;
|
|
33
33
|
const childNodes = (_a = rows[rowNum]) == null ? void 0 : _a.childNodes;
|
|
34
34
|
if (childNodes == null ? void 0 : childNodes.length) {
|
|
35
|
+
let control = 0;
|
|
35
36
|
const indexes = Array.from(childNodes).reduce((acc, item, index) => {
|
|
36
37
|
var _a2, _b;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
if (((_a2 = childNodes[index]) == null ? void 0 : _a2.colSpan) > 1) {
|
|
39
|
+
control = (_b = childNodes[index]) == null ? void 0 : _b.colSpan;
|
|
40
|
+
}
|
|
41
|
+
if (item.nodeName !== "TD" && control === 0) {
|
|
40
42
|
acc.push(index);
|
|
41
43
|
}
|
|
44
|
+
control > 0 && control--;
|
|
42
45
|
return acc;
|
|
43
46
|
}, []);
|
|
44
47
|
indexes.forEach((rowIndex) => {
|
|
45
48
|
var _a2;
|
|
46
49
|
while (rowNum > 0) {
|
|
47
50
|
const preChildNodes = (_a2 = rows[rowNum - 1]) == null ? void 0 : _a2.childNodes;
|
|
48
|
-
if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD") {
|
|
51
|
+
if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) {
|
|
49
52
|
style.addClass(preChildNodes[rowIndex], "hover-cell");
|
|
50
53
|
hoveredCellList.push(preChildNodes[rowIndex]);
|
|
51
54
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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 const indexes = Array.from(childNodes).reduce((acc, item, index) => {\n // drop colsSpan\n
|
|
1
|
+
{"version":3,"file":"index.js","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":["defineComponent","defaultProps","getCurrentInstance","inject","TABLE_INJECTION_KEY","useNamespace","useRender","useLayoutObserver","watch","addClass","removeClass","isClient","rAF","onUnmounted","removePopper","h"],"mappings":";;;;;;;;;;;;;;;;;AAeA,gBAAeA,mBAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAEC,mBAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE;AACf,IAAI,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AAC1C,IAAI,MAAM,MAAM,GAAGC,UAAM,CAACC,0BAAmB,CAAC,CAAC;AAC/C,IAAI,MAAM,EAAE,GAAGC,kBAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,GAAGC,uBAAS,CAAC,KAAK,CAAC,CAAC;AAClF,IAAI,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,GAAGC,yBAAiB,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,MAAM,eAAe,GAAG,EAAE,CAAC;AAC/B,IAAIC,SAAK,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,G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,QAAQ,IAAI,MAAM,EAAE;AACpB,UAAUD,cAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACxC,SAAS;AACT,OAAO,CAAC,CAAC;AACT,KAAK,CAAC,CAAC;AACP,IAAII,eAAW,CAAC,MAAM;AACtB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,CAAC,EAAE,GAAGC,iBAAY,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,OAAOC,KAAC,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[];
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
1
|
+
import type { ComponentInternalInstance, Ref, ShallowRef } from 'vue';
|
|
2
2
|
import type { TableV2Props } from '../table';
|
|
3
3
|
import type { RowExpandParams, RowHeightChangedParams, RowHoverParams } from '../row';
|
|
4
4
|
import type { FixedDirection, KeyType } from '../types';
|
|
5
5
|
import type { onRowRenderedParams } from '../grid';
|
|
6
6
|
import type { TableGridInstance } from '../table-grid';
|
|
7
|
+
import type { UseNamespaceReturn } from 'element-plus/es/hooks';
|
|
7
8
|
declare type Heights = Record<KeyType, number>;
|
|
8
9
|
declare type GridInstanceRef = Ref<TableGridInstance | undefined>;
|
|
9
10
|
declare type UseRowProps = {
|
|
10
11
|
mainTableRef: GridInstanceRef;
|
|
11
12
|
leftTableRef: GridInstanceRef;
|
|
12
13
|
rightTableRef: GridInstanceRef;
|
|
14
|
+
tableInstance: ComponentInternalInstance;
|
|
15
|
+
ns: UseNamespaceReturn;
|
|
16
|
+
isScrolling: ShallowRef<boolean>;
|
|
13
17
|
};
|
|
14
|
-
export declare const useRow: (props: TableV2Props, { mainTableRef, leftTableRef, rightTableRef }: UseRowProps) => {
|
|
15
|
-
hoveringRowKey: import("vue").ShallowRef<KeyType | null>;
|
|
18
|
+
export declare const useRow: (props: TableV2Props, { mainTableRef, leftTableRef, rightTableRef, tableInstance, ns, isScrolling, }: UseRowProps) => {
|
|
16
19
|
expandedRowKeys: Ref<KeyType[]>;
|
|
17
20
|
lastRenderedRowIndex: Ref<number>;
|
|
18
21
|
isDynamic: import("vue").ComputedRef<boolean>;
|
|
19
|
-
isResetting:
|
|
22
|
+
isResetting: ShallowRef<boolean>;
|
|
20
23
|
rowHeights: Ref<Heights>;
|
|
21
24
|
resetAfterIndex: (index: number, forceUpdate?: boolean) => void;
|
|
22
25
|
onRowExpanded: ({ expanded, rowData, rowIndex, rowKey, }: RowExpandParams) => void;
|
|
@@ -8,11 +8,17 @@ require('../../../../utils/index.js');
|
|
|
8
8
|
var constants = require('../constants.js');
|
|
9
9
|
var types = require('../../../../utils/types.js');
|
|
10
10
|
|
|
11
|
-
const useRow = (props, {
|
|
11
|
+
const useRow = (props, {
|
|
12
|
+
mainTableRef,
|
|
13
|
+
leftTableRef,
|
|
14
|
+
rightTableRef,
|
|
15
|
+
tableInstance,
|
|
16
|
+
ns,
|
|
17
|
+
isScrolling
|
|
18
|
+
}) => {
|
|
12
19
|
const vm = vue.getCurrentInstance();
|
|
13
20
|
const { emit } = vm;
|
|
14
21
|
const isResetting = vue.shallowRef(false);
|
|
15
|
-
const hoveringRowKey = vue.shallowRef(null);
|
|
16
22
|
const expandedRowKeys = vue.ref(props.defaultExpandedRowKeys || []);
|
|
17
23
|
const lastRenderedRowIndex = vue.ref(-1);
|
|
18
24
|
const resetIndex = vue.shallowRef(null);
|
|
@@ -30,7 +36,18 @@ const useRow = (props, { mainTableRef, leftTableRef, rightTableRef }) => {
|
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
function onRowHovered({ hovered, rowKey }) {
|
|
33
|
-
|
|
39
|
+
if (isScrolling.value) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const tableRoot = tableInstance.vnode.el;
|
|
43
|
+
const rows = tableRoot.querySelectorAll(`[rowkey=${rowKey}]`);
|
|
44
|
+
rows.forEach((row) => {
|
|
45
|
+
if (hovered) {
|
|
46
|
+
row.classList.add(ns.is("hovered"));
|
|
47
|
+
} else {
|
|
48
|
+
row.classList.remove(ns.is("hovered"));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
34
51
|
}
|
|
35
52
|
function onRowExpanded({
|
|
36
53
|
expanded,
|
|
@@ -108,7 +125,6 @@ const useRow = (props, { mainTableRef, leftTableRef, rightTableRef }) => {
|
|
|
108
125
|
}
|
|
109
126
|
}
|
|
110
127
|
return {
|
|
111
|
-
hoveringRowKey,
|
|
112
128
|
expandedRowKeys,
|
|
113
129
|
lastRenderedRowIndex,
|
|
114
130
|
isDynamic,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-row.js","sources":["../../../../../../../packages/components/table-v2/src/composables/use-row.ts"],"sourcesContent":["import { computed, getCurrentInstance, ref, shallowRef, unref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { isNumber } from '@element-plus/utils'\nimport { FixedDir } from '../constants'\n\nimport type { Ref } from 'vue'\nimport type { TableV2Props } from '../table'\nimport type {\n RowExpandParams,\n RowHeightChangedParams,\n RowHoverParams,\n} from '../row'\nimport type { FixedDirection, KeyType } from '../types'\nimport type { onRowRenderedParams } from '../grid'\nimport type { TableGridInstance } from '../table-grid'\n\ntype Heights = Record<KeyType, number>\ntype GridInstanceRef = Ref<TableGridInstance | undefined>\n\ntype UseRowProps = {\n mainTableRef: GridInstanceRef\n leftTableRef: GridInstanceRef\n rightTableRef: GridInstanceRef\n}\n\nexport const useRow = (\n props: TableV2Props,\n { mainTableRef, leftTableRef, rightTableRef }: UseRowProps\n) => {\n const vm = getCurrentInstance()!\n const { emit } = vm\n const isResetting = shallowRef(false)\n const hoveringRowKey = shallowRef<KeyType | null>(null)\n const expandedRowKeys = ref<KeyType[]>(props.defaultExpandedRowKeys || [])\n const lastRenderedRowIndex = ref(-1)\n const resetIndex = shallowRef<number | null>(null)\n const rowHeights = ref<Heights>({})\n const pendingRowHeights = ref<Heights>({})\n const leftTableHeights = shallowRef<Heights>({})\n const mainTableHeights = shallowRef<Heights>({})\n const rightTableHeights = shallowRef<Heights>({})\n const isDynamic = computed(() => isNumber(props.estimatedRowHeight))\n\n function onRowsRendered(params: onRowRenderedParams) {\n props.onRowsRendered?.(params)\n\n if (params.rowCacheEnd > unref(lastRenderedRowIndex)) {\n lastRenderedRowIndex.value = params.rowCacheEnd\n }\n }\n\n function onRowHovered({ hovered, rowKey }: RowHoverParams) {\n hoveringRowKey.value = hovered ? rowKey : null\n }\n\n function onRowExpanded({\n expanded,\n rowData,\n rowIndex,\n rowKey,\n }: RowExpandParams) {\n const _expandedRowKeys = [...unref(expandedRowKeys)]\n const currentKeyIndex = _expandedRowKeys.indexOf(rowKey)\n if (expanded) {\n if (currentKeyIndex === -1) _expandedRowKeys.push(rowKey)\n } else {\n if (currentKeyIndex > -1) _expandedRowKeys.splice(currentKeyIndex, 1)\n }\n expandedRowKeys.value = _expandedRowKeys\n\n emit('update:expandedRowKeys', _expandedRowKeys)\n props.onRowExpand?.({\n expanded,\n rowData,\n rowIndex,\n rowKey,\n })\n // If this is not controlled, then use this to notify changes\n props.onExpandedRowsChange?.(_expandedRowKeys)\n }\n\n const flushingRowHeights = debounce(() => {\n isResetting.value = true\n rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) }\n resetAfterIndex(unref(resetIndex)!, false)\n pendingRowHeights.value = {}\n // force update\n resetIndex.value = null\n mainTableRef.value?.forceUpdate()\n leftTableRef.value?.forceUpdate()\n rightTableRef.value?.forceUpdate()\n vm.proxy?.$forceUpdate()\n isResetting.value = false\n }, 0)\n\n function resetAfterIndex(index: number, forceUpdate = false) {\n if (!unref(isDynamic)) return\n ;[mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => {\n const table = unref(tableRef)\n if (table) table.resetAfterRowIndex(index, forceUpdate)\n })\n }\n\n function resetHeights(rowKey: KeyType, height: number, rowIdx: number) {\n const resetIdx = unref(resetIndex)\n if (resetIdx === null) {\n resetIndex.value = rowIdx\n } else {\n if (resetIdx > rowIdx) {\n resetIndex.value = rowIdx\n }\n }\n\n pendingRowHeights.value[rowKey] = height\n }\n\n function onRowHeightChange(\n { rowKey, height, rowIndex }: RowHeightChangedParams,\n fixedDir: FixedDirection\n ) {\n if (!fixedDir) {\n mainTableHeights.value[rowKey] = height\n } else {\n if (fixedDir === FixedDir.RIGHT) {\n rightTableHeights.value[rowKey] = height\n } else {\n leftTableHeights.value[rowKey] = height\n }\n }\n\n const maximumHeight = Math.max(\n ...[leftTableHeights, rightTableHeights, mainTableHeights].map(\n (records) => records.value[rowKey] || 0\n )\n )\n\n if (unref(rowHeights)[rowKey] !== maximumHeight) {\n resetHeights(rowKey, maximumHeight, rowIndex)\n flushingRowHeights()\n }\n }\n\n return {\n hoveringRowKey,\n expandedRowKeys,\n lastRenderedRowIndex,\n isDynamic,\n isResetting,\n rowHeights,\n\n resetAfterIndex,\n onRowExpanded,\n onRowHovered,\n onRowsRendered,\n onRowHeightChange,\n }\n}\n\nexport type UseRowReturn = ReturnType<typeof useRow>\n"],"names":["getCurrentInstance","shallowRef","ref","computed","isNumber","unref","debounce","FixedDir"],"mappings":";;;;;;;;;;AAIY,MAAC,MAAM,GAAG,CAAC,KAAK,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK;AAChF,EAAE,MAAM,EAAE,GAAGA,sBAAkB,EAAE,CAAC;AAClC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACtB,EAAE,MAAM,WAAW,GAAGC,cAAU,CAAC,KAAK,CAAC,CAAC;AACxC,EAAE,MAAM,cAAc,GAAGA,cAAU,CAAC,IAAI,CAAC,CAAC;AAC1C,EAAE,MAAM,eAAe,G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K;AACL,GAAG;AACH,EAAE,OAAO;AACT,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,oBAAoB;AACxB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"use-row.js","sources":["../../../../../../../packages/components/table-v2/src/composables/use-row.ts"],"sourcesContent":["import { computed, getCurrentInstance, ref, shallowRef, unref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { isNumber } from '@element-plus/utils'\nimport { FixedDir } from '../constants'\n\nimport type { ComponentInternalInstance, Ref, ShallowRef } from 'vue'\nimport type { TableV2Props } from '../table'\nimport type {\n RowExpandParams,\n RowHeightChangedParams,\n RowHoverParams,\n} from '../row'\nimport type { FixedDirection, KeyType } from '../types'\nimport type { onRowRenderedParams } from '../grid'\nimport type { TableGridInstance } from '../table-grid'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\n\ntype Heights = Record<KeyType, number>\ntype GridInstanceRef = Ref<TableGridInstance | undefined>\n\ntype UseRowProps = {\n mainTableRef: GridInstanceRef\n leftTableRef: GridInstanceRef\n rightTableRef: GridInstanceRef\n tableInstance: ComponentInternalInstance\n ns: UseNamespaceReturn\n isScrolling: ShallowRef<boolean>\n}\n\nexport const useRow = (\n props: TableV2Props,\n {\n mainTableRef,\n leftTableRef,\n rightTableRef,\n tableInstance,\n ns,\n isScrolling,\n }: UseRowProps\n) => {\n const vm = getCurrentInstance()!\n const { emit } = vm\n const isResetting = shallowRef(false)\n const expandedRowKeys = ref<KeyType[]>(props.defaultExpandedRowKeys || [])\n const lastRenderedRowIndex = ref(-1)\n const resetIndex = shallowRef<number | null>(null)\n const rowHeights = ref<Heights>({})\n const pendingRowHeights = ref<Heights>({})\n const leftTableHeights = shallowRef<Heights>({})\n const mainTableHeights = shallowRef<Heights>({})\n const rightTableHeights = shallowRef<Heights>({})\n const isDynamic = computed(() => isNumber(props.estimatedRowHeight))\n\n function onRowsRendered(params: onRowRenderedParams) {\n props.onRowsRendered?.(params)\n\n if (params.rowCacheEnd > unref(lastRenderedRowIndex)) {\n lastRenderedRowIndex.value = params.rowCacheEnd\n }\n }\n\n function onRowHovered({ hovered, rowKey }: RowHoverParams) {\n if (isScrolling.value) {\n return\n }\n const tableRoot = tableInstance!.vnode.el as HTMLElement\n const rows = tableRoot.querySelectorAll(`[rowkey=${rowKey as string}]`)\n rows.forEach((row) => {\n if (hovered) {\n row.classList.add(ns.is('hovered'))\n } else {\n row.classList.remove(ns.is('hovered'))\n }\n })\n }\n\n function onRowExpanded({\n expanded,\n rowData,\n rowIndex,\n rowKey,\n }: RowExpandParams) {\n const _expandedRowKeys = [...unref(expandedRowKeys)]\n const currentKeyIndex = _expandedRowKeys.indexOf(rowKey)\n if (expanded) {\n if (currentKeyIndex === -1) _expandedRowKeys.push(rowKey)\n } else {\n if (currentKeyIndex > -1) _expandedRowKeys.splice(currentKeyIndex, 1)\n }\n expandedRowKeys.value = _expandedRowKeys\n\n emit('update:expandedRowKeys', _expandedRowKeys)\n props.onRowExpand?.({\n expanded,\n rowData,\n rowIndex,\n rowKey,\n })\n // If this is not controlled, then use this to notify changes\n props.onExpandedRowsChange?.(_expandedRowKeys)\n }\n\n const flushingRowHeights = debounce(() => {\n isResetting.value = true\n rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) }\n resetAfterIndex(unref(resetIndex)!, false)\n pendingRowHeights.value = {}\n // force update\n resetIndex.value = null\n mainTableRef.value?.forceUpdate()\n leftTableRef.value?.forceUpdate()\n rightTableRef.value?.forceUpdate()\n vm.proxy?.$forceUpdate()\n isResetting.value = false\n }, 0)\n\n function resetAfterIndex(index: number, forceUpdate = false) {\n if (!unref(isDynamic)) return\n ;[mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => {\n const table = unref(tableRef)\n if (table) table.resetAfterRowIndex(index, forceUpdate)\n })\n }\n\n function resetHeights(rowKey: KeyType, height: number, rowIdx: number) {\n const resetIdx = unref(resetIndex)\n if (resetIdx === null) {\n resetIndex.value = rowIdx\n } else {\n if (resetIdx > rowIdx) {\n resetIndex.value = rowIdx\n }\n }\n\n pendingRowHeights.value[rowKey] = height\n }\n\n function onRowHeightChange(\n { rowKey, height, rowIndex }: RowHeightChangedParams,\n fixedDir: FixedDirection\n ) {\n if (!fixedDir) {\n mainTableHeights.value[rowKey] = height\n } else {\n if (fixedDir === FixedDir.RIGHT) {\n rightTableHeights.value[rowKey] = height\n } else {\n leftTableHeights.value[rowKey] = height\n }\n }\n\n const maximumHeight = Math.max(\n ...[leftTableHeights, rightTableHeights, mainTableHeights].map(\n (records) => records.value[rowKey] || 0\n )\n )\n\n if (unref(rowHeights)[rowKey] !== maximumHeight) {\n resetHeights(rowKey, maximumHeight, rowIndex)\n flushingRowHeights()\n }\n }\n\n return {\n expandedRowKeys,\n lastRenderedRowIndex,\n isDynamic,\n isResetting,\n rowHeights,\n\n resetAfterIndex,\n onRowExpanded,\n onRowHovered,\n onRowsRendered,\n onRowHeightChange,\n }\n}\n\nexport type UseRowReturn = ReturnType<typeof useRow>\n"],"names":["getCurrentInstance","shallowRef","ref","computed","isNumber","unref","debounce","FixedDir"],"mappings":";;;;;;;;;;AAIY,MAAC,MAAM,GAAG,CAAC,KAAK,EAAE;AAC9B,EAAE,YAAY;AACd,EAAE,YAAY;AACd,EAAE,aAAa;AACf,EAAE,aAAa;AACf,EAAE,EAAE;AACJ,EAAE,WAAW;AACb,CAAC,KAAK;AACN,EAAE,MAAM,EAAE,GAAGA,sBAAkB,EAAE,CAAC;AAClC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACtB,EAAE,MAAM,WAAW,GAAGC,cAAU,CAAC,KAAK,CAAC,CAAC;AACxC,EAAE,MAAM,eAAe,GAAGC,OAAG,CAAC,KAAK,CAAC,sBA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AgB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAChD,OAAO;AACP,KAAK;AACL,IAAI,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5I,IAAI,IAAIF,SAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,aAAa,EAAE;AACrD,MAAM,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;AACpD,MAAM,kBAAkB,EAAE,CAAC;AAC3B,KAAK;AACL,GAAG;AACH,EAAE,OAAO;AACT,IAAI,eAAe;AACnB,IAAI,oBAAoB;AACxB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { FunctionalComponent, UnwrapNestedRefs } from 'vue';
|
|
1
|
+
import type { ComponentInternalInstance, FunctionalComponent, UnwrapNestedRefs } from 'vue';
|
|
2
2
|
import type { UseNamespaceReturn } from 'element-plus/es/hooks';
|
|
3
3
|
import type { UseTableReturn } from '../use-table';
|
|
4
4
|
import type { TableV2Props } from '../table';
|
|
5
5
|
import type { TableGridRowSlotParams } from '../table-grid';
|
|
6
|
-
declare type RowRendererProps = TableGridRowSlotParams & Pick<TableV2Props, 'expandColumnKey' | 'estimatedRowHeight' | 'rowProps' | 'rowClass' | 'rowKey' | 'rowEventHandlers'> & UnwrapNestedRefs<Pick<UseTableReturn, 'depthMap' | 'expandedRowKeys' | 'hasFixedColumns' | '
|
|
6
|
+
declare type RowRendererProps = TableGridRowSlotParams & Pick<TableV2Props, 'expandColumnKey' | 'estimatedRowHeight' | 'rowProps' | 'rowClass' | 'rowKey' | 'rowEventHandlers'> & UnwrapNestedRefs<Pick<UseTableReturn, 'depthMap' | 'expandedRowKeys' | 'hasFixedColumns' | 'onRowHovered' | 'onRowExpanded' | 'columnsStyles'>> & {
|
|
7
7
|
ns: UseNamespaceReturn;
|
|
8
|
+
tableInstance: null | ComponentInternalInstance;
|
|
8
9
|
};
|
|
9
10
|
declare const RowRenderer: FunctionalComponent<RowRendererProps>;
|
|
10
11
|
export default RowRenderer;
|
|
@@ -21,7 +21,6 @@ const RowRenderer = (props, {
|
|
|
21
21
|
expandedRowKeys,
|
|
22
22
|
estimatedRowHeight,
|
|
23
23
|
hasFixedColumns,
|
|
24
|
-
hoveringRowKey,
|
|
25
24
|
rowData,
|
|
26
25
|
rowIndex,
|
|
27
26
|
style,
|
|
@@ -51,7 +50,6 @@ const RowRenderer = (props, {
|
|
|
51
50
|
const kls = [ns.e("row"), rowKls, {
|
|
52
51
|
[ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0,
|
|
53
52
|
[ns.is("expanded")]: canExpand && expandedRowKeys.includes(_rowKey),
|
|
54
|
-
[ns.is("hovered")]: !isScrolling && _rowKey === hoveringRowKey,
|
|
55
53
|
[ns.is("fixed")]: !depth && isFixedRow,
|
|
56
54
|
[ns.is("customized")]: Boolean(slots.row)
|
|
57
55
|
}];
|
|
@@ -71,9 +69,29 @@ const RowRenderer = (props, {
|
|
|
71
69
|
rowEventHandlers,
|
|
72
70
|
style
|
|
73
71
|
};
|
|
72
|
+
const handlerMosueEnter = (e) => {
|
|
73
|
+
onRowHover == null ? void 0 : onRowHover({
|
|
74
|
+
hovered: true,
|
|
75
|
+
rowKey: _rowKey,
|
|
76
|
+
event: e,
|
|
77
|
+
rowData,
|
|
78
|
+
rowIndex
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const handlerMouseLeave = (e) => {
|
|
82
|
+
onRowHover == null ? void 0 : onRowHover({
|
|
83
|
+
hovered: false,
|
|
84
|
+
rowKey: _rowKey,
|
|
85
|
+
event: e,
|
|
86
|
+
rowData,
|
|
87
|
+
rowIndex
|
|
88
|
+
});
|
|
89
|
+
};
|
|
74
90
|
return vue.createVNode(row["default"], vue.mergeProps(_rowProps, {
|
|
75
|
-
"
|
|
76
|
-
"
|
|
91
|
+
"onRowExpand": onRowExpanded,
|
|
92
|
+
"onMouseenter": handlerMosueEnter,
|
|
93
|
+
"onMouseleave": handlerMouseLeave,
|
|
94
|
+
"rowkey": _rowKey
|
|
77
95
|
}), _isSlot(slots) ? slots : {
|
|
78
96
|
default: () => [slots]
|
|
79
97
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","sources":["../../../../../../../packages/components/table-v2/src/renderers/row.tsx"],"sourcesContent":["import { Row } from '../components'\nimport { tryCall } from '../utils'\n\nimport type {
|
|
1
|
+
{"version":3,"file":"row.js","sources":["../../../../../../../packages/components/table-v2/src/renderers/row.tsx"],"sourcesContent":["import { Row } from '../components'\nimport { tryCall } from '../utils'\n\nimport type {\n ComponentInternalInstance,\n FunctionalComponent,\n UnwrapNestedRefs,\n} from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { UseTableReturn } from '../use-table'\nimport type { TableV2Props } from '../table'\nimport type { TableGridRowSlotParams } from '../table-grid'\n\ntype RowRendererProps = TableGridRowSlotParams &\n Pick<\n TableV2Props,\n | 'expandColumnKey'\n | 'estimatedRowHeight'\n | 'rowProps'\n | 'rowClass'\n | 'rowKey'\n | 'rowEventHandlers'\n > &\n UnwrapNestedRefs<\n Pick<\n UseTableReturn,\n | 'depthMap'\n | 'expandedRowKeys'\n | 'hasFixedColumns'\n | 'onRowHovered'\n | 'onRowExpanded'\n | 'columnsStyles'\n >\n > & {\n ns: UseNamespaceReturn\n tableInstance: null | ComponentInternalInstance\n }\n\nconst RowRenderer: FunctionalComponent<RowRendererProps> = (\n props,\n { slots }\n) => {\n const {\n columns,\n columnsStyles,\n depthMap,\n expandColumnKey,\n expandedRowKeys,\n estimatedRowHeight,\n hasFixedColumns,\n rowData,\n rowIndex,\n style,\n isScrolling,\n rowProps,\n rowClass,\n rowKey,\n rowEventHandlers,\n ns,\n onRowHovered,\n onRowExpanded,\n } = props\n\n const rowKls = tryCall(rowClass, { columns, rowData, rowIndex }, '')\n const additionalProps = tryCall(rowProps, {\n columns,\n rowData,\n rowIndex,\n })\n const _rowKey = rowData[rowKey]\n const depth = depthMap[_rowKey] || 0\n const canExpand = Boolean(expandColumnKey)\n const isFixedRow = rowIndex < 0\n const kls = [\n ns.e('row'),\n rowKls,\n {\n [ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0,\n [ns.is('expanded')]: canExpand && expandedRowKeys.includes(_rowKey),\n [ns.is('fixed')]: !depth && isFixedRow,\n [ns.is('customized')]: Boolean(slots.row),\n },\n ]\n\n const onRowHover = hasFixedColumns ? onRowHovered : undefined\n\n const _rowProps = {\n ...additionalProps,\n columns,\n columnsStyles,\n class: kls,\n depth,\n expandColumnKey,\n estimatedRowHeight: isFixedRow ? undefined : estimatedRowHeight,\n isScrolling,\n rowIndex,\n rowData,\n rowKey: _rowKey,\n rowEventHandlers,\n style,\n }\n\n const handlerMosueEnter = (e: MouseEvent) => {\n onRowHover?.({\n hovered: true,\n rowKey: _rowKey,\n event: e,\n rowData,\n rowIndex,\n })\n }\n\n const handlerMouseLeave = (e: MouseEvent) => {\n onRowHover?.({\n hovered: false,\n rowKey: _rowKey,\n event: e,\n rowData,\n rowIndex,\n })\n }\n\n return (\n <Row\n {..._rowProps}\n onRowExpand={onRowExpanded}\n onMouseenter={handlerMosueEnter}\n onMouseleave={handlerMouseLeave}\n rowkey={_rowKey}\n >\n {slots}\n </Row>\n )\n}\n\nexport default RowRenderer\n"],"names":["RowRenderer","slots","columns","columnsStyles","depthMap","expandColumnKey","expandedRowKeys","estimatedRowHeight","hasFixedColumns","rowData","rowIndex","style","isScrolling","rowProps","rowClass","rowKey","rowEventHandlers","ns","onRowExpanded","_rowKey","depth","canExpand","Boolean","isFixedRow","kls","e","is","class","handlerMosueEnter","onRowHover","hovered","event","handlerMouseLeave"],"mappings":";;;;;;;;;;;;;;AAsCA,CAAA,KAAMA;AAEFC,EAAAA,MAAAA;AAAF,IACG,OAAA;IACG,aAAA;IACJC,QADI;IAEJC,eAFI;IAGJC,eAHI;IAIJC,kBAJI;IAKJC,eALI;IAMJC,OANI;IAOJC,QAPI;IAQJC,KARI;IASJC,WATI;IAUJC,QAVI;IAWJC,QAXI;IAYJC,MAZI;IAaJC,gBAbI;IAcJC,EAdI;IAeJC,YAfI;IAgBJC,aAhBI;MAAA,KAAA,CAAA;AAkBJC,EAAAA,MAAAA,MAAAA,GAAAA,aAAAA,CAAAA,QAAAA,EAAAA;AAlBI,IAAA,OAAN;AAqBA,IAAA,OAAY;IAAuBhB,QAAF;KAAA,EAAA,CAAA,CAAA;AAAoBQ,EAAAA,MAAAA,eAAAA,GAAAA,aAAAA,CAAAA,QAAAA,EAAAA;IAA/B,OAAtB;AACA,IAAA,OAAqB;IACnBR,QADwC;IAExCO,CAFwC;AAGxCC,EAAAA,MAAAA,OAAAA,GAAAA,OAAAA,CAAAA,MAAAA,CAAAA,CAAAA;AAHwC,EAAA,MAA1C,KAAA,GAAA,QAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AAKA,EAAA,MAAMS,SAAO,GAAU,uBAAvB,CAAA,CAAA;AACA,EAAA,MAAMC,UAAQhB,GAAAA,QAAQ,GAAA,CAAR;AACd,EAAA,MAAMiB,GAAS,GAAA,CAAA,EAAA,CAAA,CAAA,CAAGC,KAAO,CAAA,EAACjB;AAC1B,IAAA,CAAA,EAAA,CAAMkB,CAAU,CAAA,CAAA,UAAGb,EAAQ,KAAA,CAAA,CAAA,CAAA,GAA3B,SAAA,IAAA,QAAA,IAAA,CAAA;IACMc,CAAAA,EAAAA,CAAAA,EAAAA,CA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AA,aAAA;IADF,cAAA,EAAA,iBAAA;;AAUA,IAAA,QAAA,EAAA,OAAA;AAAA,GAAA,CAAA,EAAA,OAAA,CAAA,KAGiBQ,CAHjB,GAAA,KAAA,GAAA;AAAA,IAAA,OAAA,EAAA,MAAA,CAIkBU,KAJlB,CAAA;AAAA,GAAA,CAAA,CAAA;;;;;"}
|
|
@@ -44,7 +44,6 @@ const TableV2 = vue.defineComponent({
|
|
|
44
44
|
depthMap,
|
|
45
45
|
expandedRowKeys,
|
|
46
46
|
hasFixedColumns,
|
|
47
|
-
hoveringRowKey,
|
|
48
47
|
mainTableRef,
|
|
49
48
|
leftTableRef,
|
|
50
49
|
rightTableRef,
|
|
@@ -79,7 +78,6 @@ const TableV2 = vue.defineComponent({
|
|
|
79
78
|
vue.provide(tokens.TableV2InjectionKey, {
|
|
80
79
|
ns,
|
|
81
80
|
isResetting,
|
|
82
|
-
hoveringRowKey,
|
|
83
81
|
isScrolling
|
|
84
82
|
});
|
|
85
83
|
return () => {
|
|
@@ -187,7 +185,6 @@ const TableV2 = vue.defineComponent({
|
|
|
187
185
|
expandedRowKeys: vue.unref(expandedRowKeys),
|
|
188
186
|
estimatedRowHeight,
|
|
189
187
|
hasFixedColumns: vue.unref(hasFixedColumns),
|
|
190
|
-
hoveringRowKey: vue.unref(hoveringRowKey),
|
|
191
188
|
rowProps,
|
|
192
189
|
rowClass,
|
|
193
190
|
rowKey,
|