beyond-webui 1.0.98 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.full.js +504 -421
- package/dist/index.full.min.js +16 -16
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +16 -16
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +504 -421
- package/es/components/affix/src/affix2.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +36 -96
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +96 -36
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/autocomplete/index.d.ts +4 -0
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.d.ts +1 -0
- package/es/components/autocomplete/src/autocomplete.mjs +395 -88
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +4 -0
- package/es/components/autocomplete/src/autocomplete2.mjs +92 -395
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +33 -68
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +68 -33
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +55 -17
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +17 -55
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -11
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/button/index.d.ts +16 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +6 -30
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +30 -6
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/button/src/button.d.ts +4 -3
- package/es/components/button/src/button.mjs +34 -35
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +16 -1
- package/es/components/button/src/button2.mjs +5 -1
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/button/src/use-button.d.ts +11 -0
- package/es/components/button/src/use-button.mjs +12 -0
- package/es/components/button/src/use-button.mjs.map +1 -1
- package/es/components/calendar/index.d.ts +16 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +131 -18
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar.vue.d.ts +18 -3
- package/es/components/calendar/src/calendar2.mjs +18 -131
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/date-table.mjs +87 -33
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +33 -87
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +63 -8
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +8 -63
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +1 -1
- package/es/components/cascader/src/cascader2.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +116 -209
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +209 -116
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/check-tag/src/check-tag.mjs +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox.mjs +49 -117
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +117 -49
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +1 -1
- package/es/components/col/src/col.mjs +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +96 -14
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +14 -96
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/collapse/src/collapse.mjs +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +16 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +16 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +74 -23
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +23 -74
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/countdown/src/utils.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +16 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +16 -1
- package/es/components/date-picker/src/panel-utils.d.ts +32 -2
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +25 -111
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +111 -25
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +7 -64
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +64 -7
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +26 -177
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +177 -26
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +3 -3
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +2 -2
- package/es/components/dropdown/src/dropdown.mjs +97 -307
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +307 -97
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +55 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -55
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +2 -1
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.mjs +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -36
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +36 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image/index.d.ts +3 -3
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +62 -220
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +3 -3
- package/es/components/image/src/image2.mjs +220 -62
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.d.ts +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +396 -39
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +39 -396
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +37 -37
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +135 -549
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +552 -135
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input/src/utils.mjs +1 -1
- package/es/components/input-number/src/input-number.mjs +1 -2
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +1 -1
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +50 -21
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +21 -50
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -35
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +35 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/pagination/src/components/jumper.mjs +9 -60
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +60 -9
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +19 -38
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +58 -19
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +17 -214
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +214 -17
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +58 -18
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +18 -38
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +68 -22
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +14 -5
- package/es/components/pagination/src/components/sizes2.mjs +22 -68
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +7 -28
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +28 -7
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +7 -7
- package/es/components/popconfirm/index.d.ts +16 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +16 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +66 -111
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +111 -66
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +8 -37
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +37 -8
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +87 -255
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +255 -87
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +63 -29
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +29 -63
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/row/index.mjs +2 -2
- package/es/components/row/src/row.mjs +30 -45
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/row/src/row2.mjs +45 -30
- package/es/components/row/src/row2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +47 -174
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +175 -47
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/index.d.ts +14 -5
- package/es/components/select/src/select.mjs +20 -3
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +14 -5
- package/es/components/select/src/useSelect.mjs +2 -1
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +10 -10
- package/es/components/select-v2/src/select.vue.d.ts +5 -5
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +1 -1
- package/es/components/slider/index.mjs +2 -2
- package/es/components/slider/src/button.mjs +1 -1
- package/es/components/slider/src/slider.mjs +233 -91
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +91 -233
- package/es/components/slider/src/slider2.mjs.map +1 -1
- package/es/components/space/src/space.mjs +1 -1
- package/es/components/space/src/use-space.mjs +1 -1
- package/es/components/statistic/src/statistic2.mjs +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +1 -1
- package/es/components/steps/src/steps.mjs +36 -34
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +34 -36
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/switch/src/switch.mjs +1 -1
- package/es/components/switch/src/switch2.mjs +1 -1
- package/es/components/table/index.d.ts +21 -77
- package/es/components/table/src/composables/use-scrollbar.mjs +1 -1
- package/es/components/table/src/config.d.ts +1 -1
- package/es/components/table/src/config.mjs +5 -3
- package/es/components/table/src/config.mjs.map +1 -1
- package/es/components/table/src/store/watcher.mjs +1 -1
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +3 -27
- package/es/components/table/src/table/defaults.mjs +1 -24
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +8 -11
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table/utils-helper.d.ts +1 -1
- package/es/components/table/src/table/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/defaults.d.ts +0 -13
- package/es/components/table/src/table-body/defaults.mjs +1 -13
- package/es/components/table/src/table-body/defaults.mjs.map +1 -1
- package/es/components/table/src/table-body/events-helper.mjs +28 -4
- package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.d.ts +0 -27
- package/es/components/table/src/table-body/index.mjs +4 -7
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-body/render-helper.mjs +2 -12
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +4 -6
- package/es/components/table/src/table-column/defaults.mjs +4 -5
- package/es/components/table/src/table-column/defaults.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +9 -11
- package/es/components/table/src/table-column/index.mjs +3 -3
- package/es/components/table/src/table-column/index.mjs.map +1 -1
- package/es/components/table/src/table-column/render-helper.mjs +1 -1
- package/es/components/table/src/table-column/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/watcher-helper.mjs +1 -1
- package/es/components/table/src/table-column/watcher-helper.mjs.map +1 -1
- package/es/components/table/src/table-footer/index.mjs +15 -33
- package/es/components/table/src/table-footer/index.mjs.map +1 -1
- package/es/components/table/src/table-header/event-helper.mjs +7 -3
- package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/index.mjs +5 -1
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table-layout.d.ts +1 -4
- package/es/components/table/src/table-layout.mjs +5 -12
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/table.mjs +34 -19
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +3 -55
- package/es/components/table/src/util.mjs +1 -1
- package/es/components/table/style/css.d.ts +0 -1
- package/es/components/table/style/css.mjs +0 -1
- package/es/components/table/style/css.mjs.map +1 -1
- package/es/components/table/style/index.d.ts +0 -1
- package/es/components/table/style/index.mjs +0 -1
- package/es/components/table/style/index.mjs.map +1 -1
- package/es/components/table-v2/src/components/row.mjs +1 -1
- package/es/components/table-v2/src/composables/use-row.mjs +1 -1
- package/es/components/table-v2/src/composables/use-styles.mjs +1 -1
- package/es/components/table-v2/src/table-grid.mjs +1 -1
- package/es/components/tabs/index.mjs +3 -3
- package/es/components/tabs/src/tab-bar.mjs +75 -7
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +7 -75
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tabs/src/tab-pane.mjs +72 -13
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +13 -72
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tabs/src/tabs.mjs +1 -2
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +44 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -44
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +76 -43
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-select/index.d.ts +56 -20
- package/es/components/time-select/src/time-select.vue.d.ts +28 -10
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +42 -70
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +70 -42
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +3 -3
- package/es/components/tooltip/src/tooltip.mjs +31 -169
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +169 -31
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +73 -16
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +16 -73
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +4 -4
- package/es/components/tooltip-v2/src/arrow.mjs +37 -22
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +22 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +80 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -80
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +21 -74
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +74 -21
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +16 -1
- package/es/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +128 -19
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +19 -128
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer.mjs +69 -160
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer.vue.d.ts +16 -1
- package/es/components/transfer/src/transfer2.mjs +160 -69
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.mjs +173 -33
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +33 -173
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/components/virtual-list/src/builders/build-grid.mjs +2 -1
- package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.mjs +2 -1
- package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs +1 -2
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/components/fixed-size-grid.mjs +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +35 -7
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +7 -35
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/hooks/use-delayed-toggle/index.mjs +1 -1
- package/es/hooks/use-model-toggle/index.mjs +2 -1
- package/es/hooks/use-model-toggle/index.mjs.map +1 -1
- package/es/hooks/use-z-index/index.mjs +1 -1
- package/es/index.mjs +37 -37
- package/es/utils/browser.d.ts +2 -0
- package/es/utils/browser.mjs +1 -0
- package/es/utils/browser.mjs.map +1 -1
- package/es/utils/dom/position.mjs +1 -0
- package/es/utils/dom/position.mjs.map +1 -1
- package/es/utils/dom/scroll.mjs +2 -1
- package/es/utils/dom/scroll.mjs.map +1 -1
- package/es/utils/dom/style.mjs +3 -2
- package/es/utils/dom/style.mjs.map +1 -1
- package/es/utils/i18n.mjs +1 -1
- package/es/utils/i18n.mjs.map +1 -1
- package/es/utils/index.mjs +2 -2
- package/es/utils/raf.mjs +1 -0
- package/es/utils/raf.mjs.map +1 -1
- package/es/utils/types.d.ts +2 -1
- package/es/utils/types.mjs +3 -2
- package/es/utils/types.mjs.map +1 -1
- package/es/utils/vue/global-node.mjs +1 -0
- package/es/utils/vue/global-node.mjs.map +1 -1
- package/lib/components/affix/src/affix2.js +3 -3
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +37 -95
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +95 -37
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/autocomplete/index.d.ts +4 -0
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.d.ts +1 -0
- package/lib/components/autocomplete/src/autocomplete.js +394 -88
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +4 -0
- package/lib/components/autocomplete/src/autocomplete2.js +92 -394
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +34 -68
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +68 -34
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +55 -17
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +17 -55
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -11
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/button/index.d.ts +16 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +6 -30
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +30 -6
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/button/src/button.d.ts +4 -3
- package/lib/components/button/src/button.js +33 -34
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +16 -1
- package/lib/components/button/src/button2.js +4 -0
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/button/src/use-button.d.ts +11 -0
- package/lib/components/button/src/use-button.js +12 -0
- package/lib/components/button/src/use-button.js.map +1 -1
- package/lib/components/calendar/index.d.ts +16 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +131 -19
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar.vue.d.ts +18 -3
- package/lib/components/calendar/src/calendar2.js +19 -131
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/date-table.js +87 -37
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +37 -87
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +63 -8
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +8 -63
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +2 -2
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +2 -2
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +116 -209
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +209 -116
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/check-tag/src/check-tag.js +3 -3
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox.js +50 -117
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +117 -50
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +2 -2
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/col/src/col.js +3 -3
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +96 -14
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +14 -96
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/collapse/src/collapse.js +2 -2
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +16 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +16 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +74 -24
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +24 -74
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/countdown/src/utils.js +2 -2
- package/lib/components/countdown/src/utils.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +16 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +16 -1
- package/lib/components/date-picker/src/panel-utils.d.ts +32 -2
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +25 -111
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +111 -25
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +7 -64
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +64 -7
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +2 -2
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +27 -177
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +177 -27
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +3 -3
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +2 -2
- package/lib/components/dropdown/src/dropdown.js +106 -307
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +307 -106
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +55 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -55
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/src/form-item2.js +2 -1
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.js +2 -2
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -36
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +36 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image/index.d.ts +3 -3
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +62 -219
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +3 -3
- package/lib/components/image/src/image2.js +220 -63
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.d.ts +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +396 -40
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +40 -396
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +37 -37
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +135 -548
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +551 -135
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input/src/utils.js +3 -3
- package/lib/components/input/src/utils.js.map +1 -1
- package/lib/components/input-number/src/input-number.js +7 -8
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +4 -4
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +50 -22
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +22 -50
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -35
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +35 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/message/src/method.js +1 -1
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +9 -60
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +60 -9
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +19 -38
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +58 -19
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +17 -214
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +214 -17
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +58 -19
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +19 -38
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +68 -22
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +14 -5
- package/lib/components/pagination/src/components/sizes2.js +22 -68
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +7 -28
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +28 -7
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +14 -14
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popconfirm/index.d.ts +16 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +16 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +67 -111
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +111 -67
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +9 -37
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +37 -9
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/radio/src/radio2.js +3 -3
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +87 -254
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +254 -87
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +63 -31
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +31 -63
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/row/index.js +2 -2
- package/lib/components/row/src/row.js +32 -45
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/row/src/row2.js +45 -32
- package/lib/components/row/src/row2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +48 -174
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +175 -48
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/index.d.ts +14 -5
- package/lib/components/select/src/select.js +19 -2
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +14 -5
- package/lib/components/select/src/useSelect.js +2 -1
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +10 -10
- package/lib/components/select-v2/src/select.vue.d.ts +5 -5
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +18 -23
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +23 -18
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +1 -1
- package/lib/components/slider/index.js +2 -2
- package/lib/components/slider/src/button.js +2 -2
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/slider.js +233 -92
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +92 -233
- package/lib/components/slider/src/slider2.js.map +1 -1
- package/lib/components/space/src/space.js +3 -3
- package/lib/components/space/src/space.js.map +1 -1
- package/lib/components/space/src/use-space.js +2 -2
- package/lib/components/space/src/use-space.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +2 -2
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +2 -2
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/steps.js +37 -34
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +34 -37
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/switch/src/switch.js +4 -4
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +4 -4
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/index.d.ts +21 -77
- package/lib/components/table/src/composables/use-scrollbar.js +2 -2
- package/lib/components/table/src/composables/use-scrollbar.js.map +1 -1
- package/lib/components/table/src/config.d.ts +1 -1
- package/lib/components/table/src/config.js +5 -3
- package/lib/components/table/src/config.js.map +1 -1
- package/lib/components/table/src/store/watcher.js +1 -1
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +3 -27
- package/lib/components/table/src/table/defaults.js +1 -24
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +8 -11
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table/utils-helper.d.ts +1 -1
- package/lib/components/table/src/table/utils-helper.js.map +1 -1
- package/lib/components/table/src/table-body/defaults.d.ts +0 -13
- package/lib/components/table/src/table-body/defaults.js +1 -13
- package/lib/components/table/src/table-body/defaults.js.map +1 -1
- package/lib/components/table/src/table-body/events-helper.js +27 -3
- package/lib/components/table/src/table-body/events-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.d.ts +0 -27
- package/lib/components/table/src/table-body/index.js +4 -7
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-body/render-helper.js +2 -12
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +4 -6
- package/lib/components/table/src/table-column/defaults.js +4 -5
- package/lib/components/table/src/table-column/defaults.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +9 -11
- package/lib/components/table/src/table-column/index.js +3 -3
- package/lib/components/table/src/table-column/index.js.map +1 -1
- package/lib/components/table/src/table-column/render-helper.js +1 -1
- package/lib/components/table/src/table-column/render-helper.js.map +1 -1
- package/lib/components/table/src/table-column/watcher-helper.js +1 -1
- package/lib/components/table/src/table-column/watcher-helper.js.map +1 -1
- package/lib/components/table/src/table-footer/index.js +15 -33
- package/lib/components/table/src/table-footer/index.js.map +1 -1
- package/lib/components/table/src/table-header/event-helper.js +7 -3
- package/lib/components/table/src/table-header/event-helper.js.map +1 -1
- package/lib/components/table/src/table-header/index.js +5 -1
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table-layout.d.ts +1 -4
- package/lib/components/table/src/table-layout.js +5 -12
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/table.js +34 -19
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +3 -55
- package/lib/components/table/src/util.js +4 -4
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/table/style/css.d.ts +0 -1
- package/lib/components/table/style/css.js +0 -1
- package/lib/components/table/style/css.js.map +1 -1
- package/lib/components/table/style/index.d.ts +0 -1
- package/lib/components/table/style/index.js +0 -1
- package/lib/components/table/style/index.js.map +1 -1
- package/lib/components/table-v2/src/components/row.js +2 -2
- package/lib/components/table-v2/src/components/row.js.map +1 -1
- package/lib/components/table-v2/src/composables/use-row.js +2 -2
- package/lib/components/table-v2/src/composables/use-row.js.map +1 -1
- package/lib/components/table-v2/src/composables/use-styles.js +3 -3
- package/lib/components/table-v2/src/composables/use-styles.js.map +1 -1
- package/lib/components/table-v2/src/table-grid.js +2 -2
- package/lib/components/table-v2/src/table-grid.js.map +1 -1
- package/lib/components/tabs/index.js +3 -3
- package/lib/components/tabs/src/tab-bar.js +75 -7
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +7 -75
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tabs/src/tab-pane.js +72 -13
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +13 -72
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tabs/src/tabs.js +2 -3
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +44 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -44
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +75 -42
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-select/index.d.ts +56 -20
- package/lib/components/time-select/src/time-select.vue.d.ts +28 -10
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +42 -70
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +70 -42
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/index.js +3 -3
- package/lib/components/tooltip/src/tooltip.js +33 -167
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +167 -33
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +73 -16
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +16 -73
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +4 -4
- package/lib/components/tooltip-v2/src/arrow.js +37 -23
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +23 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/content.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +80 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -80
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +21 -74
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +74 -21
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +16 -1
- package/lib/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +128 -21
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +21 -128
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer.js +73 -160
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer.vue.d.ts +16 -1
- package/lib/components/transfer/src/transfer2.js +160 -73
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.js +172 -32
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +32 -172
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.js +7 -6
- package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.js +5 -4
- package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js +2 -3
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js.map +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-grid.js +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-grid.js.map +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +35 -7
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +7 -35
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/hooks/use-delayed-toggle/index.js +2 -2
- package/lib/hooks/use-delayed-toggle/index.js.map +1 -1
- package/lib/hooks/use-model-toggle/index.js +2 -1
- package/lib/hooks/use-model-toggle/index.js.map +1 -1
- package/lib/hooks/use-z-index/index.js +2 -2
- package/lib/hooks/use-z-index/index.js.map +1 -1
- package/lib/index.js +37 -37
- package/lib/utils/browser.d.ts +2 -0
- package/lib/utils/browser.js +8 -0
- package/lib/utils/browser.js.map +1 -1
- package/lib/utils/dom/position.js +1 -0
- package/lib/utils/dom/position.js.map +1 -1
- package/lib/utils/dom/scroll.js +2 -1
- package/lib/utils/dom/scroll.js.map +1 -1
- package/lib/utils/dom/style.js +3 -2
- package/lib/utils/dom/style.js.map +1 -1
- package/lib/utils/i18n.js +1 -1
- package/lib/utils/i18n.js.map +1 -1
- package/lib/utils/index.js +11 -9
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/raf.js +1 -0
- package/lib/utils/raf.js.map +1 -1
- package/lib/utils/types.d.ts +2 -1
- package/lib/utils/types.js +4 -9
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/vue/global-node.js +1 -0
- package/lib/utils/vue/global-node.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/dark/css-vars.css +1 -1
- package/theme-chalk/el-autocomplete.css +1 -1
- package/theme-chalk/el-button-group.css +1 -1
- package/theme-chalk/el-button.css +1 -1
- package/theme-chalk/el-checkbox-button.css +1 -1
- package/theme-chalk/el-checkbox.css +1 -1
- package/theme-chalk/el-divider.css +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-message-box.css +1 -1
- package/theme-chalk/el-message.css +1 -1
- package/theme-chalk/el-pagination.css +1 -1
- package/theme-chalk/el-radio-button.css +1 -1
- package/theme-chalk/el-select-dropdown.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-table-v2.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-var.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/autocomplete.scss +7 -0
- package/theme-chalk/src/button.scss +70 -102
- package/theme-chalk/src/common/var.scss +827 -833
- package/theme-chalk/src/divider.scss +2 -2
- package/theme-chalk/src/form.scss +1 -1
- package/theme-chalk/src/input.scss +4 -0
- package/theme-chalk/src/message-box.scss +1 -1
- package/theme-chalk/src/message.scss +2 -2
- package/theme-chalk/src/pagination.scss +34 -1
- package/theme-chalk/src/select-dropdown.scss +1 -0
- package/theme-chalk/src/select.scss +1 -0
- package/theme-chalk/src/table.scss +78 -45
- package/theme-chalk/src/var.scss +126 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table/defaults.ts"],"sourcesContent":["// @ts-nocheck\nimport { useSizeProp } from '@element-plus/hooks'\nimport type {\n CSSProperties,\n ComponentInternalInstance,\n PropType,\n Ref,\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 { TableOverflowTooltipOptions } from '../util'\n\nexport type DefaultRow = any\n\ninterface TableRefs {\n tableWrapper: HTMLElement\n headerWrapper: HTMLElement\n footerWrapper: HTMLElement\n fixedBodyWrapper: HTMLElement\n rightFixedBodyWrapper: HTMLElement\n bodyWrapper: 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\ntype HoverState<T> = Nullable<{\n cell: HTMLElement\n column: TableColumnCtx<T>\n row: T\n}>\n\ntype RIS<T> = { row: T; $index: number; store: Store<T>; expanded: boolean }\n\ntype RenderExpanded<T> = ({\n row,\n $index,\n store,\n expanded: boolean,\n}: RIS<T>) => VNode\n\ntype SummaryMethod<T> = (data: {\n columns: TableColumnCtx<T>[]\n data: T[]\n}) => string[]\n\ninterface Table<T> extends ComponentInternalInstance {\n $ready: boolean\n hoverState?: HoverState<T>\n renderExpanded: RenderExpanded<T>\n store: Store<T>\n layout: TableLayout<T>\n refs: TableRefs\n tableId: string\n state: TableState\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> =\n | string\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => string)\ntype CellStyle<T> =\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> {\n data: T[]\n size?: ComponentSize\n width?: string | number\n height?: string | number\n maxHeight?: string | number\n fit?: boolean\n isPercentageWidth?: boolean\n isLastFixed?: boolean\n percentageWidth?: number\n stripe?: boolean\n border?: boolean\n rowKey?: string | ((row: T) => string)\n context?: Table<T>\n showHeader?: boolean\n showSummary?: boolean\n sumText?: string\n summaryMethod?: SummaryMethod<T>\n rowClassName?: ColumnCls<T>\n rowStyle?: ColumnStyle<T>\n cellClassName?: CellCls<T>\n cellStyle?: CellStyle<T>\n headerRowClassName?: ColumnCls<T>\n headerRowStyle?: ColumnStyle<T>\n headerCellClassName?: CellCls<T>\n headerCellStyle?: CellStyle<T>\n highlightCurrentRow?: boolean\n currentRowKey?: string | number\n emptyText?: string\n expandRowKeys?: any[]\n defaultExpandAll?: boolean\n defaultSort?: Sort\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\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 selectOnIndeterminate?: boolean\n indent?: number\n treeProps?: {\n hasChildren?: string\n children?: string\n }\n lazy?: boolean\n load?: (row: T, treeNode: TreeNode, resolve: (data: T[]) => void) => void\n className?: string\n style?: CSSProperties\n tableLayout?: Layout\n scrollbarAlwaysOn?: boolean\n flexible?: boolean\n}\n\ninterface Sort {\n prop: string\n order: 'ascending' | 'descending'\n init?: any\n silent?: any\n}\n\ninterface Filter<T> {\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> {\n store: Store<T>\n _self: Table<T>\n column: TableColumnCtx<T>\n row: T\n $index: number\n treeNode?: TreeNode\n expanded: boolean\n}\n\nexport default {\n data: {\n type: Array as PropType<DefaultRow[]>,\n default: () => [],\n },\n size: useSizeProp,\n width: [String, Number],\n height: [String, Number],\n maxHeight: [String, Number],\n fit: {\n type: Boolean,\n default: true,\n },\n isPercentageWidth: {\n type: Boolean,\n default: false,\n },\n isLastFixed: {\n type: Boolean,\n default: true,\n },\n percentageWidth: {\n type: Number,\n default: 0,\n },\n stripe: Boolean,\n border: Boolean,\n rowKey: [String, Function] as PropType<TableProps<DefaultRow>['rowKey']>,\n showHeader: {\n type: Boolean,\n default: true,\n },\n showSummary: Boolean,\n sumText: String,\n summaryMethod: Function as PropType<TableProps<DefaultRow>['summaryMethod']>,\n rowClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['rowClassName']\n >,\n rowStyle: [Object, Function] as PropType<TableProps<DefaultRow>['rowStyle']>,\n cellClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['cellClassName']\n >,\n cellStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['cellStyle']\n >,\n headerRowClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['headerRowClassName']\n >,\n headerRowStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['headerRowStyle']\n >,\n headerCellClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['headerCellClassName']\n >,\n headerCellStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['headerCellStyle']\n >,\n highlightCurrentRow: Boolean,\n currentRowKey: [String, Number],\n emptyText: String,\n expandRowKeys: Array as PropType<TableProps<DefaultRow>['expandRowKeys']>,\n defaultExpandAll: Boolean,\n defaultSort: Object as PropType<TableProps<DefaultRow>['defaultSort']>,\n tooltipEffect: String,\n tooltipOptions: Object as PropType<TableProps<DefaultRow>['tooltipOptions']>,\n spanMethod: Function as PropType<TableProps<DefaultRow>['spanMethod']>,\n selectOnIndeterminate: {\n type: Boolean,\n default: true,\n },\n indent: {\n type: Number,\n default: 16,\n },\n treeProps: {\n type: Object as PropType<TableProps<DefaultRow>['treeProps']>,\n default: () => {\n return {\n hasChildren: 'hasChildren',\n children: 'children',\n }\n },\n },\n lazy: Boolean,\n load: Function as PropType<TableProps<DefaultRow>['load']>,\n style: {\n type: Object as PropType<CSSProperties>,\n default: () => ({}),\n },\n className: {\n type: String,\n default: '',\n },\n tableLayout: {\n type: String as PropType<Layout>,\n default: 'fixed',\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n flexible: Boolean,\n rowDraggable: {\n type: Boolean,\n default: false,\n },\n onDragend:{\n type: Function,\n default: undefined,\n },\n onDragstart:{\n type: Function,\n default: undefined,\n },\n}\nexport type {\n SummaryMethod,\n Table,\n TableProps,\n TableRefs,\n ColumnCls,\n ColumnStyle,\n CellCls,\n CellStyle,\n TreeNode,\n RenderRowData,\n Sort,\n Filter,\n TableColumnCtx,\n}\n"],"names":[],"mappings":";;;AACA,mBAAe;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AACzB,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC7B,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,I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AAC;AACnB,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table/defaults.ts"],"sourcesContent":["// @ts-nocheck\nimport { useSizeProp } from '@element-plus/hooks'\nimport type {\n CSSProperties,\n ComponentInternalInstance,\n PropType,\n Ref,\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 { TableOverflowTooltipOptions } from '../util'\n\nexport type DefaultRow = 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\ntype HoverState<T> = Nullable<{\n cell: HTMLElement\n column: TableColumnCtx<T>\n row: T\n}>\n\ntype RIS<T> = { row: T; $index: number; store: Store<T>; expanded: boolean }\n\ntype RenderExpanded<T> = ({\n row,\n $index,\n store,\n expanded: boolean,\n}: RIS<T>) => VNode\n\ntype SummaryMethod<T> = (data: {\n columns: TableColumnCtx<T>[]\n data: T[]\n}) => string[]\n\ninterface Table<T> extends ComponentInternalInstance {\n $ready: boolean\n hoverState?: HoverState<T>\n renderExpanded: RenderExpanded<T>\n store: Store<T>\n layout: TableLayout<T>\n refs: TableRefs\n tableId: string\n state: TableState\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> =\n | string\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => string)\ntype CellStyle<T> =\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> {\n data: T[]\n size?: ComponentSize\n width?: string | number\n height?: string | number\n maxHeight?: string | number\n fit?: boolean\n stripe?: boolean\n border?: boolean\n rowKey?: string | ((row: T) => string)\n context?: Table<T>\n showHeader?: boolean\n showSummary?: boolean\n sumText?: string\n summaryMethod?: SummaryMethod<T>\n rowClassName?: ColumnCls<T>\n rowStyle?: ColumnStyle<T>\n cellClassName?: CellCls<T>\n cellStyle?: CellStyle<T>\n headerRowClassName?: ColumnCls<T>\n headerRowStyle?: ColumnStyle<T>\n headerCellClassName?: CellCls<T>\n headerCellStyle?: CellStyle<T>\n highlightCurrentRow?: boolean\n currentRowKey?: string | number\n emptyText?: string\n expandRowKeys?: any[]\n defaultExpandAll?: boolean\n defaultSort?: Sort\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\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 selectOnIndeterminate?: boolean\n indent?: number\n treeProps?: {\n hasChildren?: string\n children?: string\n }\n lazy?: boolean\n load?: (row: T, treeNode: TreeNode, resolve: (data: T[]) => void) => void\n className?: string\n style?: CSSProperties\n tableLayout?: Layout\n scrollbarAlwaysOn?: boolean\n flexible?: boolean\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n}\n\ninterface Sort {\n prop: string\n order: 'ascending' | 'descending'\n init?: any\n silent?: any\n}\n\ninterface Filter<T> {\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> {\n store: Store<T>\n _self: Table<T>\n column: TableColumnCtx<T>\n row: T\n $index: number\n treeNode?: TreeNode\n expanded: boolean\n}\n\nexport default {\n data: {\n type: Array as PropType<DefaultRow[]>,\n default: () => [],\n },\n size: useSizeProp,\n width: [String, Number],\n height: [String, Number],\n maxHeight: [String, Number],\n fit: {\n type: Boolean,\n default: true,\n },\n stripe: Boolean,\n border: Boolean,\n rowKey: [String, Function] as PropType<TableProps<DefaultRow>['rowKey']>,\n showHeader: {\n type: Boolean,\n default: true,\n },\n showSummary: Boolean,\n sumText: String,\n summaryMethod: Function as PropType<TableProps<DefaultRow>['summaryMethod']>,\n rowClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['rowClassName']\n >,\n rowStyle: [Object, Function] as PropType<TableProps<DefaultRow>['rowStyle']>,\n cellClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['cellClassName']\n >,\n cellStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['cellStyle']\n >,\n headerRowClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['headerRowClassName']\n >,\n headerRowStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['headerRowStyle']\n >,\n headerCellClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['headerCellClassName']\n >,\n headerCellStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['headerCellStyle']\n >,\n highlightCurrentRow: Boolean,\n currentRowKey: [String, Number],\n emptyText: String,\n expandRowKeys: Array as PropType<TableProps<DefaultRow>['expandRowKeys']>,\n defaultExpandAll: Boolean,\n defaultSort: Object as PropType<TableProps<DefaultRow>['defaultSort']>,\n tooltipEffect: String,\n tooltipOptions: Object as PropType<TableProps<DefaultRow>['tooltipOptions']>,\n spanMethod: Function as PropType<TableProps<DefaultRow>['spanMethod']>,\n selectOnIndeterminate: {\n type: Boolean,\n default: true,\n },\n indent: {\n type: Number,\n default: 16,\n },\n treeProps: {\n type: Object as PropType<TableProps<DefaultRow>['treeProps']>,\n default: () => {\n return {\n hasChildren: 'hasChildren',\n children: 'children',\n }\n },\n },\n lazy: Boolean,\n load: Function as PropType<TableProps<DefaultRow>['load']>,\n style: {\n type: Object as PropType<CSSProperties>,\n default: () => ({}),\n },\n className: {\n type: String,\n default: '',\n },\n tableLayout: {\n type: String as PropType<Layout>,\n default: 'fixed',\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n flexible: Boolean,\n showOverflowTooltip: [Boolean, Object] as PropType<\n TableProps<DefaultRow>['showOverflowTooltip']\n >,\n}\nexport type {\n SummaryMethod,\n Table,\n TableProps,\n TableRefs,\n ColumnCls,\n ColumnStyle,\n CellCls,\n CellStyle,\n TreeNode,\n RenderRowData,\n Sort,\n Filter,\n TableColumnCtx,\n}\n"],"names":[],"mappings":";;;AACA,mBAAe;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AACzB,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC7B,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC5B,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,aAAa,EAAE,QAAQ;AACzB,EAAE,YAAY,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AAClC,EAAE,QAAQ,EAAE,CAAC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H,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,mBAAmB,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AACxC,CAAC;;;;"}
|
|
@@ -25,6 +25,7 @@ function useStyle(props, layout, store, table) {
|
|
|
25
25
|
const bodyScrollHeight = ref(0);
|
|
26
26
|
const headerScrollHeight = ref(0);
|
|
27
27
|
const footerScrollHeight = ref(0);
|
|
28
|
+
const appendScrollHeight = ref(0);
|
|
28
29
|
watchEffect(() => {
|
|
29
30
|
layout.setHeight(props.height);
|
|
30
31
|
});
|
|
@@ -69,11 +70,10 @@ function useStyle(props, layout, store, table) {
|
|
|
69
70
|
};
|
|
70
71
|
});
|
|
71
72
|
const doLayout = () => {
|
|
72
|
-
const el = table.vnode.el;
|
|
73
73
|
if (shouldUpdateHeight.value) {
|
|
74
74
|
layout.updateElsHeight();
|
|
75
75
|
}
|
|
76
|
-
layout.updateColumnsWidth(
|
|
76
|
+
layout.updateColumnsWidth();
|
|
77
77
|
requestAnimationFrame(syncPosition);
|
|
78
78
|
};
|
|
79
79
|
onMounted(async () => {
|
|
@@ -165,7 +165,7 @@ function useStyle(props, layout, store, table) {
|
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
const resizeListener = () => {
|
|
168
|
-
var _a, _b, _c;
|
|
168
|
+
var _a, _b, _c, _d;
|
|
169
169
|
const el = table.vnode.el;
|
|
170
170
|
if (!table.$ready || !el)
|
|
171
171
|
return;
|
|
@@ -190,7 +190,8 @@ function useStyle(props, layout, store, table) {
|
|
|
190
190
|
tableScrollHeight.value = ((_b = table.refs.tableWrapper) == null ? void 0 : _b.scrollHeight) || 0;
|
|
191
191
|
headerScrollHeight.value = (tableHeader == null ? void 0 : tableHeader.scrollHeight) || 0;
|
|
192
192
|
footerScrollHeight.value = ((_c = table.refs.footerWrapper) == null ? void 0 : _c.offsetHeight) || 0;
|
|
193
|
-
|
|
193
|
+
appendScrollHeight.value = ((_d = table.refs.appendWrapper) == null ? void 0 : _d.offsetHeight) || 0;
|
|
194
|
+
bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value;
|
|
194
195
|
if (shouldUpdateLayout) {
|
|
195
196
|
resizeState.value = {
|
|
196
197
|
width,
|
|
@@ -244,13 +245,9 @@ function useStyle(props, layout, store, table) {
|
|
|
244
245
|
}
|
|
245
246
|
if (props.maxHeight) {
|
|
246
247
|
if (!Number.isNaN(Number(props.maxHeight))) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return {
|
|
251
|
-
maxHeight: `${tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value}px`
|
|
252
|
-
};
|
|
253
|
-
}
|
|
248
|
+
return {
|
|
249
|
+
maxHeight: `${props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px`
|
|
250
|
+
};
|
|
254
251
|
} else {
|
|
255
252
|
return {
|
|
256
253
|
maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/style-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { useFormSize } from '@element-plus/components/form'\n\nimport type { Table, TableProps } from './defaults'\nimport type { Store } from '../store'\nimport type TableLayout from '../table-layout'\nimport type { TableColumnCtx } from '../table-column/defaults'\n\nfunction useStyle<T>(\n props: TableProps<T>,\n layout: TableLayout<T>,\n store: Store<T>,\n table: Table<T>\n) {\n const isHidden = ref(false)\n const renderExpanded = ref(null)\n const resizeProxyVisible = ref(false)\n const setDragVisible = (visible: boolean) => {\n resizeProxyVisible.value = visible\n }\n const resizeState = ref<{\n width: null | number\n height: null | number\n headerHeight: null | number\n }>({\n width: null,\n height: null,\n headerHeight: null,\n })\n const isGroup = ref(false)\n const scrollbarViewStyle = {\n display: 'inline-block',\n verticalAlign: 'middle',\n }\n const tableWidth = ref()\n const tableScrollHeight = ref(0)\n const bodyScrollHeight = ref(0)\n const headerScrollHeight = ref(0)\n const footerScrollHeight = ref(0)\n\n watchEffect(() => {\n layout.setHeight(props.height)\n })\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight)\n })\n watch(\n () => [props.currentRowKey, store.states.rowKey],\n ([currentRowKey, rowKey]) => {\n if (!unref(rowKey) || !unref(currentRowKey)) return\n store.setCurrentRowKey(`${currentRowKey}`)\n },\n {\n immediate: true,\n }\n )\n watch(\n () => props.data,\n (data) => {\n table.store.commit('setData', data)\n },\n {\n immediate: true,\n deep: true,\n }\n )\n watchEffect(() => {\n if (props.expandRowKeys) {\n store.setExpandRowKeysAdapter(props.expandRowKeys)\n }\n })\n\n const handleMouseLeave = () => {\n table.store.commit('setHoverRow', null)\n if (table.hoverState) table.hoverState = null\n }\n\n const handleHeaderFooterMousewheel = (event, data) => {\n const { pixelX, pixelY } = data\n if (Math.abs(pixelX) >= Math.abs(pixelY)) {\n table.refs.bodyWrapper.scrollLeft += data.pixelX / 5\n }\n }\n\n const shouldUpdateHeight = computed(() => {\n return (\n props.height ||\n props.maxHeight ||\n store.states.fixedColumns.value.length > 0 ||\n store.states.rightFixedColumns.value.length > 0\n )\n })\n\n const tableBodyStyles = computed(() => {\n return {\n width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : '',\n }\n })\n\n const doLayout = () => {\n const el = table.vnode.el\n if (shouldUpdateHeight.value) {\n layout.updateElsHeight()\n }\n layout.updateColumnsWidth(el.offsetWidth)\n requestAnimationFrame(syncPosition)\n }\n onMounted(async () => {\n await nextTick()\n store.updateColumns()\n bindEvents()\n requestAnimationFrame(doLayout)\n\n const el: HTMLElement = table.vnode.el as HTMLElement\n const tableHeader: HTMLElement = table.refs.headerWrapper\n if (props.flexible && el && el.parentElement) {\n // Automatic minimum size of flex-items\n // Ensure that the main axis does not follow the width of the items\n el.parentElement.style.minWidth = '0'\n }\n\n resizeState.value = {\n width: (tableWidth.value = el.offsetWidth),\n height: el.offsetHeight,\n headerHeight:\n props.showHeader && tableHeader ? tableHeader.offsetHeight : null,\n }\n\n // init filters\n store.states.columns.value.forEach((column: TableColumnCtx<T>) => {\n if (column.filteredValue && column.filteredValue.length) {\n table.store.commit('filterChange', {\n column,\n values: column.filteredValue,\n silent: true,\n })\n }\n })\n table.$ready = true\n })\n const setScrollClassByEl = (el: HTMLElement, className: string) => {\n if (!el) return\n const classList = Array.from(el.classList).filter(\n (item) => !item.startsWith('is-scrolling-')\n )\n classList.push(layout.scrollX.value ? className : 'is-scrolling-none')\n el.className = classList.join(' ')\n }\n const setScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n setScrollClassByEl(tableWrapper, className)\n }\n const hasScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n return !!(tableWrapper && tableWrapper.classList.contains(className))\n }\n const syncPosition = function () {\n if (!table.refs.scrollBarRef) return\n if (!layout.scrollX.value) {\n const scrollingNoneClass = 'is-scrolling-none'\n if (!hasScrollClass(scrollingNoneClass)) {\n setScrollClass(scrollingNoneClass)\n }\n return\n }\n const scrollContainer = table.refs.scrollBarRef.wrapRef\n if (!scrollContainer) return\n const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer\n const { headerWrapper, footerWrapper } = table.refs\n if (headerWrapper) headerWrapper.scrollLeft = scrollLeft\n if (footerWrapper) footerWrapper.scrollLeft = scrollLeft\n const maxScrollLeftPosition = scrollWidth - offsetWidth - 1\n if (scrollLeft >= maxScrollLeftPosition) {\n setScrollClass('is-scrolling-right')\n } else if (scrollLeft === 0) {\n setScrollClass('is-scrolling-left')\n } else {\n setScrollClass('is-scrolling-middle')\n }\n }\n\n const bindEvents = () => {\n if (!table.refs.scrollBarRef) return\n if (table.refs.scrollBarRef.wrapRef) {\n useEventListener(\n table.refs.scrollBarRef.wrapRef,\n 'scroll',\n syncPosition,\n {\n passive: true,\n }\n )\n }\n if (props.fit) {\n useResizeObserver(table.vnode.el as HTMLElement, resizeListener)\n } else {\n useEventListener(window, 'resize', resizeListener)\n }\n\n useResizeObserver(table.refs.bodyWrapper, () => {\n resizeListener()\n table.refs?.scrollBarRef?.update()\n })\n }\n const resizeListener = () => {\n const el = table.vnode.el\n if (!table.$ready || !el) return\n\n let shouldUpdateLayout = false\n const {\n width: oldWidth,\n height: oldHeight,\n headerHeight: oldHeaderHeight,\n } = resizeState.value\n\n const width = (tableWidth.value = el.offsetWidth)\n if (oldWidth !== width) {\n shouldUpdateLayout = true\n }\n\n const height = el.offsetHeight\n if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {\n shouldUpdateLayout = true\n }\n\n const tableHeader: HTMLElement =\n props.tableLayout === 'fixed'\n ? table.refs.headerWrapper\n : table.refs.tableHeaderRef?.$el\n if (props.showHeader && tableHeader?.offsetHeight !== oldHeaderHeight) {\n shouldUpdateLayout = true\n }\n\n tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0\n headerScrollHeight.value = tableHeader?.scrollHeight || 0\n footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0\n bodyScrollHeight.value =\n tableScrollHeight.value -\n headerScrollHeight.value -\n footerScrollHeight.value\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n headerHeight: (props.showHeader && tableHeader?.offsetHeight) || 0,\n }\n doLayout()\n }\n }\n const tableSize = useFormSize()\n const bodyWidth = computed(() => {\n const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout\n return bodyWidth_.value\n ? `${(bodyWidth_.value as number) - (scrollY.value ? gutterWidth : 0)}px`\n : ''\n })\n\n const tableLayout = computed(() => {\n if (props.maxHeight) return 'fixed'\n return props.tableLayout\n })\n\n const emptyBlockStyle = computed(() => {\n if (props.data && props.data.length) return null\n let height = '100%'\n if (props.height && bodyScrollHeight.value) {\n height = `${bodyScrollHeight.value}px`\n }\n const width = tableWidth.value\n return {\n width: width ? `${width}px` : '',\n height,\n }\n })\n\n const tableInnerStyle = computed(() => {\n if (props.height) {\n return {\n height: !Number.isNaN(Number(props.height))\n ? `${props.height}px`\n : props.height,\n }\n }\n if (props.maxHeight) {\n return {\n maxHeight: !Number.isNaN(Number(props.maxHeight))\n ? `${props.maxHeight}px`\n : props.maxHeight,\n }\n }\n return {}\n })\n\n const scrollbarStyle = computed(() => {\n if (props.height) {\n return {\n height: '100%',\n }\n }\n if (props.maxHeight) {\n if (!Number.isNaN(Number(props.maxHeight))) {\n const maxHeight = props.maxHeight\n const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight)\n if (reachMaxHeight) {\n return {\n maxHeight: `${\n tableScrollHeight.value -\n headerScrollHeight.value -\n footerScrollHeight.value\n }px`,\n }\n }\n } else {\n return {\n maxHeight: `calc(${props.maxHeight} - ${\n headerScrollHeight.value + footerScrollHeight.value\n }px)`,\n }\n }\n }\n\n return {}\n })\n\n /**\n * fix layout\n */\n const handleFixedMousewheel = (event, data) => {\n const bodyWrapper = table.refs.bodyWrapper\n if (Math.abs(data.spinY) > 0) {\n const currentScrollTop = bodyWrapper.scrollTop\n if (data.pixelY < 0 && currentScrollTop !== 0) {\n event.preventDefault()\n }\n if (\n data.pixelY > 0 &&\n bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop\n ) {\n event.preventDefault()\n }\n bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5)\n } else {\n bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5)\n }\n }\n\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n emptyBlockStyle,\n handleFixedMousewheel,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n tableLayout,\n scrollbarViewStyle,\n tableInnerStyle,\n scrollbarStyle,\n }\n}\n\nexport default useStyle\n"],"names":[],"mappings":";;;;;AAWA,SAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,EAAE,MAAM,kBAAkB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACxC,EAAE,MAAM,cAAc,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,kBAAkB,CAAC,KAAK,GAAG,OAAO,CAAC;AACvC,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC;AAC1B,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,YAAY,EAAE,IAAI;AACtB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC7B,EAAE,MAAM,kBAAkB,GAAG;AAC7B,IAAI,OAAO,EAAE,cAAc;AAC3B,IAAI,aAAa,EAAE,QAAQ;AAC3B,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;AAC3B,EAAE,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACnC,EAAE,MAAM,gBAAgB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAClC,EAAE,MAAM,kBAAkB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACpC,EAAE,MAAM,kBAAkB,GAAG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Z,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,IAAI,gBAAgB;AACpB,IAAI,4BAA4B;AAChC,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,qBAAqB;AACzB,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,kBAAkB;AACtB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"style-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/style-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { useFormSize } from '@element-plus/components/form'\n\nimport type { Table, TableProps } from './defaults'\nimport type { Store } from '../store'\nimport type TableLayout from '../table-layout'\nimport type { TableColumnCtx } from '../table-column/defaults'\n\nfunction useStyle<T>(\n props: TableProps<T>,\n layout: TableLayout<T>,\n store: Store<T>,\n table: Table<T>\n) {\n const isHidden = ref(false)\n const renderExpanded = ref(null)\n const resizeProxyVisible = ref(false)\n const setDragVisible = (visible: boolean) => {\n resizeProxyVisible.value = visible\n }\n const resizeState = ref<{\n width: null | number\n height: null | number\n headerHeight: null | number\n }>({\n width: null,\n height: null,\n headerHeight: null,\n })\n const isGroup = ref(false)\n const scrollbarViewStyle = {\n display: 'inline-block',\n verticalAlign: 'middle',\n }\n const tableWidth = ref()\n const tableScrollHeight = ref(0)\n const bodyScrollHeight = ref(0)\n const headerScrollHeight = ref(0)\n const footerScrollHeight = ref(0)\n const appendScrollHeight = ref(0)\n\n watchEffect(() => {\n layout.setHeight(props.height)\n })\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight)\n })\n watch(\n () => [props.currentRowKey, store.states.rowKey],\n ([currentRowKey, rowKey]) => {\n if (!unref(rowKey) || !unref(currentRowKey)) return\n store.setCurrentRowKey(`${currentRowKey}`)\n },\n {\n immediate: true,\n }\n )\n watch(\n () => props.data,\n (data) => {\n table.store.commit('setData', data)\n },\n {\n immediate: true,\n deep: true,\n }\n )\n watchEffect(() => {\n if (props.expandRowKeys) {\n store.setExpandRowKeysAdapter(props.expandRowKeys)\n }\n })\n\n const handleMouseLeave = () => {\n table.store.commit('setHoverRow', null)\n if (table.hoverState) table.hoverState = null\n }\n\n const handleHeaderFooterMousewheel = (event, data) => {\n const { pixelX, pixelY } = data\n if (Math.abs(pixelX) >= Math.abs(pixelY)) {\n table.refs.bodyWrapper.scrollLeft += data.pixelX / 5\n }\n }\n\n const shouldUpdateHeight = computed(() => {\n return (\n props.height ||\n props.maxHeight ||\n store.states.fixedColumns.value.length > 0 ||\n store.states.rightFixedColumns.value.length > 0\n )\n })\n\n const tableBodyStyles = computed(() => {\n return {\n width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : '',\n }\n })\n\n const doLayout = () => {\n if (shouldUpdateHeight.value) {\n layout.updateElsHeight()\n }\n layout.updateColumnsWidth()\n requestAnimationFrame(syncPosition)\n }\n onMounted(async () => {\n await nextTick()\n store.updateColumns()\n bindEvents()\n requestAnimationFrame(doLayout)\n\n const el: HTMLElement = table.vnode.el as HTMLElement\n const tableHeader: HTMLElement = table.refs.headerWrapper\n if (props.flexible && el && el.parentElement) {\n // Automatic minimum size of flex-items\n // Ensure that the main axis does not follow the width of the items\n el.parentElement.style.minWidth = '0'\n }\n\n resizeState.value = {\n width: (tableWidth.value = el.offsetWidth),\n height: el.offsetHeight,\n headerHeight:\n props.showHeader && tableHeader ? tableHeader.offsetHeight : null,\n }\n\n // init filters\n store.states.columns.value.forEach((column: TableColumnCtx<T>) => {\n if (column.filteredValue && column.filteredValue.length) {\n table.store.commit('filterChange', {\n column,\n values: column.filteredValue,\n silent: true,\n })\n }\n })\n table.$ready = true\n })\n const setScrollClassByEl = (el: HTMLElement, className: string) => {\n if (!el) return\n const classList = Array.from(el.classList).filter(\n (item) => !item.startsWith('is-scrolling-')\n )\n classList.push(layout.scrollX.value ? className : 'is-scrolling-none')\n el.className = classList.join(' ')\n }\n const setScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n setScrollClassByEl(tableWrapper, className)\n }\n const hasScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n return !!(tableWrapper && tableWrapper.classList.contains(className))\n }\n const syncPosition = function () {\n if (!table.refs.scrollBarRef) return\n if (!layout.scrollX.value) {\n const scrollingNoneClass = 'is-scrolling-none'\n if (!hasScrollClass(scrollingNoneClass)) {\n setScrollClass(scrollingNoneClass)\n }\n return\n }\n const scrollContainer = table.refs.scrollBarRef.wrapRef\n if (!scrollContainer) return\n const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer\n const { headerWrapper, footerWrapper } = table.refs\n if (headerWrapper) headerWrapper.scrollLeft = scrollLeft\n if (footerWrapper) footerWrapper.scrollLeft = scrollLeft\n const maxScrollLeftPosition = scrollWidth - offsetWidth - 1\n if (scrollLeft >= maxScrollLeftPosition) {\n setScrollClass('is-scrolling-right')\n } else if (scrollLeft === 0) {\n setScrollClass('is-scrolling-left')\n } else {\n setScrollClass('is-scrolling-middle')\n }\n }\n\n const bindEvents = () => {\n if (!table.refs.scrollBarRef) return\n if (table.refs.scrollBarRef.wrapRef) {\n useEventListener(\n table.refs.scrollBarRef.wrapRef,\n 'scroll',\n syncPosition,\n {\n passive: true,\n }\n )\n }\n if (props.fit) {\n useResizeObserver(table.vnode.el as HTMLElement, resizeListener)\n } else {\n useEventListener(window, 'resize', resizeListener)\n }\n\n useResizeObserver(table.refs.bodyWrapper, () => {\n resizeListener()\n table.refs?.scrollBarRef?.update()\n })\n }\n const resizeListener = () => {\n const el = table.vnode.el\n if (!table.$ready || !el) return\n\n let shouldUpdateLayout = false\n const {\n width: oldWidth,\n height: oldHeight,\n headerHeight: oldHeaderHeight,\n } = resizeState.value\n\n const width = (tableWidth.value = el.offsetWidth)\n if (oldWidth !== width) {\n shouldUpdateLayout = true\n }\n\n const height = el.offsetHeight\n if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {\n shouldUpdateLayout = true\n }\n\n const tableHeader: HTMLElement =\n props.tableLayout === 'fixed'\n ? table.refs.headerWrapper\n : table.refs.tableHeaderRef?.$el\n if (props.showHeader && tableHeader?.offsetHeight !== oldHeaderHeight) {\n shouldUpdateLayout = true\n }\n\n tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0\n headerScrollHeight.value = tableHeader?.scrollHeight || 0\n footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0\n appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0\n bodyScrollHeight.value =\n tableScrollHeight.value -\n headerScrollHeight.value -\n footerScrollHeight.value -\n appendScrollHeight.value\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n headerHeight: (props.showHeader && tableHeader?.offsetHeight) || 0,\n }\n doLayout()\n }\n }\n const tableSize = useFormSize()\n const bodyWidth = computed(() => {\n const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout\n return bodyWidth_.value\n ? `${(bodyWidth_.value as number) - (scrollY.value ? gutterWidth : 0)}px`\n : ''\n })\n\n const tableLayout = computed(() => {\n if (props.maxHeight) return 'fixed'\n return props.tableLayout\n })\n\n const emptyBlockStyle = computed(() => {\n if (props.data && props.data.length) return null\n let height = '100%'\n if (props.height && bodyScrollHeight.value) {\n height = `${bodyScrollHeight.value}px`\n }\n const width = tableWidth.value\n return {\n width: width ? `${width}px` : '',\n height,\n }\n })\n\n const tableInnerStyle = computed(() => {\n if (props.height) {\n return {\n height: !Number.isNaN(Number(props.height))\n ? `${props.height}px`\n : props.height,\n }\n }\n if (props.maxHeight) {\n return {\n maxHeight: !Number.isNaN(Number(props.maxHeight))\n ? `${props.maxHeight}px`\n : props.maxHeight,\n }\n }\n return {}\n })\n\n const scrollbarStyle = computed(() => {\n if (props.height) {\n return {\n height: '100%',\n }\n }\n if (props.maxHeight) {\n if (!Number.isNaN(Number(props.maxHeight))) {\n return {\n maxHeight: `${\n props.maxHeight -\n headerScrollHeight.value -\n footerScrollHeight.value\n }px`,\n }\n } else {\n return {\n maxHeight: `calc(${props.maxHeight} - ${\n headerScrollHeight.value + footerScrollHeight.value\n }px)`,\n }\n }\n }\n\n return {}\n })\n\n /**\n * fix layout\n */\n const handleFixedMousewheel = (event, data) => {\n const bodyWrapper = table.refs.bodyWrapper\n if (Math.abs(data.spinY) > 0) {\n const currentScrollTop = bodyWrapper.scrollTop\n if (data.pixelY < 0 && currentScrollTop !== 0) {\n event.preventDefault()\n }\n if (\n data.pixelY > 0 &&\n bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop\n ) {\n event.preventDefault()\n }\n bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5)\n } else {\n bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5)\n }\n }\n\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n emptyBlockStyle,\n handleFixedMousewheel,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n tableLayout,\n scrollbarViewStyle,\n tableInnerStyle,\n scrollbarStyle,\n }\n}\n\nexport default useStyle\n"],"names":[],"mappings":";;;;;AAWA,SAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,EAAE,MAAM,kBAAkB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACxC,EAAE,MAAM,cAAc,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,kBAAkB,CAAC,KAAK,GAAG,OAAO,CAAC;AACvC,GAA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IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,gBAAgB,KAAK,CAAC,EAAE;AACrD,QAAQ,KAAK,CAAC,cAAc,EAAE,CAAC;AAC/B,OAAO;AACP,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,GAAG,gBAAgB,EAAE;AACrG,QAAQ,KAAK,CAAC,cAAc,EAAE,CAAC;AAC/B,OAAO;AACP,MAAM,WAAW,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC1D,KAAK,MAAM;AACX,MAAM,WAAW,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC3D,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,IAAI,gBAAgB;AACpB,IAAI,4BAA4B;AAChC,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,qBAAqB;AACzB,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,kBAAkB;AACtB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -4,7 +4,7 @@ declare function useUtils<T>(store: Store<T>): {
|
|
|
4
4
|
getSelectionRows: () => any;
|
|
5
5
|
toggleRowSelection: (row: T, selected: boolean) => void;
|
|
6
6
|
clearSelection: () => void;
|
|
7
|
-
clearFilter: (columnKeys
|
|
7
|
+
clearFilter: (columnKeys?: string[] | undefined) => void;
|
|
8
8
|
toggleAllSelection: () => void;
|
|
9
9
|
toggleRowExpansion: (row: T, expanded?: boolean | undefined) => void;
|
|
10
10
|
clearSort: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/utils-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport type { Store } from '../store'\n\nfunction useUtils<T>(store: Store<T>) {\n const setCurrentRow = (row: T) => {\n store.commit('setCurrentRow', row)\n }\n const getSelectionRows = () => {\n return store.getSelectionRows()\n }\n const toggleRowSelection = (row: T, selected: boolean) => {\n store.toggleRowSelection(row, selected, false)\n store.updateAllSelected()\n }\n const clearSelection = () => {\n store.clearSelection()\n }\n const clearFilter = (columnKeys
|
|
1
|
+
{"version":3,"file":"utils-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/utils-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport type { Store } from '../store'\n\nfunction useUtils<T>(store: Store<T>) {\n const setCurrentRow = (row: T) => {\n store.commit('setCurrentRow', row)\n }\n const getSelectionRows = () => {\n return store.getSelectionRows()\n }\n const toggleRowSelection = (row: T, selected: boolean) => {\n store.toggleRowSelection(row, selected, false)\n store.updateAllSelected()\n }\n const clearSelection = () => {\n store.clearSelection()\n }\n const clearFilter = (columnKeys?: string[]) => {\n store.clearFilter(columnKeys)\n }\n const toggleAllSelection = () => {\n store.commit('toggleAllSelection')\n }\n const toggleRowExpansion = (row: T, expanded?: boolean) => {\n store.toggleRowExpansionAdapter(row, expanded)\n }\n const clearSort = () => {\n store.clearSort()\n }\n const sort = (prop: string, order: string) => {\n store.commit('sort', { prop, order })\n }\n\n return {\n setCurrentRow,\n getSelectionRows,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n }\n}\n\nexport default useUtils\n"],"names":[],"mappings":"AAAA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,MAAM,aAAa,GAAG,CAAC,GAAG,KAAK;AACjC,IAAI,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,CA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IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,IAAI;AACR,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -12,7 +12,6 @@ interface TableBodyProps<T> {
|
|
|
12
12
|
highlight: boolean;
|
|
13
13
|
tooltipEffect?: string;
|
|
14
14
|
tooltipOptions?: TableOverflowTooltipOptions;
|
|
15
|
-
rowDraggable: boolean;
|
|
16
15
|
}
|
|
17
16
|
declare const defaultProps: {
|
|
18
17
|
store: {
|
|
@@ -35,18 +34,6 @@ declare const defaultProps: {
|
|
|
35
34
|
default: string;
|
|
36
35
|
};
|
|
37
36
|
highlight: BooleanConstructor;
|
|
38
|
-
rowDraggable: {
|
|
39
|
-
type: BooleanConstructor;
|
|
40
|
-
default: boolean;
|
|
41
|
-
};
|
|
42
|
-
onDragend: {
|
|
43
|
-
type: FunctionConstructor;
|
|
44
|
-
default: undefined;
|
|
45
|
-
};
|
|
46
|
-
onDragstart: {
|
|
47
|
-
type: FunctionConstructor;
|
|
48
|
-
default: undefined;
|
|
49
|
-
};
|
|
50
37
|
};
|
|
51
38
|
export { TableBodyProps };
|
|
52
39
|
export default defaultProps;
|
|
@@ -18,19 +18,7 @@ const defaultProps = {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: ""
|
|
20
20
|
},
|
|
21
|
-
highlight: Boolean
|
|
22
|
-
rowDraggable: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
onDragend: {
|
|
27
|
-
type: Function,
|
|
28
|
-
default: void 0
|
|
29
|
-
},
|
|
30
|
-
onDragstart: {
|
|
31
|
-
type: Function,
|
|
32
|
-
default: void 0
|
|
33
|
-
}
|
|
21
|
+
highlight: Boolean
|
|
34
22
|
};
|
|
35
23
|
|
|
36
24
|
export { defaultProps as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table-body/defaults.ts"],"sourcesContent":["// @ts-nocheck\nimport type { PropType } from 'vue'\nimport type { Store } from '../store'\nimport type {\n ColumnCls,\n ColumnStyle,\n DefaultRow,\n Table,\n} from '../table/defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\n\ninterface TableBodyProps<T> {\n store: Store<T>\n stripe?: boolean\n context: Table<T>\n rowClassName: ColumnCls<T>\n rowStyle: ColumnStyle<T>\n fixed: string\n highlight: boolean\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\n
|
|
1
|
+
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table-body/defaults.ts"],"sourcesContent":["// @ts-nocheck\nimport type { PropType } from 'vue'\nimport type { Store } from '../store'\nimport type {\n ColumnCls,\n ColumnStyle,\n DefaultRow,\n Table,\n} from '../table/defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\n\ninterface TableBodyProps<T> {\n store: Store<T>\n stripe?: boolean\n context: Table<T>\n rowClassName: ColumnCls<T>\n rowStyle: ColumnStyle<T>\n fixed: string\n highlight: boolean\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\n}\n\nconst defaultProps = {\n store: {\n required: true,\n type: Object as PropType<TableBodyProps<DefaultRow>['store']>,\n },\n stripe: Boolean,\n tooltipEffect: String,\n tooltipOptions: {\n type: Object as PropType<TableBodyProps<DefaultRow>['tooltipOptions']>,\n },\n context: {\n default: () => ({}),\n type: Object as PropType<TableBodyProps<DefaultRow>['context']>,\n },\n rowClassName: [String, Function] as PropType<\n TableBodyProps<DefaultRow>['rowClassName']\n >,\n rowStyle: [Object, Function] as PropType<\n TableBodyProps<DefaultRow>['rowStyle']\n >,\n fixed: {\n type: String,\n default: '',\n },\n highlight: Boolean,\n}\n\nexport { TableBodyProps }\nexport default defaultProps\n"],"names":[],"mappings":"AAAK,MAAC,YAAY,GAAG;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,aAAa,EAAE,MAAM;AACvB,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,YAAY,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AAClC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC9B,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB;;;;"}
|
|
@@ -5,7 +5,7 @@ import '../../../../hooks/index.mjs';
|
|
|
5
5
|
import { getCell, getColumnByCell, createTablePopper } from '../util.mjs';
|
|
6
6
|
import { TABLE_INJECTION_KEY } from '../tokens.mjs';
|
|
7
7
|
import { useZIndex } from '../../../../hooks/use-z-index/index.mjs';
|
|
8
|
-
import { hasClass
|
|
8
|
+
import { hasClass } from '../../../../utils/dom/style.mjs';
|
|
9
9
|
|
|
10
10
|
function useEvents(props) {
|
|
11
11
|
const parent = inject(TABLE_INJECTION_KEY);
|
|
@@ -44,6 +44,19 @@ function useEvents(props) {
|
|
|
44
44
|
const handleMouseLeave = debounce(() => {
|
|
45
45
|
props.store.commit("setHoverRow", null);
|
|
46
46
|
}, 30);
|
|
47
|
+
const getPadding = (el) => {
|
|
48
|
+
const style = window.getComputedStyle(el, null);
|
|
49
|
+
const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0;
|
|
50
|
+
const paddingRight = Number.parseInt(style.paddingRight, 10) || 0;
|
|
51
|
+
const paddingTop = Number.parseInt(style.paddingTop, 10) || 0;
|
|
52
|
+
const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0;
|
|
53
|
+
return {
|
|
54
|
+
left: paddingLeft,
|
|
55
|
+
right: paddingRight,
|
|
56
|
+
top: paddingTop,
|
|
57
|
+
bottom: paddingBottom
|
|
58
|
+
};
|
|
59
|
+
};
|
|
47
60
|
const handleCellMouseEnter = (event, row, tooltipOptions) => {
|
|
48
61
|
var _a;
|
|
49
62
|
const table = parent;
|
|
@@ -66,9 +79,20 @@ function useEvents(props) {
|
|
|
66
79
|
const range = document.createRange();
|
|
67
80
|
range.setStart(cellChild, 0);
|
|
68
81
|
range.setEnd(cellChild, cellChild.childNodes.length);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
let rangeWidth = range.getBoundingClientRect().width;
|
|
83
|
+
let rangeHeight = range.getBoundingClientRect().height;
|
|
84
|
+
const offsetWidth = rangeWidth - Math.floor(rangeWidth);
|
|
85
|
+
if (offsetWidth < 1e-3) {
|
|
86
|
+
rangeWidth = Math.floor(rangeWidth);
|
|
87
|
+
}
|
|
88
|
+
const offsetHeight = rangeHeight - Math.floor(rangeHeight);
|
|
89
|
+
if (offsetHeight < 1e-3) {
|
|
90
|
+
rangeHeight = Math.floor(rangeHeight);
|
|
91
|
+
}
|
|
92
|
+
const { top, left, right, bottom } = getPadding(cellChild);
|
|
93
|
+
const horizontalPadding = left + right;
|
|
94
|
+
const verticalPadding = top + bottom;
|
|
95
|
+
if (rangeWidth + horizontalPadding > cellChild.offsetWidth || rangeHeight + verticalPadding > cellChild.offsetHeight || cellChild.scrollWidth > cellChild.offsetWidth) {
|
|
72
96
|
createTablePopper(parent == null ? void 0 : parent.refs.tableWrapper, cell, cell.innerText || cell.textContent, nextZIndex, tooltipOptions);
|
|
73
97
|
}
|
|
74
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-helper.mjs","sources":["../../../../../../../packages/components/table/src/table-body/events-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport { h, inject, ref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { getStyle, hasClass } from '@element-plus/utils'\nimport { useZIndex } from '@element-plus/hooks'\nimport { createTablePopper, getCell, getColumnByCell } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableBodyProps } from './defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\n\nfunction useEvents<T>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const tooltipContent = ref('')\n const tooltipTrigger = ref(h('div'))\n const { nextZIndex } = useZIndex()\n const handleEvent = (event: Event, row: T, name: string) => {\n const table = parent\n const cell = getCell(event)\n let column: TableColumnCtx<T>\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n if (column) {\n table?.emit(`cell-${name}`, row, column, cell, event)\n }\n }\n table?.emit(`row-${name}`, row, column, event)\n }\n const handleDoubleClick = (event: Event, row: T) => {\n handleEvent(event, row, 'dblclick')\n }\n const handleClick = (event: Event, row: T) => {\n props.store.commit('setCurrentRow', row)\n handleEvent(event, row, 'click')\n }\n const handleContextMenu = (event: Event, row: T) => {\n handleEvent(event, row, 'contextmenu')\n }\n const handleMouseEnter = debounce((index: number) => {\n props.store.commit('setHoverRow', index)\n }, 30)\n const handleMouseLeave = debounce(() => {\n props.store.commit('setHoverRow', null)\n }, 30)\n const handleCellMouseEnter = (\n event: MouseEvent,\n row: T,\n tooltipOptions: TableOverflowTooltipOptions\n ) => {\n const table = parent\n const cell = getCell(event)\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n const column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n const hoverState = (table.hoverState = { cell, column, row })\n table?.emit(\n 'cell-mouse-enter',\n hoverState.row,\n hoverState.column,\n hoverState.cell,\n event\n )\n }\n\n if (!tooltipOptions) {\n return\n }\n\n // 判断是否text-overflow, 如果是就显示tooltip\n const cellChild = (event.target as HTMLElement).querySelector(\n '.cell'\n ) as HTMLElement\n if (\n !(\n hasClass(cellChild, `${namespace}-tooltip`) &&\n cellChild.childNodes.length\n )\n ) {\n return\n }\n // use range width instead of scrollWidth to determine whether the text is overflowing\n // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3\n const range = document.createRange()\n range.setStart(cellChild, 0)\n range.setEnd(cellChild, cellChild.childNodes.length)\n /** detail: https://github.com/element-plus/element-plus/issues/10790\n * What went wrong?\n * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:\n * - Expected: 188\n * - Actual: 188.00000762939453\n */\n const rangeWidth = Math.round(range.getBoundingClientRect().width)\n const padding =\n (Number.parseInt(getStyle(cellChild, 'paddingLeft'), 10) || 0) +\n (Number.parseInt(getStyle(cellChild, 'paddingRight'), 10) || 0)\n if (\n rangeWidth + padding > cellChild.offsetWidth ||\n cellChild.scrollWidth > cellChild.offsetWidth\n ) {\n createTablePopper(\n parent?.refs.tableWrapper,\n cell,\n cell.innerText || cell.textContent,\n nextZIndex,\n tooltipOptions\n )\n }\n }\n const handleCellMouseLeave = (event) => {\n const cell = getCell(event)\n if (!cell) return\n\n const oldHoverState = parent?.hoverState\n parent?.emit(\n 'cell-mouse-leave',\n oldHoverState?.row,\n oldHoverState?.column,\n oldHoverState?.cell,\n event\n )\n }\n\n return {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useEvents\n"],"names":[],"mappings":";;;;;;;;;AAMA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC7C,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AACjC,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,C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ources":["../../../../../../../packages/components/table/src/table-body/events-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport { h, inject, ref } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { hasClass } from '@element-plus/utils'\nimport { useZIndex } from '@element-plus/hooks'\nimport { createTablePopper, getCell, getColumnByCell } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableBodyProps } from './defaults'\nimport type { TableOverflowTooltipOptions } from '../util'\n\nfunction useEvents<T>(props: Partial<TableBodyProps<T>>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const tooltipContent = ref('')\n const tooltipTrigger = ref(h('div'))\n const { nextZIndex } = useZIndex()\n const handleEvent = (event: Event, row: T, name: string) => {\n const table = parent\n const cell = getCell(event)\n let column: TableColumnCtx<T>\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n if (column) {\n table?.emit(`cell-${name}`, row, column, cell, event)\n }\n }\n table?.emit(`row-${name}`, row, column, event)\n }\n const handleDoubleClick = (event: Event, row: T) => {\n handleEvent(event, row, 'dblclick')\n }\n const handleClick = (event: Event, row: T) => {\n props.store.commit('setCurrentRow', row)\n handleEvent(event, row, 'click')\n }\n const handleContextMenu = (event: Event, row: T) => {\n handleEvent(event, row, 'contextmenu')\n }\n const handleMouseEnter = debounce((index: number) => {\n props.store.commit('setHoverRow', index)\n }, 30)\n const handleMouseLeave = debounce(() => {\n props.store.commit('setHoverRow', null)\n }, 30)\n const getPadding = (el: HTMLElement) => {\n const style = window.getComputedStyle(el, null)\n const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0\n const paddingRight = Number.parseInt(style.paddingRight, 10) || 0\n const paddingTop = Number.parseInt(style.paddingTop, 10) || 0\n const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0\n return {\n left: paddingLeft,\n right: paddingRight,\n top: paddingTop,\n bottom: paddingBottom,\n }\n }\n const handleCellMouseEnter = (\n event: MouseEvent,\n row: T,\n tooltipOptions: TableOverflowTooltipOptions\n ) => {\n const table = parent\n const cell = getCell(event)\n const namespace = table?.vnode.el?.dataset.prefix\n if (cell) {\n const column = getColumnByCell(\n {\n columns: props.store.states.columns.value,\n },\n cell,\n namespace\n )\n const hoverState = (table.hoverState = { cell, column, row })\n table?.emit(\n 'cell-mouse-enter',\n hoverState.row,\n hoverState.column,\n hoverState.cell,\n event\n )\n }\n\n if (!tooltipOptions) {\n return\n }\n\n // 判断是否text-overflow, 如果是就显示tooltip\n const cellChild = (event.target as HTMLElement).querySelector(\n '.cell'\n ) as HTMLElement\n if (\n !(\n hasClass(cellChild, `${namespace}-tooltip`) &&\n cellChild.childNodes.length\n )\n ) {\n return\n }\n // use range width instead of scrollWidth to determine whether the text is overflowing\n // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3\n const range = document.createRange()\n range.setStart(cellChild, 0)\n range.setEnd(cellChild, cellChild.childNodes.length)\n /** detail: https://github.com/element-plus/element-plus/issues/10790\n * What went wrong?\n * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:\n * - Expected: 188\n * - Actual: 188.00000762939453\n */\n let rangeWidth = range.getBoundingClientRect().width\n let rangeHeight = range.getBoundingClientRect().height\n const offsetWidth = rangeWidth - Math.floor(rangeWidth)\n if (offsetWidth < 0.001) {\n rangeWidth = Math.floor(rangeWidth)\n }\n const offsetHeight = rangeHeight - Math.floor(rangeHeight)\n if (offsetHeight < 0.001) {\n rangeHeight = Math.floor(rangeHeight)\n }\n\n const { top, left, right, bottom } = getPadding(cellChild)\n const horizontalPadding = left + right\n const verticalPadding = top + bottom\n if (\n rangeWidth + horizontalPadding > cellChild.offsetWidth ||\n rangeHeight + verticalPadding > cellChild.offsetHeight ||\n cellChild.scrollWidth > cellChild.offsetWidth\n ) {\n createTablePopper(\n parent?.refs.tableWrapper,\n cell,\n cell.innerText || cell.textContent,\n nextZIndex,\n tooltipOptions\n )\n }\n }\n const handleCellMouseLeave = (event) => {\n const cell = getCell(event)\n if (!cell) return\n\n const oldHoverState = parent?.hoverState\n parent?.emit(\n 'cell-mouse-leave',\n oldHoverState?.row,\n oldHoverState?.column,\n oldHoverState?.cell,\n event\n )\n }\n\n return {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useEvents\n"],"names":[],"mappings":";;;;;;;;;AAMA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC7C,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AACjC,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACvC,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,CAAC;AACrC,EAAE,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,KAAK;AAC5C,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC;AACzB,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,MAAM,SAAS,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;AAC1G,IAAI,IAAI,IAAI,EAAE;AACd,MAAM,MAAM,GAAG,eAAe,CAAC;AAC/B,QAAQ,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC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AK,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC;AACtE,IAAI,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACrO,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,iBAAiB;AACrB,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,oBAAoB;AACxB,IAAI,oBAAoB;AACxB,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -20,18 +20,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
highlight: BooleanConstructor;
|
|
23
|
-
rowDraggable: {
|
|
24
|
-
type: BooleanConstructor;
|
|
25
|
-
default: boolean;
|
|
26
|
-
};
|
|
27
|
-
onDragend: {
|
|
28
|
-
type: FunctionConstructor;
|
|
29
|
-
default: undefined;
|
|
30
|
-
};
|
|
31
|
-
onDragstart: {
|
|
32
|
-
type: FunctionConstructor;
|
|
33
|
-
default: undefined;
|
|
34
|
-
};
|
|
35
23
|
}, {
|
|
36
24
|
ns: {
|
|
37
25
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -85,25 +73,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
85
73
|
default: string;
|
|
86
74
|
};
|
|
87
75
|
highlight: BooleanConstructor;
|
|
88
|
-
rowDraggable: {
|
|
89
|
-
type: BooleanConstructor;
|
|
90
|
-
default: boolean;
|
|
91
|
-
};
|
|
92
|
-
onDragend: {
|
|
93
|
-
type: FunctionConstructor;
|
|
94
|
-
default: undefined;
|
|
95
|
-
};
|
|
96
|
-
onDragstart: {
|
|
97
|
-
type: FunctionConstructor;
|
|
98
|
-
default: undefined;
|
|
99
|
-
};
|
|
100
76
|
}>>, {
|
|
101
77
|
fixed: string;
|
|
102
|
-
onDragend: Function;
|
|
103
|
-
onDragstart: Function;
|
|
104
78
|
context: import("../table/defaults").Table<any>;
|
|
105
79
|
stripe: boolean;
|
|
106
80
|
highlight: boolean;
|
|
107
|
-
rowDraggable: boolean;
|
|
108
81
|
}>;
|
|
109
82
|
export default _default;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineComponent, getCurrentInstance, inject, watch, onUnmounted, h } from 'vue';
|
|
2
|
-
import { isClient } from '@vueuse/core';
|
|
3
2
|
import '../../../../utils/index.mjs';
|
|
4
3
|
import '../../../../hooks/index.mjs';
|
|
5
4
|
import useLayoutObserver from '../layout-observer.mjs';
|
|
@@ -8,6 +7,8 @@ import { TABLE_INJECTION_KEY } from '../tokens.mjs';
|
|
|
8
7
|
import useRender from './render-helper.mjs';
|
|
9
8
|
import defaultProps from './defaults.mjs';
|
|
10
9
|
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
|
|
10
|
+
import { isClient } from '@vueuse/core';
|
|
11
|
+
import { rAF } from '../../../../utils/raf.mjs';
|
|
11
12
|
import { removeClass, addClass } from '../../../../utils/dom/style.mjs';
|
|
12
13
|
|
|
13
14
|
var TableBody = defineComponent({
|
|
@@ -22,11 +23,7 @@ var TableBody = defineComponent({
|
|
|
22
23
|
watch(props.store.states.hoverRow, (newVal, oldVal) => {
|
|
23
24
|
if (!props.store.states.isComplex.value || !isClient)
|
|
24
25
|
return;
|
|
25
|
-
|
|
26
|
-
if (!raf) {
|
|
27
|
-
raf = (fn) => window.setTimeout(fn, 16);
|
|
28
|
-
}
|
|
29
|
-
raf(() => {
|
|
26
|
+
rAF(() => {
|
|
30
27
|
const el = instance == null ? void 0 : instance.vnode.el;
|
|
31
28
|
const rows = Array.from((el == null ? void 0 : el.children) || []).filter((e) => e == null ? void 0 : e.classList.contains(`${ns.e("row")}`));
|
|
32
29
|
const oldRow = rows[oldVal];
|
|
@@ -55,7 +52,7 @@ var TableBody = defineComponent({
|
|
|
55
52
|
render() {
|
|
56
53
|
const { wrappedRowRender, store } = this;
|
|
57
54
|
const data = store.states.data.value || [];
|
|
58
|
-
return h("tbody", {}, [
|
|
55
|
+
return h("tbody", { tabIndex: -1 }, [
|
|
59
56
|
data.reduce((acc, row) => {
|
|
60
57
|
return acc.concat(wrappedRowRender(row, acc.length));
|
|
61
58
|
}, [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onUnmounted,\n watch,\n} from 'vue'\nimport { isClient
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onUnmounted,\n watch,\n} from 'vue'\nimport { addClass, isClient, rAF, removeClass } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport useLayoutObserver from '../layout-observer'\nimport { removePopper } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useRender from './render-helper'\nimport defaultProps from './defaults'\n\nimport type { VNode } from 'vue'\n\nexport default defineComponent({\n name: 'ElTableBody',\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance()\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n const { wrappedRowRender, tooltipContent, tooltipTrigger } =\n useRender(props)\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)\n\n watch(props.store.states.hoverRow, (newVal: any, oldVal: any) => {\n if (!props.store.states.isComplex.value || !isClient) return\n\n rAF(() => {\n // just get first level children; fix #9723\n const el = instance?.vnode.el as HTMLElement\n const rows = Array.from(el?.children || []).filter((e) =>\n e?.classList.contains(`${ns.e('row')}`)\n )\n const oldRow = rows[oldVal]\n const newRow = rows[newVal]\n if (oldRow) {\n removeClass(oldRow, 'hover-row')\n }\n if (newRow) {\n addClass(newRow, 'hover-row')\n }\n })\n })\n\n onUnmounted(() => {\n removePopper?.()\n })\n\n return {\n ns,\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n },\n render() {\n const { wrappedRowRender, store } = this\n const data = store.states.data.value || []\n // Why do we need tabIndex: -1 ?\n // If you set the tabindex attribute on an element ,\n // then its child content cannot be scrolled with the arrow keys,\n // unless you set tabindex on the content too\n // See https://github.com/facebook/react/issues/25462#issuecomment-1274775248 or https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes/tabindex\n return h('tbody', { tabIndex: -1 }, [\n data.reduce((acc: VNode[], row) => {\n return acc.concat(wrappedRowRender(row, acc.length))\n }, []),\n ])\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,gBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE;AACf,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC/C,IAAI,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AAClF,IAAI,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,M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AAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;AAC7C,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC/C,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;AACxC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAChC,QAAQ,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D,OAAO,EAAE,EAAE,CAAC;AACZ,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
@@ -40,14 +40,7 @@ function useRender(props) {
|
|
|
40
40
|
return index;
|
|
41
41
|
};
|
|
42
42
|
const rowRender = (row, $index, treeRowData, expanded = false) => {
|
|
43
|
-
const {
|
|
44
|
-
tooltipEffect,
|
|
45
|
-
tooltipOptions,
|
|
46
|
-
store,
|
|
47
|
-
rowDraggable,
|
|
48
|
-
onDragstart,
|
|
49
|
-
onDragend
|
|
50
|
-
} = props;
|
|
43
|
+
const { tooltipEffect, tooltipOptions, store } = props;
|
|
51
44
|
const { indent, columns } = store.states;
|
|
52
45
|
const rowClasses = getRowClass(row, $index);
|
|
53
46
|
let display = true;
|
|
@@ -61,10 +54,7 @@ function useRender(props) {
|
|
|
61
54
|
return h("tr", {
|
|
62
55
|
style: [displayStyle, getRowStyle(row, $index)],
|
|
63
56
|
class: rowClasses,
|
|
64
|
-
draggable: rowDraggable,
|
|
65
57
|
key: getKeyOfRow(row, $index),
|
|
66
|
-
onDragstart: ($event) => onDragstart($event, row),
|
|
67
|
-
onDragend: ($event) => onDragend($event, row),
|
|
68
58
|
onDblclick: ($event) => handleDoubleClick($event, row),
|
|
69
59
|
onClick: ($event) => handleClick($event, row),
|
|
70
60
|
onContextmenu: ($event) => handleContextMenu($event, row),
|
|
@@ -75,7 +65,7 @@ function useRender(props) {
|
|
|
75
65
|
if (!rowspan || !colspan) {
|
|
76
66
|
return null;
|
|
77
67
|
}
|
|
78
|
-
const columnData = {
|
|
68
|
+
const columnData = Object.assign({}, column);
|
|
79
69
|
columnData.realWidth = getColspanRealWidth(columns.value, colspan, cellIndex);
|
|
80
70
|
const data = {
|
|
81
71
|
store: props.store,
|