@element-plus/nightly 0.0.20260513 → 0.0.20260515
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +495 -474
- package/dist/index.full.min.js +4 -4
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +495 -474
- 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/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.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/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.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/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/src/affix.d.ts +1 -1
- package/es/components/affix/src/affix.vue.d.ts +2 -2
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +1 -1
- package/es/components/anchor/src/anchor.vue.d.ts +3 -3
- package/es/components/autocomplete/src/autocomplete.d.ts +2 -2
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +4 -4
- package/es/components/avatar/src/avatar-group.d.ts +1 -1
- package/es/components/badge/src/badge.vue.d.ts +1 -1
- package/es/components/button/src/button-group.d.ts +1 -1
- package/es/components/button/src/button-group.vue.d.ts +1 -1
- package/es/components/button/src/button.d.ts +1 -1
- package/es/components/button/src/button.vue.d.ts +3 -3
- package/es/components/button/src/use-button.d.ts +1 -1
- package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
- package/es/components/carousel/src/carousel.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.d.ts +3 -3
- package/es/components/cascader/src/cascader.vue.d.ts +22 -22
- package/es/components/cascader-panel/src/index.vue.d.ts +3 -3
- package/es/components/cascader-panel/src/menu.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +4 -4
- package/es/components/checkbox/src/checkbox.d.ts +8 -8
- package/es/components/checkbox/src/checkbox.vue.d.ts +5 -5
- package/es/components/color-picker/src/color-picker.vue.d.ts +10 -10
- package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +2 -2
- package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/es/components/countdown/src/countdown.vue.d.ts +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +19 -19
- package/es/components/date-picker/src/props.d.ts +3 -3
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +4 -4
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +4 -4
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs +22 -8
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-panel.d.ts +9 -9
- package/es/components/date-picker-panel/src/panel-utils.d.ts +24 -24
- package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
- package/es/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
- package/es/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
- package/es/components/date-picker-panel/src/props/shared.d.ts +1 -1
- package/es/components/descriptions/src/description-item.d.ts +19 -19
- package/es/components/dialog/src/dialog.vue.d.ts +4 -4
- package/es/components/divider/src/divider.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +7 -7
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +3 -3
- package/es/components/dropdown/src/dropdown.vue.d.ts +84 -84
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +2 -2
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
- package/es/components/input/src/input.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +13 -13
- package/es/components/input-number/src/input-number.d.ts +3 -3
- package/es/components/input-number/src/input-number.vue.d.ts +8 -8
- package/es/components/input-otp/src/input-otp.vue.d.ts +7 -7
- package/es/components/input-tag/src/input-tag.d.ts +1 -1
- package/es/components/input-tag/src/input-tag.vue.d.ts +14 -14
- package/es/components/link/src/link.d.ts +1 -1
- package/es/components/mention/src/mention.d.ts +2 -2
- package/es/components/mention/src/mention.vue.d.ts +3 -3
- package/es/components/menu/src/menu.d.ts +6 -6
- package/es/components/message/src/instance.d.ts +1 -1
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +4 -4
- package/es/components/message-box/src/index.vue.d.ts +48 -48
- package/es/components/notification/src/notification.vue.d.ts +1 -1
- package/es/components/pagination/src/pagination.d.ts +3 -3
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/es/components/popover/src/popover.d.ts +2 -2
- package/es/components/popover/src/popover.vue.d.ts +9 -9
- package/es/components/popper/src/composables/use-content.d.ts +3 -3
- package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/es/components/popper/src/content.d.ts +4 -4
- package/es/components/popper/src/content.vue.d.ts +15 -15
- package/es/components/radio/src/radio-button.d.ts +3 -3
- package/es/components/radio/src/radio-button.vue.d.ts +3 -3
- package/es/components/radio/src/radio-group.vue.d.ts +5 -5
- package/es/components/radio/src/radio.d.ts +6 -6
- package/es/components/radio/src/radio.vue.d.ts +4 -4
- package/es/components/rate/src/rate.vue.d.ts +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/es/components/row/src/row.d.ts +2 -2
- package/es/components/segmented/index.d.ts +2 -2
- package/es/components/segmented/src/segmented.d.ts +1 -1
- package/es/components/select/src/option.d.ts +2 -2
- package/es/components/select/src/option.vue.d.ts +5 -5
- package/es/components/select/src/select.d.ts +4 -4
- package/es/components/select/src/select.vue.d.ts +104 -104
- package/es/components/select/src/useOption.d.ts +2 -2
- package/es/components/select/src/useSelect.d.ts +5 -5
- package/es/components/select-v2/src/defaults.d.ts +2 -2
- package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +92 -92
- package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/es/components/slider/src/button.vue.d.ts +2 -2
- package/es/components/slider/src/slider.vue.d.ts +6 -6
- package/es/components/space/src/space.d.ts +2 -2
- package/es/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/es/components/switch/src/switch.vue.d.ts +3 -3
- package/es/components/table/index.d.ts +6 -3
- package/es/components/table/index.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +80 -80
- package/es/components/table/src/table/defaults.d.ts +143 -9
- package/es/components/table/src/table/defaults.mjs +5 -2
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table/key-render-helper.d.ts +2 -2
- package/es/components/table/src/table/key-render-helper.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.d.ts +1 -1
- package/es/components/table/src/table/utils-helper.d.ts +1 -1
- package/es/components/table/src/table/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.d.ts +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +129 -4
- package/es/components/table/src/table-column/defaults.mjs +5 -2
- package/es/components/table/src/table-column/defaults.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +1 -226
- package/es/components/table/src/table-column/index.mjs +2 -116
- package/es/components/table/src/table-column/index.mjs.map +1 -1
- package/es/components/table/src/table-column/index.vue.d.ts +37 -0
- package/es/components/table/src/table-column/index.vue_vue_type_script_setup_true_lang.mjs +124 -0
- package/es/components/table/src/table-column/index.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/table-column/index2.mjs +7 -0
- package/es/components/table/src/table-column/index2.mjs.map +1 -0
- package/es/components/table/src/table-footer/index.d.ts +1 -1
- package/es/components/table/src/table-header/index.d.ts +16 -16
- package/es/components/table/src/table.mjs +2 -211
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +692 -1350
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +392 -0
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/tableColumn.d.ts +1 -1
- package/es/components/table/src/util.d.ts +3 -1
- package/es/components/table/src/util.mjs +5 -1
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/table-v2/src/components/header.d.ts +1 -1
- package/es/components/table-v2/src/components/row.d.ts +1 -1
- package/es/components/table-v2/src/table-grid.d.ts +4 -4
- package/es/components/table-v2/src/table-v2.d.ts +6 -6
- package/es/components/tabs/src/tab-nav.d.ts +1 -1
- package/es/components/tabs/src/tab-pane.vue.d.ts +1 -1
- package/es/components/tabs/src/tabs.d.ts +6 -6
- package/es/components/tag/src/tag.d.ts +1 -1
- package/es/components/tag/src/tag.vue.d.ts +3 -3
- package/es/components/text/src/text.vue.d.ts +1 -1
- package/es/components/text/src/text.vue_vue_type_script_setup_true_lang.mjs +5 -3
- package/es/components/text/src/text.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +4 -4
- package/es/components/time-picker/src/common/picker.vue.d.ts +25 -25
- package/es/components/time-picker/src/common/props.d.ts +2 -2
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
- package/es/components/time-picker/src/time-picker.d.ts +17 -17
- package/es/components/time-select/src/time-select.vue.d.ts +13 -13
- package/es/components/timeline/src/timeline-item.d.ts +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +2 -2
- package/es/components/tooltip/src/content.d.ts +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +15 -15
- package/es/components/tooltip/src/tooltip.d.ts +2 -2
- package/es/components/tooltip/src/tooltip.vue.d.ts +18 -18
- package/es/components/tooltip/src/trigger.d.ts +1 -1
- package/es/components/tour/src/content.d.ts +2 -2
- package/es/components/tour/src/content.vue.d.ts +1 -1
- package/es/components/tour/src/step.d.ts +1 -1
- package/es/components/tour/src/step.vue.d.ts +1 -1
- package/es/components/tour/src/tour.d.ts +1 -1
- package/es/components/tour/src/tour.vue.d.ts +3 -3
- package/es/components/tree/src/tree-node.vue.d.ts +15 -15
- package/es/components/tree/src/tree.vue.d.ts +17 -17
- package/es/components/tree-select/src/tree-select-option.d.ts +5 -5
- package/es/components/tree-select/src/tree-select.vue.d.ts +34 -34
- package/es/components/tree-v2/src/composables/useTree.d.ts +6 -6
- package/es/components/tree-v2/src/composables/useTree.mjs +1 -1
- package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +4 -4
- package/es/components/upload/src/upload-content.vue.d.ts +1 -1
- package/es/components/upload/src/upload.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-grid.d.ts +3 -3
- package/es/components/virtual-list/src/builders/build-list.d.ts +3 -3
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -3
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +3 -3
- package/es/components/virtual-list/src/components/scrollbar.d.ts +1 -1
- package/es/components/watermark/src/watermark.vue.d.ts +1 -1
- package/es/directives/index.d.ts +1 -1
- package/es/hooks/use-floating/index.d.ts +4 -4
- package/es/hooks/use-popper/index.d.ts +3 -3
- package/es/index.d.ts +1 -1
- package/es/utils/vue/vnode.d.ts +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/affix/src/affix.d.ts +1 -1
- package/lib/components/affix/src/affix.vue.d.ts +2 -2
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +1 -1
- package/lib/components/anchor/src/anchor.vue.d.ts +3 -3
- package/lib/components/autocomplete/src/autocomplete.d.ts +2 -2
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +4 -4
- package/lib/components/avatar/src/avatar-group.d.ts +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +1 -1
- package/lib/components/button/src/button-group.d.ts +1 -1
- package/lib/components/button/src/button-group.vue.d.ts +1 -1
- package/lib/components/button/src/button.d.ts +1 -1
- package/lib/components/button/src/button.vue.d.ts +3 -3
- package/lib/components/button/src/use-button.d.ts +1 -1
- package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
- package/lib/components/carousel/src/carousel.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.d.ts +3 -3
- package/lib/components/cascader/src/cascader.vue.d.ts +22 -22
- package/lib/components/cascader-panel/src/index.vue.d.ts +3 -3
- package/lib/components/cascader-panel/src/menu.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +4 -4
- package/lib/components/checkbox/src/checkbox.d.ts +8 -8
- package/lib/components/checkbox/src/checkbox.vue.d.ts +5 -5
- package/lib/components/color-picker/src/color-picker.vue.d.ts +10 -10
- package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +2 -2
- package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/lib/components/countdown/src/countdown.vue.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +19 -19
- package/lib/components/date-picker/src/props.d.ts +3 -3
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +4 -4
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +4 -4
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js +22 -8
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +9 -9
- package/lib/components/date-picker-panel/src/panel-utils.d.ts +24 -24
- package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
- package/lib/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
- package/lib/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
- package/lib/components/date-picker-panel/src/props/shared.d.ts +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +19 -19
- package/lib/components/dialog/src/dialog.vue.d.ts +4 -4
- package/lib/components/divider/src/divider.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +7 -7
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown.vue.d.ts +84 -84
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +2 -2
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
- package/lib/components/input/src/input.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +13 -13
- package/lib/components/input-number/src/input-number.d.ts +3 -3
- package/lib/components/input-number/src/input-number.vue.d.ts +8 -8
- package/lib/components/input-otp/src/input-otp.vue.d.ts +7 -7
- package/lib/components/input-tag/src/input-tag.d.ts +1 -1
- package/lib/components/input-tag/src/input-tag.vue.d.ts +14 -14
- package/lib/components/link/src/link.d.ts +1 -1
- package/lib/components/mention/src/mention.d.ts +2 -2
- package/lib/components/mention/src/mention.vue.d.ts +3 -3
- package/lib/components/menu/src/menu.d.ts +6 -6
- package/lib/components/message/src/instance.d.ts +1 -1
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +4 -4
- package/lib/components/message-box/src/index.vue.d.ts +48 -48
- package/lib/components/notification/src/notification.vue.d.ts +1 -1
- package/lib/components/pagination/src/pagination.d.ts +3 -3
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/lib/components/popover/src/popover.d.ts +2 -2
- package/lib/components/popover/src/popover.vue.d.ts +9 -9
- package/lib/components/popper/src/composables/use-content.d.ts +3 -3
- package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/lib/components/popper/src/content.d.ts +4 -4
- package/lib/components/popper/src/content.vue.d.ts +15 -15
- package/lib/components/radio/src/radio-button.d.ts +3 -3
- package/lib/components/radio/src/radio-button.vue.d.ts +3 -3
- package/lib/components/radio/src/radio-group.vue.d.ts +5 -5
- package/lib/components/radio/src/radio.d.ts +6 -6
- package/lib/components/radio/src/radio.vue.d.ts +4 -4
- package/lib/components/rate/src/rate.vue.d.ts +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/lib/components/row/src/row.d.ts +2 -2
- package/lib/components/segmented/index.d.ts +2 -2
- package/lib/components/segmented/src/segmented.d.ts +1 -1
- package/lib/components/select/src/option.d.ts +2 -2
- package/lib/components/select/src/option.vue.d.ts +5 -5
- package/lib/components/select/src/select.d.ts +4 -4
- package/lib/components/select/src/select.vue.d.ts +104 -104
- package/lib/components/select/src/useOption.d.ts +2 -2
- package/lib/components/select/src/useSelect.d.ts +5 -5
- package/lib/components/select-v2/src/defaults.d.ts +2 -2
- package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +92 -92
- package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/lib/components/slider/src/button.vue.d.ts +2 -2
- package/lib/components/slider/src/slider.vue.d.ts +6 -6
- package/lib/components/space/src/space.d.ts +2 -2
- package/lib/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +3 -3
- package/lib/components/table/index.d.ts +6 -3
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +80 -80
- package/lib/components/table/src/table/defaults.d.ts +143 -9
- package/lib/components/table/src/table/defaults.js +6 -2
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table/key-render-helper.d.ts +2 -2
- package/lib/components/table/src/table/key-render-helper.js.map +1 -1
- package/lib/components/table/src/table/style-helper.d.ts +1 -1
- package/lib/components/table/src/table/utils-helper.d.ts +1 -1
- package/lib/components/table/src/table/utils-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.d.ts +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +129 -4
- package/lib/components/table/src/table-column/defaults.js +6 -2
- package/lib/components/table/src/table-column/defaults.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +1 -226
- package/lib/components/table/src/table-column/index.js +1 -118
- package/lib/components/table/src/table-column/index.js.map +1 -1
- package/lib/components/table/src/table-column/index.vue.d.ts +37 -0
- package/lib/components/table/src/table-column/index.vue_vue_type_script_setup_true_lang.js +126 -0
- package/lib/components/table/src/table-column/index.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/lib/components/table/src/table-column/index2.js +10 -0
- package/lib/components/table/src/table-column/index2.js.map +1 -0
- package/lib/components/table/src/table-footer/index.d.ts +1 -1
- package/lib/components/table/src/table-header/index.d.ts +16 -16
- package/lib/components/table/src/table.js +1 -212
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +692 -1350
- package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js +393 -0
- package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/lib/components/table/src/tableColumn.d.ts +1 -1
- package/lib/components/table/src/util.d.ts +3 -1
- package/lib/components/table/src/util.js +6 -0
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/table-v2/src/components/header.d.ts +1 -1
- package/lib/components/table-v2/src/components/row.d.ts +1 -1
- package/lib/components/table-v2/src/table-grid.d.ts +4 -4
- package/lib/components/table-v2/src/table-v2.d.ts +6 -6
- package/lib/components/tabs/src/tab-nav.d.ts +1 -1
- package/lib/components/tabs/src/tab-pane.vue.d.ts +1 -1
- package/lib/components/tabs/src/tabs.d.ts +6 -6
- package/lib/components/tag/src/tag.d.ts +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +3 -3
- package/lib/components/text/src/text.vue.d.ts +1 -1
- package/lib/components/text/src/text.vue_vue_type_script_setup_true_lang.js +4 -2
- package/lib/components/text/src/text.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +4 -4
- package/lib/components/time-picker/src/common/picker.vue.d.ts +25 -25
- package/lib/components/time-picker/src/common/props.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker.d.ts +17 -17
- package/lib/components/time-select/src/time-select.vue.d.ts +13 -13
- package/lib/components/timeline/src/timeline-item.d.ts +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +2 -2
- package/lib/components/tooltip/src/content.d.ts +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +15 -15
- package/lib/components/tooltip/src/tooltip.d.ts +2 -2
- package/lib/components/tooltip/src/tooltip.vue.d.ts +18 -18
- package/lib/components/tooltip/src/trigger.d.ts +1 -1
- package/lib/components/tour/src/content.d.ts +2 -2
- package/lib/components/tour/src/content.vue.d.ts +1 -1
- package/lib/components/tour/src/step.d.ts +1 -1
- package/lib/components/tour/src/step.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.d.ts +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +3 -3
- package/lib/components/tree/src/tree-node.vue.d.ts +15 -15
- package/lib/components/tree/src/tree.vue.d.ts +17 -17
- package/lib/components/tree-select/src/tree-select-option.d.ts +5 -5
- package/lib/components/tree-select/src/tree-select.vue.d.ts +34 -34
- package/lib/components/tree-v2/src/composables/useTree.d.ts +6 -6
- package/lib/components/tree-v2/src/composables/useTree.js +1 -1
- package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +4 -4
- package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +3 -3
- package/lib/components/virtual-list/src/builders/build-list.d.ts +3 -3
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +3 -3
- package/lib/components/virtual-list/src/components/scrollbar.d.ts +1 -1
- package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
- package/lib/directives/index.d.ts +1 -1
- package/lib/hooks/use-floating/index.d.ts +4 -4
- package/lib/hooks/use-popper/index.d.ts +3 -3
- package/lib/index.d.ts +1 -1
- package/lib/utils/vue/vnode.d.ts +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/web-types.json +1 -1
- package/es/components/table/src/table.vue_vue_type_script_lang.mjs +0 -195
- package/es/components/table/src/table.vue_vue_type_script_lang.mjs.map +0 -1
- package/lib/components/table/src/table.vue_vue_type_script_lang.js +0 -196
- package/lib/components/table/src/table.vue_vue_type_script_lang.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["ElTableColumn"],"sources":["../../../../../../../packages/components/table/src/table-column/index.ts"],"sourcesContent":["import ElTableColumn from './index.vue'\n\nexport default ElTableColumn\n"],"mappings":";;;;;AAEA,IAAA,6CAAeA,CAAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TableColumnCtx, TableColumnProps } from "./defaults.js";
|
|
2
|
+
import { DefaultRow } from "../table/defaults.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region ../../packages/components/table/src/table-column/index.vue.d.ts
|
|
6
|
+
declare const __VLS_export: <T extends DefaultRow = DefaultRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
|
+
props: _$vue.PublicProps & __VLS_PrettifyLocal<TableColumnProps<T>> & (typeof globalThis extends {
|
|
8
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
9
|
+
} ? P : {});
|
|
10
|
+
expose: (exposed: {}) => void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: {
|
|
13
|
+
default?: (props: {
|
|
14
|
+
row: T;
|
|
15
|
+
column: TableColumnCtx<T>;
|
|
16
|
+
$index: number;
|
|
17
|
+
}) => any;
|
|
18
|
+
header?: (props: {
|
|
19
|
+
column: TableColumnCtx<T>;
|
|
20
|
+
$index: number;
|
|
21
|
+
}) => any;
|
|
22
|
+
expand?: (props: {
|
|
23
|
+
expanded: boolean;
|
|
24
|
+
expandable: boolean;
|
|
25
|
+
}) => any;
|
|
26
|
+
'filter-icon'?: (props: {
|
|
27
|
+
filterOpened: boolean;
|
|
28
|
+
}) => any;
|
|
29
|
+
};
|
|
30
|
+
emit: {};
|
|
31
|
+
}>) => _$vue.VNode & {
|
|
32
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
33
|
+
};
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { _default as default };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.js");
|
|
2
|
+
const require_types = require("../../../../utils/types.js");
|
|
3
|
+
const require_use_global_config = require("../../../config-provider/src/hooks/use-global-config.js");
|
|
4
|
+
const require_util = require("../util.js");
|
|
5
|
+
const require_defaults = require("./defaults.js");
|
|
6
|
+
const require_config = require("../config.js");
|
|
7
|
+
const require_watcher_helper = require("./watcher-helper.js");
|
|
8
|
+
const require_render_helper = require("./render-helper.js");
|
|
9
|
+
let vue = require("vue");
|
|
10
|
+
let _vue_shared = require("@vue/shared");
|
|
11
|
+
//#region ../../packages/components/table/src/table-column/index.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
13
|
+
name: "ElTableColumn",
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: require_defaults.default,
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const slots = (0, vue.useSlots)();
|
|
19
|
+
const instance = (0, vue.getCurrentInstance)();
|
|
20
|
+
const globalConfig = require_use_global_config.useGlobalConfig("table");
|
|
21
|
+
const columnConfig = (0, vue.ref)({});
|
|
22
|
+
const owner = (0, vue.computed)(() => {
|
|
23
|
+
let parent = instance.parent;
|
|
24
|
+
while (parent && !parent.tableId) parent = parent.parent;
|
|
25
|
+
return parent;
|
|
26
|
+
});
|
|
27
|
+
const { registerNormalWatchers, registerComplexWatchers } = require_watcher_helper.default(owner, props);
|
|
28
|
+
const { columnId, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, realAlign, updateColumnOrder } = require_render_helper.default(props, slots, owner);
|
|
29
|
+
const parent = columnOrTableParent.value;
|
|
30
|
+
columnId.value = require_util.createTableColumnId("tableId" in parent ? parent.tableId : parent.columnId);
|
|
31
|
+
(0, vue.onBeforeMount)(() => {
|
|
32
|
+
isSubColumn.value = owner.value !== parent;
|
|
33
|
+
const type = props.type || "default";
|
|
34
|
+
const sortable = props.sortable === "" ? true : props.sortable;
|
|
35
|
+
const showOverflowTooltip = type === "selection" ? false : require_types.isUndefined(props.showOverflowTooltip) ? parent.props.showOverflowTooltip ?? globalConfig.value?.showOverflowTooltip : props.showOverflowTooltip;
|
|
36
|
+
const tooltipFormatter = require_types.isUndefined(props.tooltipFormatter) ? parent.props.tooltipFormatter ?? globalConfig.value?.tooltipFormatter : props.tooltipFormatter;
|
|
37
|
+
const defaults = {
|
|
38
|
+
...require_config.cellStarts[type],
|
|
39
|
+
id: columnId.value,
|
|
40
|
+
type,
|
|
41
|
+
property: props.prop || props.property,
|
|
42
|
+
align: realAlign,
|
|
43
|
+
headerAlign: realHeaderAlign,
|
|
44
|
+
showOverflowTooltip,
|
|
45
|
+
tooltipFormatter,
|
|
46
|
+
filterable: props.filters || props.filterMethod,
|
|
47
|
+
filteredValue: [],
|
|
48
|
+
filterPlacement: "",
|
|
49
|
+
filterClassName: "",
|
|
50
|
+
isColumnGroup: false,
|
|
51
|
+
isSubColumn: false,
|
|
52
|
+
filterOpened: false,
|
|
53
|
+
sortable,
|
|
54
|
+
index: props.index,
|
|
55
|
+
rawColumnKey: instance.vnode.key
|
|
56
|
+
};
|
|
57
|
+
let column = getPropsData([
|
|
58
|
+
"columnKey",
|
|
59
|
+
"label",
|
|
60
|
+
"className",
|
|
61
|
+
"labelClassName",
|
|
62
|
+
"type",
|
|
63
|
+
"renderHeader",
|
|
64
|
+
"formatter",
|
|
65
|
+
"fixed",
|
|
66
|
+
"resizable"
|
|
67
|
+
], [
|
|
68
|
+
"sortMethod",
|
|
69
|
+
"sortBy",
|
|
70
|
+
"sortOrders"
|
|
71
|
+
], ["selectable", "reserveSelection"], [
|
|
72
|
+
"filterMethod",
|
|
73
|
+
"filters",
|
|
74
|
+
"filterMultiple",
|
|
75
|
+
"filterOpened",
|
|
76
|
+
"filteredValue",
|
|
77
|
+
"filterPlacement",
|
|
78
|
+
"filterClassName"
|
|
79
|
+
]);
|
|
80
|
+
column = require_util.mergeOptions(defaults, column);
|
|
81
|
+
column = require_util.compose(setColumnRenders, setColumnWidth, setColumnForcedProps)(column);
|
|
82
|
+
columnConfig.value = column;
|
|
83
|
+
registerNormalWatchers();
|
|
84
|
+
registerComplexWatchers();
|
|
85
|
+
});
|
|
86
|
+
(0, vue.onMounted)(() => {
|
|
87
|
+
const parent = columnOrTableParent.value;
|
|
88
|
+
const children = isSubColumn.value ? parent.vnode.el?.children : parent.refs.hiddenColumns?.children;
|
|
89
|
+
const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el);
|
|
90
|
+
columnConfig.value.getColumnIndex = getColumnIndex;
|
|
91
|
+
getColumnIndex() > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
|
|
92
|
+
});
|
|
93
|
+
(0, vue.onBeforeUnmount)(() => {
|
|
94
|
+
const getColumnIndex = columnConfig.value.getColumnIndex;
|
|
95
|
+
(getColumnIndex ? getColumnIndex() : -1) > -1 && owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
|
|
96
|
+
});
|
|
97
|
+
instance.columnId = columnId.value;
|
|
98
|
+
instance.columnConfig = columnConfig;
|
|
99
|
+
const TableColumnRenderer = () => {
|
|
100
|
+
try {
|
|
101
|
+
const renderDefault = slots.default?.({
|
|
102
|
+
row: {},
|
|
103
|
+
column: {},
|
|
104
|
+
$index: -1
|
|
105
|
+
});
|
|
106
|
+
const children = [];
|
|
107
|
+
if ((0, _vue_shared.isArray)(renderDefault)) {
|
|
108
|
+
for (const childNode of renderDefault) if (childNode.type?.name === "ElTableColumn" || childNode.shapeFlag & 2) children.push(childNode);
|
|
109
|
+
else if (childNode.type === vue.Fragment && (0, _vue_shared.isArray)(childNode.children)) childNode.children.forEach((vnode) => {
|
|
110
|
+
if (vnode?.patchFlag !== 1024 && !(0, _vue_shared.isString)(vnode?.children)) children.push(vnode);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return (0, vue.h)("div", children);
|
|
114
|
+
} catch {
|
|
115
|
+
return (0, vue.h)("div", []);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
return (_ctx, _cache) => {
|
|
119
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(TableColumnRenderer);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
//#endregion
|
|
124
|
+
exports.default = index_vue_vue_type_script_setup_true_lang_default;
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=index.vue_vue_type_script_setup_true_lang.js.map
|
package/lib/components/table/src/table-column/index.vue_vue_type_script_setup_true_lang.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../../packages/components/table/src/table-column/index.vue"],"sourcesContent":["<template>\n <TableColumnRenderer />\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends DefaultRow = DefaultRow\">\nimport {\n Fragment,\n computed,\n getCurrentInstance,\n h,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n ref,\n} from 'vue'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { isArray, isString, isUndefined } from '@element-plus/utils'\nimport { cellStarts } from '../config'\nimport { compose, createTableColumnId, mergeOptions } from '../util'\nimport useWatcher from './watcher-helper'\nimport useRender from './render-helper'\n\nimport type { VNode } from 'vue'\nimport type { TableColumn, TableColumnCtx, TableColumnProps } from './defaults'\nimport type { DefaultRow } from '../table/defaults'\n\ndefineOptions({\n name: 'ElTableColumn',\n})\n\nconst props = withDefaults(defineProps<TableColumnProps<T>>(), {\n type: 'default',\n width: '',\n minWidth: '',\n sortable: false,\n resizable: true,\n showOverflowTooltip: undefined,\n filterMultiple: true,\n sortOrders: () => ['ascending', 'descending', null],\n})\nconst slots = defineSlots<{\n default?: (props: {\n row: T\n column: TableColumnCtx<T>\n $index: number\n }) => any\n header?: (props: { column: TableColumnCtx<T>; $index: number }) => any\n expand?: (props: { expanded: boolean; expandable: boolean }) => any\n 'filter-icon'?: (props: { filterOpened: boolean }) => any\n}>()\n\nconst instance = getCurrentInstance() as TableColumn<T>\nconst globalConfig = useGlobalConfig('table')\nconst columnConfig = ref<Partial<TableColumnCtx<T>>>({})\nconst owner = computed(() => {\n let parent = instance.parent as any\n while (parent && !parent.tableId) {\n parent = parent.parent\n }\n return parent\n})\n\nconst { registerNormalWatchers, registerComplexWatchers } = useWatcher<T>(\n owner,\n props\n)\nconst {\n columnId,\n isSubColumn,\n realHeaderAlign,\n columnOrTableParent,\n setColumnWidth,\n setColumnForcedProps,\n setColumnRenders,\n getPropsData,\n getColumnElIndex,\n realAlign,\n updateColumnOrder,\n} = useRender<T>(props as unknown as TableColumnCtx<T>, slots, owner)\n\nconst parent = columnOrTableParent.value\nconst parentId = 'tableId' in parent ? parent.tableId : parent.columnId\ncolumnId.value = createTableColumnId(parentId)\n\nonBeforeMount(() => {\n isSubColumn.value = owner.value !== parent\n\n const type = (props.type as keyof typeof cellStarts) || 'default'\n const sortable = props.sortable === '' ? true : props.sortable\n //The selection column should not be affected by `showOverflowTooltip`.\n const showOverflowTooltip =\n type === 'selection'\n ? false\n : isUndefined(props.showOverflowTooltip)\n ? (parent.props.showOverflowTooltip ??\n globalConfig.value?.showOverflowTooltip)\n : props.showOverflowTooltip\n const tooltipFormatter = isUndefined(props.tooltipFormatter)\n ? (parent.props.tooltipFormatter ?? globalConfig.value?.tooltipFormatter)\n : props.tooltipFormatter\n const defaults = {\n ...cellStarts[type],\n id: columnId.value,\n type,\n property: props.prop || props.property,\n align: realAlign,\n headerAlign: realHeaderAlign,\n showOverflowTooltip,\n tooltipFormatter,\n // filter 相关属性\n filterable: props.filters || props.filterMethod,\n filteredValue: [],\n filterPlacement: '',\n filterClassName: '',\n isColumnGroup: false,\n isSubColumn: false,\n filterOpened: false,\n // sort 相关属性\n sortable,\n // index 列\n index: props.index,\n // <el-table-column key=\"xxx\" />\n rawColumnKey: instance.vnode.key,\n }\n\n const basicProps = [\n 'columnKey',\n 'label',\n 'className',\n 'labelClassName',\n 'type',\n 'renderHeader',\n 'formatter',\n 'fixed',\n 'resizable',\n ]\n const sortProps = ['sortMethod', 'sortBy', 'sortOrders']\n const selectProps = ['selectable', 'reserveSelection']\n const filterProps = [\n 'filterMethod',\n 'filters',\n 'filterMultiple',\n 'filterOpened',\n 'filteredValue',\n 'filterPlacement',\n 'filterClassName',\n ]\n\n let column = getPropsData(basicProps, sortProps, selectProps, filterProps)\n\n column = mergeOptions(defaults, column)\n // 注意 compose 中函数执行的顺序是从右到左\n const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps)\n column = chains(column) as unknown as TableColumnCtx<T>\n columnConfig.value = column\n\n // 注册 watcher\n registerNormalWatchers()\n registerComplexWatchers()\n})\n\nonMounted(() => {\n const parent = columnOrTableParent.value\n const children = isSubColumn.value\n ? parent.vnode.el?.children\n : parent.refs.hiddenColumns?.children\n const getColumnIndex = () =>\n getColumnElIndex(children || [], instance.vnode.el)\n columnConfig.value.getColumnIndex = getColumnIndex\n const columnIndex = getColumnIndex()\n columnIndex > -1 &&\n owner.value.store.commit(\n 'insertColumn',\n columnConfig.value,\n isSubColumn.value\n ? 'columnConfig' in parent && parent.columnConfig.value\n : null,\n updateColumnOrder\n )\n})\n\nonBeforeUnmount(() => {\n const getColumnIndex = columnConfig.value.getColumnIndex\n const columnIndex = getColumnIndex ? getColumnIndex() : -1\n columnIndex > -1 &&\n owner.value.store.commit(\n 'removeColumn',\n columnConfig.value,\n isSubColumn.value\n ? 'columnConfig' in parent && parent.columnConfig.value\n : null,\n updateColumnOrder\n )\n})\n\ninstance.columnId = columnId.value\n\ninstance.columnConfig = columnConfig as any\n\nconst TableColumnRenderer = () => {\n try {\n const renderDefault = slots.default?.({\n row: {} as T,\n column: {} as TableColumnCtx<T>,\n $index: -1,\n })\n const children = []\n if (isArray(renderDefault)) {\n for (const childNode of renderDefault) {\n if (\n (childNode.type as any)?.name === 'ElTableColumn' ||\n childNode.shapeFlag & 2\n ) {\n children.push(childNode)\n } else if (childNode.type === Fragment && isArray(childNode.children)) {\n childNode.children.forEach((vnode: VNode) => {\n // No rendering when vnode is dynamic slot or text\n if (\n (vnode as VNode)?.patchFlag !== 1024 &&\n !isString((vnode as VNode)?.children)\n ) {\n children.push(vnode)\n }\n })\n }\n }\n }\n return h('div', children)\n } catch {\n return h('div', [])\n }\n}\n</script>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
//#region ../../packages/components/table/src/table-column/index.vue
|
|
6
|
+
var table_column_default = require("./index.vue_vue_type_script_setup_true_lang.js").default;
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.default = table_column_default;
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=index2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../../../../../packages/components/table/src/table-column/index.vue"],"sourcesContent":["<template>\n <TableColumnRenderer />\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends DefaultRow = DefaultRow\">\nimport {\n Fragment,\n computed,\n getCurrentInstance,\n h,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n ref,\n} from 'vue'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { isArray, isString, isUndefined } from '@element-plus/utils'\nimport { cellStarts } from '../config'\nimport { compose, createTableColumnId, mergeOptions } from '../util'\nimport useWatcher from './watcher-helper'\nimport useRender from './render-helper'\n\nimport type { VNode } from 'vue'\nimport type { TableColumn, TableColumnCtx, TableColumnProps } from './defaults'\nimport type { DefaultRow } from '../table/defaults'\n\ndefineOptions({\n name: 'ElTableColumn',\n})\n\nconst props = withDefaults(defineProps<TableColumnProps<T>>(), {\n type: 'default',\n width: '',\n minWidth: '',\n sortable: false,\n resizable: true,\n showOverflowTooltip: undefined,\n filterMultiple: true,\n sortOrders: () => ['ascending', 'descending', null],\n})\nconst slots = defineSlots<{\n default?: (props: {\n row: T\n column: TableColumnCtx<T>\n $index: number\n }) => any\n header?: (props: { column: TableColumnCtx<T>; $index: number }) => any\n expand?: (props: { expanded: boolean; expandable: boolean }) => any\n 'filter-icon'?: (props: { filterOpened: boolean }) => any\n}>()\n\nconst instance = getCurrentInstance() as TableColumn<T>\nconst globalConfig = useGlobalConfig('table')\nconst columnConfig = ref<Partial<TableColumnCtx<T>>>({})\nconst owner = computed(() => {\n let parent = instance.parent as any\n while (parent && !parent.tableId) {\n parent = parent.parent\n }\n return parent\n})\n\nconst { registerNormalWatchers, registerComplexWatchers } = useWatcher<T>(\n owner,\n props\n)\nconst {\n columnId,\n isSubColumn,\n realHeaderAlign,\n columnOrTableParent,\n setColumnWidth,\n setColumnForcedProps,\n setColumnRenders,\n getPropsData,\n getColumnElIndex,\n realAlign,\n updateColumnOrder,\n} = useRender<T>(props as unknown as TableColumnCtx<T>, slots, owner)\n\nconst parent = columnOrTableParent.value\nconst parentId = 'tableId' in parent ? parent.tableId : parent.columnId\ncolumnId.value = createTableColumnId(parentId)\n\nonBeforeMount(() => {\n isSubColumn.value = owner.value !== parent\n\n const type = (props.type as keyof typeof cellStarts) || 'default'\n const sortable = props.sortable === '' ? true : props.sortable\n //The selection column should not be affected by `showOverflowTooltip`.\n const showOverflowTooltip =\n type === 'selection'\n ? false\n : isUndefined(props.showOverflowTooltip)\n ? (parent.props.showOverflowTooltip ??\n globalConfig.value?.showOverflowTooltip)\n : props.showOverflowTooltip\n const tooltipFormatter = isUndefined(props.tooltipFormatter)\n ? (parent.props.tooltipFormatter ?? globalConfig.value?.tooltipFormatter)\n : props.tooltipFormatter\n const defaults = {\n ...cellStarts[type],\n id: columnId.value,\n type,\n property: props.prop || props.property,\n align: realAlign,\n headerAlign: realHeaderAlign,\n showOverflowTooltip,\n tooltipFormatter,\n // filter 相关属性\n filterable: props.filters || props.filterMethod,\n filteredValue: [],\n filterPlacement: '',\n filterClassName: '',\n isColumnGroup: false,\n isSubColumn: false,\n filterOpened: false,\n // sort 相关属性\n sortable,\n // index 列\n index: props.index,\n // <el-table-column key=\"xxx\" />\n rawColumnKey: instance.vnode.key,\n }\n\n const basicProps = [\n 'columnKey',\n 'label',\n 'className',\n 'labelClassName',\n 'type',\n 'renderHeader',\n 'formatter',\n 'fixed',\n 'resizable',\n ]\n const sortProps = ['sortMethod', 'sortBy', 'sortOrders']\n const selectProps = ['selectable', 'reserveSelection']\n const filterProps = [\n 'filterMethod',\n 'filters',\n 'filterMultiple',\n 'filterOpened',\n 'filteredValue',\n 'filterPlacement',\n 'filterClassName',\n ]\n\n let column = getPropsData(basicProps, sortProps, selectProps, filterProps)\n\n column = mergeOptions(defaults, column)\n // 注意 compose 中函数执行的顺序是从右到左\n const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps)\n column = chains(column) as unknown as TableColumnCtx<T>\n columnConfig.value = column\n\n // 注册 watcher\n registerNormalWatchers()\n registerComplexWatchers()\n})\n\nonMounted(() => {\n const parent = columnOrTableParent.value\n const children = isSubColumn.value\n ? parent.vnode.el?.children\n : parent.refs.hiddenColumns?.children\n const getColumnIndex = () =>\n getColumnElIndex(children || [], instance.vnode.el)\n columnConfig.value.getColumnIndex = getColumnIndex\n const columnIndex = getColumnIndex()\n columnIndex > -1 &&\n owner.value.store.commit(\n 'insertColumn',\n columnConfig.value,\n isSubColumn.value\n ? 'columnConfig' in parent && parent.columnConfig.value\n : null,\n updateColumnOrder\n )\n})\n\nonBeforeUnmount(() => {\n const getColumnIndex = columnConfig.value.getColumnIndex\n const columnIndex = getColumnIndex ? getColumnIndex() : -1\n columnIndex > -1 &&\n owner.value.store.commit(\n 'removeColumn',\n columnConfig.value,\n isSubColumn.value\n ? 'columnConfig' in parent && parent.columnConfig.value\n : null,\n updateColumnOrder\n )\n})\n\ninstance.columnId = columnId.value\n\ninstance.columnConfig = columnConfig as any\n\nconst TableColumnRenderer = () => {\n try {\n const renderDefault = slots.default?.({\n row: {} as T,\n column: {} as TableColumnCtx<T>,\n $index: -1,\n })\n const children = []\n if (isArray(renderDefault)) {\n for (const childNode of renderDefault) {\n if (\n (childNode.type as any)?.name === 'ElTableColumn' ||\n childNode.shapeFlag & 2\n ) {\n children.push(childNode)\n } else if (childNode.type === Fragment && isArray(childNode.children)) {\n childNode.children.forEach((vnode: VNode) => {\n // No rendering when vnode is dynamic slot or text\n if (\n (vnode as VNode)?.patchFlag !== 1024 &&\n !isString((vnode as VNode)?.children)\n ) {\n children.push(vnode)\n }\n })\n }\n }\n }\n return h('div', children)\n } catch {\n return h('div', [])\n }\n}\n</script>\n"],"mappings":""}
|
|
@@ -77,8 +77,8 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
79
|
}>> & Readonly<{}>, {
|
|
80
|
-
fixed: string;
|
|
81
80
|
border: boolean;
|
|
81
|
+
fixed: string;
|
|
82
82
|
defaultSort: Sort;
|
|
83
83
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
84
84
|
//#endregion
|
|
@@ -112,8 +112,8 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
112
112
|
type: BooleanConstructor;
|
|
113
113
|
};
|
|
114
114
|
}>> & Readonly<{}>, {
|
|
115
|
-
fixed: string;
|
|
116
115
|
border: boolean;
|
|
116
|
+
fixed: string;
|
|
117
117
|
defaultSort: Sort;
|
|
118
118
|
allowDragLastColumn: boolean;
|
|
119
119
|
}, {}, {
|
|
@@ -125,13 +125,13 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
125
125
|
"update:modelValue": (val: CheckboxValueType) => void;
|
|
126
126
|
change: (val: CheckboxValueType) => void;
|
|
127
127
|
}, _$vue.PublicProps, {
|
|
128
|
-
id: string;
|
|
129
|
-
name: string;
|
|
130
|
-
disabled: boolean;
|
|
131
|
-
modelValue: number | string | boolean;
|
|
132
|
-
validateEvent: boolean;
|
|
133
128
|
value: string | boolean | number | object;
|
|
134
129
|
label: string | boolean | number | object;
|
|
130
|
+
disabled: boolean;
|
|
131
|
+
validateEvent: boolean;
|
|
132
|
+
modelValue: number | string | boolean;
|
|
133
|
+
name: string;
|
|
134
|
+
id: string;
|
|
135
135
|
trueValue: string | number;
|
|
136
136
|
falseValue: string | number;
|
|
137
137
|
trueLabel: string | number;
|
|
@@ -147,13 +147,13 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
147
147
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
148
148
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
149
149
|
}>, {}, {}, {}, {}, {
|
|
150
|
-
id: string;
|
|
151
|
-
name: string;
|
|
152
|
-
disabled: boolean;
|
|
153
|
-
modelValue: number | string | boolean;
|
|
154
|
-
validateEvent: boolean;
|
|
155
150
|
value: string | boolean | number | object;
|
|
156
151
|
label: string | boolean | number | object;
|
|
152
|
+
disabled: boolean;
|
|
153
|
+
validateEvent: boolean;
|
|
154
|
+
modelValue: number | string | boolean;
|
|
155
|
+
name: string;
|
|
156
|
+
id: string;
|
|
157
157
|
trueValue: string | number;
|
|
158
158
|
falseValue: string | number;
|
|
159
159
|
trueLabel: string | number;
|
|
@@ -169,13 +169,13 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
169
169
|
"update:modelValue": (val: CheckboxValueType) => void;
|
|
170
170
|
change: (val: CheckboxValueType) => void;
|
|
171
171
|
}, string, {
|
|
172
|
-
id: string;
|
|
173
|
-
name: string;
|
|
174
|
-
disabled: boolean;
|
|
175
|
-
modelValue: number | string | boolean;
|
|
176
|
-
validateEvent: boolean;
|
|
177
172
|
value: string | boolean | number | object;
|
|
178
173
|
label: string | boolean | number | object;
|
|
174
|
+
disabled: boolean;
|
|
175
|
+
validateEvent: boolean;
|
|
176
|
+
modelValue: number | string | boolean;
|
|
177
|
+
name: string;
|
|
178
|
+
id: string;
|
|
179
179
|
trueValue: string | number;
|
|
180
180
|
falseValue: string | number;
|
|
181
181
|
trueLabel: string | number;
|
|
@@ -2,219 +2,8 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
require("../../../_virtual/_rolldown/runtime.js");
|
|
6
|
-
const require__plugin_vue_export_helper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
7
|
-
const require_table_vue_vue_type_script_lang = require("./table.vue_vue_type_script_lang.js");
|
|
8
|
-
let vue = require("vue");
|
|
9
5
|
//#region ../../packages/components/table/src/table.vue
|
|
10
|
-
|
|
11
|
-
const _hoisted_2 = {
|
|
12
|
-
ref: "hiddenColumns",
|
|
13
|
-
class: "hidden-columns"
|
|
14
|
-
};
|
|
15
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16
|
-
const _component_hColgroup = (0, vue.resolveComponent)("hColgroup");
|
|
17
|
-
const _component_table_header = (0, vue.resolveComponent)("table-header");
|
|
18
|
-
const _component_table_body = (0, vue.resolveComponent)("table-body");
|
|
19
|
-
const _component_table_footer = (0, vue.resolveComponent)("table-footer");
|
|
20
|
-
const _component_el_scrollbar = (0, vue.resolveComponent)("el-scrollbar");
|
|
21
|
-
const _directive_mousewheel = (0, vue.resolveDirective)("mousewheel");
|
|
22
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
23
|
-
ref: "tableWrapper",
|
|
24
|
-
class: (0, vue.normalizeClass)([
|
|
25
|
-
{
|
|
26
|
-
[_ctx.ns.m("fit")]: _ctx.fit,
|
|
27
|
-
[_ctx.ns.m("striped")]: _ctx.stripe,
|
|
28
|
-
[_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup,
|
|
29
|
-
[_ctx.ns.m("hidden")]: _ctx.isHidden,
|
|
30
|
-
[_ctx.ns.m("group")]: _ctx.isGroup,
|
|
31
|
-
[_ctx.ns.m("fluid-height")]: _ctx.maxHeight,
|
|
32
|
-
[_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value,
|
|
33
|
-
[_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value,
|
|
34
|
-
[_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value,
|
|
35
|
-
[_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100,
|
|
36
|
-
"has-footer": _ctx.showSummary
|
|
37
|
-
},
|
|
38
|
-
_ctx.ns.m(_ctx.tableSize),
|
|
39
|
-
_ctx.className,
|
|
40
|
-
_ctx.ns.b(),
|
|
41
|
-
_ctx.ns.m(`layout-${_ctx.tableLayout}`)
|
|
42
|
-
]),
|
|
43
|
-
style: (0, vue.normalizeStyle)(_ctx.style),
|
|
44
|
-
"data-prefix": _ctx.ns.namespace.value,
|
|
45
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args))
|
|
46
|
-
}, [(0, vue.createElementVNode)("div", {
|
|
47
|
-
ref: "tableInnerWrapper",
|
|
48
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("inner-wrapper"))
|
|
49
|
-
}, [
|
|
50
|
-
(0, vue.createElementVNode)("div", _hoisted_2, [(0, vue.renderSlot)(_ctx.$slots, "default")], 512),
|
|
51
|
-
_ctx.showHeader && _ctx.tableLayout === "fixed" ? (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
52
|
-
key: 0,
|
|
53
|
-
ref: "headerWrapper",
|
|
54
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("header-wrapper"))
|
|
55
|
-
}, [(0, vue.createElementVNode)("table", {
|
|
56
|
-
ref: "tableHeader",
|
|
57
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("header")),
|
|
58
|
-
style: (0, vue.normalizeStyle)(_ctx.tableBodyStyles),
|
|
59
|
-
border: "0",
|
|
60
|
-
cellpadding: "0",
|
|
61
|
-
cellspacing: "0"
|
|
62
|
-
}, [(0, vue.createVNode)(_component_hColgroup, {
|
|
63
|
-
columns: _ctx.store.states.columns.value,
|
|
64
|
-
"table-layout": _ctx.tableLayout
|
|
65
|
-
}, null, 8, ["columns", "table-layout"]), (0, vue.createVNode)(_component_table_header, {
|
|
66
|
-
ref: "tableHeaderRef",
|
|
67
|
-
border: _ctx.border,
|
|
68
|
-
"default-sort": _ctx.defaultSort,
|
|
69
|
-
store: _ctx.store,
|
|
70
|
-
"append-filter-panel-to": _ctx.appendFilterPanelTo,
|
|
71
|
-
"allow-drag-last-column": _ctx.allowDragLastColumn,
|
|
72
|
-
onSetDragVisible: _ctx.setDragVisible
|
|
73
|
-
}, null, 8, [
|
|
74
|
-
"border",
|
|
75
|
-
"default-sort",
|
|
76
|
-
"store",
|
|
77
|
-
"append-filter-panel-to",
|
|
78
|
-
"allow-drag-last-column",
|
|
79
|
-
"onSetDragVisible"
|
|
80
|
-
])], 6)], 2)), [[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]]) : (0, vue.createCommentVNode)("v-if", true),
|
|
81
|
-
(0, vue.createElementVNode)("div", {
|
|
82
|
-
ref: "bodyWrapper",
|
|
83
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("body-wrapper"))
|
|
84
|
-
}, [(0, vue.createVNode)(_component_el_scrollbar, {
|
|
85
|
-
ref: "scrollBarRef",
|
|
86
|
-
"view-style": _ctx.scrollbarViewStyle,
|
|
87
|
-
"wrap-style": _ctx.scrollbarStyle,
|
|
88
|
-
always: _ctx.scrollbarAlwaysOn,
|
|
89
|
-
tabindex: _ctx.scrollbarTabindex,
|
|
90
|
-
native: _ctx.nativeScrollbar,
|
|
91
|
-
onScroll: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("scroll", $event))
|
|
92
|
-
}, {
|
|
93
|
-
default: (0, vue.withCtx)(() => [
|
|
94
|
-
(0, vue.createElementVNode)("table", {
|
|
95
|
-
ref: "tableBody",
|
|
96
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("body")),
|
|
97
|
-
cellspacing: "0",
|
|
98
|
-
cellpadding: "0",
|
|
99
|
-
border: "0",
|
|
100
|
-
style: (0, vue.normalizeStyle)({
|
|
101
|
-
width: _ctx.bodyWidth,
|
|
102
|
-
tableLayout: _ctx.tableLayout
|
|
103
|
-
})
|
|
104
|
-
}, [
|
|
105
|
-
(0, vue.createVNode)(_component_hColgroup, {
|
|
106
|
-
columns: _ctx.store.states.columns.value,
|
|
107
|
-
"table-layout": _ctx.tableLayout
|
|
108
|
-
}, null, 8, ["columns", "table-layout"]),
|
|
109
|
-
_ctx.showHeader && _ctx.tableLayout === "auto" ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_table_header, {
|
|
110
|
-
key: 0,
|
|
111
|
-
ref: "tableHeaderRef",
|
|
112
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("body-header")),
|
|
113
|
-
border: _ctx.border,
|
|
114
|
-
"default-sort": _ctx.defaultSort,
|
|
115
|
-
store: _ctx.store,
|
|
116
|
-
"append-filter-panel-to": _ctx.appendFilterPanelTo,
|
|
117
|
-
onSetDragVisible: _ctx.setDragVisible
|
|
118
|
-
}, null, 8, [
|
|
119
|
-
"class",
|
|
120
|
-
"border",
|
|
121
|
-
"default-sort",
|
|
122
|
-
"store",
|
|
123
|
-
"append-filter-panel-to",
|
|
124
|
-
"onSetDragVisible"
|
|
125
|
-
])) : (0, vue.createCommentVNode)("v-if", true),
|
|
126
|
-
(0, vue.createVNode)(_component_table_body, {
|
|
127
|
-
context: _ctx.context,
|
|
128
|
-
highlight: _ctx.highlightCurrentRow,
|
|
129
|
-
"row-class-name": _ctx.rowClassName,
|
|
130
|
-
"tooltip-effect": _ctx.computedTooltipEffect,
|
|
131
|
-
"tooltip-options": _ctx.computedTooltipOptions,
|
|
132
|
-
"row-style": _ctx.rowStyle,
|
|
133
|
-
store: _ctx.store,
|
|
134
|
-
stripe: _ctx.stripe
|
|
135
|
-
}, null, 8, [
|
|
136
|
-
"context",
|
|
137
|
-
"highlight",
|
|
138
|
-
"row-class-name",
|
|
139
|
-
"tooltip-effect",
|
|
140
|
-
"tooltip-options",
|
|
141
|
-
"row-style",
|
|
142
|
-
"store",
|
|
143
|
-
"stripe"
|
|
144
|
-
]),
|
|
145
|
-
_ctx.showSummary && _ctx.tableLayout === "auto" ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_table_footer, {
|
|
146
|
-
key: 1,
|
|
147
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("body-footer")),
|
|
148
|
-
border: _ctx.border,
|
|
149
|
-
"default-sort": _ctx.defaultSort,
|
|
150
|
-
store: _ctx.store,
|
|
151
|
-
"sum-text": _ctx.computedSumText,
|
|
152
|
-
"summary-method": _ctx.summaryMethod
|
|
153
|
-
}, null, 8, [
|
|
154
|
-
"class",
|
|
155
|
-
"border",
|
|
156
|
-
"default-sort",
|
|
157
|
-
"store",
|
|
158
|
-
"sum-text",
|
|
159
|
-
"summary-method"
|
|
160
|
-
])) : (0, vue.createCommentVNode)("v-if", true)
|
|
161
|
-
], 6),
|
|
162
|
-
_ctx.isEmpty ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
163
|
-
key: 0,
|
|
164
|
-
ref: "emptyBlock",
|
|
165
|
-
style: (0, vue.normalizeStyle)(_ctx.emptyBlockStyle),
|
|
166
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("empty-block"))
|
|
167
|
-
}, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(_ctx.ns.e("empty-text")) }, [(0, vue.renderSlot)(_ctx.$slots, "empty", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(_ctx.computedEmptyText), 1)])], 2)], 6)) : (0, vue.createCommentVNode)("v-if", true),
|
|
168
|
-
_ctx.$slots.append ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
169
|
-
key: 1,
|
|
170
|
-
ref: "appendWrapper",
|
|
171
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("append-wrapper"))
|
|
172
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "append")], 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
173
|
-
]),
|
|
174
|
-
_: 3
|
|
175
|
-
}, 8, [
|
|
176
|
-
"view-style",
|
|
177
|
-
"wrap-style",
|
|
178
|
-
"always",
|
|
179
|
-
"tabindex",
|
|
180
|
-
"native"
|
|
181
|
-
])], 2),
|
|
182
|
-
_ctx.showSummary && _ctx.tableLayout === "fixed" ? (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
183
|
-
key: 1,
|
|
184
|
-
ref: "footerWrapper",
|
|
185
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("footer-wrapper"))
|
|
186
|
-
}, [(0, vue.createElementVNode)("table", {
|
|
187
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("footer")),
|
|
188
|
-
cellspacing: "0",
|
|
189
|
-
cellpadding: "0",
|
|
190
|
-
border: "0",
|
|
191
|
-
style: (0, vue.normalizeStyle)(_ctx.tableBodyStyles)
|
|
192
|
-
}, [(0, vue.createVNode)(_component_hColgroup, {
|
|
193
|
-
columns: _ctx.store.states.columns.value,
|
|
194
|
-
"table-layout": _ctx.tableLayout
|
|
195
|
-
}, null, 8, ["columns", "table-layout"]), (0, vue.createVNode)(_component_table_footer, {
|
|
196
|
-
border: _ctx.border,
|
|
197
|
-
"default-sort": _ctx.defaultSort,
|
|
198
|
-
store: _ctx.store,
|
|
199
|
-
"sum-text": _ctx.computedSumText,
|
|
200
|
-
"summary-method": _ctx.summaryMethod
|
|
201
|
-
}, null, 8, [
|
|
202
|
-
"border",
|
|
203
|
-
"default-sort",
|
|
204
|
-
"store",
|
|
205
|
-
"sum-text",
|
|
206
|
-
"summary-method"
|
|
207
|
-
])], 6)], 2)), [[vue.vShow, !_ctx.isEmpty], [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]]) : (0, vue.createCommentVNode)("v-if", true),
|
|
208
|
-
_ctx.border || _ctx.isGroup ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
209
|
-
key: 2,
|
|
210
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("border-left-patch"))
|
|
211
|
-
}, null, 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
212
|
-
], 2), (0, vue.withDirectives)((0, vue.createElementVNode)("div", {
|
|
213
|
-
ref: "resizeProxy",
|
|
214
|
-
class: (0, vue.normalizeClass)(_ctx.ns.e("column-resize-proxy"))
|
|
215
|
-
}, null, 2), [[vue.vShow, _ctx.resizeProxyVisible]])], 46, _hoisted_1);
|
|
216
|
-
}
|
|
217
|
-
var table_default = /* @__PURE__ */ require__plugin_vue_export_helper.default(require_table_vue_vue_type_script_lang.default, [["render", _sfc_render]]);
|
|
6
|
+
var table_default = require("./table.vue_vue_type_script_setup_true_lang.js").default;
|
|
218
7
|
//#endregion
|
|
219
8
|
exports.default = table_default;
|
|
220
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","names":[],"sources":["../../../../../../packages/components/table/src/table.vue"],"sourcesContent":["<template>\n <div\n ref=\"tableWrapper\"\n :class=\"[\n {\n [ns.m('fit')]: fit,\n [ns.m('striped')]: stripe,\n [ns.m('border')]: border || isGroup,\n [ns.m('hidden')]: isHidden,\n [ns.m('group')]: isGroup,\n [ns.m('fluid-height')]: maxHeight,\n [ns.m('scrollable-x')]: layout.scrollX.value,\n [ns.m('scrollable-y')]: layout.scrollY.value,\n [ns.m('enable-row-hover')]: !store.states.isComplex.value,\n [ns.m('enable-row-transition')]:\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n 'has-footer': showSummary,\n },\n ns.m(tableSize),\n className,\n ns.b(),\n ns.m(`layout-${tableLayout}`),\n ]\"\n :style=\"style\"\n :data-prefix=\"ns.namespace.value\"\n @mouseleave=\"handleMouseLeave\"\n >\n <div ref=\"tableInnerWrapper\" :class=\"ns.e('inner-wrapper')\">\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot />\n </div>\n <div\n v-if=\"showHeader && tableLayout === 'fixed'\"\n ref=\"headerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n :class=\"ns.e('header-wrapper')\"\n >\n <table\n ref=\"tableHeader\"\n :class=\"ns.e('header')\"\n :style=\"tableBodyStyles\"\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n >\n <hColgroup\n :columns=\"store.states.columns.value\"\n :table-layout=\"tableLayout\"\n />\n <table-header\n ref=\"tableHeaderRef\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :append-filter-panel-to=\"appendFilterPanelTo\"\n :allow-drag-last-column=\"allowDragLastColumn\"\n @set-drag-visible=\"setDragVisible\"\n />\n </table>\n </div>\n <div ref=\"bodyWrapper\" :class=\"ns.e('body-wrapper')\">\n <el-scrollbar\n ref=\"scrollBarRef\"\n :view-style=\"scrollbarViewStyle\"\n :wrap-style=\"scrollbarStyle\"\n :always=\"scrollbarAlwaysOn\"\n :tabindex=\"scrollbarTabindex\"\n :native=\"nativeScrollbar\"\n @scroll=\"$emit('scroll', $event)\"\n >\n <table\n ref=\"tableBody\"\n :class=\"ns.e('body')\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n border=\"0\"\n :style=\"{\n width: bodyWidth,\n tableLayout,\n }\"\n >\n <hColgroup\n :columns=\"store.states.columns.value\"\n :table-layout=\"tableLayout\"\n />\n <table-header\n v-if=\"showHeader && tableLayout === 'auto'\"\n ref=\"tableHeaderRef\"\n :class=\"ns.e('body-header')\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :append-filter-panel-to=\"appendFilterPanelTo\"\n @set-drag-visible=\"setDragVisible\"\n />\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"computedTooltipEffect\"\n :tooltip-options=\"computedTooltipOptions\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n />\n <table-footer\n v-if=\"showSummary && tableLayout === 'auto'\"\n :class=\"ns.e('body-footer')\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :sum-text=\"computedSumText\"\n :summary-method=\"summaryMethod\"\n />\n </table>\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n :class=\"ns.e('empty-block')\"\n >\n <span :class=\"ns.e('empty-text')\">\n <slot name=\"empty\">{{ computedEmptyText }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n :class=\"ns.e('append-wrapper')\"\n >\n <slot name=\"append\" />\n </div>\n </el-scrollbar>\n </div>\n <div\n v-if=\"showSummary && tableLayout === 'fixed'\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n :class=\"ns.e('footer-wrapper')\"\n >\n <table\n :class=\"ns.e('footer')\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n border=\"0\"\n :style=\"tableBodyStyles\"\n >\n <hColgroup\n :columns=\"store.states.columns.value\"\n :table-layout=\"tableLayout\"\n />\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :sum-text=\"computedSumText\"\n :summary-method=\"summaryMethod\"\n />\n </table>\n </div>\n <div v-if=\"border || isGroup\" :class=\"ns.e('border-left-patch')\" />\n </div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n :class=\"ns.e('column-resize-proxy')\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n onBeforeUnmount,\n provide,\n} from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { Mousewheel } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport { convertToRows } from './table-header/utils-helper'\nimport useStyle from './table/style-helper'\nimport useKeyRender from './table/key-render-helper'\nimport defaultProps from './table/defaults'\nimport { TABLE_INJECTION_KEY } from './tokens'\nimport { hColgroup } from './h-helper'\nimport { useScrollbar } from './composables/use-scrollbar'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'ElTable',\n directives: {\n Mousewheel,\n },\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n ElScrollbar,\n hColgroup,\n },\n props: defaultProps,\n emits: [\n 'select',\n 'select-all',\n 'selection-change',\n 'cell-mouse-enter',\n 'cell-mouse-leave',\n 'cell-contextmenu',\n 'cell-click',\n 'cell-dblclick',\n 'row-click',\n 'row-contextmenu',\n 'row-dblclick',\n 'header-click',\n 'header-contextmenu',\n 'sort-change',\n 'filter-change',\n 'current-change',\n 'header-dragend',\n 'expand-change',\n 'scroll',\n ],\n setup(props) {\n type Row = (typeof props.data)[number]\n const { t } = useLocale()\n const ns = useNamespace('table')\n const globalConfig = useGlobalConfig('table')\n const table = getCurrentInstance() as Table<Row>\n provide(TABLE_INJECTION_KEY, table)\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n getSelectionRows,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n updateKeyChildren,\n } = useUtils<Row>(store)\n const {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n emptyBlockStyle,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n tableLayout,\n scrollbarViewStyle,\n scrollbarStyle,\n } = useStyle<Row>(props, layout, store, table)\n\n const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } =\n useScrollbar()\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `${ns.namespace.value}-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n const computedSumText = computed(\n () => props.sumText ?? t('el.table.sumText')\n )\n\n const computedEmptyText = computed(() => {\n return props.emptyText ?? t('el.table.emptyText')\n })\n\n const computedTooltipEffect = computed(\n () => props.tooltipEffect ?? globalConfig.value?.tooltipEffect\n )\n\n const computedTooltipOptions = computed(\n () => props.tooltipOptions ?? globalConfig.value?.tooltipOptions\n )\n\n const columns = computed(() => {\n return convertToRows(store.states.originColumns.value)[0]\n })\n\n useKeyRender(table)\n\n onBeforeUnmount(() => {\n debouncedUpdateLayout.cancel()\n })\n\n return {\n ns,\n layout,\n store,\n columns,\n handleHeaderFooterMousewheel,\n handleMouseLeave,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n tableBodyStyles,\n emptyBlockStyle,\n debouncedUpdateLayout,\n /**\n * @description used in single selection Table, set a certain row selected. If called without any parameter, it will clear selection\n */\n setCurrentRow,\n /**\n * @description returns the currently selected rows\n */\n getSelectionRows,\n /**\n * @description used in multiple selection Table, toggle if a certain row is selected. With the second parameter, you can directly set if this row is selected\n */\n toggleRowSelection,\n /**\n * @description used in multiple selection Table, clear user selection\n */\n clearSelection,\n /**\n * @description clear filters of the columns whose `columnKey` are passed in. If no params, clear all filters\n */\n clearFilter,\n /**\n * @description used in multiple selection Table, toggle select all and deselect all\n */\n toggleAllSelection,\n /**\n * @description used in expandable Table or tree Table, toggle if a certain row is expanded. With the second parameter, you can directly set if this row is expanded or collapsed\n */\n toggleRowExpansion,\n /**\n * @description clear sorting, restore data to the original order\n */\n clearSort,\n /**\n * @description refresh the layout of Table. When the visibility of Table changes, you may need to call this method to get a correct layout\n */\n doLayout,\n /**\n * @description sort Table manually. Property `prop` is used to set sort column, property `order` is used to set sort order\n */\n sort,\n /**\n * @description used in lazy Table, must set `rowKey`, update key children\n */\n updateKeyChildren,\n t,\n setDragVisible,\n context: table,\n computedSumText,\n computedEmptyText,\n computedTooltipEffect,\n computedTooltipOptions,\n tableLayout,\n scrollbarViewStyle,\n scrollbarStyle,\n scrollBarRef,\n /**\n * @description scrolls to a particular set of coordinates\n */\n scrollTo,\n /**\n * @description set horizontal scroll position\n */\n setScrollLeft,\n /**\n * @description set vertical scroll position\n */\n setScrollTop,\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn: props.allowDragLastColumn,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;CA6BW,KAAI;CAAgB,OAAM;;;;;;;;;0DA4I7B,OAAA;EAvKJ,KAAI;EACH,QAAA,GAAA,IAAA,gBAAK;;KAAqB,KAAA,GAAG,EAAC,MAAA,GAAU,KAAA;KAAc,KAAA,GAAG,EAAC,UAAA,GAAc,KAAA;KAAiB,KAAA,GAAG,EAAC,SAAA,GAAa,KAAA,UAAU,KAAA;KAAkB,KAAA,GAAG,EAAC,SAAA,GAAa,KAAA;KAAmB,KAAA,GAAG,EAAC,QAAA,GAAY,KAAA;KAAkB,KAAA,GAAG,EAAC,eAAA,GAAmB,KAAA;KAAoB,KAAA,GAAG,EAAC,eAAA,GAAmB,KAAA,OAAO,QAAQ;KAAgB,KAAA,GAAG,EAAC,eAAA,GAAmB,KAAA,OAAO,QAAQ;KAAgB,KAAA,GAAG,EAAC,mBAAA,GAAA,CAAwB,KAAA,MAAM,OAAO,UAAU;KAAgB,KAAA,GAAG,EAAC,wBAAA,IAAuC,KAAA,MAAM,OAAO,KAAK,SAAK,EAAA,EAAQ,WAAM,MAAqB,KAAA,MAAM,OAAO,KAAK,SAAK,EAAA,EAAQ,SAAM;kBAA8B,KAAA;;GAA4B,KAAA,GAAG,EAAE,KAAA,UAAS;GAAS,KAAA;GAAiB,KAAA,GAAG,GAAC;GAAU,KAAA,GAAG,EAAC,UAAW,KAAA,cAAW;;EAqB1rB,QAAA,GAAA,IAAA,gBAAO,KAAA,MAAK;EACZ,eAAa,KAAA,GAAG,UAAU;EAC1B,cAAU,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,KAAA,oBAAA,KAAA,iBAAA,GAAA,KAAgB;iCAyIvB,OAAA;EAvID,KAAI;EAAqB,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,gBAAA,CAAA;;8BAGjC,OAFN,YAEM,EAAA,GAAA,IAAA,YADI,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA;EAGF,KAAA,cAAc,KAAA,gBAAW,WAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBA2B3B,OAAA;;GA1BJ,KAAI;GAEH,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,iBAAA,CAAA;kCAuBJ,SAAA;GApBN,KAAI;GACH,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,SAAA,CAAA;GACX,QAAA,GAAA,IAAA,gBAAO,KAAA,gBAAe;GACvB,QAAO;GACP,aAAY;GACZ,aAAY;2BAKV,sBAAA;GAFC,SAAS,KAAA,MAAM,OAAO,QAAQ;GAC9B,gBAAc,KAAA;iEAUf,yBAAA;GAPA,KAAI;GACH,QAAQ,KAAA;GACR,gBAAc,KAAA;GACd,OAAO,KAAA;GACP,0BAAwB,KAAA;GACxB,0BAAwB,KAAA;GACxB,kBAAkB,KAAA;;;;;;;;0CAtBT,KAAA,6BAA4B,CAAA,CAAA,IAAA,GAAA,IAAA,oBAAA,QAAA,KAAA;8BAmGtC,OAAA;GAzED,KAAI;GAAe,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,eAAA,CAAA;2BAwElB,yBAAA;GAtEb,KAAI;GACH,cAAY,KAAA;GACZ,cAAY,KAAA;GACZ,QAAQ,KAAA;GACR,UAAU,KAAA;GACV,QAAQ,KAAA;GACR,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAA,MAAK,UAAW,OAAM;;mCA8CvB;gCAAA,SAAA;KA3CN,KAAI;KACH,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,OAAA,CAAA;KACZ,aAAY;KACZ,aAAY;KACZ,QAAO;KACN,QAAA,GAAA,IAAA,gBAAK;aAAyB,KAAA;mBAAyB,KAAA;;;0BAQtD,sBAAA;MAFC,SAAS,KAAA,MAAM,OAAO,QAAQ;MAC9B,gBAAc,KAAA;;KAGT,KAAA,cAAc,KAAA,gBAAW,WAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,aAQ/B,yBAAA;;MAPA,KAAI;MACH,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,cAAA,CAAA;MACX,QAAQ,KAAA;MACR,gBAAc,KAAA;MACd,OAAO,KAAA;MACP,0BAAwB,KAAA;MACxB,kBAAkB,KAAA;;;;;;;;;0BAWnB,uBAAA;MARC,SAAS,KAAA;MACT,WAAW,KAAA;MACX,kBAAgB,KAAA;MAChB,kBAAgB,KAAA;MAChB,mBAAiB,KAAA;MACjB,aAAW,KAAA;MACX,OAAO,KAAA;MACP,QAAQ,KAAA;;;;;;;;;;;KAGH,KAAA,eAAe,KAAA,gBAAW,WAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,aAOhC,yBAAA;;MANC,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,cAAA,CAAA;MACX,QAAQ,KAAA;MACR,gBAAc,KAAA;MACd,OAAO,KAAA;MACP,YAAU,KAAA;MACV,kBAAgB,KAAA;;;;;;;;;;IAIb,KAAA,YAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAQF,OAAA;;KAPJ,KAAI;KACH,QAAA,GAAA,IAAA,gBAAO,KAAA,gBAAe;KACtB,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,cAAA,CAAA;oCAIL,QAAA,EAFA,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,aAAA,CAAA,EAAA,EAAA,EAAA,GAAA,IAAA,YACiC,KAAA,QAAA,SAAA,EAAA,QAAA,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAA3B,KAAA,kBAAiB,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,EAAA,KAAA,GAAA,IAAA,oBAAA,QAAA,KAAA;IAInC,KAAA,OAAO,WAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAKT,OAAA;;KAJJ,KAAI;KACH,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,iBAAA,CAAA;4BAEU,KAAA,QAAA,SAAA,CAAA,EAAA,EAAA,KAAA,GAAA,IAAA,oBAAA,QAAA,KAAA;;;;;;;;;;EAKpB,KAAA,eAAe,KAAA,gBAAW,WAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAyB5B,OAAA;;GAvBJ,KAAI;GAEH,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,iBAAA,CAAA;kCAoBJ,SAAA;GAjBL,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,SAAA,CAAA;GACZ,aAAY;GACZ,aAAY;GACZ,QAAO;GACN,QAAA,GAAA,IAAA,gBAAO,KAAA,gBAAe;2BAKrB,sBAAA;GAFC,SAAS,KAAA,MAAM,OAAO,QAAQ;GAC9B,gBAAc,KAAA;iEAQf,yBAAA;GALC,QAAQ,KAAA;GACR,gBAAc,KAAA;GACd,OAAO,KAAA;GACP,YAAU,KAAA;GACV,kBAAgB,KAAA;;;;;;;+BArBZ,KAAA,QAAO,EAAA,CAAA,uBAEF,KAAA,6BAA4B,CAAA,CAAA,IAAA,GAAA,IAAA,oBAAA,QAAA,KAAA;EAuBjC,KAAA,UAAU,KAAA,YAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAA8C,OAAA;;GAApC,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,oBAAA,CAAA;;4DAM1C,OAAA;EAFA,KAAI;EACH,QAAA,GAAA,IAAA,gBAAO,KAAA,GAAG,EAAC,sBAAA,CAAA;2BAFJ,KAAA,mBAAkB,CAAA,CAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
1
|
+
{"version":3,"file":"table.js","names":[],"sources":["../../../../../../packages/components/table/src/table.vue"],"sourcesContent":["<template>\n <div\n ref=\"tableWrapper\"\n :class=\"[\n {\n [ns.m('fit')]: fit,\n [ns.m('striped')]: stripe,\n [ns.m('border')]: border || isGroup,\n [ns.m('hidden')]: isHidden,\n [ns.m('group')]: isGroup,\n [ns.m('fluid-height')]: maxHeight,\n [ns.m('scrollable-x')]: layout.scrollX.value,\n [ns.m('scrollable-y')]: layout.scrollY.value,\n [ns.m('enable-row-hover')]: !store.states.isComplex.value,\n [ns.m('enable-row-transition')]:\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n 'has-footer': showSummary,\n },\n ns.m(tableSize),\n className,\n ns.b(),\n ns.m(`layout-${tableLayout}`),\n ]\"\n :style=\"style\"\n :data-prefix=\"ns.namespace.value\"\n @mouseleave=\"handleMouseLeave\"\n >\n <div ref=\"tableInnerWrapper\" :class=\"ns.e('inner-wrapper')\">\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot />\n </div>\n <div\n v-if=\"showHeader && tableLayout === 'fixed'\"\n ref=\"headerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n :class=\"ns.e('header-wrapper')\"\n >\n <table\n ref=\"tableHeader\"\n :class=\"ns.e('header')\"\n :style=\"tableBodyStyles\"\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n >\n <hColgroup\n :columns=\"store.states.columns.value\"\n :table-layout=\"tableLayout\"\n />\n <table-header\n ref=\"tableHeaderRef\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :append-filter-panel-to=\"appendFilterPanelTo\"\n :allow-drag-last-column=\"allowDragLastColumn\"\n @set-drag-visible=\"setDragVisible\"\n />\n </table>\n </div>\n <div ref=\"bodyWrapper\" :class=\"ns.e('body-wrapper')\">\n <el-scrollbar\n ref=\"scrollBarRef\"\n :view-style=\"scrollbarViewStyle\"\n :wrap-style=\"scrollbarStyle\"\n :always=\"scrollbarAlwaysOn\"\n :tabindex=\"scrollbarTabindex\"\n :native=\"nativeScrollbar\"\n @scroll=\"$emit('scroll', $event)\"\n >\n <table\n ref=\"tableBody\"\n :class=\"ns.e('body')\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n border=\"0\"\n :style=\"{\n width: bodyWidth,\n tableLayout,\n }\"\n >\n <hColgroup\n :columns=\"store.states.columns.value\"\n :table-layout=\"tableLayout\"\n />\n <table-header\n v-if=\"showHeader && tableLayout === 'auto'\"\n ref=\"tableHeaderRef\"\n :class=\"ns.e('body-header')\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :append-filter-panel-to=\"appendFilterPanelTo\"\n @set-drag-visible=\"setDragVisible\"\n />\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"computedTooltipEffect\"\n :tooltip-options=\"computedTooltipOptions\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n />\n <table-footer\n v-if=\"showSummary && tableLayout === 'auto'\"\n :class=\"ns.e('body-footer')\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :sum-text=\"computedSumText\"\n :summary-method=\"summaryMethod\"\n />\n </table>\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n :class=\"ns.e('empty-block')\"\n >\n <span :class=\"ns.e('empty-text')\">\n <slot name=\"empty\">{{ computedEmptyText }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n :class=\"ns.e('append-wrapper')\"\n >\n <slot name=\"append\" />\n </div>\n </el-scrollbar>\n </div>\n <div\n v-if=\"showSummary && tableLayout === 'fixed'\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n v-mousewheel=\"handleHeaderFooterMousewheel\"\n :class=\"ns.e('footer-wrapper')\"\n >\n <table\n :class=\"ns.e('footer')\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n border=\"0\"\n :style=\"tableBodyStyles\"\n >\n <hColgroup\n :columns=\"store.states.columns.value\"\n :table-layout=\"tableLayout\"\n />\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :sum-text=\"computedSumText\"\n :summary-method=\"summaryMethod\"\n />\n </table>\n </div>\n <div v-if=\"border || isGroup\" :class=\"ns.e('border-left-patch')\" />\n </div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n :class=\"ns.e('column-resize-proxy')\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends DefaultRow = DefaultRow\">\nimport { computed, getCurrentInstance, onBeforeUnmount, provide } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { Mousewheel as vMousewheel } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport { createTableId } from './util'\nimport useUtils from './table/utils-helper'\nimport { convertToRows } from './table-header/utils-helper'\nimport useStyle from './table/style-helper'\nimport useKeyRender from './table/key-render-helper'\nimport { TABLE_INJECTION_KEY } from './tokens'\nimport { hColgroup } from './h-helper'\nimport { useScrollbar } from './composables/use-scrollbar'\n\nimport type { DefaultRow, Table, TableProps } from './table/defaults'\n\ndefineOptions({\n name: 'ElTable',\n})\n\nconst props = withDefaults(defineProps<TableProps<T>>(), {\n data: () => [],\n fit: true,\n showHeader: true,\n selectOnIndeterminate: true,\n indent: 16,\n treeProps: () => ({\n hasChildren: 'hasChildren',\n children: 'children',\n checkStrictly: false,\n }),\n style: () => ({}),\n className: '',\n tableLayout: 'fixed',\n showOverflowTooltip: undefined,\n scrollbarTabindex: undefined,\n allowDragLastColumn: true,\n})\n\ndefineEmits([\n 'select',\n 'select-all',\n 'selection-change',\n 'cell-mouse-enter',\n 'cell-mouse-leave',\n 'cell-contextmenu',\n 'cell-click',\n 'cell-dblclick',\n 'row-click',\n 'row-contextmenu',\n 'row-dblclick',\n 'header-click',\n 'header-contextmenu',\n 'sort-change',\n 'filter-change',\n 'current-change',\n 'header-dragend',\n 'expand-change',\n 'scroll',\n])\n\nconst { t } = useLocale()\nconst ns = useNamespace('table')\nconst globalConfig = useGlobalConfig('table')\nconst table = getCurrentInstance() as Table<T>\nprovide(TABLE_INJECTION_KEY, table)\nconst store = createStore<T>(table, props)\ntable.store = store\nconst layout = new TableLayout<T>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n})\ntable.layout = layout\n\nconst isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n/**\n * open functions\n */\nconst {\n setCurrentRow,\n getSelectionRows,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n updateKeyChildren,\n} = useUtils<T>(store)\nconst {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n emptyBlockStyle,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n tableLayout,\n scrollbarViewStyle,\n scrollbarStyle,\n} = useStyle<T>(props, layout, store, table)\n\nconst { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar()\n\nconst debouncedUpdateLayout = debounce(doLayout, 50)\n\nconst tableId = createTableId(ns.namespace.value)\nconst context = table\ntable.tableId = tableId\ntable.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n}\nconst computedSumText = computed(() => props.sumText ?? t('el.table.sumText'))\n\nconst computedEmptyText = computed(() => {\n return props.emptyText ?? t('el.table.emptyText')\n})\n\nconst computedTooltipEffect = computed(\n () => props.tooltipEffect ?? globalConfig.value?.tooltipEffect\n)\n\nconst computedTooltipOptions = computed(\n () => props.tooltipOptions ?? globalConfig.value?.tooltipOptions\n)\n\nconst columns = computed(() => {\n return convertToRows(store.states.originColumns.value)[0]\n})\n\nuseKeyRender(table)\n\nonBeforeUnmount(() => {\n debouncedUpdateLayout.cancel()\n})\n\ndefineExpose({\n ns,\n layout,\n store,\n columns,\n handleHeaderFooterMousewheel,\n handleMouseLeave,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n tableBodyStyles,\n emptyBlockStyle,\n debouncedUpdateLayout,\n /**\n * @description used in single selection Table, set a certain row selected. If called without any parameter, it will clear selection\n */\n setCurrentRow,\n /**\n * @description returns the currently selected rows\n */\n getSelectionRows,\n /**\n * @description used in multiple selection Table, toggle if a certain row is selected. With the second parameter, you can directly set if this row is selected\n */\n toggleRowSelection,\n /**\n * @description used in multiple selection Table, clear user selection\n */\n clearSelection,\n /**\n * @description clear filters of the columns whose `columnKey` are passed in. If no params, clear all filters\n */\n clearFilter,\n /**\n * @description used in multiple selection Table, toggle select all and deselect all\n */\n toggleAllSelection,\n /**\n * @description used in expandable Table or tree Table, toggle if a certain row is expanded. With the second parameter, you can directly set if this row is expanded or collapsed\n */\n toggleRowExpansion,\n /**\n * @description clear sorting, restore data to the original order\n */\n clearSort,\n /**\n * @description refresh the layout of Table. When the visibility of Table changes, you may need to call this method to get a correct layout\n */\n doLayout,\n /**\n * @description sort Table manually. Property `prop` is used to set sort column, property `order` is used to set sort order\n */\n sort,\n /**\n * @description used in lazy Table, must set `rowKey`, update key children\n */\n updateKeyChildren,\n t,\n setDragVisible,\n context,\n computedSumText,\n computedEmptyText,\n computedTooltipEffect,\n computedTooltipOptions,\n tableLayout,\n scrollbarViewStyle,\n scrollbarStyle,\n scrollBarRef,\n /**\n * @description scrolls to a particular set of coordinates\n */\n scrollTo,\n /**\n * @description set horizontal scroll position\n */\n setScrollLeft,\n /**\n * @description set vertical scroll position\n */\n setScrollTop,\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn: props.allowDragLastColumn,\n})\n</script>\n"],"mappings":""}
|