@element-plus/nightly 0.0.20260719 → 0.0.20260721
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/es/components/affix/src/affix.vue.d.ts +3 -3
- 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 +1 -1
- package/es/components/autocomplete/src/autocomplete.d.ts +5 -106
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
- package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/avatar/src/avatar-group-props.d.ts +8 -105
- package/es/components/avatar/src/avatar-group-props.mjs +9 -1
- package/es/components/avatar/src/avatar-group-props.mjs.map +1 -1
- package/es/components/avatar/src/avatar-group.d.ts +17 -210
- package/es/components/avatar/src/avatar.d.ts +2 -2
- package/es/components/badge/src/badge.d.ts +4 -8
- package/es/components/badge/src/badge.mjs +9 -1
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.d.ts +3 -1
- package/es/components/badge/src/badge.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/button/src/button-group.d.ts +2 -2
- package/es/components/button/src/button-group.vue.d.ts +1 -1
- package/es/components/button/src/button.d.ts +2 -2
- package/es/components/button/src/button.vue.d.ts +4 -4
- package/es/components/button/src/use-button.d.ts +2 -2
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/card/src/card.d.ts +7 -6
- package/es/components/card/src/card.mjs +27 -3
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card.vue.d.ts +4 -0
- package/es/components/card/src/card.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.d.ts +5 -106
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +18 -16
- package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.vue.d.ts +5 -5
- package/es/components/cascader-panel/src/menu.vue.d.ts +1 -1
- package/es/components/check-tag/src/check-tag.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
- package/es/components/checkbox/src/checkbox-group.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +5 -5
- package/es/components/checkbox/src/checkbox.d.ts +3 -3
- package/es/components/checkbox/src/checkbox.vue.d.ts +5 -5
- package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
- package/es/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
- package/es/components/col/src/col.vue.d.ts +2 -2
- package/es/components/collapse/src/collapse.vue.d.ts +2 -2
- package/es/components/color-picker/src/color-picker.d.ts +5 -104
- package/es/components/color-picker/src/color-picker.mjs +1 -0
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +12 -10
- package/es/components/color-picker-panel/src/color-picker-panel.d.ts +4 -10
- package/es/components/color-picker-panel/src/color-picker-panel.mjs +9 -5
- package/es/components/color-picker-panel/src/color-picker-panel.mjs.map +1 -1
- package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +5 -2
- package/es/components/color-picker-panel/src/color-picker-panel.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/color-picker-panel/src/color-picker-panel2.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider-props.d.ts +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +3 -3
- 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 +12 -212
- package/es/components/date-picker/src/props.d.ts +4 -104
- package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/basic-month-table.vue.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-com/basic-year-table.vue.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +5 -5
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +6 -6
- 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 +7 -7
- package/es/components/date-picker-panel/src/panel-utils.d.ts +36 -36
- package/es/components/date-picker-panel/src/props/basic-date-table.mjs.map +1 -1
- package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
- package/es/components/descriptions/src/description-item.d.ts +2 -2
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog-content.d.ts +10 -6
- package/es/components/dialog/src/dialog-content.mjs +32 -5
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +5 -1
- package/es/components/dialog/src/dialog.d.ts +10 -5
- package/es/components/dialog/src/dialog.mjs +11 -14
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +11 -6
- package/es/components/divider/src/divider.vue.d.ts +1 -1
- package/es/components/drawer/src/drawer.d.ts +5 -4
- package/es/components/drawer/src/drawer.vue.d.ts +12 -7
- package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +2 -2
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +5 -5
- package/es/components/dropdown/src/dropdown.d.ts +4 -105
- package/es/components/dropdown/src/dropdown.vue.d.ts +67 -265
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/form/src/form-item.d.ts +2 -2
- package/es/components/form/src/form-item.vue.d.ts +2 -2
- package/es/components/form/src/form.d.ts +2 -2
- package/es/components/form/src/hooks/use-form-common-props.d.ts +2 -2
- package/es/components/image/src/image.d.ts +1 -1
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +4 -4
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +3 -3
- package/es/components/input/src/input.d.ts +3 -3
- package/es/components/input/src/input.vue.d.ts +16 -16
- package/es/components/input-number/src/input-number.d.ts +3 -3
- package/es/components/input-number/src/input-number.vue.d.ts +9 -9
- package/es/components/input-otp/src/input-otp.vue.d.ts +7 -7
- package/es/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
- package/es/components/input-tag/src/input-tag.d.ts +2 -2
- package/es/components/input-tag/src/input-tag.vue.d.ts +10 -10
- package/es/components/link/src/link.d.ts +1 -1
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/mention/src/mention.d.ts +5 -106
- package/es/components/mention/src/mention.vue.d.ts +4 -4
- package/es/components/mention/src/mention.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/menu/src/menu.d.ts +11 -23
- package/es/components/menu/src/menu.mjs +18 -2
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.d.ts +10 -22
- package/es/components/menu/src/sub-menu.mjs +18 -2
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +4 -4
- package/es/components/message/src/message.mjs +6 -1
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +6 -5
- package/es/components/message/src/method.mjs.map +1 -1
- package/es/components/message-box/src/index.vue.d.ts +66 -74
- package/es/components/notification/src/notification.d.ts +4 -3
- package/es/components/notification/src/notification.mjs +6 -1
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +6 -5
- package/es/components/overlay/index.d.ts +4 -12
- package/es/components/overlay/src/overlay.d.ts +5 -18
- package/es/components/overlay/src/overlay.mjs +9 -5
- package/es/components/overlay/src/overlay.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.d.ts +1 -1
- package/es/components/pagination/src/components/jumper.vue.d.ts +2 -2
- package/es/components/pagination/src/components/sizes.d.ts +5 -14
- package/es/components/pagination/src/components/sizes.mjs +18 -2
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +9 -26
- package/es/components/pagination/src/pagination.d.ts +15 -28
- package/es/components/pagination/src/pagination.mjs +15 -2
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +3 -3
- package/es/components/popover/src/popover.d.ts +4 -104
- package/es/components/popover/src/popover.mjs +1 -0
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover.vue.d.ts +8 -7
- package/es/components/popper/src/composables/use-content-dom.d.ts +2 -25
- package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/es/components/popper/src/content.d.ts +12 -22
- package/es/components/popper/src/content.mjs +13 -7
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content.vue.d.ts +11 -9
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/progress/src/progress.d.ts +1 -1
- package/es/components/progress/src/progress.vue.d.ts +1 -1
- package/es/components/radio/src/radio-button.d.ts +1 -1
- package/es/components/radio/src/radio-button.vue.d.ts +2 -2
- package/es/components/radio/src/radio-group.d.ts +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +7 -7
- package/es/components/radio/src/radio.d.ts +2 -2
- package/es/components/radio/src/radio.vue.d.ts +5 -5
- package/es/components/radio/src/use-radio.d.ts +1 -1
- package/es/components/rate/src/rate.d.ts +1 -1
- package/es/components/rate/src/rate.vue.d.ts +4 -4
- package/es/components/rate/src/rate.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/result/src/result.d.ts +1 -1
- package/es/components/scrollbar/src/scrollbar.d.ts +5 -4
- package/es/components/scrollbar/src/scrollbar.mjs +12 -2
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +5 -4
- package/es/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/segmented/index.d.ts +4 -4
- package/es/components/segmented/src/segmented.d.ts +1 -1
- package/es/components/segmented/src/segmented.vue.d.ts +2 -2
- package/es/components/select/src/option.d.ts +1 -1
- package/es/components/select/src/option.vue.d.ts +2 -2
- package/es/components/select/src/select-dropdown.vue.d.ts +2 -1
- package/es/components/select/src/select.d.ts +9 -13
- package/es/components/select/src/select.mjs +15 -2
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +77 -83
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +7 -7
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/defaults.d.ts +4 -104
- package/es/components/select-v2/src/select.vue.d.ts +54 -252
- package/es/components/select-v2/src/useSelect.d.ts +2 -2
- package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/es/components/slider/src/button.d.ts +2 -1
- package/es/components/slider/src/button.mjs +10 -2
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button.vue.d.ts +5 -3
- package/es/components/slider/src/composables/use-marks.mjs.map +1 -1
- package/es/components/slider/src/slider.d.ts +4 -4
- package/es/components/slider/src/slider.mjs +6 -1
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider.vue.d.ts +16 -16
- package/es/components/space/src/space.d.ts +9 -9
- package/es/components/space/src/space.mjs +2 -1
- package/es/components/space/src/space.mjs.map +1 -1
- package/es/components/space/src/use-space.d.ts +2 -3
- package/es/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/es/components/splitter/src/splitter.vue.d.ts +2 -2
- package/es/components/statistic/src/statistic.vue.d.ts +2 -2
- package/es/components/steps/src/item.d.ts +1 -1
- package/es/components/steps/src/steps.d.ts +2 -2
- package/es/components/steps/src/steps.vue.d.ts +1 -1
- package/es/components/switch/src/switch.d.ts +1 -1
- package/es/components/switch/src/switch.vue.d.ts +5 -5
- package/es/components/table/src/filter-panel.vue.d.ts +63 -60
- package/es/components/table/src/table/defaults.d.ts +1 -1
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.d.ts +2 -2
- package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
- 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.vue.d.ts +4 -4
- package/es/components/table-v2/src/components/row.d.ts +1 -1
- package/es/components/table-v2/src/table-grid.d.ts +2 -2
- package/es/components/table-v2/src/table-v2.d.ts +4 -4
- package/es/components/tabs/src/tab-nav.d.ts +1 -1
- package/es/components/tabs/src/tabs.d.ts +2 -2
- package/es/components/tag/src/tag.d.ts +2 -2
- package/es/components/tag/src/tag.vue.d.ts +2 -2
- package/es/components/text/src/text.d.ts +2 -2
- package/es/components/text/src/text.vue.d.ts +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
- package/es/components/time-picker/src/common/picker.vue.d.ts +18 -218
- package/es/components/time-picker/src/common/props.d.ts +4 -104
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -1
- 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 +12 -212
- package/es/components/time-picker/src/utils.d.ts +1 -1
- package/es/components/time-select/src/time-select.d.ts +7 -11
- package/es/components/time-select/src/time-select.mjs +15 -2
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +13 -12
- package/es/components/timeline/src/timeline-item.d.ts +2 -2
- package/es/components/timeline/src/timeline-item.vue.d.ts +2 -2
- package/es/components/tooltip/src/content.d.ts +5 -200
- package/es/components/tooltip/src/content.vue.d.ts +6 -4
- package/es/components/tooltip/src/tooltip.d.ts +5 -202
- package/es/components/tooltip/src/tooltip.vue.d.ts +8 -7
- package/es/components/tooltip/src/trigger.d.ts +1 -1
- package/es/components/tour/src/content.d.ts +1 -1
- package/es/components/tour/src/step.vue.d.ts +1 -1
- package/es/components/tour/src/tour.vue.d.ts +6 -6
- package/es/components/transfer/src/transfer.vue.d.ts +2 -2
- package/es/components/tree/src/tree-node.vue.d.ts +16 -16
- package/es/components/tree/src/tree.vue.d.ts +22 -22
- package/es/components/tree-select/src/select.mjs +1 -5
- package/es/components/tree-select/src/select.mjs.map +1 -1
- package/es/components/tree-select/src/tree-select-option.d.ts +2 -2
- package/es/components/tree-select/src/tree-select.vue.d.ts +32 -40
- package/es/components/tree-v2/src/composables/useTree.d.ts +15 -14
- package/es/components/tree-v2/src/tree-node.vue.d.ts +2 -2
- package/es/components/tree-v2/src/tree.vue.d.ts +5 -5
- package/es/components/upload/src/upload-content.vue.d.ts +2 -2
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +3 -3
- package/es/components/virtual-list/src/builders/build-grid.d.ts +9 -8
- package/es/components/virtual-list/src/builders/build-list.d.ts +8 -7
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +9 -8
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +8 -7
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +9 -8
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +8 -7
- package/es/components/virtual-list/src/components/scrollbar.d.ts +5 -3
- package/es/components/virtual-list/src/props.d.ts +5 -4
- package/es/components/virtual-list/src/props.mjs +15 -2
- package/es/components/virtual-list/src/props.mjs.map +1 -1
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/hooks/use-size/index.d.ts +3 -3
- package/es/hooks/use-throttle-render/index.mjs.map +1 -1
- package/es/utils/index.d.ts +2 -2
- package/es/utils/typescript.d.ts +2 -1
- package/es/utils/typescript.mjs.map +1 -1
- package/es/utils/vue/size.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.vue.d.ts +3 -3
- 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 +1 -1
- package/lib/components/autocomplete/src/autocomplete.d.ts +5 -106
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
- package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/avatar/src/avatar-group-props.d.ts +8 -105
- package/lib/components/avatar/src/avatar-group-props.js +9 -1
- package/lib/components/avatar/src/avatar-group-props.js.map +1 -1
- package/lib/components/avatar/src/avatar-group.d.ts +17 -210
- package/lib/components/avatar/src/avatar.d.ts +2 -2
- package/lib/components/badge/src/badge.d.ts +4 -8
- package/lib/components/badge/src/badge.js +9 -1
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +3 -1
- package/lib/components/badge/src/badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/src/button-group.d.ts +2 -2
- package/lib/components/button/src/button-group.vue.d.ts +1 -1
- package/lib/components/button/src/button.d.ts +2 -2
- package/lib/components/button/src/button.vue.d.ts +4 -4
- package/lib/components/button/src/use-button.d.ts +2 -2
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/card/src/card.d.ts +7 -6
- package/lib/components/card/src/card.js +27 -3
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card.vue.d.ts +4 -0
- package/lib/components/card/src/card.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.d.ts +5 -106
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +18 -16
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue.d.ts +5 -5
- package/lib/components/cascader-panel/src/menu.vue.d.ts +1 -1
- package/lib/components/check-tag/src/check-tag.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
- package/lib/components/checkbox/src/checkbox-group.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +5 -5
- package/lib/components/checkbox/src/checkbox.d.ts +3 -3
- package/lib/components/checkbox/src/checkbox.vue.d.ts +5 -5
- package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
- package/lib/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
- package/lib/components/col/src/col.vue.d.ts +2 -2
- package/lib/components/collapse/src/collapse.vue.d.ts +2 -2
- package/lib/components/color-picker/src/color-picker.d.ts +5 -104
- package/lib/components/color-picker/src/color-picker.js +1 -0
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +12 -10
- package/lib/components/color-picker-panel/src/color-picker-panel.d.ts +4 -10
- package/lib/components/color-picker-panel/src/color-picker-panel.js +9 -5
- package/lib/components/color-picker-panel/src/color-picker-panel.js.map +1 -1
- package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +5 -2
- package/lib/components/color-picker-panel/src/color-picker-panel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/color-picker-panel/src/color-picker-panel2.js.map +1 -1
- package/lib/components/config-provider/src/config-provider-props.d.ts +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +3 -3
- 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 +12 -212
- package/lib/components/date-picker/src/props.d.ts +4 -104
- package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/basic-month-table.vue.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-com/basic-year-table.vue.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +5 -5
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +6 -6
- 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 +7 -7
- package/lib/components/date-picker-panel/src/panel-utils.d.ts +36 -36
- package/lib/components/date-picker-panel/src/props/basic-date-table.js.map +1 -1
- package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +2 -2
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog-content.d.ts +10 -6
- package/lib/components/dialog/src/dialog-content.js +31 -4
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +5 -1
- package/lib/components/dialog/src/dialog.d.ts +10 -5
- package/lib/components/dialog/src/dialog.js +11 -14
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +11 -6
- package/lib/components/divider/src/divider.vue.d.ts +1 -1
- package/lib/components/drawer/src/drawer.d.ts +5 -4
- package/lib/components/drawer/src/drawer.vue.d.ts +12 -7
- package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +5 -5
- package/lib/components/dropdown/src/dropdown.d.ts +4 -105
- package/lib/components/dropdown/src/dropdown.vue.d.ts +67 -265
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/form/src/form-item.d.ts +2 -2
- package/lib/components/form/src/form-item.vue.d.ts +2 -2
- package/lib/components/form/src/form.d.ts +2 -2
- package/lib/components/form/src/hooks/use-form-common-props.d.ts +2 -2
- package/lib/components/image/src/image.d.ts +1 -1
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +4 -4
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +3 -3
- package/lib/components/input/src/input.d.ts +3 -3
- package/lib/components/input/src/input.vue.d.ts +16 -16
- package/lib/components/input-number/src/input-number.d.ts +3 -3
- package/lib/components/input-number/src/input-number.vue.d.ts +9 -9
- package/lib/components/input-otp/src/input-otp.vue.d.ts +7 -7
- package/lib/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
- package/lib/components/input-tag/src/input-tag.d.ts +2 -2
- package/lib/components/input-tag/src/input-tag.vue.d.ts +10 -10
- package/lib/components/link/src/link.d.ts +1 -1
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/mention/src/mention.d.ts +5 -106
- package/lib/components/mention/src/mention.vue.d.ts +4 -4
- package/lib/components/mention/src/mention.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/menu/src/menu.d.ts +11 -23
- package/lib/components/menu/src/menu.js +18 -2
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.d.ts +10 -22
- package/lib/components/menu/src/sub-menu.js +18 -2
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/message/src/message.d.ts +4 -4
- package/lib/components/message/src/message.js +6 -1
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +6 -5
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/message-box/src/index.vue.d.ts +66 -74
- package/lib/components/notification/src/notification.d.ts +4 -3
- package/lib/components/notification/src/notification.js +6 -1
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +6 -5
- package/lib/components/overlay/index.d.ts +4 -12
- package/lib/components/overlay/src/overlay.d.ts +5 -18
- package/lib/components/overlay/src/overlay.js +9 -5
- package/lib/components/overlay/src/overlay.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.d.ts +1 -1
- package/lib/components/pagination/src/components/jumper.vue.d.ts +2 -2
- package/lib/components/pagination/src/components/sizes.d.ts +5 -14
- package/lib/components/pagination/src/components/sizes.js +18 -2
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +9 -26
- package/lib/components/pagination/src/pagination.d.ts +15 -28
- package/lib/components/pagination/src/pagination.js +15 -2
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +3 -3
- package/lib/components/popover/src/popover.d.ts +4 -104
- package/lib/components/popover/src/popover.js +1 -0
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +8 -7
- package/lib/components/popper/src/composables/use-content-dom.d.ts +2 -25
- package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/lib/components/popper/src/content.d.ts +12 -22
- package/lib/components/popper/src/content.js +13 -7
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content.vue.d.ts +11 -9
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/progress/src/progress.d.ts +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +1 -1
- package/lib/components/radio/src/radio-button.d.ts +1 -1
- package/lib/components/radio/src/radio-button.vue.d.ts +2 -2
- package/lib/components/radio/src/radio-group.d.ts +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +7 -7
- package/lib/components/radio/src/radio.d.ts +2 -2
- package/lib/components/radio/src/radio.vue.d.ts +5 -5
- package/lib/components/radio/src/use-radio.d.ts +1 -1
- package/lib/components/rate/src/rate.d.ts +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +4 -4
- package/lib/components/rate/src/rate.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/result/src/result.d.ts +1 -1
- package/lib/components/scrollbar/src/scrollbar.d.ts +5 -4
- package/lib/components/scrollbar/src/scrollbar.js +12 -2
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +5 -4
- package/lib/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/segmented/index.d.ts +4 -4
- package/lib/components/segmented/src/segmented.d.ts +1 -1
- package/lib/components/segmented/src/segmented.vue.d.ts +2 -2
- package/lib/components/select/src/option.d.ts +1 -1
- package/lib/components/select/src/option.vue.d.ts +2 -2
- package/lib/components/select/src/select-dropdown.vue.d.ts +2 -1
- package/lib/components/select/src/select.d.ts +9 -13
- package/lib/components/select/src/select.js +15 -2
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +77 -83
- package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +7 -7
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/defaults.d.ts +4 -104
- package/lib/components/select-v2/src/select.vue.d.ts +54 -252
- package/lib/components/select-v2/src/useSelect.d.ts +2 -2
- package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/lib/components/slider/src/button.d.ts +2 -1
- package/lib/components/slider/src/button.js +9 -1
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button.vue.d.ts +5 -3
- package/lib/components/slider/src/composables/use-marks.js.map +1 -1
- package/lib/components/slider/src/slider.d.ts +4 -4
- package/lib/components/slider/src/slider.js +6 -1
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +16 -16
- package/lib/components/space/src/space.d.ts +9 -9
- package/lib/components/space/src/space.js +2 -1
- package/lib/components/space/src/space.js.map +1 -1
- package/lib/components/space/src/use-space.d.ts +2 -3
- package/lib/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/lib/components/splitter/src/splitter.vue.d.ts +2 -2
- package/lib/components/statistic/src/statistic.vue.d.ts +2 -2
- package/lib/components/steps/src/item.d.ts +1 -1
- package/lib/components/steps/src/steps.d.ts +2 -2
- package/lib/components/steps/src/steps.vue.d.ts +1 -1
- package/lib/components/switch/src/switch.d.ts +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +5 -5
- package/lib/components/table/src/filter-panel.vue.d.ts +63 -60
- package/lib/components/table/src/table/defaults.d.ts +1 -1
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table/style-helper.d.ts +2 -2
- package/lib/components/table/src/table-body/events-helper.js.map +1 -1
- 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.vue.d.ts +4 -4
- package/lib/components/table-v2/src/components/row.d.ts +1 -1
- package/lib/components/table-v2/src/table-grid.d.ts +2 -2
- package/lib/components/table-v2/src/table-v2.d.ts +4 -4
- package/lib/components/tabs/src/tab-nav.d.ts +1 -1
- package/lib/components/tabs/src/tabs.d.ts +2 -2
- package/lib/components/tag/src/tag.d.ts +2 -2
- package/lib/components/tag/src/tag.vue.d.ts +2 -2
- package/lib/components/text/src/text.d.ts +2 -2
- package/lib/components/text/src/text.vue.d.ts +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
- package/lib/components/time-picker/src/common/picker.vue.d.ts +18 -218
- package/lib/components/time-picker/src/common/props.d.ts +4 -104
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -1
- 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 +12 -212
- package/lib/components/time-picker/src/utils.d.ts +1 -1
- package/lib/components/time-select/src/time-select.d.ts +7 -11
- package/lib/components/time-select/src/time-select.js +15 -2
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +13 -12
- package/lib/components/timeline/src/timeline-item.d.ts +2 -2
- package/lib/components/timeline/src/timeline-item.vue.d.ts +2 -2
- package/lib/components/tooltip/src/content.d.ts +5 -200
- package/lib/components/tooltip/src/content.vue.d.ts +6 -4
- package/lib/components/tooltip/src/tooltip.d.ts +5 -202
- package/lib/components/tooltip/src/tooltip.vue.d.ts +8 -7
- package/lib/components/tooltip/src/trigger.d.ts +1 -1
- package/lib/components/tour/src/content.d.ts +1 -1
- package/lib/components/tour/src/step.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +6 -6
- package/lib/components/transfer/src/transfer.vue.d.ts +2 -2
- package/lib/components/tree/src/tree-node.vue.d.ts +16 -16
- package/lib/components/tree/src/tree.vue.d.ts +22 -22
- package/lib/components/tree-select/src/select.js +1 -5
- package/lib/components/tree-select/src/select.js.map +1 -1
- package/lib/components/tree-select/src/tree-select-option.d.ts +2 -2
- package/lib/components/tree-select/src/tree-select.vue.d.ts +32 -40
- package/lib/components/tree-v2/src/composables/useTree.d.ts +15 -14
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +2 -2
- package/lib/components/tree-v2/src/tree.vue.d.ts +5 -5
- package/lib/components/upload/src/upload-content.vue.d.ts +2 -2
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +3 -3
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +9 -8
- package/lib/components/virtual-list/src/builders/build-list.d.ts +8 -7
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +9 -8
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +8 -7
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +9 -8
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +8 -7
- package/lib/components/virtual-list/src/components/scrollbar.d.ts +5 -3
- package/lib/components/virtual-list/src/props.d.ts +5 -4
- package/lib/components/virtual-list/src/props.js +15 -2
- package/lib/components/virtual-list/src/props.js.map +1 -1
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/hooks/use-size/index.d.ts +3 -3
- package/lib/hooks/use-throttle-render/index.js.map +1 -1
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/typescript.d.ts +2 -1
- package/lib/utils/typescript.js.map +1 -1
- package/lib/utils/vue/size.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SFCWithInstall } from "../../../utils/vue/typescript.js";
|
|
2
2
|
import { EpPropMergeType } from "../../../utils/vue/props/types.js";
|
|
3
|
-
import { Arrayable } from "../../../utils/typescript.js";
|
|
3
|
+
import { Arrayable, ClassValue } from "../../../utils/typescript.js";
|
|
4
4
|
import { Translator } from "../../../hooks/use-locale/index.js";
|
|
5
5
|
import { PopperEffect, PopperInstance, roleTypes } from "../../popper/src/popper.js";
|
|
6
6
|
import { Options, Placement } from "../../popper/index.js";
|
|
@@ -105,19 +105,19 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
105
105
|
}, {}, {
|
|
106
106
|
ElCheckbox: {
|
|
107
107
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<CheckboxProps> & Readonly<{
|
|
108
|
-
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
109
108
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
109
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
110
110
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
111
|
-
change: (val: CheckboxValueType) => void;
|
|
112
111
|
"update:modelValue": (val: CheckboxValueType) => void;
|
|
112
|
+
change: (val: CheckboxValueType) => void;
|
|
113
113
|
}, _$vue.PublicProps, {
|
|
114
|
-
label: string | boolean | number | object;
|
|
115
|
-
disabled: boolean;
|
|
116
|
-
name: string;
|
|
117
114
|
modelValue: number | string | boolean;
|
|
115
|
+
disabled: boolean;
|
|
118
116
|
validateEvent: boolean;
|
|
117
|
+
name: string;
|
|
119
118
|
id: string;
|
|
120
119
|
value: string | boolean | number | object;
|
|
120
|
+
label: string | boolean | number | object;
|
|
121
121
|
trueValue: string | number;
|
|
122
122
|
falseValue: string | number;
|
|
123
123
|
trueLabel: string | number;
|
|
@@ -130,16 +130,16 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
130
130
|
M: {};
|
|
131
131
|
Defaults: {};
|
|
132
132
|
}, Readonly<CheckboxProps> & Readonly<{
|
|
133
|
-
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
134
133
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
134
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
135
135
|
}>, {}, {}, {}, {}, {
|
|
136
|
-
label: string | boolean | number | object;
|
|
137
|
-
disabled: boolean;
|
|
138
|
-
name: string;
|
|
139
136
|
modelValue: number | string | boolean;
|
|
137
|
+
disabled: boolean;
|
|
140
138
|
validateEvent: boolean;
|
|
139
|
+
name: string;
|
|
141
140
|
id: string;
|
|
142
141
|
value: string | boolean | number | object;
|
|
142
|
+
label: string | boolean | number | object;
|
|
143
143
|
trueValue: string | number;
|
|
144
144
|
falseValue: string | number;
|
|
145
145
|
trueLabel: string | number;
|
|
@@ -149,19 +149,19 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
149
149
|
__isTeleport?: never;
|
|
150
150
|
__isSuspense?: never;
|
|
151
151
|
} & _$vue.ComponentOptionsBase<Readonly<CheckboxProps> & Readonly<{
|
|
152
|
-
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
153
152
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
153
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
154
154
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
155
|
-
change: (val: CheckboxValueType) => void;
|
|
156
155
|
"update:modelValue": (val: CheckboxValueType) => void;
|
|
156
|
+
change: (val: CheckboxValueType) => void;
|
|
157
157
|
}, string, {
|
|
158
|
-
label: string | boolean | number | object;
|
|
159
|
-
disabled: boolean;
|
|
160
|
-
name: string;
|
|
161
158
|
modelValue: number | string | boolean;
|
|
159
|
+
disabled: boolean;
|
|
162
160
|
validateEvent: boolean;
|
|
161
|
+
name: string;
|
|
163
162
|
id: string;
|
|
164
163
|
value: string | boolean | number | object;
|
|
164
|
+
label: string | boolean | number | object;
|
|
165
165
|
trueValue: string | number;
|
|
166
166
|
falseValue: string | number;
|
|
167
167
|
trueLabel: string | number;
|
|
@@ -185,7 +185,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
185
185
|
readonly falseLabel?: string | number | (() => string | number) | undefined;
|
|
186
186
|
readonly id?: string | (() => string) | undefined;
|
|
187
187
|
readonly border?: boolean | (() => boolean) | undefined;
|
|
188
|
-
readonly size?: "" | "
|
|
188
|
+
readonly size?: "" | "small" | "default" | "large" | (() => "" | "small" | "default" | "large") | undefined;
|
|
189
189
|
readonly tabindex?: string | number | (() => string | number) | undefined;
|
|
190
190
|
readonly validateEvent?: boolean | (() => boolean) | undefined;
|
|
191
191
|
readonly ariaLabel?: string | (() => string) | undefined;
|
|
@@ -197,22 +197,22 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
197
197
|
};
|
|
198
198
|
ElCheckboxGroup: SFCWithInstall<{
|
|
199
199
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<CheckboxGroupProps> & Readonly<{
|
|
200
|
-
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
201
200
|
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
201
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
202
202
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
203
|
-
change: (val: CheckboxValueType[]) => void;
|
|
204
203
|
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
204
|
+
change: (val: CheckboxValueType[]) => void;
|
|
205
205
|
}, _$vue.PublicProps, {
|
|
206
|
+
modelValue: CheckboxGroupValueType;
|
|
207
|
+
disabled: boolean;
|
|
208
|
+
validateEvent: boolean;
|
|
206
209
|
type: "checkbox" | "button";
|
|
207
210
|
props: {
|
|
208
211
|
value?: string;
|
|
209
212
|
label?: string;
|
|
210
213
|
disabled?: string;
|
|
211
214
|
};
|
|
212
|
-
disabled: boolean;
|
|
213
|
-
modelValue: CheckboxGroupValueType;
|
|
214
215
|
tag: string;
|
|
215
|
-
validateEvent: boolean;
|
|
216
216
|
}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
|
217
217
|
P: {};
|
|
218
218
|
B: {};
|
|
@@ -221,40 +221,40 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
221
221
|
M: {};
|
|
222
222
|
Defaults: {};
|
|
223
223
|
}, Readonly<CheckboxGroupProps> & Readonly<{
|
|
224
|
-
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
225
224
|
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
225
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
226
226
|
}>, {}, {}, {}, {}, {
|
|
227
|
+
modelValue: CheckboxGroupValueType;
|
|
228
|
+
disabled: boolean;
|
|
229
|
+
validateEvent: boolean;
|
|
227
230
|
type: "checkbox" | "button";
|
|
228
231
|
props: {
|
|
229
232
|
value?: string;
|
|
230
233
|
label?: string;
|
|
231
234
|
disabled?: string;
|
|
232
235
|
};
|
|
233
|
-
disabled: boolean;
|
|
234
|
-
modelValue: CheckboxGroupValueType;
|
|
235
236
|
tag: string;
|
|
236
|
-
validateEvent: boolean;
|
|
237
237
|
}>;
|
|
238
238
|
__isFragment?: never;
|
|
239
239
|
__isTeleport?: never;
|
|
240
240
|
__isSuspense?: never;
|
|
241
241
|
} & _$vue.ComponentOptionsBase<Readonly<CheckboxGroupProps> & Readonly<{
|
|
242
|
-
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
243
242
|
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
243
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
244
244
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
245
|
-
change: (val: CheckboxValueType[]) => void;
|
|
246
245
|
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
246
|
+
change: (val: CheckboxValueType[]) => void;
|
|
247
247
|
}, string, {
|
|
248
|
+
modelValue: CheckboxGroupValueType;
|
|
249
|
+
disabled: boolean;
|
|
250
|
+
validateEvent: boolean;
|
|
248
251
|
type: "checkbox" | "button";
|
|
249
252
|
props: {
|
|
250
253
|
value?: string;
|
|
251
254
|
label?: string;
|
|
252
255
|
disabled?: string;
|
|
253
256
|
};
|
|
254
|
-
disabled: boolean;
|
|
255
|
-
modelValue: CheckboxGroupValueType;
|
|
256
257
|
tag: string;
|
|
257
|
-
validateEvent: boolean;
|
|
258
258
|
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
|
259
259
|
$slots: {
|
|
260
260
|
default?: (props: {}) => any;
|
|
@@ -284,14 +284,14 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
284
284
|
}) => void;
|
|
285
285
|
"end-reached": (direction: ScrollbarDirection) => void;
|
|
286
286
|
}, _$vue.PublicProps, {
|
|
287
|
+
tabindex: number | string;
|
|
287
288
|
height: number | string;
|
|
288
289
|
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
289
|
-
tabindex: number | string;
|
|
290
|
-
maxHeight: number | string;
|
|
291
290
|
distance: number;
|
|
291
|
+
maxHeight: number | string;
|
|
292
292
|
wrapStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
293
|
-
wrapClass: string | string[];
|
|
294
|
-
viewClass: string | string[];
|
|
293
|
+
wrapClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
294
|
+
viewClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
295
295
|
viewStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
296
296
|
minSize: number;
|
|
297
297
|
}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
|
@@ -318,14 +318,14 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
318
318
|
setScrollLeft: (value: number) => void;
|
|
319
319
|
handleScroll: () => void;
|
|
320
320
|
}, {}, {}, {}, {
|
|
321
|
+
tabindex: number | string;
|
|
321
322
|
height: number | string;
|
|
322
323
|
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
323
|
-
tabindex: number | string;
|
|
324
|
-
maxHeight: number | string;
|
|
325
324
|
distance: number;
|
|
325
|
+
maxHeight: number | string;
|
|
326
326
|
wrapStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
327
|
-
wrapClass: string | string[];
|
|
328
|
-
viewClass: string | string[];
|
|
327
|
+
wrapClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
328
|
+
viewClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
329
329
|
viewStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
330
330
|
minSize: number;
|
|
331
331
|
}>;
|
|
@@ -355,14 +355,14 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
355
355
|
}) => void;
|
|
356
356
|
"end-reached": (direction: ScrollbarDirection) => void;
|
|
357
357
|
}, string, {
|
|
358
|
+
tabindex: number | string;
|
|
358
359
|
height: number | string;
|
|
359
360
|
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
360
|
-
tabindex: number | string;
|
|
361
|
-
maxHeight: number | string;
|
|
362
361
|
distance: number;
|
|
362
|
+
maxHeight: number | string;
|
|
363
363
|
wrapStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
364
|
-
wrapClass: string | string[];
|
|
365
|
-
viewClass: string | string[];
|
|
364
|
+
wrapClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
365
|
+
viewClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
366
366
|
viewStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
367
367
|
minSize: number;
|
|
368
368
|
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
|
@@ -397,30 +397,31 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
397
397
|
"before-hide": (...args: any[]) => void;
|
|
398
398
|
}, _$vue.PublicProps, {
|
|
399
399
|
visible: boolean | null;
|
|
400
|
-
role: typeof roleTypes[number];
|
|
401
|
-
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
402
400
|
content: string;
|
|
403
|
-
|
|
401
|
+
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
402
|
+
popperClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
403
|
+
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
404
404
|
teleported: boolean;
|
|
405
405
|
effect: PopperEffect;
|
|
406
406
|
enterable: boolean;
|
|
407
407
|
pure: boolean;
|
|
408
408
|
focusOnShow: boolean;
|
|
409
409
|
trapping: boolean;
|
|
410
|
-
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
411
410
|
stopPopperMouseEvent: boolean;
|
|
412
411
|
virtualTriggering: boolean;
|
|
413
412
|
loop: boolean;
|
|
414
413
|
boundariesPadding: number;
|
|
415
414
|
gpuAcceleration: boolean;
|
|
415
|
+
offset: number;
|
|
416
416
|
placement: Placement;
|
|
417
417
|
popperOptions: Partial<Options>;
|
|
418
|
-
strategy: "
|
|
418
|
+
strategy: "fixed" | "absolute";
|
|
419
419
|
arrowOffset: number;
|
|
420
|
-
showArrow: boolean;
|
|
421
420
|
showAfter: number;
|
|
422
421
|
hideAfter: number;
|
|
423
422
|
autoClose: number;
|
|
423
|
+
role: typeof roleTypes[number];
|
|
424
|
+
showArrow: boolean;
|
|
424
425
|
trigger: Arrayable<TooltipTriggerType>;
|
|
425
426
|
triggerKeys: string[];
|
|
426
427
|
}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
|
@@ -448,30 +449,31 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
448
449
|
hide: (event?: Event) => void;
|
|
449
450
|
}, {}, {}, {}, {
|
|
450
451
|
visible: boolean | null;
|
|
451
|
-
role: typeof roleTypes[number];
|
|
452
|
-
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
453
452
|
content: string;
|
|
454
|
-
|
|
453
|
+
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
454
|
+
popperClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
455
|
+
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
455
456
|
teleported: boolean;
|
|
456
457
|
effect: PopperEffect;
|
|
457
458
|
enterable: boolean;
|
|
458
459
|
pure: boolean;
|
|
459
460
|
focusOnShow: boolean;
|
|
460
461
|
trapping: boolean;
|
|
461
|
-
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
462
462
|
stopPopperMouseEvent: boolean;
|
|
463
463
|
virtualTriggering: boolean;
|
|
464
464
|
loop: boolean;
|
|
465
465
|
boundariesPadding: number;
|
|
466
466
|
gpuAcceleration: boolean;
|
|
467
|
+
offset: number;
|
|
467
468
|
placement: Placement;
|
|
468
469
|
popperOptions: Partial<Options>;
|
|
469
|
-
strategy: "
|
|
470
|
+
strategy: "fixed" | "absolute";
|
|
470
471
|
arrowOffset: number;
|
|
471
|
-
showArrow: boolean;
|
|
472
472
|
showAfter: number;
|
|
473
473
|
hideAfter: number;
|
|
474
474
|
autoClose: number;
|
|
475
|
+
role: typeof roleTypes[number];
|
|
476
|
+
showArrow: boolean;
|
|
475
477
|
trigger: Arrayable<TooltipTriggerType>;
|
|
476
478
|
triggerKeys: string[];
|
|
477
479
|
}>;
|
|
@@ -504,30 +506,31 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
504
506
|
"before-hide": (...args: any[]) => void;
|
|
505
507
|
}, string, {
|
|
506
508
|
visible: boolean | null;
|
|
507
|
-
role: typeof roleTypes[number];
|
|
508
|
-
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
509
509
|
content: string;
|
|
510
|
-
|
|
510
|
+
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
511
|
+
popperClass: string | false | Record<string, any> | ClassValue[] | null;
|
|
512
|
+
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
511
513
|
teleported: boolean;
|
|
512
514
|
effect: PopperEffect;
|
|
513
515
|
enterable: boolean;
|
|
514
516
|
pure: boolean;
|
|
515
517
|
focusOnShow: boolean;
|
|
516
518
|
trapping: boolean;
|
|
517
|
-
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
518
519
|
stopPopperMouseEvent: boolean;
|
|
519
520
|
virtualTriggering: boolean;
|
|
520
521
|
loop: boolean;
|
|
521
522
|
boundariesPadding: number;
|
|
522
523
|
gpuAcceleration: boolean;
|
|
524
|
+
offset: number;
|
|
523
525
|
placement: Placement;
|
|
524
526
|
popperOptions: Partial<Options>;
|
|
525
|
-
strategy: "
|
|
527
|
+
strategy: "fixed" | "absolute";
|
|
526
528
|
arrowOffset: number;
|
|
527
|
-
showArrow: boolean;
|
|
528
529
|
showAfter: number;
|
|
529
530
|
hideAfter: number;
|
|
530
531
|
autoClose: number;
|
|
532
|
+
role: typeof roleTypes[number];
|
|
533
|
+
showArrow: boolean;
|
|
531
534
|
trigger: Arrayable<TooltipTriggerType>;
|
|
532
535
|
triggerKeys: string[];
|
|
533
536
|
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
|
@@ -350,7 +350,7 @@ declare const tableProps: {
|
|
|
350
350
|
* @description size of Table
|
|
351
351
|
*/
|
|
352
352
|
size: {
|
|
353
|
-
readonly type: PropType<EpPropMergeType<StringConstructor, "" | "
|
|
353
|
+
readonly type: PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
354
354
|
readonly required: false;
|
|
355
355
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
356
356
|
__epPropKey: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["useSizeProp"],"sources":["../../../../../../../packages/components/table/src/table/defaults.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\n\nimport type {\n CSSProperties,\n ComponentInternalInstance,\n PropType,\n Ref,\n StyleValue,\n VNode,\n} from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { Nullable } from '@element-plus/utils'\nimport type { Store } from '../store'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type TableLayout from '../table-layout'\nimport type {\n TableOverflowTooltipFormatter,\n TableOverflowTooltipOptions,\n} from '../util'\n\ntype DefaultRow = Record<PropertyKey, any>\n\ninterface TableRefs {\n tableWrapper: HTMLElement\n headerWrapper: HTMLElement\n footerWrapper: HTMLElement\n fixedBodyWrapper: HTMLElement\n rightFixedBodyWrapper: HTMLElement\n bodyWrapper: HTMLElement\n appendWrapper: HTMLElement\n [key: string]: any\n}\n\ninterface TableState {\n isGroup: Ref<boolean>\n resizeState: Ref<{\n width: any\n height: any\n }>\n doLayout: () => void\n debouncedUpdateLayout: () => void\n}\n\ninterface TreeProps {\n hasChildren?: string\n children?: string\n checkStrictly?: boolean\n}\n\ntype HoverState<T extends DefaultRow> = Nullable<{\n cell: HTMLElement\n column: TableColumnCtx<T>\n row: T\n}>\n\ntype RIS<T extends DefaultRow> = {\n row: T\n $index: number\n store: Store<T>\n expanded: boolean\n}\n\ntype RenderExpanded<T extends DefaultRow> = ({\n row,\n $index,\n store,\n expanded,\n}: RIS<T>) => VNode[] | undefined\n\ntype SummaryMethod<T extends DefaultRow> = (data: {\n columns: TableColumnCtx<T>[]\n data: T[]\n}) => (string | VNode)[]\n\ninterface Table<T extends DefaultRow = any> extends Omit<\n ComponentInternalInstance,\n 'emit'\n> {\n $ready: boolean\n hoverState?: HoverState<T> | null\n renderExpanded: RenderExpanded<T>\n store: Store<T>\n layout: TableLayout<T>\n refs: TableRefs\n tableId: string\n state: TableState\n emit: TableEmits<T>\n}\n\ntype ColumnCls<T> = string | ((data: { row: T; rowIndex: number }) => string)\ntype ColumnStyle<T> =\n | CSSProperties\n | ((data: { row: T; rowIndex: number }) => CSSProperties)\ntype CellCls<T extends DefaultRow> =\n | string\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => string)\ntype CellStyle<T extends DefaultRow> =\n | CSSProperties\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => CSSProperties)\ntype Layout = 'fixed' | 'auto'\ninterface TableProps<T extends DefaultRow = DefaultRow> {\n /**\n * @description table data\n */\n data?: T[]\n /**\n * @description size of Table\n */\n size?: ComponentSize\n width?: string | number\n /**\n * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles\n */\n height?: string | number\n /**\n * @description table's max-height. The legal value is a number or the height in px\n */\n maxHeight?: string | number\n /**\n * @description whether width of column automatically fits its container\n */\n fit?: boolean\n /**\n * @description whether Table is striped\n */\n stripe?: boolean\n /**\n * @description whether Table has vertical border\n */\n border?: boolean\n /**\n * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n */\n rowKey?: string | ((row: T) => string)\n context?: Table<T>\n /**\n * @description whether Table header is visible\n */\n showHeader?: boolean\n /**\n * @description whether to display a summary row\n */\n showSummary?: boolean\n /**\n * @description displayed text for the first column of summary row\n */\n sumText?: string\n /**\n * @description custom summary method\n */\n summaryMethod?: SummaryMethod<T>\n /**\n * @description function that returns custom class names for a row, or a string assigning class names for every row\n */\n rowClassName?: ColumnCls<T>\n /**\n * @description function that returns custom style for a row, or an object assigning custom style for every row\n */\n rowStyle?: ColumnStyle<T>\n /**\n * @description function that returns custom class names for a cell, or a string assigning class names for every cell\n */\n cellClassName?: CellCls<T>\n /**\n * @description function that returns custom style for a cell, or an object assigning custom style for every cell\n */\n cellStyle?: CellStyle<T>\n /**\n * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header\n */\n headerRowClassName?: ColumnCls<T>\n /**\n * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header\n */\n headerRowStyle?: ColumnStyle<T>\n /**\n * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header\n */\n headerCellClassName?: CellCls<T>\n /**\n * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header\n */\n headerCellStyle?: CellStyle<T>\n /**\n * @description whether current row is highlighted\n */\n highlightCurrentRow?: boolean\n /**\n * @description key of current row, a set only prop\n */\n currentRowKey?: string | number\n /**\n * @description displayed text when data is empty. You can customize this area with `#empty`\n */\n emptyText?: string\n /**\n * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop\n */\n expandRowKeys?: Array<string>\n /**\n * @description whether expand all rows by default, works when the table has a column type=\"expand\" or contains tree structure data\n */\n defaultExpandAll?: boolean\n /**\n * @description enable expandable rows, works when the table has a column type=\"expand\"\n */\n rowExpandable?: (row: T, index: number) => boolean\n /**\n * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order\n */\n defaultSort?: Sort\n /**\n * @description the `effect` of the overflow tooltip\n */\n tooltipEffect?: string\n /**\n * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)\n */\n tooltipOptions?: TableOverflowTooltipOptions\n /**\n * @description method that returns rowspan and colspan\n */\n spanMethod?: (data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) =>\n | number[]\n | {\n rowspan: number\n colspan: number\n }\n | undefined\n /**\n * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected\n */\n selectOnIndeterminate?: boolean\n /**\n * @description horizontal indentation of tree data\n */\n indent?: number\n /**\n * @description configuration for rendering nested data\n */\n treeProps?: TreeProps\n /**\n * @description whether to lazy loading data\n */\n lazy?: boolean\n /**\n * @description method for loading child row data, only works when `lazy` is true\n */\n load?: (row: T, treeNode: TreeNode, resolve: (data: T[]) => void) => void\n className?: string\n style?: StyleValue\n /**\n * @description sets the algorithm used to lay out table cells, rows, and columns\n */\n tableLayout?: Layout\n /**\n * @description always show scrollbar\n */\n scrollbarAlwaysOn?: boolean\n /**\n * @description ensure main axis minimum-size doesn't follow the content\n */\n flexible?: boolean\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns\n */\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter?: TableOverflowTooltipFormatter<T>\n appendFilterPanelTo?: string\n scrollbarTabindex?: number | string\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn?: boolean\n /**\n * @description whether to preserve expanded row content in DOM when collapsed\n */\n preserveExpandedContent?: boolean\n /**\n * @description whether to use native scrollbars\n */\n nativeScrollbar?: boolean\n}\n\ntype TableTooltipData<T extends DefaultRow> = Parameters<\n TableOverflowTooltipFormatter<T>\n>[0]\ntype TableSortOrder = 'ascending' | 'descending'\n\ninterface Sort {\n prop: string\n order: TableSortOrder\n init?: any\n silent?: any\n}\n\ninterface Filter<T extends DefaultRow> {\n column: TableColumnCtx<T>\n values: string[]\n silent: any\n}\n\ninterface TreeNode {\n expanded?: boolean\n loading?: boolean\n noLazyChildren?: boolean\n indent?: number\n level?: number\n display?: boolean\n}\n\ninterface RenderRowData<T extends DefaultRow> {\n store: Store<T>\n _self: Table<T>\n column: TableColumnCtx<T>\n row: T\n $index: number\n cellIndex: number\n treeNode?: TreeNode\n expanded: boolean\n}\n\ninterface TableConfigContext {\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\n tooltipFormatter?: TableOverflowTooltipFormatter<any>\n}\n\ninterface TableEmits<T extends DefaultRow = DefaultRow> {\n (e: 'select', selection: T[], row: T): void\n (e: 'select-all', selection: T[]): void\n (e: 'selection-change', newSelection: T[]): void\n (\n e: 'cell-mouse-enter' | 'cell-mouse-leave' | 'cell-dblclick',\n row: T,\n column: TableColumnCtx<T>,\n cell: HTMLTableCellElement,\n event: MouseEvent\n ): void\n (\n e: 'cell-contextmenu' | 'cell-click',\n row: T,\n column: TableColumnCtx<T>,\n cell: HTMLTableCellElement,\n event: PointerEvent\n ): void\n (\n e: 'row-dblclick',\n row: T,\n column: TableColumnCtx<T> | null,\n event: MouseEvent\n ): void\n (\n e: 'row-click' | 'row-contextmenu',\n row: T,\n column: TableColumnCtx<T> | null,\n event: PointerEvent\n ): void\n (\n e: 'header-click' | 'header-contextmenu',\n column: TableColumnCtx<T>,\n event: PointerEvent\n ): void\n (\n e: 'sort-change',\n data: {\n column: TableColumnCtx<T>\n prop: string | null\n order: TableSortOrder | null\n }\n ): void\n (e: 'filter-change', newFilters: Record<string, string[]>): void\n (e: 'current-change', currentRow: T | null, oldCurrentRow: T | null): void\n (\n e: 'header-dragend',\n newWidth: number,\n oldWidth: number,\n column: TableColumnCtx<T>,\n event: MouseEvent\n ): void\n (e: 'expand-change', row: T, expandedRows: T[]): void\n (e: 'expand-change', row: T, expanded: boolean): void\n (\n e: 'scroll',\n data: {\n scrollLeft: number\n scrollTop: number\n }\n ): void\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TableProps` instead.\n */\nexport const tableProps = {\n /**\n * @description table data\n */\n data: {\n type: Array as PropType<any[]>,\n default: () => [],\n },\n /**\n * @description size of Table\n */\n size: useSizeProp,\n width: [String, Number],\n /**\n * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles\n */\n height: [String, Number],\n /**\n * @description table's max-height. The legal value is a number or the height in px\n */\n maxHeight: [String, Number],\n /**\n * @description whether width of column automatically fits its container\n */\n fit: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Table is striped\n */\n stripe: Boolean,\n /**\n * @description whether Table has vertical border\n */\n border: Boolean,\n /**\n * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n */\n rowKey: [String, Function] as PropType<TableProps<any>['rowKey']>,\n /**\n * @description whether Table header is visible\n */\n showHeader: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to display a summary row\n */\n showSummary: Boolean,\n /**\n * @description displayed text for the first column of summary row\n */\n sumText: String,\n /**\n * @description custom summary method\n */\n summaryMethod: Function as PropType<TableProps<any>['summaryMethod']>,\n /**\n * @description function that returns custom class names for a row, or a string assigning class names for every row\n */\n rowClassName: [String, Function] as PropType<TableProps<any>['rowClassName']>,\n /**\n * @description function that returns custom style for a row, or an object assigning custom style for every row\n */\n rowStyle: [Object, Function] as PropType<TableProps<any>['rowStyle']>,\n /**\n * @description function that returns custom class names for a cell, or a string assigning class names for every cell\n */\n cellClassName: [String, Function] as PropType<\n TableProps<any>['cellClassName']\n >,\n /**\n * @description function that returns custom style for a cell, or an object assigning custom style for every cell\n */\n cellStyle: [Object, Function] as PropType<TableProps<any>['cellStyle']>,\n /**\n * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header\n */\n headerRowClassName: [String, Function] as PropType<\n TableProps<any>['headerRowClassName']\n >,\n /**\n * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header\n */\n headerRowStyle: [Object, Function] as PropType<\n TableProps<any>['headerRowStyle']\n >,\n /**\n * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header\n */\n headerCellClassName: [String, Function] as PropType<\n TableProps<any>['headerCellClassName']\n >,\n /**\n * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header\n */\n headerCellStyle: [Object, Function] as PropType<\n TableProps<any>['headerCellStyle']\n >,\n /**\n * @description whether current row is highlighted\n */\n highlightCurrentRow: Boolean,\n /**\n * @description key of current row, a set only prop\n */\n currentRowKey: [String, Number],\n /**\n * @description displayed text when data is empty. You can customize this area with `#empty`\n */\n emptyText: String,\n /**\n * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop\n */\n expandRowKeys: Array as PropType<TableProps<any>['expandRowKeys']>,\n /**\n * @description whether expand all rows by default, works when the table has a column type=\"expand\" or contains tree structure data\n */\n defaultExpandAll: Boolean,\n /**\n * @description enable expandable rows, works when the table has a column type=\"expand\"\n */\n rowExpandable: {\n type: Function as PropType<TableProps<any>['rowExpandable']>,\n },\n /**\n * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order\n */\n defaultSort: Object as PropType<TableProps<any>['defaultSort']>,\n /**\n * @description the `effect` of the overflow tooltip\n */\n tooltipEffect: String,\n /**\n * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)\n */\n tooltipOptions: Object as PropType<TableProps<any>['tooltipOptions']>,\n /**\n * @description method that returns rowspan and colspan\n */\n spanMethod: Function as PropType<TableProps<any>['spanMethod']>,\n /**\n * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected\n */\n selectOnIndeterminate: {\n type: Boolean,\n default: true,\n },\n /**\n * @description horizontal indentation of tree data\n */\n indent: {\n type: Number,\n default: 16,\n },\n /**\n * @description configuration for rendering nested data\n */\n treeProps: {\n type: Object as PropType<TableProps<any>['treeProps']>,\n default: () => {\n return {\n hasChildren: 'hasChildren',\n children: 'children',\n checkStrictly: false,\n }\n },\n },\n /**\n * @description whether to lazy loading data\n */\n lazy: Boolean,\n /**\n * @description method for loading child row data, only works when `lazy` is true\n */\n load: Function as PropType<TableProps<any>['load']>,\n style: {\n type: [String, Object, Array, Boolean] as PropType<\n TableProps<any>['style']\n >,\n default: () => ({}),\n },\n className: {\n type: String,\n default: '',\n },\n /**\n * @description sets the algorithm used to lay out table cells, rows, and columns\n */\n tableLayout: {\n type: String as PropType<Layout>,\n default: 'fixed',\n },\n /**\n * @description always show scrollbar\n */\n scrollbarAlwaysOn: Boolean,\n /**\n * @description ensure main axis minimum-size doesn't follow the content\n */\n flexible: Boolean,\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns\n */\n showOverflowTooltip: {\n type: [Boolean, Object] as PropType<TableProps<any>['showOverflowTooltip']>,\n default: undefined,\n },\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter: Function as PropType<TableProps<any>['tooltipFormatter']>,\n appendFilterPanelTo: String,\n scrollbarTabindex: {\n type: [Number, String],\n default: undefined,\n },\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to preserve expanded row content in DOM when collapsed\n */\n preserveExpandedContent: Boolean,\n /**\n * @description whether to use native scrollbars\n */\n nativeScrollbar: Boolean,\n}\nexport type {\n SummaryMethod,\n Table,\n TableProps,\n TableRefs,\n ColumnCls,\n ColumnStyle,\n CellCls,\n CellStyle,\n DefaultRow,\n TreeNode,\n RenderRowData,\n Sort,\n Filter,\n TableColumnCtx,\n TreeProps,\n TableTooltipData,\n TableSortOrder,\n RenderExpanded,\n TableConfigContext,\n TableEmits,\n}\n\nexport default tableProps\n"],"mappings":";;;;;;;;;AA6ZA,MAAa,aAAa;;;;CAIxB,MAAM;EACJ,MAAM;EACN,eAAe,EAAE;EAClB;;;;CAID,MAAMA,cAAAA;CACN,OAAO,CAAC,QAAQ,OAAO;;;;CAIvB,QAAQ,CAAC,QAAQ,OAAO;;;;CAIxB,WAAW,CAAC,QAAQ,OAAO;;;;CAI3B,KAAK;EACH,MAAM;EACN,SAAS;EACV;;;;CAID,QAAQ;;;;CAIR,QAAQ;;;;CAIR,QAAQ,CAAC,QAAQ,SAAS;;;;CAI1B,YAAY;EACV,MAAM;EACN,SAAS;EACV;;;;CAID,aAAa;;;;CAIb,SAAS;;;;CAIT,eAAe;;;;CAIf,cAAc,CAAC,QAAQ,SAAS;;;;CAIhC,UAAU,CAAC,QAAQ,SAAS;;;;CAI5B,eAAe,CAAC,QAAQ,SAAS;;;;CAMjC,WAAW,CAAC,QAAQ,SAAS;;;;CAI7B,oBAAoB,CAAC,QAAQ,SAAS;;;;CAMtC,gBAAgB,CAAC,QAAQ,SAAS;;;;CAMlC,qBAAqB,CAAC,QAAQ,SAAS;;;;CAMvC,iBAAiB,CAAC,QAAQ,SAAS;;;;CAMnC,qBAAqB;;;;CAIrB,eAAe,CAAC,QAAQ,OAAO;;;;CAI/B,WAAW;;;;CAIX,eAAe;;;;CAIf,kBAAkB;;;;CAIlB,eAAe,EACb,MAAM,UACP;;;;CAID,aAAa;;;;CAIb,eAAe;;;;CAIf,gBAAgB;;;;CAIhB,YAAY;;;;CAIZ,uBAAuB;EACrB,MAAM;EACN,SAAS;EACV;;;;CAID,QAAQ;EACN,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,eAAe;GACb,OAAO;IACL,aAAa;IACb,UAAU;IACV,eAAe;IAChB;;EAEJ;;;;CAID,MAAM;;;;CAIN,MAAM;CACN,OAAO;EACL,MAAM;GAAC;GAAQ;GAAQ;GAAO;GAAQ;EAGtC,gBAAgB,EAAE;EACnB;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,mBAAmB;;;;CAInB,UAAU;;;;CAIV,qBAAqB;EACnB,MAAM,CAAC,SAAS,OAAO;EACvB,SAAS,KAAA;EACV;;;;CAID,kBAAkB;CAClB,qBAAqB;CACrB,mBAAmB;EACjB,MAAM,CAAC,QAAQ,OAAO;EACtB,SAAS,KAAA;EACV;;;;CAID,qBAAqB;EACnB,MAAM;EACN,SAAS;EACV;;;;CAID,yBAAyB;;;;CAIzB,iBAAiB;CAClB"}
|
|
1
|
+
{"version":3,"file":"defaults.js","names":["useSizeProp"],"sources":["../../../../../../../packages/components/table/src/table/defaults.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\n\nimport type {\n CSSProperties,\n ComponentInternalInstance,\n PropType,\n Ref,\n StyleValue,\n VNode,\n} from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { Nullable } from '@element-plus/utils'\nimport type { Store } from '../store'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type TableLayout from '../table-layout'\nimport type {\n TableOverflowTooltipFormatter,\n TableOverflowTooltipOptions,\n} from '../util'\n\ntype DefaultRow = Record<PropertyKey, any>\n\ninterface TableRefs {\n tableWrapper: HTMLElement\n headerWrapper: HTMLElement\n footerWrapper: HTMLElement\n fixedBodyWrapper: HTMLElement\n rightFixedBodyWrapper: HTMLElement\n bodyWrapper: HTMLElement\n appendWrapper: HTMLElement\n [key: string]: any\n}\n\ninterface TableState {\n isGroup: Ref<boolean>\n resizeState: Ref<{\n width: any\n height: any\n }>\n doLayout: () => void\n debouncedUpdateLayout: () => void\n}\n\ninterface TreeProps {\n hasChildren?: string\n children?: string\n checkStrictly?: boolean\n}\n\ntype HoverState<T extends DefaultRow> = Nullable<{\n cell: HTMLElement\n column: TableColumnCtx<T>\n row: T\n}>\n\ntype RIS<T extends DefaultRow> = {\n row: T\n $index: number\n store: Store<T>\n expanded: boolean\n}\n\ntype RenderExpanded<T extends DefaultRow> = ({\n row,\n $index,\n store,\n expanded,\n}: RIS<T>) => VNode[] | undefined\n\ntype SummaryMethod<T extends DefaultRow> = (data: {\n columns: TableColumnCtx<T>[]\n data: T[]\n}) => (string | VNode)[]\n\ninterface Table<T extends DefaultRow = any> extends Omit<\n ComponentInternalInstance,\n 'emit'\n> {\n $ready: boolean\n hoverState?: HoverState<T> | null\n renderExpanded: RenderExpanded<T>\n store: Store<T>\n layout: TableLayout<T>\n refs: TableRefs\n tableId: string\n state: TableState\n emit: TableEmits<T>\n}\n\ntype ColumnCls<T> = string | ((data: { row: T; rowIndex: number }) => string)\ntype ColumnStyle<T> =\n CSSProperties | ((data: { row: T; rowIndex: number }) => CSSProperties)\ntype CellCls<T extends DefaultRow> =\n | string\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => string)\ntype CellStyle<T extends DefaultRow> =\n | CSSProperties\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => CSSProperties)\ntype Layout = 'fixed' | 'auto'\ninterface TableProps<T extends DefaultRow = DefaultRow> {\n /**\n * @description table data\n */\n data?: T[]\n /**\n * @description size of Table\n */\n size?: ComponentSize\n width?: string | number\n /**\n * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles\n */\n height?: string | number\n /**\n * @description table's max-height. The legal value is a number or the height in px\n */\n maxHeight?: string | number\n /**\n * @description whether width of column automatically fits its container\n */\n fit?: boolean\n /**\n * @description whether Table is striped\n */\n stripe?: boolean\n /**\n * @description whether Table has vertical border\n */\n border?: boolean\n /**\n * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n */\n rowKey?: string | ((row: T) => string)\n context?: Table<T>\n /**\n * @description whether Table header is visible\n */\n showHeader?: boolean\n /**\n * @description whether to display a summary row\n */\n showSummary?: boolean\n /**\n * @description displayed text for the first column of summary row\n */\n sumText?: string\n /**\n * @description custom summary method\n */\n summaryMethod?: SummaryMethod<T>\n /**\n * @description function that returns custom class names for a row, or a string assigning class names for every row\n */\n rowClassName?: ColumnCls<T>\n /**\n * @description function that returns custom style for a row, or an object assigning custom style for every row\n */\n rowStyle?: ColumnStyle<T>\n /**\n * @description function that returns custom class names for a cell, or a string assigning class names for every cell\n */\n cellClassName?: CellCls<T>\n /**\n * @description function that returns custom style for a cell, or an object assigning custom style for every cell\n */\n cellStyle?: CellStyle<T>\n /**\n * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header\n */\n headerRowClassName?: ColumnCls<T>\n /**\n * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header\n */\n headerRowStyle?: ColumnStyle<T>\n /**\n * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header\n */\n headerCellClassName?: CellCls<T>\n /**\n * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header\n */\n headerCellStyle?: CellStyle<T>\n /**\n * @description whether current row is highlighted\n */\n highlightCurrentRow?: boolean\n /**\n * @description key of current row, a set only prop\n */\n currentRowKey?: string | number\n /**\n * @description displayed text when data is empty. You can customize this area with `#empty`\n */\n emptyText?: string\n /**\n * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop\n */\n expandRowKeys?: Array<string>\n /**\n * @description whether expand all rows by default, works when the table has a column type=\"expand\" or contains tree structure data\n */\n defaultExpandAll?: boolean\n /**\n * @description enable expandable rows, works when the table has a column type=\"expand\"\n */\n rowExpandable?: (row: T, index: number) => boolean\n /**\n * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order\n */\n defaultSort?: Sort\n /**\n * @description the `effect` of the overflow tooltip\n */\n tooltipEffect?: string\n /**\n * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)\n */\n tooltipOptions?: TableOverflowTooltipOptions\n /**\n * @description method that returns rowspan and colspan\n */\n spanMethod?: (data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) =>\n | number[]\n | {\n rowspan: number\n colspan: number\n }\n | undefined\n /**\n * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected\n */\n selectOnIndeterminate?: boolean\n /**\n * @description horizontal indentation of tree data\n */\n indent?: number\n /**\n * @description configuration for rendering nested data\n */\n treeProps?: TreeProps\n /**\n * @description whether to lazy loading data\n */\n lazy?: boolean\n /**\n * @description method for loading child row data, only works when `lazy` is true\n */\n load?: (row: T, treeNode: TreeNode, resolve: (data: T[]) => void) => void\n className?: string\n style?: StyleValue\n /**\n * @description sets the algorithm used to lay out table cells, rows, and columns\n */\n tableLayout?: Layout\n /**\n * @description always show scrollbar\n */\n scrollbarAlwaysOn?: boolean\n /**\n * @description ensure main axis minimum-size doesn't follow the content\n */\n flexible?: boolean\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns\n */\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter?: TableOverflowTooltipFormatter<T>\n appendFilterPanelTo?: string\n scrollbarTabindex?: number | string\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn?: boolean\n /**\n * @description whether to preserve expanded row content in DOM when collapsed\n */\n preserveExpandedContent?: boolean\n /**\n * @description whether to use native scrollbars\n */\n nativeScrollbar?: boolean\n}\n\ntype TableTooltipData<T extends DefaultRow> = Parameters<\n TableOverflowTooltipFormatter<T>\n>[0]\ntype TableSortOrder = 'ascending' | 'descending'\n\ninterface Sort {\n prop: string\n order: TableSortOrder\n init?: any\n silent?: any\n}\n\ninterface Filter<T extends DefaultRow> {\n column: TableColumnCtx<T>\n values: string[]\n silent: any\n}\n\ninterface TreeNode {\n expanded?: boolean\n loading?: boolean\n noLazyChildren?: boolean\n indent?: number\n level?: number\n display?: boolean\n}\n\ninterface RenderRowData<T extends DefaultRow> {\n store: Store<T>\n _self: Table<T>\n column: TableColumnCtx<T>\n row: T\n $index: number\n cellIndex: number\n treeNode?: TreeNode\n expanded: boolean\n}\n\ninterface TableConfigContext {\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\n tooltipFormatter?: TableOverflowTooltipFormatter<any>\n}\n\ninterface TableEmits<T extends DefaultRow = DefaultRow> {\n (e: 'select', selection: T[], row: T): void\n (e: 'select-all', selection: T[]): void\n (e: 'selection-change', newSelection: T[]): void\n (\n e: 'cell-mouse-enter' | 'cell-mouse-leave' | 'cell-dblclick',\n row: T,\n column: TableColumnCtx<T>,\n cell: HTMLTableCellElement,\n event: MouseEvent\n ): void\n (\n e: 'cell-contextmenu' | 'cell-click',\n row: T,\n column: TableColumnCtx<T>,\n cell: HTMLTableCellElement,\n event: PointerEvent\n ): void\n (\n e: 'row-dblclick',\n row: T,\n column: TableColumnCtx<T> | null,\n event: MouseEvent\n ): void\n (\n e: 'row-click' | 'row-contextmenu',\n row: T,\n column: TableColumnCtx<T> | null,\n event: PointerEvent\n ): void\n (\n e: 'header-click' | 'header-contextmenu',\n column: TableColumnCtx<T>,\n event: PointerEvent\n ): void\n (\n e: 'sort-change',\n data: {\n column: TableColumnCtx<T>\n prop: string | null\n order: TableSortOrder | null\n }\n ): void\n (e: 'filter-change', newFilters: Record<string, string[]>): void\n (e: 'current-change', currentRow: T | null, oldCurrentRow: T | null): void\n (\n e: 'header-dragend',\n newWidth: number,\n oldWidth: number,\n column: TableColumnCtx<T>,\n event: MouseEvent\n ): void\n (e: 'expand-change', row: T, expandedRows: T[]): void\n (e: 'expand-change', row: T, expanded: boolean): void\n (\n e: 'scroll',\n data: {\n scrollLeft: number\n scrollTop: number\n }\n ): void\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TableProps` instead.\n */\nexport const tableProps = {\n /**\n * @description table data\n */\n data: {\n type: Array as PropType<any[]>,\n default: () => [],\n },\n /**\n * @description size of Table\n */\n size: useSizeProp,\n width: [String, Number],\n /**\n * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles\n */\n height: [String, Number],\n /**\n * @description table's max-height. The legal value is a number or the height in px\n */\n maxHeight: [String, Number],\n /**\n * @description whether width of column automatically fits its container\n */\n fit: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Table is striped\n */\n stripe: Boolean,\n /**\n * @description whether Table has vertical border\n */\n border: Boolean,\n /**\n * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n */\n rowKey: [String, Function] as PropType<TableProps<any>['rowKey']>,\n /**\n * @description whether Table header is visible\n */\n showHeader: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to display a summary row\n */\n showSummary: Boolean,\n /**\n * @description displayed text for the first column of summary row\n */\n sumText: String,\n /**\n * @description custom summary method\n */\n summaryMethod: Function as PropType<TableProps<any>['summaryMethod']>,\n /**\n * @description function that returns custom class names for a row, or a string assigning class names for every row\n */\n rowClassName: [String, Function] as PropType<TableProps<any>['rowClassName']>,\n /**\n * @description function that returns custom style for a row, or an object assigning custom style for every row\n */\n rowStyle: [Object, Function] as PropType<TableProps<any>['rowStyle']>,\n /**\n * @description function that returns custom class names for a cell, or a string assigning class names for every cell\n */\n cellClassName: [String, Function] as PropType<\n TableProps<any>['cellClassName']\n >,\n /**\n * @description function that returns custom style for a cell, or an object assigning custom style for every cell\n */\n cellStyle: [Object, Function] as PropType<TableProps<any>['cellStyle']>,\n /**\n * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header\n */\n headerRowClassName: [String, Function] as PropType<\n TableProps<any>['headerRowClassName']\n >,\n /**\n * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header\n */\n headerRowStyle: [Object, Function] as PropType<\n TableProps<any>['headerRowStyle']\n >,\n /**\n * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header\n */\n headerCellClassName: [String, Function] as PropType<\n TableProps<any>['headerCellClassName']\n >,\n /**\n * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header\n */\n headerCellStyle: [Object, Function] as PropType<\n TableProps<any>['headerCellStyle']\n >,\n /**\n * @description whether current row is highlighted\n */\n highlightCurrentRow: Boolean,\n /**\n * @description key of current row, a set only prop\n */\n currentRowKey: [String, Number],\n /**\n * @description displayed text when data is empty. You can customize this area with `#empty`\n */\n emptyText: String,\n /**\n * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop\n */\n expandRowKeys: Array as PropType<TableProps<any>['expandRowKeys']>,\n /**\n * @description whether expand all rows by default, works when the table has a column type=\"expand\" or contains tree structure data\n */\n defaultExpandAll: Boolean,\n /**\n * @description enable expandable rows, works when the table has a column type=\"expand\"\n */\n rowExpandable: {\n type: Function as PropType<TableProps<any>['rowExpandable']>,\n },\n /**\n * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order\n */\n defaultSort: Object as PropType<TableProps<any>['defaultSort']>,\n /**\n * @description the `effect` of the overflow tooltip\n */\n tooltipEffect: String,\n /**\n * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)\n */\n tooltipOptions: Object as PropType<TableProps<any>['tooltipOptions']>,\n /**\n * @description method that returns rowspan and colspan\n */\n spanMethod: Function as PropType<TableProps<any>['spanMethod']>,\n /**\n * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected\n */\n selectOnIndeterminate: {\n type: Boolean,\n default: true,\n },\n /**\n * @description horizontal indentation of tree data\n */\n indent: {\n type: Number,\n default: 16,\n },\n /**\n * @description configuration for rendering nested data\n */\n treeProps: {\n type: Object as PropType<TableProps<any>['treeProps']>,\n default: () => {\n return {\n hasChildren: 'hasChildren',\n children: 'children',\n checkStrictly: false,\n }\n },\n },\n /**\n * @description whether to lazy loading data\n */\n lazy: Boolean,\n /**\n * @description method for loading child row data, only works when `lazy` is true\n */\n load: Function as PropType<TableProps<any>['load']>,\n style: {\n type: [String, Object, Array, Boolean] as PropType<\n TableProps<any>['style']\n >,\n default: () => ({}),\n },\n className: {\n type: String,\n default: '',\n },\n /**\n * @description sets the algorithm used to lay out table cells, rows, and columns\n */\n tableLayout: {\n type: String as PropType<Layout>,\n default: 'fixed',\n },\n /**\n * @description always show scrollbar\n */\n scrollbarAlwaysOn: Boolean,\n /**\n * @description ensure main axis minimum-size doesn't follow the content\n */\n flexible: Boolean,\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns\n */\n showOverflowTooltip: {\n type: [Boolean, Object] as PropType<TableProps<any>['showOverflowTooltip']>,\n default: undefined,\n },\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter: Function as PropType<TableProps<any>['tooltipFormatter']>,\n appendFilterPanelTo: String,\n scrollbarTabindex: {\n type: [Number, String],\n default: undefined,\n },\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to preserve expanded row content in DOM when collapsed\n */\n preserveExpandedContent: Boolean,\n /**\n * @description whether to use native scrollbars\n */\n nativeScrollbar: Boolean,\n}\nexport type {\n SummaryMethod,\n Table,\n TableProps,\n TableRefs,\n ColumnCls,\n ColumnStyle,\n CellCls,\n CellStyle,\n DefaultRow,\n TreeNode,\n RenderRowData,\n Sort,\n Filter,\n TableColumnCtx,\n TreeProps,\n TableTooltipData,\n TableSortOrder,\n RenderExpanded,\n TableConfigContext,\n TableEmits,\n}\n\nexport default tableProps\n"],"mappings":";;;;;;;;;AA4ZA,MAAa,aAAa;;;;CAIxB,MAAM;EACJ,MAAM;EACN,eAAe,EAAE;EAClB;;;;CAID,MAAMA,cAAAA;CACN,OAAO,CAAC,QAAQ,OAAO;;;;CAIvB,QAAQ,CAAC,QAAQ,OAAO;;;;CAIxB,WAAW,CAAC,QAAQ,OAAO;;;;CAI3B,KAAK;EACH,MAAM;EACN,SAAS;EACV;;;;CAID,QAAQ;;;;CAIR,QAAQ;;;;CAIR,QAAQ,CAAC,QAAQ,SAAS;;;;CAI1B,YAAY;EACV,MAAM;EACN,SAAS;EACV;;;;CAID,aAAa;;;;CAIb,SAAS;;;;CAIT,eAAe;;;;CAIf,cAAc,CAAC,QAAQ,SAAS;;;;CAIhC,UAAU,CAAC,QAAQ,SAAS;;;;CAI5B,eAAe,CAAC,QAAQ,SAAS;;;;CAMjC,WAAW,CAAC,QAAQ,SAAS;;;;CAI7B,oBAAoB,CAAC,QAAQ,SAAS;;;;CAMtC,gBAAgB,CAAC,QAAQ,SAAS;;;;CAMlC,qBAAqB,CAAC,QAAQ,SAAS;;;;CAMvC,iBAAiB,CAAC,QAAQ,SAAS;;;;CAMnC,qBAAqB;;;;CAIrB,eAAe,CAAC,QAAQ,OAAO;;;;CAI/B,WAAW;;;;CAIX,eAAe;;;;CAIf,kBAAkB;;;;CAIlB,eAAe,EACb,MAAM,UACP;;;;CAID,aAAa;;;;CAIb,eAAe;;;;CAIf,gBAAgB;;;;CAIhB,YAAY;;;;CAIZ,uBAAuB;EACrB,MAAM;EACN,SAAS;EACV;;;;CAID,QAAQ;EACN,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,eAAe;GACb,OAAO;IACL,aAAa;IACb,UAAU;IACV,eAAe;IAChB;;EAEJ;;;;CAID,MAAM;;;;CAIN,MAAM;CACN,OAAO;EACL,MAAM;GAAC;GAAQ;GAAQ;GAAO;GAAQ;EAGtC,gBAAgB,EAAE;EACnB;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,mBAAmB;;;;CAInB,UAAU;;;;CAIV,qBAAqB;EACnB,MAAM,CAAC,SAAS,OAAO;EACvB,SAAS,KAAA;EACV;;;;CAID,kBAAkB;CAClB,qBAAqB;CACrB,mBAAmB;EACjB,MAAM,CAAC,QAAQ,OAAO;EACtB,SAAS,KAAA;EACV;;;;CAID,qBAAqB;EACnB,MAAM;EACN,SAAS;EACV;;;;CAID,yBAAyB;;;;CAIzB,iBAAiB;CAClB"}
|
|
@@ -11,7 +11,7 @@ declare function useStyle<T extends DefaultRow>(props: TableProps<T>, layout: Ta
|
|
|
11
11
|
isGroup: _$vue.Ref<boolean, boolean>;
|
|
12
12
|
handleMouseLeave: () => void;
|
|
13
13
|
handleHeaderFooterMousewheel: (_event: WheelEvent, data: any) => void;
|
|
14
|
-
tableSize: _$vue.ComputedRef<"" | "
|
|
14
|
+
tableSize: _$vue.ComputedRef<"" | "small" | "default" | "large">;
|
|
15
15
|
emptyBlockStyle: _$vue.ComputedRef<{
|
|
16
16
|
width: string;
|
|
17
17
|
height: string;
|
|
@@ -35,7 +35,7 @@ declare function useStyle<T extends DefaultRow>(props: TableProps<T>, layout: Ta
|
|
|
35
35
|
tableBodyStyles: _$vue.ComputedRef<{
|
|
36
36
|
width: string;
|
|
37
37
|
}>;
|
|
38
|
-
tableLayout: _$vue.ComputedRef<"
|
|
38
|
+
tableLayout: _$vue.ComputedRef<"fixed" | "auto">;
|
|
39
39
|
scrollbarViewStyle: {
|
|
40
40
|
display: string;
|
|
41
41
|
verticalAlign: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-helper.js","names":["TABLE_INJECTION_KEY","getCell","getColumnByCell","addClass","removePopper","hasClass","isGreaterThan","removeClass"],"sources":["../../../../../../../packages/components/table/src/table-body/events-helper.ts"],"sourcesContent":["import { h, inject, ref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport {\n addClass,\n hasClass,\n isGreaterThan,\n removeClass,\n} from '@element-plus/utils'\nimport {\n createTablePopper,\n getCell,\n getColumnByCell,\n removePopper,\n} from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\n\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableBodyProps } from './defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\nimport type { DefaultRow, Table } from '../table/defaults'\n\ninterface HandleEvent<T> {\n (event: PointerEvent, row: T, name: 'click' | 'contextmenu'): void\n (event: MouseEvent, row: T, name: 'dblclick'): void\n}\n\nfunction useEvents<T extends DefaultRow>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY) as Table<T>\n const tooltipContent = ref('')\n const tooltipTrigger = ref(h('div'))\n const handleEvent: HandleEvent<T> = (event, row, name) => {\n const table = parent\n const cell = getCell(event)\n let column: TableColumnCtx<T> | null = null\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store?.states.columns.value ?? [],\n },\n cell,\n namespace\n )\n if (column) {\n // @ts-expect-error\n table?.emit(`cell-${name}`, row, column, cell, event)\n }\n }\n // @ts-expect-error\n table?.emit(`row-${name}`, row, column, event)\n }\n const handleDoubleClick = (event: MouseEvent, row: T) => {\n handleEvent(event, row, 'dblclick')\n }\n const handleClick = (event: PointerEvent, row: T) => {\n props.store?.commit('setCurrentRow', row)\n handleEvent(event, row, 'click')\n }\n const handleContextMenu = (event: PointerEvent, row: T) => {\n handleEvent(event, row, 'contextmenu')\n }\n const handleMouseEnter = debounce((index: number) => {\n props.store?.commit('setHoverRow', index)\n }, 30)\n const handleMouseLeave = debounce(() => {\n props.store?.commit('setHoverRow', null)\n }, 30)\n const getPadding = (el: HTMLElement) => {\n const style = window.getComputedStyle(el, null)\n const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0\n const paddingRight = Number.parseInt(style.paddingRight, 10) || 0\n const paddingTop = Number.parseInt(style.paddingTop, 10) || 0\n const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0\n return {\n left: paddingLeft,\n right: paddingRight,\n top: paddingTop,\n bottom: paddingBottom,\n }\n }\n\n const toggleRowClassByCell = (\n rowSpan: number,\n event: MouseEvent,\n toggle: (el: Element, cls: string) => void\n ) => {\n let node: Node | null | undefined = (event?.target as Element | null)\n ?.parentNode\n while (rowSpan > 1) {\n node = node?.nextSibling\n if (!node || node.nodeName !== 'TR') break\n toggle(node as Element, 'hover-row hover-fixed-row')\n rowSpan--\n }\n }\n\n const handleCellMouseEnter = (\n event: MouseEvent,\n row: T,\n tooltipOptions: TableOverflowTooltipOptions\n ) => {\n if (!parent) return\n const table = parent\n const cell = getCell(event)\n const namespace = table?.vnode.el?.dataset.prefix\n let column: TableColumnCtx<T> | null = null\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store?.states.columns.value ?? [],\n },\n cell,\n namespace\n )\n if (!column) {\n return\n }\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, addClass)\n }\n const hoverState = (table.hoverState = {\n cell,\n column: column as any,\n row,\n })\n table?.emit(\n 'cell-mouse-enter',\n hoverState.row,\n hoverState.column,\n hoverState.cell,\n event\n )\n }\n\n if (!tooltipOptions) {\n if (removePopper?.trigger === cell) {\n removePopper?.()\n }\n return\n }\n\n // 判断是否text-overflow, 如果是就显示tooltip\n const cellChild = (event.target as HTMLElement).querySelector(\n '.cell'\n ) as HTMLElement\n if (\n !(\n hasClass(cellChild, `${namespace}-tooltip`) &&\n cellChild.childNodes.length &&\n cellChild.textContent?.trim()\n )\n ) {\n return\n }\n // use range width instead of scrollWidth to determine whether the text is overflowing\n // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3\n const range = document.createRange()\n range.setStart(cellChild, 0)\n range.setEnd(cellChild, cellChild.childNodes.length)\n /** detail: https://github.com/element-plus/element-plus/issues/10790\n * What went wrong?\n * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:\n * - Expected: 188\n * - Actual: 188.00000762939453\n */\n const { width: rangeWidth, height: rangeHeight } =\n range.getBoundingClientRect()\n const { width: cellChildWidth, height: cellChildHeight } =\n cellChild.getBoundingClientRect()\n\n const { top, left, right, bottom } = getPadding(cellChild)\n const horizontalPadding = left + right\n const verticalPadding = top + bottom\n if (\n isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) ||\n isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) ||\n // When using a high-resolution screen, it is possible that a returns cellChild.scrollWidth value of 1921 and\n // cellChildWidth returns a value of 1920.994140625. #16856 #16673\n isGreaterThan(cellChild.scrollWidth, cellChildWidth)\n ) {\n createTablePopper(\n tooltipOptions,\n (cell?.innerText || cell?.textContent) ?? '',\n row,\n column,\n cell,\n table\n )\n } else if (removePopper?.trigger === cell) {\n removePopper?.()\n }\n }\n const handleCellMouseLeave = (event: MouseEvent) => {\n const cell = getCell(event)\n if (!cell) return\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, removeClass)\n }\n // From the normal user interaction flow, it should never be empty. However, to avoid potential runtime errors, we still keep this defensive optional handling.\n const oldHoverState = parent?.hoverState as NonNullable<Table['hoverState']>\n parent?.emit(\n 'cell-mouse-leave',\n oldHoverState?.row,\n oldHoverState?.column,\n oldHoverState?.cell as HTMLTableCellElement,\n event\n )\n }\n\n return {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useEvents\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"events-helper.js","names":["TABLE_INJECTION_KEY","getCell","getColumnByCell","addClass","removePopper","hasClass","isGreaterThan","removeClass"],"sources":["../../../../../../../packages/components/table/src/table-body/events-helper.ts"],"sourcesContent":["import { h, inject, ref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport {\n addClass,\n hasClass,\n isGreaterThan,\n removeClass,\n} from '@element-plus/utils'\nimport {\n createTablePopper,\n getCell,\n getColumnByCell,\n removePopper,\n} from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\n\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableBodyProps } from './defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\nimport type { DefaultRow, Table } from '../table/defaults'\n\ninterface HandleEvent<T> {\n (event: PointerEvent, row: T, name: 'click' | 'contextmenu'): void\n (event: MouseEvent, row: T, name: 'dblclick'): void\n}\n\nfunction useEvents<T extends DefaultRow>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY) as Table<T>\n const tooltipContent = ref('')\n const tooltipTrigger = ref(h('div'))\n const handleEvent: HandleEvent<T> = (event, row, name) => {\n const table = parent\n const cell = getCell(event)\n let column: TableColumnCtx<T> | null = null\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store?.states.columns.value ?? [],\n },\n cell,\n namespace\n )\n if (column) {\n // @ts-expect-error\n table?.emit(`cell-${name}`, row, column, cell, event)\n }\n }\n // @ts-expect-error\n table?.emit(`row-${name}`, row, column, event)\n }\n const handleDoubleClick = (event: MouseEvent, row: T) => {\n handleEvent(event, row, 'dblclick')\n }\n const handleClick = (event: PointerEvent, row: T) => {\n props.store?.commit('setCurrentRow', row)\n handleEvent(event, row, 'click')\n }\n const handleContextMenu = (event: PointerEvent, row: T) => {\n handleEvent(event, row, 'contextmenu')\n }\n const handleMouseEnter = debounce((index: number) => {\n props.store?.commit('setHoverRow', index)\n }, 30)\n const handleMouseLeave = debounce(() => {\n props.store?.commit('setHoverRow', null)\n }, 30)\n const getPadding = (el: HTMLElement) => {\n const style = window.getComputedStyle(el, null)\n const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0\n const paddingRight = Number.parseInt(style.paddingRight, 10) || 0\n const paddingTop = Number.parseInt(style.paddingTop, 10) || 0\n const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0\n return {\n left: paddingLeft,\n right: paddingRight,\n top: paddingTop,\n bottom: paddingBottom,\n }\n }\n\n const toggleRowClassByCell = (\n rowSpan: number,\n event: MouseEvent,\n toggle: (el: Element, cls: string) => void\n ) => {\n let node: Node | null | undefined = (event?.target as Element | null)\n ?.parentNode\n while (rowSpan > 1) {\n node = node?.nextSibling\n if (!node || node.nodeName !== 'TR') break\n toggle(node as Element, 'hover-row hover-fixed-row')\n rowSpan--\n }\n }\n\n const handleCellMouseEnter = (\n event: MouseEvent,\n row: T,\n tooltipOptions: TableOverflowTooltipOptions\n ) => {\n if (!parent) return\n const table = parent\n const cell = getCell(event)\n const namespace = table?.vnode.el?.dataset.prefix\n let column: TableColumnCtx<T> | null = null\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store?.states.columns.value ?? [],\n },\n cell,\n namespace\n )\n if (!column) {\n return\n }\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, addClass)\n }\n const hoverState = (table.hoverState = {\n cell,\n column: column as any,\n row,\n })\n table?.emit(\n 'cell-mouse-enter',\n hoverState.row,\n hoverState.column,\n hoverState.cell,\n event\n )\n }\n\n if (!tooltipOptions) {\n if (removePopper?.trigger === cell) {\n removePopper?.()\n }\n return\n }\n\n // 判断是否text-overflow, 如果是就显示tooltip\n const cellChild = (event.target as HTMLElement).querySelector(\n '.cell'\n ) as HTMLElement\n if (!(\n hasClass(cellChild, `${namespace}-tooltip`) &&\n cellChild.childNodes.length &&\n cellChild.textContent?.trim()\n )) {\n return\n }\n // use range width instead of scrollWidth to determine whether the text is overflowing\n // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3\n const range = document.createRange()\n range.setStart(cellChild, 0)\n range.setEnd(cellChild, cellChild.childNodes.length)\n /** detail: https://github.com/element-plus/element-plus/issues/10790\n * What went wrong?\n * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:\n * - Expected: 188\n * - Actual: 188.00000762939453\n */\n const { width: rangeWidth, height: rangeHeight } =\n range.getBoundingClientRect()\n const { width: cellChildWidth, height: cellChildHeight } =\n cellChild.getBoundingClientRect()\n\n const { top, left, right, bottom } = getPadding(cellChild)\n const horizontalPadding = left + right\n const verticalPadding = top + bottom\n if (\n isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) ||\n isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) ||\n // When using a high-resolution screen, it is possible that a returns cellChild.scrollWidth value of 1921 and\n // cellChildWidth returns a value of 1920.994140625. #16856 #16673\n isGreaterThan(cellChild.scrollWidth, cellChildWidth)\n ) {\n createTablePopper(\n tooltipOptions,\n (cell?.innerText || cell?.textContent) ?? '',\n row,\n column,\n cell,\n table\n )\n } else if (removePopper?.trigger === cell) {\n removePopper?.()\n }\n }\n const handleCellMouseLeave = (event: MouseEvent) => {\n const cell = getCell(event)\n if (!cell) return\n if (cell.rowSpan > 1) {\n toggleRowClassByCell(cell.rowSpan, event, removeClass)\n }\n // From the normal user interaction flow, it should never be empty. However, to avoid potential runtime errors, we still keep this defensive optional handling.\n const oldHoverState = parent?.hoverState as NonNullable<Table['hoverState']>\n parent?.emit(\n 'cell-mouse-leave',\n oldHoverState?.row,\n oldHoverState?.column,\n oldHoverState?.cell as HTMLTableCellElement,\n event\n )\n }\n\n return {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useEvents\n"],"mappings":"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"}
|
|
@@ -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,26 +112,26 @@ 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
|
}, {}, {
|
|
120
120
|
ElCheckbox: {
|
|
121
121
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<CheckboxProps> & Readonly<{
|
|
122
|
-
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
123
122
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
123
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
124
124
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
125
|
-
change: (val: CheckboxValueType) => void;
|
|
126
125
|
"update:modelValue": (val: CheckboxValueType) => void;
|
|
126
|
+
change: (val: CheckboxValueType) => void;
|
|
127
127
|
}, _$vue.PublicProps, {
|
|
128
|
-
label: string | boolean | number | object;
|
|
129
|
-
disabled: boolean;
|
|
130
|
-
name: string;
|
|
131
128
|
modelValue: number | string | boolean;
|
|
129
|
+
disabled: boolean;
|
|
132
130
|
validateEvent: boolean;
|
|
131
|
+
name: string;
|
|
133
132
|
id: string;
|
|
134
133
|
value: string | boolean | number | object;
|
|
134
|
+
label: string | boolean | number | object;
|
|
135
135
|
trueValue: string | number;
|
|
136
136
|
falseValue: string | number;
|
|
137
137
|
trueLabel: string | number;
|
|
@@ -144,16 +144,16 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
144
144
|
M: {};
|
|
145
145
|
Defaults: {};
|
|
146
146
|
}, Readonly<CheckboxProps> & Readonly<{
|
|
147
|
-
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
148
147
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
148
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
149
149
|
}>, {}, {}, {}, {}, {
|
|
150
|
-
label: string | boolean | number | object;
|
|
151
|
-
disabled: boolean;
|
|
152
|
-
name: string;
|
|
153
150
|
modelValue: number | string | boolean;
|
|
151
|
+
disabled: boolean;
|
|
154
152
|
validateEvent: boolean;
|
|
153
|
+
name: string;
|
|
155
154
|
id: string;
|
|
156
155
|
value: string | boolean | number | object;
|
|
156
|
+
label: string | boolean | number | object;
|
|
157
157
|
trueValue: string | number;
|
|
158
158
|
falseValue: string | number;
|
|
159
159
|
trueLabel: string | number;
|
|
@@ -163,19 +163,19 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
163
163
|
__isTeleport?: never;
|
|
164
164
|
__isSuspense?: never;
|
|
165
165
|
} & _$vue.ComponentOptionsBase<Readonly<CheckboxProps> & Readonly<{
|
|
166
|
-
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
167
166
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
167
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
168
168
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
169
|
-
change: (val: CheckboxValueType) => void;
|
|
170
169
|
"update:modelValue": (val: CheckboxValueType) => void;
|
|
170
|
+
change: (val: CheckboxValueType) => void;
|
|
171
171
|
}, string, {
|
|
172
|
-
label: string | boolean | number | object;
|
|
173
|
-
disabled: boolean;
|
|
174
|
-
name: string;
|
|
175
172
|
modelValue: number | string | boolean;
|
|
173
|
+
disabled: boolean;
|
|
176
174
|
validateEvent: boolean;
|
|
175
|
+
name: string;
|
|
177
176
|
id: string;
|
|
178
177
|
value: string | boolean | number | object;
|
|
178
|
+
label: string | boolean | number | object;
|
|
179
179
|
trueValue: string | number;
|
|
180
180
|
falseValue: string | number;
|
|
181
181
|
trueLabel: string | number;
|
|
@@ -199,7 +199,7 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
199
199
|
readonly falseLabel?: string | number | (() => string | number) | undefined;
|
|
200
200
|
readonly id?: string | (() => string) | undefined;
|
|
201
201
|
readonly border?: boolean | (() => boolean) | undefined;
|
|
202
|
-
readonly size?: "" | "
|
|
202
|
+
readonly size?: "" | "small" | "default" | "large" | (() => "" | "small" | "default" | "large") | undefined;
|
|
203
203
|
readonly tabindex?: string | number | (() => string | number) | undefined;
|
|
204
204
|
readonly validateEvent?: boolean | (() => boolean) | undefined;
|
|
205
205
|
readonly ariaLabel?: string | (() => string) | undefined;
|