@sdata/web-vue 3.30.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sd.css +319 -23
- package/dist/sd.min.css +2 -2
- package/es/_components/auto-tooltip/auto-tooltip.js +3 -62
- package/es/_components/auto-tooltip/auto-tooltip.vue.d.ts +17 -0
- package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +66 -0
- package/es/_components/client-only.js +3 -16
- package/es/_components/client-only.vue.d.ts +13 -0
- package/es/_components/client-only.vue_vue_type_script_setup_true_lang.js +17 -0
- package/es/_components/feedback-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/icon-hover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/input-label/input-label.js +3 -168
- package/es/_components/input-label/input-label.vue.d.ts +59 -0
- package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +192 -0
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-observer.js +3 -44
- package/es/_components/resize-observer.vue.d.ts +17 -0
- package/es/_components/resize-observer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/_components/select-view/select-view.js +3 -231
- package/es/_components/select-view/select-view.vue.d.ts +76 -0
- package/es/_components/select-view/select-view.vue_vue_type_script_setup_true_lang.js +269 -0
- package/es/_components/transition/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/array.js +1 -6
- package/es/_utils/color.js +4 -6
- package/es/_utils/date.js +2 -2
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_utils/vue-utils.js +2 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/auto-complete/auto-complete.js +3 -389
- package/es/auto-complete/auto-complete.vue.d.ts +693 -0
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +293 -0
- package/es/auto-complete/index.d.ts +1667 -79
- package/es/avatar/avatar-group.js +4 -96
- package/es/avatar/avatar-group.vue.d.ts +29 -0
- package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +84 -0
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/avatar/index.d.ts +53 -51
- package/es/avatar/index.js +4 -4
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/badge/badge.js +4 -149
- package/es/badge/badge.vue.d.ts +36 -0
- package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +112 -0
- package/es/badge/index.d.ts +39 -100
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/border-beam/styles.js +1 -1
- package/es/breadcrumb/breadcrumb-item.js +3 -106
- package/es/breadcrumb/breadcrumb-item.vue.d.ts +25 -0
- package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +89 -0
- package/es/breadcrumb/breadcrumb.js +3 -115
- package/es/breadcrumb/breadcrumb.vue.d.ts +29 -0
- package/es/breadcrumb/breadcrumb.vue_vue_type_script_setup_true_lang.js +98 -0
- package/es/breadcrumb/index.d.ts +72 -79
- package/es/button/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +8 -6
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/components/headings-bar.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/card/card-actions.js +5 -0
- package/es/card/card-actions.vue.d.ts +7 -0
- package/es/card/card-actions.vue_vue_type_script_setup_true_lang.js +23 -0
- package/es/card/card-grid.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card-meta.js +3 -47
- package/es/card/card-meta.vue.d.ts +21 -0
- package/es/card/card-meta.vue_vue_type_script_setup_true_lang.js +54 -0
- package/es/card/card.js +3 -180
- package/es/card/card.vue.d.ts +40 -0
- package/es/card/card.vue_vue_type_script_setup_true_lang.js +116 -0
- package/es/card/context.d.ts +1 -2
- package/es/card/index.d.ts +67 -871
- package/es/card/index.js +1 -1
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel.js +3 -289
- package/es/carousel/{carousel.d.ts → carousel.vue.d.ts} +8 -11
- package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +229 -0
- package/es/carousel/index.d.ts +11 -17
- package/es/carousel/index.js +1 -1
- package/es/cascader/base-cascader-panel.js +3 -70
- package/es/cascader/{base-cascader-panel.d.ts → base-cascader-panel.vue.d.ts} +20 -11
- package/es/cascader/base-cascader-panel.vue_vue_type_script_setup_true_lang.js +85 -0
- package/es/cascader/cascader-column.js +3 -75
- package/es/cascader/{cascader-column.d.ts → cascader-column.vue.d.ts} +18 -11
- package/es/cascader/cascader-column.vue_vue_type_script_setup_true_lang.js +103 -0
- package/es/cascader/cascader-option.js +3 -141
- package/es/cascader/{cascader-option.d.ts → cascader-option.vue.d.ts} +4 -3
- package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +171 -0
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/cascader/cascader-search-panel.js +3 -58
- package/es/cascader/{cascader-search-panel.d.ts → cascader-search-panel.vue.d.ts} +15 -4
- package/es/cascader/cascader-search-panel.vue_vue_type_script_setup_true_lang.js +71 -0
- package/es/cascader/cascader.vue.d.ts +3 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +17 -13
- package/es/checkbox/checkbox-group.js +3 -139
- package/es/checkbox/checkbox-group.vue.d.ts +41 -0
- package/es/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.js +100 -0
- package/es/checkbox/checkbox.js +3 -195
- package/es/checkbox/checkbox.vue.d.ts +39 -0
- package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +165 -0
- package/es/checkbox/icon-check.js +3 -18
- package/es/checkbox/icon-check.vue.d.ts +3 -0
- package/es/checkbox/icon-check.vue_vue_type_script_setup_true_lang.js +24 -0
- package/es/checkbox/index.d.ts +102 -294
- package/es/collapse/collapse-item.js +3 -177
- package/es/collapse/collapse-item.vue.d.ts +30 -0
- package/es/collapse/collapse-item.vue_vue_type_script_setup_true_lang.js +168 -0
- package/es/collapse/collapse.vue.d.ts +1 -1
- package/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/collapse/index.d.ts +50 -155
- package/es/collapse/style/index.css +1 -0
- package/es/collapse/style/index.scss +1 -0
- package/es/color-picker/color-picker.js +3 -293
- package/es/color-picker/{color-picker.d.ts → color-picker.vue.d.ts} +25 -14
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +256 -0
- package/es/color-picker/control-bar.js +3 -54
- package/es/color-picker/{control-bar.d.ts → control-bar.vue.d.ts} +5 -4
- package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +68 -0
- package/es/color-picker/gradient-thumb.js +5 -0
- package/es/color-picker/gradient-thumb.vue.d.ts +13 -0
- package/es/color-picker/gradient-thumb.vue_vue_type_script_setup_true_lang.js +69 -0
- package/es/color-picker/index.d.ts +37 -32
- package/es/color-picker/palette.js +3 -43
- package/es/color-picker/palette.vue.d.ts +17 -0
- package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +51 -0
- package/es/color-picker/panel.js +3 -475
- package/es/color-picker/{panel.d.ts → panel.vue.d.ts} +5 -4
- package/es/color-picker/panel.vue_vue_type_script_setup_true_lang.js +453 -0
- package/es/color-picker/utils.js +12 -10
- package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/components.d.ts +2 -0
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/theme.js +1 -1
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/hooks/use-range-header-value.js +2 -2
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/hooks/use-time-picker-value.js +10 -8
- package/es/date-picker/index.d.ts +238 -122
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue.d.ts +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/date-picker/pickers/date-picker.js +3 -93
- package/es/date-picker/pickers/{date-picker.d.ts → date-picker.vue.d.ts} +26 -35
- package/es/date-picker/pickers/date-picker.vue_vue_type_script_setup_true_lang.js +107 -0
- package/es/date-picker/pickers/month-picker.js +3 -37
- package/es/date-picker/pickers/month-picker.vue.d.ts +38 -0
- package/es/date-picker/pickers/month-picker.vue_vue_type_script_setup_true_lang.js +51 -0
- package/es/date-picker/pickers/quarter-picker.js +3 -46
- package/es/date-picker/pickers/{quarter-picker.d.ts → quarter-picker.vue.d.ts} +14 -3
- package/es/date-picker/pickers/quarter-picker.vue_vue_type_script_setup_true_lang.js +60 -0
- package/es/date-picker/pickers/week-picker.js +3 -56
- package/es/date-picker/pickers/{week-picker.d.ts → week-picker.vue.d.ts} +15 -4
- package/es/date-picker/pickers/week-picker.vue_vue_type_script_setup_true_lang.js +70 -0
- package/es/date-picker/pickers/year-picker.js +3 -37
- package/es/date-picker/pickers/year-picker.vue.d.ts +38 -0
- package/es/date-picker/pickers/year-picker.vue_vue_type_script_setup_true_lang.js +51 -0
- package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +1 -1
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/descriptions/descriptions-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/descriptions/descriptions.js +3 -232
- package/es/descriptions/{descriptions.d.ts → descriptions.vue.d.ts} +22 -23
- package/es/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +209 -0
- package/es/descriptions/index.d.ts +18 -32
- package/es/descriptions/index.js +1 -1
- package/es/divider/divider.js +3 -71
- package/es/divider/divider.vue.d.ts +21 -0
- package/es/divider/divider.vue_vue_type_script_setup_true_lang.js +47 -0
- package/es/divider/index.d.ts +25 -66
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +1 -2
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/empty/empty.js +3 -49
- package/es/empty/empty.vue.d.ts +18 -0
- package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +44 -0
- package/es/empty/index.d.ts +20 -36
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/file-previewer/pdfjs-worker.min.mjs +4 -4
- package/es/file-previewer/use-pdf-js.js +2 -2
- package/es/form/form-item-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item-message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +31 -30
- package/es/form/form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/style/col.scss +29 -41
- package/es/grid/style/index.css +237 -0
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/add-from-icon-font-cn.d.ts +8 -13
- package/es/icon-component/add-from-icon-font-cn.js +13 -22
- package/es/icon-component/icon-font.js +5 -0
- package/es/icon-component/icon-font.vue.d.ts +35 -0
- package/es/icon-component/icon-font.vue_vue_type_script_setup_true_lang.js +38 -0
- package/es/icon-component/icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/index.d.ts +1 -13
- package/es/icon.js +5 -5
- package/es/image/hooks/use-image-drag.js +3 -1
- package/es/image/image-footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/image/index.d.ts +1 -1
- package/es/image/preview-action.js +3 -47
- package/es/image/preview-action.vue.d.ts +29 -0
- package/es/image/preview-action.vue_vue_type_script_setup_true_lang.js +55 -0
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-toolbar.vue.d.ts +2 -2
- package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +33 -23
- package/es/index.css +319 -23
- package/es/index.d.ts +2 -2
- package/es/index.js +16 -14
- package/es/index.scss +1 -1
- package/es/input/index.d.ts +1770 -136
- package/es/input/index.js +1 -1
- package/es/input/input-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/input/input-search.js +3 -140
- package/es/input/input-search.vue.d.ts +620 -0
- package/es/input/input-search.vue_vue_type_script_setup_true_lang.js +168 -0
- package/es/input/input.js +3 -487
- package/es/input/{input.d.ts → input.vue.d.ts} +42 -43
- package/es/input/input.vue_vue_type_script_setup_true_lang.js +377 -0
- package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input-mask/mask-engine.js +4 -4
- package/es/input-mask/presets.js +1 -1
- package/es/input-number/index.d.ts +1670 -106
- package/es/input-number/input-number.js +3 -529
- package/es/input-number/input-number.vue.d.ts +708 -0
- package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +384 -0
- package/es/input-tag/index.d.ts +76 -92
- package/es/input-tag/input-tag.js +3 -672
- package/es/input-tag/{input-tag.d.ts → input-tag.vue.d.ts} +52 -49
- package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +585 -0
- package/es/input-tag/utils.js +1 -1
- package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/utils.js +4 -4
- package/es/kv-list/index.d.ts +34 -34
- package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/index.d.ts +2619 -93
- package/es/list/index.js +2 -2
- package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item.js +3 -54
- package/es/list/list-item.vue.d.ts +22 -0
- package/es/list/list-item.vue_vue_type_script_setup_true_lang.js +58 -0
- package/es/list/list.js +3 -383
- package/es/list/list.vue.d.ts +980 -0
- package/es/list/list.vue_vue_type_script_setup_true_lang.js +326 -0
- package/es/mention/index.d.ts +3234 -58
- package/es/mention/mention.js +3 -437
- package/es/mention/mention.vue.d.ts +1210 -0
- package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +376 -0
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/menu/hooks/use-level.js +2 -1
- package/es/menu/indent.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/menu/index.d.ts +3 -3
- package/es/menu/index.js +1 -1
- package/es/menu/item-group.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/menu/item.js +3 -127
- package/es/menu/{item.d.ts → item.vue.d.ts} +25 -4
- package/es/menu/item.vue_vue_type_script_setup_true_lang.js +147 -0
- package/es/menu/menu.js +3 -57
- package/es/menu/menu.vue.d.ts +66 -0
- package/es/menu/menu.vue_vue_type_script_setup_true_lang.js +78 -0
- package/es/menu/overflow-wrap.js +3 -97
- package/es/menu/overflow-wrap.vue.d.ts +3 -0
- package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +114 -0
- package/es/menu/sub-menu-inline.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/menu/sub-menu.js +3 -115
- package/es/menu/{sub-menu.d.ts → sub-menu.vue.d.ts} +27 -30
- package/es/menu/sub-menu.vue_vue_type_script_setup_true_lang.js +110 -0
- package/es/message/index.js +1 -1
- package/es/message/message-list.js +3 -45
- package/es/message/{message-list.d.ts → message-list.vue.d.ts} +9 -7
- package/es/message/message-list.vue_vue_type_script_setup_true_lang.js +64 -0
- package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/modal/index.js +3 -3
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/model-selector/model-selector-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-name.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-separator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-shortcut.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-trigger-element.js +5 -0
- package/es/model-selector/model-selector-trigger-element.vue.d.ts +7 -0
- package/es/model-selector/model-selector-trigger-element.vue_vue_type_script_lang.js +18 -0
- package/es/model-selector/model-selector-trigger.vue_vue_type_script_setup_true_lang.js +4 -17
- package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/index.js +1 -1
- package/es/notification/notification-list.js +3 -58
- package/es/notification/notification-list.vue.d.ts +34 -0
- package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +96 -0
- package/es/notification/notification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/number-flow/continuous.d.ts +2 -0
- package/es/number-flow/continuous.js +7 -0
- package/es/number-flow/formatter.d.ts +15 -0
- package/es/number-flow/formatter.js +54 -0
- package/es/number-flow/group-key.d.ts +11 -0
- package/es/number-flow/group-key.js +4 -0
- package/es/number-flow/index.d.ts +63 -0
- package/es/number-flow/index.js +15 -0
- package/es/number-flow/number-flow-group.js +5 -0
- package/es/number-flow/number-flow-group.vue.d.ts +12 -0
- package/es/number-flow/number-flow-group.vue_vue_type_script_setup_true_lang.js +58 -0
- package/es/number-flow/number-flow.js +5 -0
- package/es/number-flow/number-flow.vue.d.ts +20 -0
- package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +284 -0
- package/es/number-flow/style/index.css +85 -0
- package/es/number-flow/style/index.scss +93 -0
- package/es/number-flow/style/token.scss +5 -0
- package/es/number-flow/types.d.ts +46 -0
- package/es/number-flow/use-can-animate.d.ts +4 -0
- package/es/number-flow/use-can-animate.js +30 -0
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/index.d.ts +45 -49
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/pagination.js +3 -463
- package/es/pagination/{pagination.d.ts → pagination.vue.d.ts} +42 -31
- package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +454 -0
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/circle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/line.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/progress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/qr-code/index.d.ts +18 -33
- package/es/qr-code/qr-code.vue.d.ts +6 -11
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/radio/index.d.ts +111 -289
- package/es/radio/radio-group.js +3 -168
- package/es/radio/radio-group.vue.d.ts +45 -0
- package/es/radio/radio-group.vue_vue_type_script_setup_true_lang.js +129 -0
- package/es/radio/radio.js +3 -172
- package/es/radio/radio.vue.d.ts +40 -0
- package/es/radio/radio.vue_vue_type_script_setup_true_lang.js +152 -0
- package/es/rate/index.d.ts +17 -11
- package/es/rate/rate.js +3 -269
- package/es/rate/{rate.d.ts → rate.vue.d.ts} +18 -6
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +220 -0
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +1 -3
- package/es/result/403.js +3 -481
- package/es/result/403.vue.d.ts +3 -0
- package/es/result/403.vue_vue_type_script_setup_true_lang.js +24 -0
- package/es/result/404.js +3 -335
- package/es/result/404.vue.d.ts +3 -0
- package/es/result/404.vue_vue_type_script_setup_true_lang.js +24 -0
- package/es/result/500.js +3 -344
- package/es/result/500.vue.d.ts +3 -0
- package/es/result/500.vue_vue_type_script_setup_true_lang.js +19 -0
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/rich-text-editor/index.d.ts +3 -3
- package/es/rich-text-editor/nodes/inline-component-node.js +1 -1
- package/es/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
- package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/scrollbar/scrollbar.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/sd-vue.js +17 -16
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/index.d.ts +93 -2299
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/select/select.js +3 -684
- package/es/select/select.vue.d.ts +450 -0
- package/es/select/select.vue_vue_type_script_setup_true_lang.js +774 -0
- package/es/select/utils.js +1 -1
- package/es/selectable-card/selectable-card.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-recording-icon.js +5 -0
- package/es/sender/sender-recording-icon.vue.d.ts +3 -0
- package/es/sender/sender-recording-icon.vue_vue_type_script_setup_true_lang.js +38 -0
- package/es/sender/sender-skill-tag.js +5 -0
- package/es/sender/sender-skill-tag.vue.d.ts +28 -0
- package/es/sender/sender-skill-tag.vue_vue_type_script_setup_true_lang.js +59 -0
- package/es/sender/sender-stop-loading-icon.js +5 -0
- package/es/sender/sender-stop-loading-icon.vue.d.ts +3 -0
- package/es/sender/sender-stop-loading-icon.vue_vue_type_script_setup_true_lang.js +54 -0
- package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +8 -109
- package/es/sender/use-recorder.js +2 -1
- package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/shape.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/slider/slider-dots.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-marks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-ticks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/utils.js +1 -2
- package/es/space/index.d.ts +26 -72
- package/es/space/space.js +3 -101
- package/es/space/space.vue.d.ts +22 -0
- package/es/space/space.vue_vue_type_script_setup_true_lang.js +84 -0
- package/es/spin/dot-loading.js +3 -28
- package/es/spin/dot-loading.vue.d.ts +6 -0
- package/es/spin/dot-loading.vue_vue_type_script_setup_true_lang.js +33 -0
- package/es/spin/index.d.ts +37 -60
- package/es/spin/spin.js +3 -153
- package/es/spin/spin.vue.d.ts +27 -0
- package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +139 -0
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/statistic/countdown.vue.d.ts +9 -0
- package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +30 -3
- package/es/statistic/index.d.ts +15 -0
- package/es/statistic/statistic.vue.d.ts +3 -3
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +32 -63
- package/es/statistic/style/index.css +3 -0
- package/es/statistic/style/index.scss +5 -0
- package/es/statistic/utils.js +5 -5
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/style/theme/z-index.js +3 -3
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/table/hooks/use-row-selection.js +1 -1
- package/es/table/index.d.ts +449 -362
- package/es/table/index.js +1 -1
- package/es/table/table-column.js +3 -254
- package/es/table/table-column.vue.d.ts +75 -0
- package/es/table/table-column.vue_vue_type_script_setup_true_lang.js +194 -0
- package/es/table/table-operation-td.js +3 -130
- package/es/table/table-operation-td.vue.d.ts +87 -0
- package/es/table/table-operation-td.vue_vue_type_script_setup_true_lang.js +114 -0
- package/es/table/table-operation-th.js +3 -73
- package/es/table/{table-operation-th.d.ts → table-operation-th.vue.d.ts} +5 -4
- package/es/table/table-operation-th.vue_vue_type_script_setup_true_lang.js +86 -0
- package/es/table/table-tbody.js +3 -16
- package/es/table/table-tbody.vue.d.ts +14 -0
- package/es/table/table-tbody.vue_vue_type_script_setup_true_lang.js +23 -0
- package/es/table/table-td.js +3 -192
- package/es/table/{table-td.d.ts → table-td.vue.d.ts} +26 -12
- package/es/table/table-td.vue_vue_type_script_setup_true_lang.js +218 -0
- package/es/table/table-th.js +3 -225
- package/es/table/{table-th.d.ts → table-th.vue.d.ts} +17 -6
- package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +268 -0
- package/es/table/table-thead.js +3 -16
- package/es/table/table-thead.vue.d.ts +14 -0
- package/es/table/table-thead.vue_vue_type_script_setup_true_lang.js +23 -0
- package/es/table/table-tr.js +3 -34
- package/es/table/table-tr.vue.d.ts +30 -0
- package/es/table/table-tr.vue_vue_type_script_setup_true_lang.js +48 -0
- package/es/table/table.js +3 -1637
- package/es/table/{table.d.ts → table.vue.d.ts} +41 -56
- package/es/table/table.vue_vue_type_script_setup_true_lang.js +1568 -0
- package/es/table/utils.js +1 -1
- package/es/tabs/index.d.ts +32 -33
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-button.js +3 -58
- package/es/tabs/{tabs-button.d.ts → tabs-button.vue.d.ts} +6 -3
- package/es/tabs/tabs-button.vue_vue_type_script_setup_true_lang.js +54 -0
- package/es/tabs/tabs-nav-ink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-nav.js +3 -297
- package/es/tabs/{tabs-nav.d.ts → tabs-nav.vue.d.ts} +23 -13
- package/es/tabs/tabs-nav.vue_vue_type_script_setup_true_lang.js +332 -0
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs.js +3 -325
- package/es/tabs/{tabs.d.ts → tabs.vue.d.ts} +25 -18
- package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +237 -0
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/thinking-orb/engine/lattice.js +1 -1
- package/es/thinking-orb/engine/morph.js +1 -1
- package/es/thinking-orb/engine/profiles.js +1 -1
- package/es/thinking-orb/presets.js +1 -1
- package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/hooks/use-time-state.js +4 -2
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/time-picker/range-panel.js +3 -56
- package/es/time-picker/range-panel.vue.d.ts +44 -0
- package/es/time-picker/range-panel.vue_vue_type_script_setup_true_lang.js +65 -0
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/timeline/context.d.ts +1 -0
- package/es/timeline/index.d.ts +36 -426
- package/es/timeline/item.vue.d.ts +3 -0
- package/es/timeline/item.vue_vue_type_script_setup_true_lang.js +7 -5
- package/es/timeline/timeline.js +3 -109
- package/es/timeline/timeline.vue.d.ts +26 -0
- package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +68 -0
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tooltip/index.d.ts +3 -0
- package/es/tooltip/interface.d.ts +1 -0
- package/es/tooltip/style/index.css +3 -0
- package/es/tooltip/style/index.scss +4 -0
- package/es/tooltip/tooltip.vue.d.ts +1 -0
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +17 -15
- package/es/transfer/transfer-list-item.js +3 -74
- package/es/transfer/transfer-list-item.vue.d.ts +30 -0
- package/es/transfer/transfer-list-item.vue_vue_type_script_setup_true_lang.js +101 -0
- package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/hooks/use-draggable.js +0 -2
- package/es/tree/node-switcher.js +2 -2
- package/es/tree/node-switcher.vue.d.ts +7 -43
- package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +85 -0
- package/es/tree/node.js +3 -20
- package/es/tree/node.vue.d.ts +15 -0
- package/es/tree/node.vue_vue_type_script_setup_true_lang.js +30 -0
- package/es/tree/transition-node-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +28 -30
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.js +3 -71
- package/es/tree-select/panel.vue.d.ts +56 -0
- package/es/tree-select/panel.vue_vue_type_script_setup_true_lang.js +75 -0
- package/es/tree-select/tree-select.vue.d.ts +5 -2
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/trigger/index.d.ts +168 -506
- package/es/trigger/trigger.js +3 -833
- package/es/trigger/trigger.vue.d.ts +108 -0
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +642 -0
- package/es/typography/base.js +3 -427
- package/es/typography/base.vue.d.ts +116 -0
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +314 -0
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/index.d.ts +108 -37
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/paragraph.js +3 -35
- package/es/typography/paragraph.vue.d.ts +33 -0
- package/es/typography/paragraph.vue_vue_type_script_setup_true_lang.js +42 -0
- package/es/typography/text.js +3 -22
- package/es/typography/text.vue.d.ts +27 -0
- package/es/typography/text.vue_vue_type_script_setup_true_lang.js +31 -0
- package/es/typography/title.js +3 -24
- package/es/typography/title.vue.d.ts +26 -0
- package/es/typography/title.vue_vue_type_script_setup_true_lang.js +33 -0
- package/es/typography/typography-content.js +5 -0
- package/es/typography/typography-content.vue.d.ts +9 -0
- package/es/typography/typography-content.vue_vue_type_script_setup_true_lang.js +47 -0
- package/es/typography/typography-operations.js +5 -0
- package/es/typography/typography-operations.vue.d.ts +22 -0
- package/es/typography/typography-operations.vue_vue_type_script_setup_true_lang.js +73 -0
- package/es/typography/typography.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/utils/getInnerText.d.ts +1 -1
- package/es/typography/utils/getInnerText.js +4 -5
- package/es/typography/utils/inner-text-renderer.js +5 -0
- package/es/typography/utils/inner-text-renderer.vue.d.ts +7 -0
- package/es/typography/utils/inner-text-renderer.vue_vue_type_script_setup_true_lang.js +22 -0
- package/es/typography/utils/measure.d.ts +2 -3
- package/es/typography/utils/measure.js +8 -10
- package/es/upload/index.d.ts +74 -148
- package/es/upload/style/index.css +7 -9
- package/es/upload/style/index.scss +6 -6
- package/es/upload/upload-button.js +3 -137
- package/es/upload/{upload-button.d.ts → upload-button.vue.d.ts} +18 -11
- package/es/upload/upload-button.vue_vue_type_script_setup_true_lang.js +161 -0
- package/es/upload/upload-list-item.js +3 -120
- package/es/upload/{upload-list-item.d.ts → upload-list-item.vue.d.ts} +5 -4
- package/es/upload/upload-list-item.vue_vue_type_script_setup_true_lang.js +195 -0
- package/es/upload/upload-list.js +3 -46
- package/es/upload/upload-list.vue.d.ts +38 -0
- package/es/upload/upload-list.vue_vue_type_script_setup_true_lang.js +47 -0
- package/es/upload/upload-picture-item.js +3 -86
- package/es/upload/upload-picture-item.vue.d.ts +35 -0
- package/es/upload/upload-picture-item.vue_vue_type_script_setup_true_lang.js +147 -0
- package/es/upload/upload-progress.js +3 -73
- package/es/upload/{upload-progress.d.ts → upload-progress.vue.d.ts} +5 -4
- package/es/upload/upload-progress.vue_vue_type_script_setup_true_lang.js +75 -0
- package/es/upload/upload.js +3 -671
- package/es/upload/{upload.d.ts → upload.vue.d.ts} +50 -83
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +392 -0
- package/es/verification-code/index.d.ts +18 -24
- package/es/verification-code/verification-code.js +3 -216
- package/es/verification-code/{verification-code.d.ts → verification-code.vue.d.ts} +12 -15
- package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +192 -0
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/index.d.ts +12 -8
- package/es/watermark/watermark.js +3 -292
- package/es/watermark/{watermark.d.ts → watermark.vue.d.ts} +13 -2
- package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +303 -0
- package/json/vetur-attributes.json +74 -1352
- package/json/vetur-tags.json +94 -473
- package/json/web-types.json +2615 -5690
- package/package.json +14 -14
- package/es/_components/auto-tooltip/auto-tooltip.d.ts +0 -10
- package/es/_components/client-only.d.ts +0 -4
- package/es/_components/input-label/input-label.d.ts +0 -70
- package/es/_components/resize-observer.d.ts +0 -6
- package/es/_components/select-view/select-view.d.ts +0 -171
- package/es/auto-complete/auto-complete.d.ts +0 -146
- package/es/avatar/avatar-group.d.ts +0 -58
- package/es/badge/badge.d.ts +0 -67
- package/es/breadcrumb/breadcrumb-item.d.ts +0 -35
- package/es/breadcrumb/breadcrumb.d.ts +0 -34
- package/es/card/card-meta.d.ts +0 -18
- package/es/card/card.d.ts +0 -464
- package/es/checkbox/checkbox-group.d.ts +0 -62
- package/es/checkbox/checkbox.d.ts +0 -146
- package/es/checkbox/icon-check.d.ts +0 -2
- package/es/collapse/collapse-item.d.ts +0 -157
- package/es/color-picker/palette.d.ts +0 -16
- package/es/date-picker/pickers/month-picker.d.ts +0 -27
- package/es/date-picker/pickers/year-picker.d.ts +0 -27
- package/es/divider/divider.d.ts +0 -43
- package/es/empty/empty.d.ts +0 -20
- package/es/image/preview-action.d.ts +0 -73
- package/es/input/input-search.d.ts +0 -81
- package/es/input-number/input-number.d.ts +0 -178
- package/es/list/list-item.d.ts +0 -16
- package/es/list/list.d.ts +0 -127
- package/es/mention/mention.d.ts +0 -128
- package/es/menu/menu.d.ts +0 -455
- package/es/menu/overflow-wrap.d.ts +0 -2
- package/es/notification/notification-list.d.ts +0 -32
- package/es/overflow-list/index.d.ts +0 -81
- package/es/overflow-list/index.js +0 -10
- package/es/overflow-list/overflow-list.d.ts +0 -37
- package/es/overflow-list/overflow-list.js +0 -140
- package/es/overflow-list/style/index.css +0 -30
- package/es/overflow-list/style/index.scss +0 -20
- package/es/radio/radio-group.d.ts +0 -72
- package/es/radio/radio.d.ts +0 -140
- package/es/result/403.d.ts +0 -2
- package/es/result/404.d.ts +0 -2
- package/es/result/500.d.ts +0 -2
- package/es/select/select.d.ts +0 -1533
- package/es/space/space.d.ts +0 -45
- package/es/spin/dot-loading.d.ts +0 -10
- package/es/spin/spin.d.ts +0 -37
- package/es/table/table-column.d.ts +0 -120
- package/es/table/table-operation-td.d.ts +0 -813
- package/es/table/table-tbody.d.ts +0 -4
- package/es/table/table-thead.d.ts +0 -4
- package/es/table/table-tr.d.ts +0 -41
- package/es/time-picker/range-panel.d.ts +0 -203
- package/es/timeline/timeline.d.ts +0 -226
- package/es/transfer/transfer-list-item.d.ts +0 -45
- package/es/tree/node-switcher.vue_vue_type_script_lang.js +0 -69
- package/es/tree/node.d.ts +0 -4
- package/es/tree-select/panel.d.ts +0 -14
- package/es/trigger/trigger.d.ts +0 -366
- package/es/typography/base.d.ts +0 -171
- package/es/typography/paragraph.d.ts +0 -27
- package/es/typography/text.d.ts +0 -18
- package/es/typography/title.d.ts +0 -17
- package/es/upload/upload-list.d.ts +0 -63
- package/es/upload/upload-picture-item.d.ts +0 -24
- /package/es/{overflow-list → number-flow}/style/css.js +0 -0
- /package/es/{overflow-list → number-flow}/style/index.d.ts +0 -0
- /package/es/{overflow-list → number-flow}/style/index.js +0 -0
|
@@ -0,0 +1,1568 @@
|
|
|
1
|
+
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/objectSpread2.js";
|
|
3
|
+
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
|
+
import { isArray, isFunction, isNull, isNumber, isObject, isString, isUndefined } from "../_utils/is.js";
|
|
5
|
+
import resize_observer_default from "../_components/resize-observer.js";
|
|
6
|
+
import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/objectWithoutProperties.js";
|
|
7
|
+
import virtual_list_default from "../_components/virtual-list/index.js";
|
|
8
|
+
import { omit } from "../_utils/omit.js";
|
|
9
|
+
import { useComponentRef } from "../_hooks/use-component-ref.js";
|
|
10
|
+
import { useScrollbar } from "../_hooks/use-scrollbar.js";
|
|
11
|
+
import Empty from "../empty/index.js";
|
|
12
|
+
import Scrollbar from "../scrollbar/index.js";
|
|
13
|
+
import Spin from "../spin/index.js";
|
|
14
|
+
import { useChildrenComponents } from "../_hooks/use-children-components.js";
|
|
15
|
+
import { tableInjectionKey } from "./context.js";
|
|
16
|
+
import table_tbody_default from "./table-tbody.js";
|
|
17
|
+
import { getValueByPath, setValueByPath } from "../_utils/get-value-by-path.js";
|
|
18
|
+
import { getGroupColumns, getTableGridTemplate, mapArrayWithChildren, mapRawTableData } from "./utils.js";
|
|
19
|
+
import table_td_default from "./table-td.js";
|
|
20
|
+
import table_th_default from "./table-th.js";
|
|
21
|
+
import table_thead_default from "./table-thead.js";
|
|
22
|
+
import table_tr_default from "./table-tr.js";
|
|
23
|
+
import { debounce } from "../_utils/debounce.js";
|
|
24
|
+
import IconMinus from "../icon/icon-minus/index.js";
|
|
25
|
+
import IconPlus from "../icon/icon-plus/index.js";
|
|
26
|
+
import Pagination from "../pagination/index.js";
|
|
27
|
+
import { useColumnResize } from "./hooks/use-column-resize.js";
|
|
28
|
+
import { useDrag } from "./hooks/use-drag.js";
|
|
29
|
+
import { useExpand } from "./hooks/use-expand.js";
|
|
30
|
+
import { useFilter } from "./hooks/use-filter.js";
|
|
31
|
+
import { usePagination } from "./hooks/use-pagination.js";
|
|
32
|
+
import { useRowSelection } from "./hooks/use-row-selection.js";
|
|
33
|
+
import { useSorter } from "./hooks/use-sorter.js";
|
|
34
|
+
import { useSpan } from "./hooks/use-span.js";
|
|
35
|
+
import table_operation_td_default from "./table-operation-td.js";
|
|
36
|
+
import table_operation_th_default from "./table-operation-th.js";
|
|
37
|
+
import { Fragment, computed, createBlock, createVNode, defineComponent, inject, isVNode, mergeProps, onMounted, openBlock, provide, reactive, ref, toRef, useSlots, watch, watchEffect } from "vue";
|
|
38
|
+
//#region components/table/table.vue?vue&type=script&setup=true&lang.ts
|
|
39
|
+
var _excluded = [
|
|
40
|
+
"items",
|
|
41
|
+
"data",
|
|
42
|
+
"keyField",
|
|
43
|
+
"itemKey",
|
|
44
|
+
"listTag",
|
|
45
|
+
"itemTag",
|
|
46
|
+
"listClass",
|
|
47
|
+
"itemClass",
|
|
48
|
+
"listAttrs",
|
|
49
|
+
"listStyle",
|
|
50
|
+
"contentWrapperAttrs",
|
|
51
|
+
"contentAttrs",
|
|
52
|
+
"component",
|
|
53
|
+
"paddingPosition",
|
|
54
|
+
"isStaticItemHeight",
|
|
55
|
+
"fixedSize"
|
|
56
|
+
];
|
|
57
|
+
var _excluded2 = ["outerStyle"];
|
|
58
|
+
var _excluded3 = ["outerStyle"];
|
|
59
|
+
var table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Table" }), {}, {
|
|
60
|
+
__name: "table",
|
|
61
|
+
props: {
|
|
62
|
+
/**
|
|
63
|
+
* @zh 表格的列描述信息
|
|
64
|
+
* @en Column info of the table
|
|
65
|
+
*/
|
|
66
|
+
columns: {
|
|
67
|
+
type: Array,
|
|
68
|
+
default: () => []
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* @zh 表格的数据
|
|
72
|
+
* @en Table data
|
|
73
|
+
*/
|
|
74
|
+
data: {
|
|
75
|
+
type: Array,
|
|
76
|
+
default: () => []
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* @zh 是否显示边框
|
|
80
|
+
* @en Whether to show the border
|
|
81
|
+
*/
|
|
82
|
+
bordered: {
|
|
83
|
+
type: [Boolean, Object],
|
|
84
|
+
default: true
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* @zh 是否显示选中效果
|
|
88
|
+
* @en Whether to show the hover effect
|
|
89
|
+
*/
|
|
90
|
+
hoverable: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: true
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* @zh 是否开启斑马纹效果
|
|
96
|
+
* @en Whether to enable the stripe effect
|
|
97
|
+
*/
|
|
98
|
+
stripe: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* @zh 表格的大小
|
|
104
|
+
* @en The size of the table
|
|
105
|
+
* @values 'mini','small','medium','large'
|
|
106
|
+
* @defaultValue 'large'
|
|
107
|
+
*/
|
|
108
|
+
size: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: () => {
|
|
111
|
+
var _inject$size, _inject;
|
|
112
|
+
return (_inject$size = (_inject = inject(configProviderInjectionKey, void 0)) === null || _inject === void 0 ? void 0 : _inject.size) !== null && _inject$size !== void 0 ? _inject$size : "large";
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* @zh 表格的 table-layout 属性设置为 fixed,设置为 fixed 后,表格的宽度不会被内容撑开超出 100%。
|
|
117
|
+
* @en The table-layout property of the table is set to fixed. After it is set to fixed, the width of the table will not be stretched beyond 100% by the content.
|
|
118
|
+
*/
|
|
119
|
+
tableLayoutFixed: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: false
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* @zh 是否为加载中状态
|
|
125
|
+
* @en Whether it is loading state
|
|
126
|
+
*/
|
|
127
|
+
loading: {
|
|
128
|
+
type: [Boolean, Object],
|
|
129
|
+
default: false
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* @zh 传递给加载中 Spin 的属性
|
|
133
|
+
* @en Props passed to the loading Spin
|
|
134
|
+
*/
|
|
135
|
+
spinProps: { type: Object },
|
|
136
|
+
/**
|
|
137
|
+
* @zh 表格的行选择器配置
|
|
138
|
+
* @en Table row selector configuration
|
|
139
|
+
*/
|
|
140
|
+
rowSelection: { type: Object },
|
|
141
|
+
/**
|
|
142
|
+
* @zh 表格的展开行配置
|
|
143
|
+
* @en Expand row configuration of the table
|
|
144
|
+
*/
|
|
145
|
+
expandable: { type: Object },
|
|
146
|
+
/**
|
|
147
|
+
* @zh 表格的滚动属性配置。`2.13.0` 版本增加字符型值的支持。`2.20.0` 版本增加 `minWidth`,`maxHeight` 的支持。
|
|
148
|
+
* @en Scrolling attribute configuration of the table. The `2.13.0` version adds support for character values. `2.20.0` version adds support for `minWidth`, `maxHeight`.
|
|
149
|
+
*/
|
|
150
|
+
scroll: { type: Object },
|
|
151
|
+
/**
|
|
152
|
+
* @zh 分页的属性配置
|
|
153
|
+
* @en Pagination properties configuration
|
|
154
|
+
*/
|
|
155
|
+
pagination: {
|
|
156
|
+
type: [Boolean, Object],
|
|
157
|
+
default: true
|
|
158
|
+
},
|
|
159
|
+
/**
|
|
160
|
+
* @zh 分页选择器的位置
|
|
161
|
+
* @en The position of the page selector
|
|
162
|
+
* @values 'tl','top',tr','bl','bottom','br'
|
|
163
|
+
*/
|
|
164
|
+
pagePosition: {
|
|
165
|
+
type: String,
|
|
166
|
+
default: "br"
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
* @zh 树形表格的缩进距离
|
|
170
|
+
* @en The indentation distance of the tree table
|
|
171
|
+
*/
|
|
172
|
+
indentSize: {
|
|
173
|
+
type: Number,
|
|
174
|
+
default: 16
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* @zh 表格行 `key` 的取值字段
|
|
178
|
+
* @en Value field of table row `key`
|
|
179
|
+
*/
|
|
180
|
+
rowKey: {
|
|
181
|
+
type: [String, Function],
|
|
182
|
+
default: "key"
|
|
183
|
+
},
|
|
184
|
+
/**
|
|
185
|
+
* @zh 是否显示表头
|
|
186
|
+
* @en Whether to show the header
|
|
187
|
+
*/
|
|
188
|
+
showHeader: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
default: true
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动 [VirtualListProps](#VirtualListProps)
|
|
194
|
+
* @en Pass the virtual list attribute, pass in this parameter to turn on virtual scrolling [VirtualListProps](#VirtualListProps)
|
|
195
|
+
* @type VirtualListProps
|
|
196
|
+
*/
|
|
197
|
+
virtualListProps: { type: Object },
|
|
198
|
+
/**
|
|
199
|
+
* @zh 单元格合并方法(索引从数据项开始计数)
|
|
200
|
+
* @en Cell merge method (The index starts counting from the data item)
|
|
201
|
+
* @version 2.10.0
|
|
202
|
+
*/
|
|
203
|
+
spanMethod: { type: Function },
|
|
204
|
+
/**
|
|
205
|
+
* @zh 是否让合并方法的索引包含所有
|
|
206
|
+
* @en Whether to make the index of the span method contain all
|
|
207
|
+
* @version 2.18.0
|
|
208
|
+
*/
|
|
209
|
+
spanAll: {
|
|
210
|
+
type: Boolean,
|
|
211
|
+
default: false
|
|
212
|
+
},
|
|
213
|
+
components: { type: Object },
|
|
214
|
+
/**
|
|
215
|
+
* @zh 数据懒加载函数,传入时开启懒加载功能
|
|
216
|
+
* @en Data lazy loading function, open the lazy loading function when it is passed in
|
|
217
|
+
* @version 2.13.0
|
|
218
|
+
*/
|
|
219
|
+
loadMore: { type: Function },
|
|
220
|
+
/**
|
|
221
|
+
* @zh 筛选图标是否左对齐
|
|
222
|
+
* @en Whether the filter icon is aligned to the left
|
|
223
|
+
* @version 2.13.0
|
|
224
|
+
*/
|
|
225
|
+
filterIconAlignLeft: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
default: false
|
|
228
|
+
},
|
|
229
|
+
/**
|
|
230
|
+
* @zh 是否在子树为空时隐藏展开按钮
|
|
231
|
+
* @en Whether to hide expand button when subtree is empty
|
|
232
|
+
* @version 2.14.0
|
|
233
|
+
*/
|
|
234
|
+
hideExpandButtonOnEmpty: {
|
|
235
|
+
type: Boolean,
|
|
236
|
+
default: false
|
|
237
|
+
},
|
|
238
|
+
/**
|
|
239
|
+
* @zh 表格行元素的类名。`2.34.0` 版本增加函数值支持
|
|
240
|
+
* @en The class name of the table row element. The `2.34.0` version adds support for function values.
|
|
241
|
+
* @version 2.16.0
|
|
242
|
+
*/
|
|
243
|
+
rowClass: { type: [
|
|
244
|
+
String,
|
|
245
|
+
Array,
|
|
246
|
+
Object,
|
|
247
|
+
Function
|
|
248
|
+
] },
|
|
249
|
+
/**
|
|
250
|
+
* @zh 表格拖拽排序的配置
|
|
251
|
+
* @en Table drag and drop sorting configuration
|
|
252
|
+
* @version 2.16.0
|
|
253
|
+
*/
|
|
254
|
+
draggable: { type: Object },
|
|
255
|
+
rowNumber: { type: [Boolean, Object] },
|
|
256
|
+
/**
|
|
257
|
+
* @zh 是否允许调整列宽
|
|
258
|
+
* @en Whether to allow the column width to be adjusted
|
|
259
|
+
* @version 2.16.0
|
|
260
|
+
*/
|
|
261
|
+
columnResizable: { type: Boolean },
|
|
262
|
+
/**
|
|
263
|
+
* @zh 显示表尾总结行
|
|
264
|
+
* @en Show footer summary row
|
|
265
|
+
* @version 2.21.0
|
|
266
|
+
*/
|
|
267
|
+
summary: { type: [Boolean, Function] },
|
|
268
|
+
/**
|
|
269
|
+
* @zh 总结行的首列文字
|
|
270
|
+
* @en The first column of text in the summary line
|
|
271
|
+
* @version 2.21.0
|
|
272
|
+
*/
|
|
273
|
+
summaryText: {
|
|
274
|
+
type: String,
|
|
275
|
+
default: "Summary"
|
|
276
|
+
},
|
|
277
|
+
/**
|
|
278
|
+
* @zh 总结行的单元格合并方法
|
|
279
|
+
* @en Cell Merge Method for Summarizing Rows
|
|
280
|
+
* @version 2.21.0
|
|
281
|
+
*/
|
|
282
|
+
summarySpanMethod: { type: Function },
|
|
283
|
+
/**
|
|
284
|
+
* @zh 已选择的行(受控模式)优先于 `rowSelection`
|
|
285
|
+
* @en Selected row (controlled mode) takes precedence over `rowSelection`
|
|
286
|
+
* @version 2.25.0
|
|
287
|
+
*/
|
|
288
|
+
selectedKeys: { type: Array },
|
|
289
|
+
/**
|
|
290
|
+
* @zh 默认已选择的行(非受控模式)优先于 `rowSelection`
|
|
291
|
+
* @en The selected row by default (uncontrolled mode) takes precedence over `rowSelection`
|
|
292
|
+
* @version 2.25.0
|
|
293
|
+
*/
|
|
294
|
+
defaultSelectedKeys: { type: Array },
|
|
295
|
+
/**
|
|
296
|
+
* @zh 显示的展开行、子树(受控模式)优先于 `expandable`
|
|
297
|
+
* @en Displayed Expanded Row, Subtree (Controlled Mode) takes precedence over `expandable`
|
|
298
|
+
* @version 2.25.0
|
|
299
|
+
*/
|
|
300
|
+
expandedKeys: { type: Array },
|
|
301
|
+
/**
|
|
302
|
+
* @zh 默认显示的展开行、子树(非受控模式)优先于 `expandable`
|
|
303
|
+
* @en Expand row, Subtree displayed by default (Uncontrolled mode) takes precedence over `expandable`
|
|
304
|
+
* @version 2.25.0
|
|
305
|
+
*/
|
|
306
|
+
defaultExpandedKeys: { type: Array },
|
|
307
|
+
/**
|
|
308
|
+
* @zh 是否默认展开所有的行
|
|
309
|
+
* @en Whether to expand all rows by default
|
|
310
|
+
* @version 2.25.0
|
|
311
|
+
*/
|
|
312
|
+
defaultExpandAllRows: {
|
|
313
|
+
type: Boolean,
|
|
314
|
+
default: false
|
|
315
|
+
},
|
|
316
|
+
/**
|
|
317
|
+
* @zh 是否开启表头吸顶
|
|
318
|
+
* @en Whether to open the sticky header
|
|
319
|
+
* @version 2.30.0
|
|
320
|
+
*/
|
|
321
|
+
stickyHeader: {
|
|
322
|
+
type: [Boolean, Number],
|
|
323
|
+
default: false
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* @zh 是否开启虚拟滚动条
|
|
327
|
+
* @en Whether to enable virtual scroll bar
|
|
328
|
+
* @version 2.38.0
|
|
329
|
+
*/
|
|
330
|
+
scrollbar: {
|
|
331
|
+
type: [Object, Boolean],
|
|
332
|
+
default: true
|
|
333
|
+
},
|
|
334
|
+
/**
|
|
335
|
+
* @zh 是否展示空子树
|
|
336
|
+
* @en Whether to display empty subtrees
|
|
337
|
+
* @version 2.51.0
|
|
338
|
+
*/
|
|
339
|
+
showEmptyTree: {
|
|
340
|
+
type: Boolean,
|
|
341
|
+
default: false
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
emits: {
|
|
345
|
+
"update:selectedKeys": (_rowKeys) => true,
|
|
346
|
+
"update:expandedKeys": (_rowKeys) => true,
|
|
347
|
+
/**
|
|
348
|
+
* @zh 点击展开行时触发
|
|
349
|
+
* @en Triggered when a row is clicked to expand
|
|
350
|
+
* @param {string | number} rowKey
|
|
351
|
+
* @param {TableData} record
|
|
352
|
+
*/
|
|
353
|
+
"expand": (_rowKey, _record) => true,
|
|
354
|
+
/**
|
|
355
|
+
* @zh 已展开的数据行发生改变时触发
|
|
356
|
+
* @en Triggered when the expanded data row changes
|
|
357
|
+
* @param {(string | number)[]} rowKeys
|
|
358
|
+
*/
|
|
359
|
+
"expandedChange": (_rowKeys) => true,
|
|
360
|
+
/**
|
|
361
|
+
* @zh 点击行选择器时触发
|
|
362
|
+
* @en Triggered when the row selector is clicked
|
|
363
|
+
* @param {string | number[]} rowKeys
|
|
364
|
+
* @param {string | number} rowKey
|
|
365
|
+
* @param {TableData} record
|
|
366
|
+
*/
|
|
367
|
+
"select": (_rowKeys, _rowKey, _record) => true,
|
|
368
|
+
/**
|
|
369
|
+
* @zh 点击全选选择器时触发
|
|
370
|
+
* @en Triggered when the select all selector is clicked
|
|
371
|
+
* @param {boolean} checked
|
|
372
|
+
*/
|
|
373
|
+
"selectAll": (_checked) => true,
|
|
374
|
+
/**
|
|
375
|
+
* @zh 已选择的数据行发生改变时触发
|
|
376
|
+
* @en Triggered when the selected data row changes
|
|
377
|
+
* @param {(string | number)[]} rowKeys
|
|
378
|
+
*/
|
|
379
|
+
"selectionChange": (_rowKeys) => true,
|
|
380
|
+
/**
|
|
381
|
+
* @zh 排序规则发生改变时触发
|
|
382
|
+
* @en Triggered when the collation changes
|
|
383
|
+
* @param {string} dataIndex
|
|
384
|
+
* @param {string} direction
|
|
385
|
+
*/
|
|
386
|
+
"sorterChange": (_dataIndex, _direction) => true,
|
|
387
|
+
/**
|
|
388
|
+
* @zh 过滤选项发生改变时触发
|
|
389
|
+
* @en Triggered when the filter options are changed
|
|
390
|
+
* @param {string} dataIndex
|
|
391
|
+
* @param {string[]} filteredValues
|
|
392
|
+
*/
|
|
393
|
+
"filterChange": (_dataIndex, _filteredValues) => true,
|
|
394
|
+
/**
|
|
395
|
+
* @zh 表格分页发生改变时触发
|
|
396
|
+
* @en Triggered when the table pagination changes
|
|
397
|
+
* @param {number} page
|
|
398
|
+
*/
|
|
399
|
+
"pageChange": (_page) => true,
|
|
400
|
+
/**
|
|
401
|
+
* @zh 表格每页数据数量发生改变时触发
|
|
402
|
+
* @en Triggered when the number of data per page of the table changes
|
|
403
|
+
* @param {number} pageSize
|
|
404
|
+
*/
|
|
405
|
+
"pageSizeChange": (_pageSize) => true,
|
|
406
|
+
/**
|
|
407
|
+
* @zh 表格数据发生变化时触发
|
|
408
|
+
* @en Triggered when table data changes
|
|
409
|
+
* @param {TableData[]} data
|
|
410
|
+
* @param {TableChangeExtra} extra
|
|
411
|
+
* @param {TableData[]} currentData
|
|
412
|
+
* @version 2.40.0 增加 currentData
|
|
413
|
+
*/
|
|
414
|
+
"change": (_data, _extra, _currentData) => true,
|
|
415
|
+
/**
|
|
416
|
+
* @zh 单元格 hover 进入时触发
|
|
417
|
+
* @en Triggered when hovering into a cell
|
|
418
|
+
* @param {TableData} record
|
|
419
|
+
* @param {TableColumnData} column
|
|
420
|
+
* @param {Event} ev
|
|
421
|
+
*/
|
|
422
|
+
"cellMouseEnter": (_record, _column, _ev) => true,
|
|
423
|
+
/**
|
|
424
|
+
* @zh 单元格 hover 退出时触发
|
|
425
|
+
* @en Triggered when hovering out of a cell
|
|
426
|
+
* @param {TableData} record
|
|
427
|
+
* @param {TableColumnData} column
|
|
428
|
+
* @param {Event} ev
|
|
429
|
+
*/
|
|
430
|
+
"cellMouseLeave": (_record, _column, _ev) => true,
|
|
431
|
+
/**
|
|
432
|
+
* @zh 点击单元格时触发
|
|
433
|
+
* @en Triggered when a cell is clicked
|
|
434
|
+
* @param {TableData} record
|
|
435
|
+
* @param {TableColumnData} column
|
|
436
|
+
* @param {Event} ev
|
|
437
|
+
*/
|
|
438
|
+
"cellClick": (_record, _column, _ev) => true,
|
|
439
|
+
/**
|
|
440
|
+
* @zh 点击行数据时触发
|
|
441
|
+
* @en Triggered when row data is clicked
|
|
442
|
+
* @param {TableData} record
|
|
443
|
+
* @param {Event} ev
|
|
444
|
+
*/
|
|
445
|
+
"rowClick": (_record, _ev) => true,
|
|
446
|
+
/**
|
|
447
|
+
* @zh 点击表头数据时触发
|
|
448
|
+
* @en Triggered when the header data is clicked
|
|
449
|
+
* @param {TableColumnData} column
|
|
450
|
+
* @param {Event} ev
|
|
451
|
+
*/
|
|
452
|
+
"headerClick": (_column, _ev) => true,
|
|
453
|
+
/**
|
|
454
|
+
* @zh 调整列宽时触发
|
|
455
|
+
* @en Triggered when column width is adjusted
|
|
456
|
+
* @param {string} dataIndex
|
|
457
|
+
* @param {number} width
|
|
458
|
+
* @version 2.28.0
|
|
459
|
+
*/
|
|
460
|
+
"columnResize": (_dataIndex, _width) => true,
|
|
461
|
+
/**
|
|
462
|
+
* @zh 双击行数据时触发
|
|
463
|
+
* @en Triggered when row data is double clicked
|
|
464
|
+
* @param {TableData} record
|
|
465
|
+
* @param {Event} ev
|
|
466
|
+
*/
|
|
467
|
+
"rowDblclick": (_record, _ev) => true,
|
|
468
|
+
/**
|
|
469
|
+
* @zh 双击单元格时触发
|
|
470
|
+
* @en Triggered when a cell is double clicked
|
|
471
|
+
* @param {TableData} record
|
|
472
|
+
* @param {TableColumnData} column
|
|
473
|
+
* @param {Event} ev
|
|
474
|
+
*/
|
|
475
|
+
"cellDblclick": (_record, _column, _ev) => true,
|
|
476
|
+
/**
|
|
477
|
+
* @zh 右击行数据时触发
|
|
478
|
+
* @en Triggered when row data is right clicked
|
|
479
|
+
* @param {TableData} record
|
|
480
|
+
* @param {Event} ev
|
|
481
|
+
*/
|
|
482
|
+
"rowContextmenu": (_record, _ev) => true,
|
|
483
|
+
/**
|
|
484
|
+
* @zh 右击单元格时触发
|
|
485
|
+
* @en Triggered when a cell is right clicked
|
|
486
|
+
* @param {TableData} record
|
|
487
|
+
* @param {TableColumnData} column
|
|
488
|
+
* @param {Event} ev
|
|
489
|
+
*/
|
|
490
|
+
"cellContextmenu": (_record, _column, _ev) => true
|
|
491
|
+
},
|
|
492
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
493
|
+
function _isSlot(s) {
|
|
494
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
495
|
+
}
|
|
496
|
+
const getRecordKey = (record, rowKey) => isFunction(rowKey) ? rowKey(record) : record[rowKey];
|
|
497
|
+
const DEFAULT_BORDERED = {
|
|
498
|
+
wrapper: true,
|
|
499
|
+
cell: false,
|
|
500
|
+
headerCell: false,
|
|
501
|
+
bodyCell: false
|
|
502
|
+
};
|
|
503
|
+
const props = __props;
|
|
504
|
+
const emit = __emit;
|
|
505
|
+
/**
|
|
506
|
+
* @zh 表格列定义。启用时会屏蔽 columns 属性
|
|
507
|
+
* @en Table column definitions. When enabled, the columns attribute is masked
|
|
508
|
+
* @slot columns
|
|
509
|
+
*/
|
|
510
|
+
/**
|
|
511
|
+
* @zh 展开行图标
|
|
512
|
+
* @en Expand row icon
|
|
513
|
+
* @slot expand-icon
|
|
514
|
+
* @binding {boolean} expanded
|
|
515
|
+
* @binding {TableData} record
|
|
516
|
+
*/
|
|
517
|
+
/**
|
|
518
|
+
* @zh 展开行内容
|
|
519
|
+
* @en Expand row content
|
|
520
|
+
* @slot expand-row
|
|
521
|
+
* @binding {TableData} record
|
|
522
|
+
*/
|
|
523
|
+
/**
|
|
524
|
+
* @zh 表格底部
|
|
525
|
+
* @en Table Footer
|
|
526
|
+
* @slot footer
|
|
527
|
+
*/
|
|
528
|
+
/**
|
|
529
|
+
* @zh 拖拽锚点图标
|
|
530
|
+
* @en Drag handle icon
|
|
531
|
+
* @slot drag-handle-icon
|
|
532
|
+
* @version 2.16.0
|
|
533
|
+
*/
|
|
534
|
+
/**
|
|
535
|
+
* @zh 自定义 tbody 元素
|
|
536
|
+
* @en Custom tbody element
|
|
537
|
+
* @slot tbody
|
|
538
|
+
* @version 2.16.0
|
|
539
|
+
*/
|
|
540
|
+
/**
|
|
541
|
+
* @zh 自定义 tr 元素
|
|
542
|
+
* @en Custom tr element
|
|
543
|
+
* @slot tr
|
|
544
|
+
* @binding {TableData} record
|
|
545
|
+
* @binding {number} rowIndex
|
|
546
|
+
* @version 2.16.0
|
|
547
|
+
*/
|
|
548
|
+
/**
|
|
549
|
+
* @zh 自定义 td 元素
|
|
550
|
+
* @en Custom td element
|
|
551
|
+
* @slot td
|
|
552
|
+
* @binding {TableColumnData} column
|
|
553
|
+
* @binding {TableData} record
|
|
554
|
+
* @binding {number} rowIndex
|
|
555
|
+
* @version 2.16.0
|
|
556
|
+
*/
|
|
557
|
+
/**
|
|
558
|
+
* @zh 分页器左侧内容
|
|
559
|
+
* @en Content on the left side of the pagination
|
|
560
|
+
* @slot pagination-left
|
|
561
|
+
* @version 2.18.0
|
|
562
|
+
*/
|
|
563
|
+
/**
|
|
564
|
+
* @zh 分页器右侧内容
|
|
565
|
+
* @en Content on the right side of the pagination
|
|
566
|
+
* @slot pagination-right
|
|
567
|
+
* @version 2.18.0
|
|
568
|
+
*/
|
|
569
|
+
/**
|
|
570
|
+
* @zh 总结行
|
|
571
|
+
* @en Content on the right side of the pagination
|
|
572
|
+
* @slot summary-cell
|
|
573
|
+
* @binding {TableColumnData} column
|
|
574
|
+
* @binding {TableData} record
|
|
575
|
+
* @binding {number} rowIndex
|
|
576
|
+
* @version 2.23.0
|
|
577
|
+
*/
|
|
578
|
+
/**
|
|
579
|
+
* @zh 空白展示
|
|
580
|
+
* @en Empty
|
|
581
|
+
* @slot empty
|
|
582
|
+
*/
|
|
583
|
+
/**
|
|
584
|
+
* @zh 自定义 thead 元素
|
|
585
|
+
* @en Custom thead element
|
|
586
|
+
* @slot thead
|
|
587
|
+
* @version 2.26.0
|
|
588
|
+
*/
|
|
589
|
+
/**
|
|
590
|
+
* @zh 自定义 th 元素
|
|
591
|
+
* @en Custom th element
|
|
592
|
+
* @slot th
|
|
593
|
+
* @binding {TableColumnData} column
|
|
594
|
+
* @version 2.26.0
|
|
595
|
+
*/
|
|
596
|
+
const slots = useSlots();
|
|
597
|
+
const VNodeRenderer = ({ content }) => content;
|
|
598
|
+
const columns = toRef(props, "columns");
|
|
599
|
+
const rowKey = toRef(props, "rowKey");
|
|
600
|
+
const rowSelection = toRef(props, "rowSelection");
|
|
601
|
+
const expandable = toRef(props, "expandable");
|
|
602
|
+
const loadMore = toRef(props, "loadMore");
|
|
603
|
+
const filterIconAlignLeft = toRef(props, "filterIconAlignLeft");
|
|
604
|
+
const selectedKeys = toRef(props, "selectedKeys");
|
|
605
|
+
const defaultSelectedKeys = toRef(props, "defaultSelectedKeys");
|
|
606
|
+
const expandedKeys = toRef(props, "expandedKeys");
|
|
607
|
+
const defaultExpandedKeys = toRef(props, "defaultExpandedKeys");
|
|
608
|
+
const defaultExpandAllRows = toRef(props, "defaultExpandAllRows");
|
|
609
|
+
const spanMethod = toRef(props, "spanMethod");
|
|
610
|
+
const draggable = toRef(props, "draggable");
|
|
611
|
+
const summarySpanMethod = toRef(props, "summarySpanMethod");
|
|
612
|
+
const scrollbar = toRef(props, "scrollbar");
|
|
613
|
+
const showEmptyTree = toRef(props, "showEmptyTree");
|
|
614
|
+
const prefixCls = getPrefixCls("table");
|
|
615
|
+
const virtualListPrefixCls = getPrefixCls("virtual-list");
|
|
616
|
+
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
617
|
+
const bordered = computed(() => {
|
|
618
|
+
if (isObject(props.bordered)) return _objectSpread2(_objectSpread2({}, DEFAULT_BORDERED), props.bordered);
|
|
619
|
+
return _objectSpread2(_objectSpread2({}, DEFAULT_BORDERED), {}, { wrapper: props.bordered });
|
|
620
|
+
});
|
|
621
|
+
const { children, components: columnComponents } = useChildrenComponents("TableColumn");
|
|
622
|
+
const checkStrictly = computed(() => {
|
|
623
|
+
var _rowSelection$value$c, _rowSelection$value;
|
|
624
|
+
return (_rowSelection$value$c = (_rowSelection$value = rowSelection.value) === null || _rowSelection$value === void 0 ? void 0 : _rowSelection$value.checkStrictly) !== null && _rowSelection$value$c !== void 0 ? _rowSelection$value$c : true;
|
|
625
|
+
});
|
|
626
|
+
const { scrollbarProps } = useScrollbar(scrollbar);
|
|
627
|
+
const displayScrollbar = computed(() => scrollbar.value !== false);
|
|
628
|
+
const isScroll = computed(() => {
|
|
629
|
+
var _props$scroll, _props$scroll2, _props$scroll3, _props$scroll4;
|
|
630
|
+
return {
|
|
631
|
+
x: Boolean(((_props$scroll = props.scroll) === null || _props$scroll === void 0 ? void 0 : _props$scroll.x) || ((_props$scroll2 = props.scroll) === null || _props$scroll2 === void 0 ? void 0 : _props$scroll2.minWidth)),
|
|
632
|
+
y: Boolean(((_props$scroll3 = props.scroll) === null || _props$scroll3 === void 0 ? void 0 : _props$scroll3.y) || ((_props$scroll4 = props.scroll) === null || _props$scroll4 === void 0 ? void 0 : _props$scroll4.maxHeight))
|
|
633
|
+
};
|
|
634
|
+
});
|
|
635
|
+
const summaryRef = ref();
|
|
636
|
+
const thRefs = ref({});
|
|
637
|
+
const virtualListRef = ref(null);
|
|
638
|
+
const { componentRef: contentComRef, elementRef: contentRef } = useComponentRef("containerRef");
|
|
639
|
+
const { componentRef: tbodyComRef, elementRef: tbodyRef } = useComponentRef("containerRef");
|
|
640
|
+
const { elementRef: virtualRef } = useComponentRef("viewportRef");
|
|
641
|
+
const { componentRef: theadComRef, elementRef: theadRef } = useComponentRef("containerRef");
|
|
642
|
+
const containerElement = computed(() => {
|
|
643
|
+
if (splitTable.value) {
|
|
644
|
+
if (isVirtualList.value) return virtualRef.value;
|
|
645
|
+
return tbodyRef.value;
|
|
646
|
+
}
|
|
647
|
+
return contentRef.value;
|
|
648
|
+
});
|
|
649
|
+
const splitTable = computed(() => isScroll.value.y || props.stickyHeader !== false || isVirtualList.value || isScroll.value.x && flattenData.value.length === 0);
|
|
650
|
+
const slotColumnMap = reactive(/* @__PURE__ */ new Map());
|
|
651
|
+
const slotColumns = ref();
|
|
652
|
+
watch([columnComponents, slotColumnMap], ([componentIds, slotColumnMap]) => {
|
|
653
|
+
if (componentIds.length > 0) {
|
|
654
|
+
const columns = [];
|
|
655
|
+
componentIds.forEach((id) => {
|
|
656
|
+
const column = slotColumnMap.get(id);
|
|
657
|
+
if (column) columns.push(column);
|
|
658
|
+
});
|
|
659
|
+
slotColumns.value = columns;
|
|
660
|
+
} else slotColumns.value = void 0;
|
|
661
|
+
});
|
|
662
|
+
const dataColumnMap = /* @__PURE__ */ new Map();
|
|
663
|
+
const dataColumns = ref([]);
|
|
664
|
+
const groupColumns = ref([]);
|
|
665
|
+
const { resizingColumn, columnWidth, handleThMouseDown } = useColumnResize(thRefs, emit);
|
|
666
|
+
watch([
|
|
667
|
+
columns,
|
|
668
|
+
slotColumns,
|
|
669
|
+
columnWidth
|
|
670
|
+
], ([columns, slotColumns]) => {
|
|
671
|
+
var _ref;
|
|
672
|
+
const result = getGroupColumns((_ref = slotColumns !== null && slotColumns !== void 0 ? slotColumns : columns) !== null && _ref !== void 0 ? _ref : [], dataColumnMap, columnWidth);
|
|
673
|
+
dataColumns.value = result.dataColumns;
|
|
674
|
+
groupColumns.value = result.groupColumns;
|
|
675
|
+
}, {
|
|
676
|
+
immediate: true,
|
|
677
|
+
deep: true
|
|
678
|
+
});
|
|
679
|
+
const isPaginationTop = computed(() => [
|
|
680
|
+
"tl",
|
|
681
|
+
"top",
|
|
682
|
+
"tr"
|
|
683
|
+
].includes(props.pagePosition));
|
|
684
|
+
const hasLeftFixedColumn = ref(false);
|
|
685
|
+
const hasRightFixedColumn = ref(false);
|
|
686
|
+
const hasLeftFixedDataColumns = ref(false);
|
|
687
|
+
watchEffect(() => {
|
|
688
|
+
var _props$rowSelection, _props$expandable, _props$draggable;
|
|
689
|
+
let _hasLeftFixedColumn = false;
|
|
690
|
+
let _hasRightFixedColumn = false;
|
|
691
|
+
let _hasLeftFixedDataColumns = false;
|
|
692
|
+
if (((_props$rowSelection = props.rowSelection) === null || _props$rowSelection === void 0 ? void 0 : _props$rowSelection.fixed) || ((_props$expandable = props.expandable) === null || _props$expandable === void 0 ? void 0 : _props$expandable.fixed) || ((_props$draggable = props.draggable) === null || _props$draggable === void 0 ? void 0 : _props$draggable.fixed)) _hasLeftFixedColumn = true;
|
|
693
|
+
for (const column of dataColumns.value) if (column.fixed === "left") {
|
|
694
|
+
_hasLeftFixedColumn = true;
|
|
695
|
+
_hasLeftFixedDataColumns = true;
|
|
696
|
+
} else if (column.fixed === "right") _hasRightFixedColumn = true;
|
|
697
|
+
if (_hasLeftFixedColumn !== hasLeftFixedColumn.value) hasLeftFixedColumn.value = _hasLeftFixedColumn;
|
|
698
|
+
if (_hasRightFixedColumn !== hasRightFixedColumn.value) hasRightFixedColumn.value = _hasRightFixedColumn;
|
|
699
|
+
if (_hasLeftFixedDataColumns !== hasLeftFixedDataColumns.value) hasLeftFixedDataColumns.value = _hasLeftFixedDataColumns;
|
|
700
|
+
});
|
|
701
|
+
const hasEllipsis = computed(() => {
|
|
702
|
+
for (const col of dataColumns.value) if (col.ellipsis) return true;
|
|
703
|
+
return false;
|
|
704
|
+
});
|
|
705
|
+
const handleChange = (type) => {
|
|
706
|
+
const extra = {
|
|
707
|
+
type,
|
|
708
|
+
page: page.value,
|
|
709
|
+
pageSize: pageSize.value,
|
|
710
|
+
sorter: computedSorter.value,
|
|
711
|
+
filters: computedFilters.value,
|
|
712
|
+
dragTarget: type === "drag" ? dragState.data : void 0
|
|
713
|
+
};
|
|
714
|
+
emit("change", flattenRawData.value, extra, sortedData.value);
|
|
715
|
+
};
|
|
716
|
+
const handleFilterChange = (dataIndex, filteredValues) => {
|
|
717
|
+
_filters.value = _objectSpread2(_objectSpread2({}, computedFilters.value), {}, { [dataIndex]: filteredValues });
|
|
718
|
+
emit("filterChange", dataIndex, filteredValues);
|
|
719
|
+
handleChange("filter");
|
|
720
|
+
};
|
|
721
|
+
const handleSorterChange = (dataIndex, direction) => {
|
|
722
|
+
_sorter.value = direction ? {
|
|
723
|
+
field: dataIndex,
|
|
724
|
+
direction
|
|
725
|
+
} : void 0;
|
|
726
|
+
emit("sorterChange", dataIndex, direction);
|
|
727
|
+
handleChange("sorter");
|
|
728
|
+
};
|
|
729
|
+
const { _filters, computedFilters, resetFilters, clearFilters } = useFilter({
|
|
730
|
+
columns: dataColumns,
|
|
731
|
+
onFilterChange: handleFilterChange
|
|
732
|
+
});
|
|
733
|
+
const { _sorter, computedSorter, resetSorters, clearSorters } = useSorter({
|
|
734
|
+
columns: dataColumns,
|
|
735
|
+
onSorterChange: handleSorterChange
|
|
736
|
+
});
|
|
737
|
+
const disabledKeys = /* @__PURE__ */ new Set();
|
|
738
|
+
const allRowKeys = computed(() => {
|
|
739
|
+
const allRowKeys = [];
|
|
740
|
+
disabledKeys.clear();
|
|
741
|
+
const travelData = (data) => {
|
|
742
|
+
if (isArray(data) && data.length > 0) for (const record of data) {
|
|
743
|
+
allRowKeys.push(getRecordKey(record, rowKey.value));
|
|
744
|
+
if (record.disabled) disabledKeys.add(getRecordKey(record, rowKey.value));
|
|
745
|
+
if (record.children) travelData(record.children);
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
travelData(props.data);
|
|
749
|
+
return allRowKeys;
|
|
750
|
+
});
|
|
751
|
+
const currentAllRowKeys = computed(() => {
|
|
752
|
+
const keys = [];
|
|
753
|
+
const travel = (data) => {
|
|
754
|
+
for (const record of data) {
|
|
755
|
+
keys.push(record.key);
|
|
756
|
+
if (record.children) travel(record.children);
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
travel(flattenData.value);
|
|
760
|
+
return keys;
|
|
761
|
+
});
|
|
762
|
+
const currentAllEnabledRowKeys = computed(() => {
|
|
763
|
+
const keys = [];
|
|
764
|
+
const travel = (data) => {
|
|
765
|
+
for (const record of data) {
|
|
766
|
+
if (!record.disabled) keys.push(record.key);
|
|
767
|
+
if (record.children) travel(record.children);
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
travel(flattenData.value);
|
|
771
|
+
return keys;
|
|
772
|
+
});
|
|
773
|
+
const { selectedRowKeys, currentSelectedRowKeys, handleSelect, handleSelectAllLeafs, handleSelectAll, select, selectAll, clearSelected } = useRowSelection({
|
|
774
|
+
selectedKeys,
|
|
775
|
+
defaultSelectedKeys,
|
|
776
|
+
rowSelection,
|
|
777
|
+
currentAllRowKeys,
|
|
778
|
+
currentAllEnabledRowKeys,
|
|
779
|
+
emit
|
|
780
|
+
});
|
|
781
|
+
const { expandedRowKeys, handleExpand, expand, expandAll } = useExpand({
|
|
782
|
+
expandedKeys,
|
|
783
|
+
defaultExpandedKeys,
|
|
784
|
+
defaultExpandAllRows,
|
|
785
|
+
expandable,
|
|
786
|
+
allRowKeys,
|
|
787
|
+
emit
|
|
788
|
+
});
|
|
789
|
+
const lazyLoadData = reactive({});
|
|
790
|
+
const addLazyLoadData = (children, record) => {
|
|
791
|
+
if (children) lazyLoadData[record.key] = children;
|
|
792
|
+
};
|
|
793
|
+
const isValidRecord = (record) => {
|
|
794
|
+
for (const field of Object.keys(computedFilters.value)) {
|
|
795
|
+
var _column$filterable;
|
|
796
|
+
const filteredValues = computedFilters.value[field];
|
|
797
|
+
const column = dataColumnMap.get(field);
|
|
798
|
+
if (column && ((_column$filterable = column.filterable) === null || _column$filterable === void 0 ? void 0 : _column$filterable.filter) && filteredValues.length > 0) {
|
|
799
|
+
var _column$filterable2;
|
|
800
|
+
const result = (_column$filterable2 = column.filterable) === null || _column$filterable2 === void 0 ? void 0 : _column$filterable2.filter(filteredValues, record.raw);
|
|
801
|
+
if (!result) return result;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
return true;
|
|
805
|
+
};
|
|
806
|
+
const { dragType, dragState, handleDragStart, handleDragEnter, handleDragover, handleDragEnd, handleDrop } = useDrag(draggable);
|
|
807
|
+
const processedData = computed(() => {
|
|
808
|
+
var _props$data;
|
|
809
|
+
const travel = (data) => {
|
|
810
|
+
const result = [];
|
|
811
|
+
for (const _record of data) {
|
|
812
|
+
const record = {
|
|
813
|
+
raw: _record,
|
|
814
|
+
key: getRecordKey(_record, props.rowKey),
|
|
815
|
+
disabled: _record.disabled,
|
|
816
|
+
expand: _record.expand,
|
|
817
|
+
isLeaf: _record.isLeaf
|
|
818
|
+
};
|
|
819
|
+
if (_record.children) {
|
|
820
|
+
record.isLeaf = false;
|
|
821
|
+
record.children = travel(_record.children);
|
|
822
|
+
} else if (props.loadMore && !_record.isLeaf) {
|
|
823
|
+
record.isLeaf = false;
|
|
824
|
+
if (lazyLoadData[record.key]) record.children = travel(lazyLoadData[record.key]);
|
|
825
|
+
} else record.isLeaf = true;
|
|
826
|
+
record.hasSubtree = Boolean(record.children ? props.hideExpandButtonOnEmpty ? record.children.length > 0 : true : props.loadMore && !record.isLeaf);
|
|
827
|
+
result.push(record);
|
|
828
|
+
}
|
|
829
|
+
return result;
|
|
830
|
+
};
|
|
831
|
+
return travel((_props$data = props.data) !== null && _props$data !== void 0 ? _props$data : []);
|
|
832
|
+
});
|
|
833
|
+
const validData = computed(() => {
|
|
834
|
+
const travel = (data) => data.filter((record) => {
|
|
835
|
+
if (isValidRecord(record)) {
|
|
836
|
+
if (record.children) record.children = travel(record.children);
|
|
837
|
+
return true;
|
|
838
|
+
}
|
|
839
|
+
return false;
|
|
840
|
+
});
|
|
841
|
+
return Object.keys(computedFilters.value).length > 0 ? travel(processedData.value) : processedData.value;
|
|
842
|
+
});
|
|
843
|
+
const sortedData = computed(() => {
|
|
844
|
+
const data = mapArrayWithChildren(validData.value);
|
|
845
|
+
if (data.length > 0) {
|
|
846
|
+
var _computedSorter$value;
|
|
847
|
+
if ((_computedSorter$value = computedSorter.value) === null || _computedSorter$value === void 0 ? void 0 : _computedSorter$value.field) {
|
|
848
|
+
var _column$sortable;
|
|
849
|
+
const column = dataColumnMap.get(computedSorter.value.field);
|
|
850
|
+
if (column && ((_column$sortable = column.sortable) === null || _column$sortable === void 0 ? void 0 : _column$sortable.sorter) !== true) {
|
|
851
|
+
const { field, direction } = computedSorter.value;
|
|
852
|
+
data.sort((a, b) => {
|
|
853
|
+
var _column$sortable2;
|
|
854
|
+
const valueA = getValueByPath(a.raw, field);
|
|
855
|
+
const valueB = getValueByPath(b.raw, field);
|
|
856
|
+
if (((_column$sortable2 = column.sortable) === null || _column$sortable2 === void 0 ? void 0 : _column$sortable2.sorter) && isFunction(column.sortable.sorter)) return column.sortable.sorter(a.raw, b.raw, {
|
|
857
|
+
dataIndex: field,
|
|
858
|
+
direction
|
|
859
|
+
});
|
|
860
|
+
if (valueA === void 0 || valueB === void 0) return 0;
|
|
861
|
+
const result = valueA > valueB ? 1 : -1;
|
|
862
|
+
return direction === "descend" ? -result : result;
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
const { sourcePath, targetPath } = dragState;
|
|
867
|
+
if (dragState.dragging && targetPath.length && targetPath.toString() !== sourcePath.toString()) {
|
|
868
|
+
if (sourcePath.length === targetPath.length && sourcePath.slice(0, -1).toString() === targetPath.slice(0, -1).toString()) {
|
|
869
|
+
let children = data;
|
|
870
|
+
for (let i = 0; i < sourcePath.length; i++) {
|
|
871
|
+
const sourceIndex = sourcePath[i];
|
|
872
|
+
if (i >= sourcePath.length - 1) {
|
|
873
|
+
const sourceChild = children[sourceIndex];
|
|
874
|
+
const targetIndex = targetPath[i];
|
|
875
|
+
if (targetIndex > sourceIndex) {
|
|
876
|
+
children.splice(targetIndex + 1, 0, sourceChild);
|
|
877
|
+
children.splice(sourceIndex, 1);
|
|
878
|
+
} else {
|
|
879
|
+
children.splice(targetIndex, 0, sourceChild);
|
|
880
|
+
children.splice(sourceIndex + 1, 1);
|
|
881
|
+
}
|
|
882
|
+
} else {
|
|
883
|
+
var _children$sourceIndex;
|
|
884
|
+
children = (_children$sourceIndex = children[sourceIndex].children) !== null && _children$sourceIndex !== void 0 ? _children$sourceIndex : [];
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
return data;
|
|
891
|
+
});
|
|
892
|
+
const { page, pageSize, handlePageChange, handlePageSizeChange } = usePagination(props, emit);
|
|
893
|
+
const onlyCurrent = computed(() => {
|
|
894
|
+
var _rowSelection$value$o, _rowSelection$value2;
|
|
895
|
+
return (_rowSelection$value$o = (_rowSelection$value2 = rowSelection.value) === null || _rowSelection$value2 === void 0 ? void 0 : _rowSelection$value2.onlyCurrent) !== null && _rowSelection$value$o !== void 0 ? _rowSelection$value$o : false;
|
|
896
|
+
});
|
|
897
|
+
watch(page, (cur, pre) => {
|
|
898
|
+
if (cur !== pre && onlyCurrent.value) clearSelected();
|
|
899
|
+
});
|
|
900
|
+
const flattenData = computed(() => {
|
|
901
|
+
if (props.pagination && sortedData.value.length > pageSize.value) return sortedData.value.slice((page.value - 1) * pageSize.value, page.value * pageSize.value);
|
|
902
|
+
return sortedData.value;
|
|
903
|
+
});
|
|
904
|
+
const flattenRawData = computed(() => mapRawTableData(flattenData.value));
|
|
905
|
+
const getSummaryData = () => {
|
|
906
|
+
return dataColumns.value.reduce((per, column, index) => {
|
|
907
|
+
if (column.dataIndex) if (index === 0) setValueByPath(per, column.dataIndex, props.summaryText, { addPath: true });
|
|
908
|
+
else {
|
|
909
|
+
let count = 0;
|
|
910
|
+
let isNotNumber = false;
|
|
911
|
+
flattenData.value.forEach((data) => {
|
|
912
|
+
if (column.dataIndex) {
|
|
913
|
+
const _number = getValueByPath(data.raw, column.dataIndex);
|
|
914
|
+
if (isNumber(_number)) count += _number;
|
|
915
|
+
else if (!isUndefined(_number) && !isNull(_number)) isNotNumber = true;
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
setValueByPath(per, column.dataIndex, isNotNumber ? "" : count, { addPath: true });
|
|
919
|
+
}
|
|
920
|
+
return per;
|
|
921
|
+
}, {});
|
|
922
|
+
};
|
|
923
|
+
const getTableDataWithRaw = (data) => {
|
|
924
|
+
if (data && data.length > 0) return data.map((raw) => {
|
|
925
|
+
return {
|
|
926
|
+
raw,
|
|
927
|
+
key: getRecordKey(raw, props.rowKey)
|
|
928
|
+
};
|
|
929
|
+
});
|
|
930
|
+
return [];
|
|
931
|
+
};
|
|
932
|
+
const summaryData = computed(() => {
|
|
933
|
+
if (props.summary) {
|
|
934
|
+
if (isFunction(props.summary)) return getTableDataWithRaw(props.summary({
|
|
935
|
+
columns: dataColumns.value,
|
|
936
|
+
data: flattenRawData.value
|
|
937
|
+
}));
|
|
938
|
+
return getTableDataWithRaw([getSummaryData()]);
|
|
939
|
+
}
|
|
940
|
+
return [];
|
|
941
|
+
});
|
|
942
|
+
const containerScrollLeft = ref(0);
|
|
943
|
+
const alignLeft = ref(true);
|
|
944
|
+
const alignRight = ref(true);
|
|
945
|
+
const setAlignPosition = () => {
|
|
946
|
+
let _alignLeft = true;
|
|
947
|
+
let _alignRight = true;
|
|
948
|
+
const scrollContainer = containerElement.value;
|
|
949
|
+
if (scrollContainer) {
|
|
950
|
+
_alignLeft = containerScrollLeft.value === 0;
|
|
951
|
+
_alignRight = Math.ceil(containerScrollLeft.value + scrollContainer.offsetWidth) >= scrollContainer.scrollWidth;
|
|
952
|
+
}
|
|
953
|
+
if (_alignLeft !== alignLeft.value) alignLeft.value = _alignLeft;
|
|
954
|
+
if (_alignRight !== alignRight.value) alignRight.value = _alignRight;
|
|
955
|
+
};
|
|
956
|
+
const getTableScrollCls = () => {
|
|
957
|
+
if (alignLeft.value && alignRight.value) return `${prefixCls}-scroll-position-both`;
|
|
958
|
+
if (alignLeft.value) return `${prefixCls}-scroll-position-left`;
|
|
959
|
+
if (alignRight.value) return `${prefixCls}-scroll-position-right`;
|
|
960
|
+
return `${prefixCls}-scroll-position-middle`;
|
|
961
|
+
};
|
|
962
|
+
const getTableFixedCls = () => {
|
|
963
|
+
const cls = [];
|
|
964
|
+
if (hasLeftFixedColumn.value) cls.push(`${prefixCls}-has-fixed-col-left`);
|
|
965
|
+
if (hasRightFixedColumn.value) cls.push(`${prefixCls}-has-fixed-col-right`);
|
|
966
|
+
return cls;
|
|
967
|
+
};
|
|
968
|
+
const handleScroll = (e) => {
|
|
969
|
+
if (e.target.scrollLeft !== containerScrollLeft.value) containerScrollLeft.value = e.target.scrollLeft;
|
|
970
|
+
setAlignPosition();
|
|
971
|
+
};
|
|
972
|
+
const onTbodyScroll = (e) => {
|
|
973
|
+
handleScroll(e);
|
|
974
|
+
const { scrollLeft } = e.target;
|
|
975
|
+
if (theadRef.value) theadRef.value.scrollLeft = scrollLeft;
|
|
976
|
+
if (summaryRef.value) summaryRef.value.scrollLeft = scrollLeft;
|
|
977
|
+
};
|
|
978
|
+
const handleRowClick = (record, ev) => {
|
|
979
|
+
emit("rowClick", record.raw, ev);
|
|
980
|
+
};
|
|
981
|
+
const handleRowDblclick = (record, ev) => {
|
|
982
|
+
emit("rowDblclick", record.raw, ev);
|
|
983
|
+
};
|
|
984
|
+
const handleRowContextMenu = (record, ev) => {
|
|
985
|
+
emit("rowContextmenu", record.raw, ev);
|
|
986
|
+
};
|
|
987
|
+
const handleCellClick = (record, column, ev) => {
|
|
988
|
+
emit("cellClick", record.raw, column, ev);
|
|
989
|
+
};
|
|
990
|
+
const handleCellMouseEnter = debounce((record, column, ev) => {
|
|
991
|
+
emit("cellMouseEnter", record.raw, column, ev);
|
|
992
|
+
}, 30);
|
|
993
|
+
const handleCellMouseLeave = debounce((record, column, ev) => {
|
|
994
|
+
emit("cellMouseLeave", record.raw, column, ev);
|
|
995
|
+
}, 30);
|
|
996
|
+
const handleCellDblclick = (record, column, ev) => {
|
|
997
|
+
emit("cellDblclick", record.raw, column, ev);
|
|
998
|
+
};
|
|
999
|
+
const handleCellContextmenu = (record, column, ev) => {
|
|
1000
|
+
emit("cellContextmenu", record.raw, column, ev);
|
|
1001
|
+
};
|
|
1002
|
+
const handleHeaderClick = (column, ev) => {
|
|
1003
|
+
emit("headerClick", column, ev);
|
|
1004
|
+
};
|
|
1005
|
+
const operations = computed(() => {
|
|
1006
|
+
var _props$draggable2, _props$components;
|
|
1007
|
+
const operations = [];
|
|
1008
|
+
const hasFixedColumn = hasLeftFixedColumn.value || hasRightFixedColumn.value;
|
|
1009
|
+
let dragHandle;
|
|
1010
|
+
let expand;
|
|
1011
|
+
let selection;
|
|
1012
|
+
if (((_props$draggable2 = props.draggable) === null || _props$draggable2 === void 0 ? void 0 : _props$draggable2.type) === "handle") {
|
|
1013
|
+
dragHandle = {
|
|
1014
|
+
name: "drag-handle",
|
|
1015
|
+
title: props.draggable.title,
|
|
1016
|
+
width: props.draggable.width,
|
|
1017
|
+
fixed: props.draggable.fixed || hasFixedColumn
|
|
1018
|
+
};
|
|
1019
|
+
operations.push(dragHandle);
|
|
1020
|
+
}
|
|
1021
|
+
if (props.expandable) {
|
|
1022
|
+
expand = {
|
|
1023
|
+
name: "expand",
|
|
1024
|
+
title: props.expandable.title,
|
|
1025
|
+
width: props.expandable.width,
|
|
1026
|
+
fixed: props.expandable.fixed || hasFixedColumn
|
|
1027
|
+
};
|
|
1028
|
+
operations.push(expand);
|
|
1029
|
+
}
|
|
1030
|
+
if (props.rowSelection) {
|
|
1031
|
+
selection = {
|
|
1032
|
+
name: props.rowSelection.type === "radio" ? "selection-radio" : "selection-checkbox",
|
|
1033
|
+
title: props.rowSelection.title,
|
|
1034
|
+
width: props.rowSelection.width,
|
|
1035
|
+
fixed: props.rowSelection.fixed || hasFixedColumn
|
|
1036
|
+
};
|
|
1037
|
+
operations.push(selection);
|
|
1038
|
+
}
|
|
1039
|
+
if (!hasLeftFixedDataColumns.value && operations.length > 0 && operations[operations.length - 1].fixed) operations[operations.length - 1].isLastLeftFixed = true;
|
|
1040
|
+
const operationsFn = (_props$components = props.components) === null || _props$components === void 0 ? void 0 : _props$components.operations;
|
|
1041
|
+
return isFunction(operationsFn) ? operationsFn({
|
|
1042
|
+
dragHandle,
|
|
1043
|
+
expand,
|
|
1044
|
+
selection
|
|
1045
|
+
}) : operations;
|
|
1046
|
+
});
|
|
1047
|
+
const tableGridTemplate = computed(() => getTableGridTemplate(dataColumns.value, operations.value, columnWidth));
|
|
1048
|
+
const getTableElementStyle = (base) => _objectSpread2(_objectSpread2({}, base), {}, { "--sd-table-grid-template": tableGridTemplate.value });
|
|
1049
|
+
const headerStyle = computed(() => {
|
|
1050
|
+
if (isScroll.value.x) {
|
|
1051
|
+
var _props$scroll5, _props$scroll6, _props$scroll7, _props$scroll8;
|
|
1052
|
+
const style = { width: isNumber((_props$scroll5 = props.scroll) === null || _props$scroll5 === void 0 ? void 0 : _props$scroll5.x) ? `${(_props$scroll6 = props.scroll) === null || _props$scroll6 === void 0 ? void 0 : _props$scroll6.x}px` : (_props$scroll7 = props.scroll) === null || _props$scroll7 === void 0 ? void 0 : _props$scroll7.x };
|
|
1053
|
+
if ((_props$scroll8 = props.scroll) === null || _props$scroll8 === void 0 ? void 0 : _props$scroll8.minWidth) style.minWidth = isNumber(props.scroll.minWidth) ? `${props.scroll.minWidth}px` : props.scroll.minWidth;
|
|
1054
|
+
return getTableElementStyle(style);
|
|
1055
|
+
}
|
|
1056
|
+
return getTableElementStyle();
|
|
1057
|
+
});
|
|
1058
|
+
const contentStyle = computed(() => {
|
|
1059
|
+
if (isScroll.value.x && flattenData.value.length > 0) {
|
|
1060
|
+
var _props$scroll9, _props$scroll10, _props$scroll11, _props$scroll12;
|
|
1061
|
+
const style = { width: isNumber((_props$scroll9 = props.scroll) === null || _props$scroll9 === void 0 ? void 0 : _props$scroll9.x) ? `${(_props$scroll10 = props.scroll) === null || _props$scroll10 === void 0 ? void 0 : _props$scroll10.x}px` : (_props$scroll11 = props.scroll) === null || _props$scroll11 === void 0 ? void 0 : _props$scroll11.x };
|
|
1062
|
+
if ((_props$scroll12 = props.scroll) === null || _props$scroll12 === void 0 ? void 0 : _props$scroll12.minWidth) style.minWidth = isNumber(props.scroll.minWidth) ? `${props.scroll.minWidth}px` : props.scroll.minWidth;
|
|
1063
|
+
return getTableElementStyle(style);
|
|
1064
|
+
}
|
|
1065
|
+
return getTableElementStyle();
|
|
1066
|
+
});
|
|
1067
|
+
const addColumn = (id, column) => {
|
|
1068
|
+
slotColumnMap.set(id, column);
|
|
1069
|
+
};
|
|
1070
|
+
const removeColumn = (id) => {
|
|
1071
|
+
slotColumnMap.delete(id);
|
|
1072
|
+
};
|
|
1073
|
+
provide(tableInjectionKey, reactive({
|
|
1074
|
+
loadMore,
|
|
1075
|
+
addLazyLoadData,
|
|
1076
|
+
slots,
|
|
1077
|
+
sorter: computedSorter,
|
|
1078
|
+
filters: computedFilters,
|
|
1079
|
+
filterIconAlignLeft,
|
|
1080
|
+
resizingColumn,
|
|
1081
|
+
checkStrictly,
|
|
1082
|
+
currentAllEnabledRowKeys,
|
|
1083
|
+
currentSelectedRowKeys,
|
|
1084
|
+
addColumn,
|
|
1085
|
+
removeColumn,
|
|
1086
|
+
onSelectAll: handleSelectAll,
|
|
1087
|
+
onSelect: handleSelect,
|
|
1088
|
+
onSelectAllLeafs: handleSelectAllLeafs,
|
|
1089
|
+
onSorterChange: handleSorterChange,
|
|
1090
|
+
onFilterChange: handleFilterChange,
|
|
1091
|
+
onThMouseDown: handleThMouseDown
|
|
1092
|
+
}));
|
|
1093
|
+
const cls = computed(() => [
|
|
1094
|
+
prefixCls,
|
|
1095
|
+
`${prefixCls}-size-${props.size}`,
|
|
1096
|
+
{
|
|
1097
|
+
[`${prefixCls}-border`]: bordered.value.wrapper,
|
|
1098
|
+
[`${prefixCls}-border-cell`]: bordered.value.cell,
|
|
1099
|
+
[`${prefixCls}-border-header-cell`]: !bordered.value.cell && bordered.value.headerCell,
|
|
1100
|
+
[`${prefixCls}-border-body-cell`]: !bordered.value.cell && bordered.value.bodyCell,
|
|
1101
|
+
[`${prefixCls}-stripe`]: props.stripe,
|
|
1102
|
+
[`${prefixCls}-hover`]: props.hoverable,
|
|
1103
|
+
[`${prefixCls}-dragging`]: dragState.dragging,
|
|
1104
|
+
[`${prefixCls}-type-selection`]: Boolean(props.rowSelection),
|
|
1105
|
+
[`${prefixCls}-empty`]: props.data && flattenData.value.length === 0,
|
|
1106
|
+
[`${prefixCls}-layout-fixed`]: props.tableLayoutFixed || isScroll.value.x || splitTable.value || hasEllipsis.value
|
|
1107
|
+
}
|
|
1108
|
+
]);
|
|
1109
|
+
const paginationCls = computed(() => [`${prefixCls}-pagination`, {
|
|
1110
|
+
[`${prefixCls}-pagination-left`]: props.pagePosition === "tl" || props.pagePosition === "bl",
|
|
1111
|
+
[`${prefixCls}-pagination-center`]: props.pagePosition === "top" || props.pagePosition === "bottom",
|
|
1112
|
+
[`${prefixCls}-pagination-right`]: props.pagePosition === "tr" || props.pagePosition === "br",
|
|
1113
|
+
[`${prefixCls}-pagination-top`]: isPaginationTop.value
|
|
1114
|
+
}]);
|
|
1115
|
+
const tableCls = computed(() => {
|
|
1116
|
+
const cls = getTableFixedCls();
|
|
1117
|
+
if (isScroll.value.x) cls.push(getTableScrollCls());
|
|
1118
|
+
if (splitTable.value) cls.push(`${prefixCls}-scroll-y`);
|
|
1119
|
+
return cls;
|
|
1120
|
+
});
|
|
1121
|
+
const tableVirtualListProps = computed(() => {
|
|
1122
|
+
if (!props.virtualListProps) return {};
|
|
1123
|
+
const _props$virtualListPro = props.virtualListProps, { items: _items, data: _data, keyField: _keyField, itemKey: _itemKey, listTag: _listTag, itemTag: _itemTag, listClass: _listClass, itemClass: _itemClass, listAttrs: _listAttrs, listStyle: _listStyle, contentWrapperAttrs: _contentWrapperAttrs, contentAttrs: _contentAttrs, component: _component, paddingPosition: _paddingPosition, isStaticItemHeight, fixedSize } = _props$virtualListPro, rest = _objectWithoutProperties(_props$virtualListPro, _excluded);
|
|
1124
|
+
return _objectSpread2(_objectSpread2({ prerender: 20 }, rest), {}, { fixedSize: fixedSize !== null && fixedSize !== void 0 ? fixedSize : isStaticItemHeight });
|
|
1125
|
+
});
|
|
1126
|
+
const isVirtualList = computed(() => Boolean(props.virtualListProps));
|
|
1127
|
+
const thWidth = ref({});
|
|
1128
|
+
const getThWidth = () => {
|
|
1129
|
+
const width = {};
|
|
1130
|
+
for (const key of Object.keys(thRefs.value)) width[key] = thRefs.value[key].offsetWidth;
|
|
1131
|
+
thWidth.value = width;
|
|
1132
|
+
};
|
|
1133
|
+
const hasScrollBar = ref(false);
|
|
1134
|
+
const isTbodyHasScrollBar = () => {
|
|
1135
|
+
if (tbodyRef.value) return tbodyRef.value.offsetWidth > tbodyRef.value.clientWidth;
|
|
1136
|
+
return false;
|
|
1137
|
+
};
|
|
1138
|
+
const handleTbodyResize = () => {
|
|
1139
|
+
const _hasScrollBar = isTbodyHasScrollBar();
|
|
1140
|
+
if (hasScrollBar.value !== _hasScrollBar) hasScrollBar.value = _hasScrollBar;
|
|
1141
|
+
setAlignPosition();
|
|
1142
|
+
getThWidth();
|
|
1143
|
+
};
|
|
1144
|
+
onMounted(() => {
|
|
1145
|
+
hasScrollBar.value = isTbodyHasScrollBar();
|
|
1146
|
+
getThWidth();
|
|
1147
|
+
});
|
|
1148
|
+
const mergedSpinProps = computed(() => _objectSpread2(_objectSpread2(_objectSpread2({}, configCtx === null || configCtx === void 0 ? void 0 : configCtx.tableSpinProps), props.spinProps), isObject(props.loading) ? props.loading : { loading: props.loading }));
|
|
1149
|
+
const renderEmpty = () => {
|
|
1150
|
+
return createVNode(table_tr_default, { empty: true }, { default: () => [createVNode(table_td_default, { colSpan: dataColumns.value.length + operations.value.length }, { default: () => {
|
|
1151
|
+
var _ref2, _slots$empty, _slots$empty2, _configCtx$slots, _configCtx$slots$empt;
|
|
1152
|
+
return [(_ref2 = (_slots$empty = (_slots$empty2 = slots.empty) === null || _slots$empty2 === void 0 ? void 0 : _slots$empty2.call(slots)) !== null && _slots$empty !== void 0 ? _slots$empty : configCtx === null || configCtx === void 0 || (_configCtx$slots$empt = (_configCtx$slots = configCtx.slots).empty) === null || _configCtx$slots$empt === void 0 ? void 0 : _configCtx$slots$empt.call(_configCtx$slots, { component: "table" })) !== null && _ref2 !== void 0 ? _ref2 : createVNode(Empty, null, null)];
|
|
1153
|
+
} })] });
|
|
1154
|
+
};
|
|
1155
|
+
const renderExpandContent = (record) => {
|
|
1156
|
+
var _props$expandable2;
|
|
1157
|
+
if (record.expand) return isFunction(record.expand) ? record.expand() : record.expand;
|
|
1158
|
+
if (slots["expand-row"]) return slots["expand-row"]({ record: record.raw });
|
|
1159
|
+
if ((_props$expandable2 = props.expandable) === null || _props$expandable2 === void 0 ? void 0 : _props$expandable2.expandedRowRender) return props.expandable.expandedRowRender(record.raw);
|
|
1160
|
+
};
|
|
1161
|
+
const allColumns = computed(() => [].concat(operations.value, dataColumns.value));
|
|
1162
|
+
const spanColumns = computed(() => props.spanAll ? allColumns.value : dataColumns.value);
|
|
1163
|
+
const { tableSpan, removedCells } = useSpan({
|
|
1164
|
+
spanMethod,
|
|
1165
|
+
data: flattenData,
|
|
1166
|
+
columns: spanColumns
|
|
1167
|
+
});
|
|
1168
|
+
const { tableSpan: tableSummarySpan, removedCells: removedSummaryCells } = useSpan({
|
|
1169
|
+
spanMethod: summarySpanMethod,
|
|
1170
|
+
data: summaryData,
|
|
1171
|
+
columns: allColumns
|
|
1172
|
+
});
|
|
1173
|
+
const getVirtualColumnStyle = (name) => {
|
|
1174
|
+
if (!isVirtualList.value || !name || !thWidth.value[name]) return;
|
|
1175
|
+
return { width: `${thWidth.value[name]}px` };
|
|
1176
|
+
};
|
|
1177
|
+
const renderSummaryRow = (record, rowIndex) => {
|
|
1178
|
+
return createVNode(table_tr_default, {
|
|
1179
|
+
key: `table-summary-${rowIndex}`,
|
|
1180
|
+
class: [`${prefixCls}-tr-summary`, isFunction(props.rowClass) ? props.rowClass(record.raw, rowIndex) : props.rowClass],
|
|
1181
|
+
onClick: (ev) => handleRowClick(record, ev)
|
|
1182
|
+
}, {
|
|
1183
|
+
default: () => [operations.value.map((operation, index) => {
|
|
1184
|
+
var _tableSummarySpan$val;
|
|
1185
|
+
const cellId = `${rowIndex}-${index}-${record.key}`;
|
|
1186
|
+
const [rowspan, colspan] = (_tableSummarySpan$val = tableSummarySpan.value[cellId]) !== null && _tableSummarySpan$val !== void 0 ? _tableSummarySpan$val : [1, 1];
|
|
1187
|
+
if (removedSummaryCells.value.includes(cellId)) return null;
|
|
1188
|
+
const style = getVirtualColumnStyle(operation.name);
|
|
1189
|
+
return createVNode(table_operation_td_default, {
|
|
1190
|
+
style,
|
|
1191
|
+
operationColumn: operation,
|
|
1192
|
+
operations: operations.value,
|
|
1193
|
+
record,
|
|
1194
|
+
rowSpan: rowspan,
|
|
1195
|
+
colSpan: colspan,
|
|
1196
|
+
summary: true
|
|
1197
|
+
}, null);
|
|
1198
|
+
}), dataColumns.value.map((column, index) => {
|
|
1199
|
+
var _tableSummarySpan$val2;
|
|
1200
|
+
const cellId = `${rowIndex}-${operations.value.length + index}-${record.key}`;
|
|
1201
|
+
const [rowspan, colspan] = (_tableSummarySpan$val2 = tableSummarySpan.value[cellId]) !== null && _tableSummarySpan$val2 !== void 0 ? _tableSummarySpan$val2 : [1, 1];
|
|
1202
|
+
if (removedSummaryCells.value.includes(cellId)) return null;
|
|
1203
|
+
const style = getVirtualColumnStyle(column.dataIndex);
|
|
1204
|
+
return createVNode(table_td_default, {
|
|
1205
|
+
key: `td-${cellId}`,
|
|
1206
|
+
style,
|
|
1207
|
+
rowIndex,
|
|
1208
|
+
record,
|
|
1209
|
+
column,
|
|
1210
|
+
operations: operations.value,
|
|
1211
|
+
dataColumns: dataColumns.value,
|
|
1212
|
+
rowSpan: rowspan,
|
|
1213
|
+
colSpan: colspan,
|
|
1214
|
+
summary: true,
|
|
1215
|
+
onClick: (ev) => handleCellClick(record, column, ev),
|
|
1216
|
+
onDblclick: (ev) => handleCellDblclick(record, column, ev),
|
|
1217
|
+
onMouseenter: (ev) => handleCellMouseEnter(record, column, ev),
|
|
1218
|
+
onMouseleave: (ev) => handleCellMouseLeave(record, column, ev),
|
|
1219
|
+
onContextmenu: (ev) => handleCellContextmenu(record, column, ev)
|
|
1220
|
+
}, {
|
|
1221
|
+
td: slots.td,
|
|
1222
|
+
cell: slots["summary-cell"]
|
|
1223
|
+
});
|
|
1224
|
+
})],
|
|
1225
|
+
tr: slots.tr
|
|
1226
|
+
});
|
|
1227
|
+
};
|
|
1228
|
+
const renderSummary = () => {
|
|
1229
|
+
if (summaryData.value && summaryData.value.length > 0) return createVNode("div", { class: `${prefixCls}-tfoot-content` }, [summaryData.value.map((data, index) => renderSummaryRow(data, index))]);
|
|
1230
|
+
return null;
|
|
1231
|
+
};
|
|
1232
|
+
const renderExpandBtn = (record, stopPropagation = true) => {
|
|
1233
|
+
var _ref3, _slots$expandIcon, _slots$expandIcon2, _props$expandable3, _props$expandable3$ic;
|
|
1234
|
+
const currentKey = record.key;
|
|
1235
|
+
const expanded = expandedRowKeys.value.includes(currentKey);
|
|
1236
|
+
return createVNode("button", {
|
|
1237
|
+
type: "button",
|
|
1238
|
+
class: `${prefixCls}-expand-btn`,
|
|
1239
|
+
onClick: (ev) => {
|
|
1240
|
+
handleExpand(currentKey, record.raw);
|
|
1241
|
+
if (stopPropagation) ev.stopPropagation();
|
|
1242
|
+
}
|
|
1243
|
+
}, [(_ref3 = (_slots$expandIcon = (_slots$expandIcon2 = slots["expand-icon"]) === null || _slots$expandIcon2 === void 0 ? void 0 : _slots$expandIcon2.call(slots, {
|
|
1244
|
+
expanded,
|
|
1245
|
+
record: record.raw
|
|
1246
|
+
})) !== null && _slots$expandIcon !== void 0 ? _slots$expandIcon : (_props$expandable3 = props.expandable) === null || _props$expandable3 === void 0 || (_props$expandable3$ic = _props$expandable3.icon) === null || _props$expandable3$ic === void 0 ? void 0 : _props$expandable3$ic.call(_props$expandable3, expanded, record.raw)) !== null && _ref3 !== void 0 ? _ref3 : expanded ? createVNode(IconMinus, null, null) : createVNode(IconPlus, null, null)]);
|
|
1247
|
+
};
|
|
1248
|
+
const renderExpand = (record, { indentSize, indexPath, allowDrag, expandContent }) => {
|
|
1249
|
+
if (record.hasSubtree) {
|
|
1250
|
+
var _record$children, _record$children2;
|
|
1251
|
+
if (((_record$children = record.children) === null || _record$children === void 0 ? void 0 : _record$children.length) === 0 && showEmptyTree.value) return renderEmpty();
|
|
1252
|
+
return (_record$children2 = record.children) === null || _record$children2 === void 0 ? void 0 : _record$children2.map((item, index) => renderRecord(item, index, {
|
|
1253
|
+
indentSize,
|
|
1254
|
+
indexPath,
|
|
1255
|
+
allowDrag
|
|
1256
|
+
}));
|
|
1257
|
+
}
|
|
1258
|
+
if (expandContent) {
|
|
1259
|
+
const scrollContainer = containerElement.value;
|
|
1260
|
+
return createVNode(table_tr_default, {
|
|
1261
|
+
key: `${record.key}-expand`,
|
|
1262
|
+
expand: true
|
|
1263
|
+
}, { default: () => [createVNode(table_td_default, {
|
|
1264
|
+
isFixedExpand: hasLeftFixedColumn.value || hasRightFixedColumn.value,
|
|
1265
|
+
containerWidth: scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientWidth,
|
|
1266
|
+
colSpan: dataColumns.value.length + operations.value.length
|
|
1267
|
+
}, _isSlot(expandContent) ? expandContent : { default: () => [expandContent] })] });
|
|
1268
|
+
}
|
|
1269
|
+
return null;
|
|
1270
|
+
};
|
|
1271
|
+
const renderRecord = (record, rowIndex, { indentSize = 0, indexPath, allowDrag = true } = {}) => {
|
|
1272
|
+
var _selectedRowKeys$valu;
|
|
1273
|
+
const currentKey = record.key;
|
|
1274
|
+
const currentPath = (indexPath !== null && indexPath !== void 0 ? indexPath : []).concat(rowIndex);
|
|
1275
|
+
const expandContent = renderExpandContent(record);
|
|
1276
|
+
const showExpand = expandedRowKeys.value.includes(currentKey);
|
|
1277
|
+
const isDragTarget = dragState.sourceKey === record.key;
|
|
1278
|
+
const dragSourceEvent = dragType.value ? {
|
|
1279
|
+
draggable: allowDrag,
|
|
1280
|
+
onDragstart: (ev) => {
|
|
1281
|
+
if (!allowDrag) return;
|
|
1282
|
+
handleDragStart(ev, record.key, currentPath, record.raw);
|
|
1283
|
+
},
|
|
1284
|
+
onDragend: (ev) => {
|
|
1285
|
+
if (!allowDrag) return;
|
|
1286
|
+
handleDragEnd(ev);
|
|
1287
|
+
}
|
|
1288
|
+
} : {};
|
|
1289
|
+
const dragTargetEvent = dragType.value ? {
|
|
1290
|
+
onDragenter: (ev) => {
|
|
1291
|
+
if (!allowDrag) return;
|
|
1292
|
+
handleDragEnter(ev, currentPath);
|
|
1293
|
+
},
|
|
1294
|
+
onDragover: (ev) => {
|
|
1295
|
+
if (!allowDrag) return;
|
|
1296
|
+
handleDragover(ev);
|
|
1297
|
+
},
|
|
1298
|
+
onDrop: (ev) => {
|
|
1299
|
+
if (!allowDrag) return;
|
|
1300
|
+
handleChange("drag");
|
|
1301
|
+
handleDrop(ev);
|
|
1302
|
+
}
|
|
1303
|
+
} : {};
|
|
1304
|
+
return createVNode(Fragment, null, [createVNode(table_tr_default, mergeProps({
|
|
1305
|
+
key: currentKey,
|
|
1306
|
+
class: [{
|
|
1307
|
+
[`${prefixCls}-tr-draggable`]: dragType.value === "row",
|
|
1308
|
+
[`${prefixCls}-tr-drag`]: isDragTarget
|
|
1309
|
+
}, isFunction(props.rowClass) ? props.rowClass(record.raw, rowIndex) : props.rowClass],
|
|
1310
|
+
rowIndex,
|
|
1311
|
+
record,
|
|
1312
|
+
checked: props.rowSelection && ((_selectedRowKeys$valu = selectedRowKeys.value) === null || _selectedRowKeys$valu === void 0 ? void 0 : _selectedRowKeys$valu.includes(currentKey)),
|
|
1313
|
+
onClick: (ev) => handleRowClick(record, ev),
|
|
1314
|
+
onDblclick: (ev) => handleRowDblclick(record, ev),
|
|
1315
|
+
onContextmenu: (ev) => handleRowContextMenu(record, ev)
|
|
1316
|
+
}, dragType.value === "row" ? dragSourceEvent : {}, dragTargetEvent), {
|
|
1317
|
+
default: () => [operations.value.map((operation, index) => {
|
|
1318
|
+
var _tableSpan$value$cell;
|
|
1319
|
+
const cellId = `${rowIndex}-${index}-${record.key}`;
|
|
1320
|
+
const [rowspan, colspan] = props.spanAll ? (_tableSpan$value$cell = tableSpan.value[cellId]) !== null && _tableSpan$value$cell !== void 0 ? _tableSpan$value$cell : [1, 1] : [1, 1];
|
|
1321
|
+
if (props.spanAll && removedCells.value.includes(cellId)) return null;
|
|
1322
|
+
const style = getVirtualColumnStyle(operation.name);
|
|
1323
|
+
return createVNode(table_operation_td_default, mergeProps({
|
|
1324
|
+
key: `operation-td-${index}`,
|
|
1325
|
+
style,
|
|
1326
|
+
operationColumn: operation,
|
|
1327
|
+
operations: operations.value,
|
|
1328
|
+
record,
|
|
1329
|
+
hasExpand: Boolean(expandContent),
|
|
1330
|
+
selectedRowKeys: currentSelectedRowKeys.value,
|
|
1331
|
+
rowSpan: rowspan,
|
|
1332
|
+
colSpan: colspan,
|
|
1333
|
+
renderExpandBtn
|
|
1334
|
+
}, dragType.value === "handle" ? dragSourceEvent : {}), { "drag-handle-icon": slots["drag-handle-icon"] });
|
|
1335
|
+
}), dataColumns.value.map((column, index) => {
|
|
1336
|
+
var _tableSpan$value$cell2;
|
|
1337
|
+
const cellId = `${rowIndex}-${props.spanAll ? operations.value.length + index : index}-${record.key}`;
|
|
1338
|
+
const [rowspan, colspan] = (_tableSpan$value$cell2 = tableSpan.value[cellId]) !== null && _tableSpan$value$cell2 !== void 0 ? _tableSpan$value$cell2 : [1, 1];
|
|
1339
|
+
if (removedCells.value.includes(cellId)) return null;
|
|
1340
|
+
const extraProps = index === 0 ? {
|
|
1341
|
+
showExpandBtn: record.hasSubtree,
|
|
1342
|
+
indentSize: record.hasSubtree ? indentSize - 20 : indentSize
|
|
1343
|
+
} : {};
|
|
1344
|
+
const style = getVirtualColumnStyle(column.dataIndex);
|
|
1345
|
+
return createVNode(table_td_default, mergeProps({
|
|
1346
|
+
key: `td-${index}`,
|
|
1347
|
+
style,
|
|
1348
|
+
rowIndex,
|
|
1349
|
+
record,
|
|
1350
|
+
column,
|
|
1351
|
+
operations: operations.value,
|
|
1352
|
+
dataColumns: dataColumns.value,
|
|
1353
|
+
rowSpan: rowspan,
|
|
1354
|
+
renderExpandBtn,
|
|
1355
|
+
colSpan: colspan
|
|
1356
|
+
}, extraProps, {
|
|
1357
|
+
onClick: (ev) => handleCellClick(record, column, ev),
|
|
1358
|
+
onDblclick: (ev) => handleCellDblclick(record, column, ev),
|
|
1359
|
+
onMouseenter: (ev) => handleCellMouseEnter(record, column, ev),
|
|
1360
|
+
onMouseleave: (ev) => handleCellMouseLeave(record, column, ev),
|
|
1361
|
+
onContextmenu: (ev) => handleCellContextmenu(record, column, ev)
|
|
1362
|
+
}), { td: slots.td });
|
|
1363
|
+
})],
|
|
1364
|
+
tr: slots.tr
|
|
1365
|
+
}), showExpand && renderExpand(record, {
|
|
1366
|
+
indentSize: indentSize + props.indentSize,
|
|
1367
|
+
indexPath: currentPath,
|
|
1368
|
+
allowDrag: allowDrag && !isDragTarget,
|
|
1369
|
+
expandContent
|
|
1370
|
+
})]);
|
|
1371
|
+
};
|
|
1372
|
+
const renderBody = () => {
|
|
1373
|
+
const hasSubData = flattenData.value.some((record) => Boolean(record.hasSubtree));
|
|
1374
|
+
return createVNode(table_tbody_default, null, {
|
|
1375
|
+
default: () => [flattenData.value.length > 0 ? flattenData.value.map((record, index) => renderRecord(record, index, { indentSize: hasSubData ? 20 : 0 })) : renderEmpty()],
|
|
1376
|
+
tbody: slots.tbody
|
|
1377
|
+
});
|
|
1378
|
+
};
|
|
1379
|
+
const setThRef = (key, instance) => {
|
|
1380
|
+
const element = instance && "$el" in instance ? instance.$el : instance;
|
|
1381
|
+
if (key && element instanceof HTMLElement) thRefs.value[key] = element;
|
|
1382
|
+
};
|
|
1383
|
+
const renderHeader = () => createVNode(table_thead_default, null, {
|
|
1384
|
+
default: () => [groupColumns.value.map((row, index) => createVNode(table_tr_default, { key: `header-row-${index}` }, { default: () => [index === 0 && operations.value.map((operation, index) => {
|
|
1385
|
+
var _props$rowSelection2;
|
|
1386
|
+
return createVNode(table_operation_th_default, {
|
|
1387
|
+
key: `operation-th-${index}`,
|
|
1388
|
+
ref: (ins) => setThRef(operation.name, ins),
|
|
1389
|
+
operationColumn: operation,
|
|
1390
|
+
operations: operations.value,
|
|
1391
|
+
selectAll: Boolean(operation.name === "selection-checkbox" && ((_props$rowSelection2 = props.rowSelection) === null || _props$rowSelection2 === void 0 ? void 0 : _props$rowSelection2.showCheckedAll)),
|
|
1392
|
+
rowSpan: groupColumns.value.length
|
|
1393
|
+
}, null);
|
|
1394
|
+
}), row.map((column, index) => {
|
|
1395
|
+
const resizable = props.columnResizable && Boolean(column.dataIndex) && index < row.length - 1;
|
|
1396
|
+
return createVNode(table_th_default, {
|
|
1397
|
+
key: `th-${index}`,
|
|
1398
|
+
ref: (ins) => setThRef(column.dataIndex, ins),
|
|
1399
|
+
column,
|
|
1400
|
+
operations: operations.value,
|
|
1401
|
+
dataColumns: dataColumns.value,
|
|
1402
|
+
resizable,
|
|
1403
|
+
onClick: (ev) => handleHeaderClick(column, ev)
|
|
1404
|
+
}, { th: slots.th });
|
|
1405
|
+
})] }))],
|
|
1406
|
+
thead: slots.thead
|
|
1407
|
+
});
|
|
1408
|
+
const renderContent = () => {
|
|
1409
|
+
if (splitTable.value) {
|
|
1410
|
+
var _props$scroll13, _props$scroll14, _props$scroll15;
|
|
1411
|
+
const top = isNumber(props.stickyHeader) ? `${props.stickyHeader}px` : void 0;
|
|
1412
|
+
const isStringScrollY = isString((_props$scroll13 = props.scroll) === null || _props$scroll13 === void 0 ? void 0 : _props$scroll13.y);
|
|
1413
|
+
const bodyMaxHeight = isNumber((_props$scroll14 = props.scroll) === null || _props$scroll14 === void 0 ? void 0 : _props$scroll14.y) ? `${(_props$scroll15 = props.scroll) === null || _props$scroll15 === void 0 ? void 0 : _props$scroll15.y}px` : "100%";
|
|
1414
|
+
const _scrollbarProps$value = scrollbarProps.value, { outerStyle: bodyOuterStyle } = _scrollbarProps$value, bodyScrollbarRestProps = _objectWithoutProperties(_scrollbarProps$value, _excluded2);
|
|
1415
|
+
const bodyBaseStyle = isStringScrollY ? {
|
|
1416
|
+
height: bodyMaxHeight,
|
|
1417
|
+
minHeight: 0
|
|
1418
|
+
} : {
|
|
1419
|
+
maxHeight: bodyMaxHeight,
|
|
1420
|
+
minHeight: 0
|
|
1421
|
+
};
|
|
1422
|
+
const bodyScrollbarOuterStyle = Array.isArray(bodyOuterStyle) ? [bodyBaseStyle, ...bodyOuterStyle] : bodyOuterStyle ? [bodyBaseStyle, bodyOuterStyle] : bodyBaseStyle;
|
|
1423
|
+
const bodyComponentStyle = isStringScrollY ? { height: bodyMaxHeight } : { maxHeight: bodyMaxHeight };
|
|
1424
|
+
const BodyComponent = displayScrollbar.value ? Scrollbar : "div";
|
|
1425
|
+
return createVNode(Fragment, null, [
|
|
1426
|
+
props.showHeader && createVNode("div", {
|
|
1427
|
+
ref: theadComRef,
|
|
1428
|
+
class: [`${prefixCls}-header`, { [`${prefixCls}-header-sticky`]: props.stickyHeader !== false }],
|
|
1429
|
+
style: { top }
|
|
1430
|
+
}, [createVNode("div", {
|
|
1431
|
+
class: `${prefixCls}-element`,
|
|
1432
|
+
style: headerStyle.value
|
|
1433
|
+
}, [renderHeader()])]),
|
|
1434
|
+
createVNode(resize_observer_default, { onResize: handleTbodyResize }, { default: () => [isVirtualList.value && flattenData.value.length ? createVNode(virtual_list_default, mergeProps({
|
|
1435
|
+
ref: (ins) => {
|
|
1436
|
+
if (ins === null || ins === void 0 ? void 0 : ins.$el) {
|
|
1437
|
+
var _ins$$el$querySelecto, _ins$$el;
|
|
1438
|
+
virtualListRef.value = ins;
|
|
1439
|
+
tbodyRef.value = ins.$el;
|
|
1440
|
+
virtualRef.value = (_ins$$el$querySelecto = (_ins$$el = ins.$el).querySelector) === null || _ins$$el$querySelecto === void 0 ? void 0 : _ins$$el$querySelecto.call(_ins$$el, `.${virtualListPrefixCls}-scroller`);
|
|
1441
|
+
} else {
|
|
1442
|
+
virtualListRef.value = null;
|
|
1443
|
+
tbodyRef.value = void 0;
|
|
1444
|
+
virtualRef.value = void 0;
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
class: `${prefixCls}-body`,
|
|
1448
|
+
items: flattenData.value,
|
|
1449
|
+
keyField: "_key",
|
|
1450
|
+
listTag: "div",
|
|
1451
|
+
itemTag: "div",
|
|
1452
|
+
listClass: `${prefixCls}-element`,
|
|
1453
|
+
listStyle: contentStyle.value,
|
|
1454
|
+
itemClass: `${prefixCls}-virtual-item`,
|
|
1455
|
+
height: bodyMaxHeight
|
|
1456
|
+
}, tableVirtualListProps.value, {
|
|
1457
|
+
scrollbar: displayScrollbar.value ? scrollbarProps.value : false,
|
|
1458
|
+
onScroll: onTbodyScroll
|
|
1459
|
+
}), { item: ({ item, index }) => item ? renderRecord(item, index) : null }) : createVNode(BodyComponent, mergeProps({
|
|
1460
|
+
ref: tbodyComRef,
|
|
1461
|
+
class: `${prefixCls}-body`,
|
|
1462
|
+
style: bodyComponentStyle
|
|
1463
|
+
}, displayScrollbar.value ? _objectSpread2({ outerStyle: bodyScrollbarOuterStyle }, bodyScrollbarRestProps) : {}, { onScroll: onTbodyScroll }), { default: () => [createVNode("div", {
|
|
1464
|
+
class: `${prefixCls}-element`,
|
|
1465
|
+
style: contentStyle.value
|
|
1466
|
+
}, [renderBody()])] })] }),
|
|
1467
|
+
summaryData.value && summaryData.value.length > 0 && createVNode("div", {
|
|
1468
|
+
ref: summaryRef,
|
|
1469
|
+
class: `${prefixCls}-tfoot`,
|
|
1470
|
+
style: { overflow: "hidden" }
|
|
1471
|
+
}, [createVNode("div", {
|
|
1472
|
+
class: `${prefixCls}-element`,
|
|
1473
|
+
style: contentStyle.value
|
|
1474
|
+
}, [renderSummary()])])
|
|
1475
|
+
]);
|
|
1476
|
+
}
|
|
1477
|
+
return createVNode(resize_observer_default, { onResize: () => setAlignPosition() }, { default: () => [createVNode("div", {
|
|
1478
|
+
class: `${prefixCls}-element`,
|
|
1479
|
+
style: contentStyle.value
|
|
1480
|
+
}, [
|
|
1481
|
+
props.showHeader && renderHeader(),
|
|
1482
|
+
renderBody(),
|
|
1483
|
+
summaryData.value && summaryData.value.length > 0 && renderSummary()
|
|
1484
|
+
])] });
|
|
1485
|
+
};
|
|
1486
|
+
const renderTable = (content) => {
|
|
1487
|
+
var _props$scroll16;
|
|
1488
|
+
const style = ((_props$scroll16 = props.scroll) === null || _props$scroll16 === void 0 ? void 0 : _props$scroll16.maxHeight) ? { maxHeight: props.scroll.maxHeight } : void 0;
|
|
1489
|
+
const Component = displayScrollbar.value && !splitTable.value ? Scrollbar : "div";
|
|
1490
|
+
const _scrollbarProps$value2 = scrollbarProps.value, { outerStyle: contentOuterStyle } = _scrollbarProps$value2, contentScrollbarRestProps = _objectWithoutProperties(_scrollbarProps$value2, _excluded3);
|
|
1491
|
+
const contentScrollbarOuterStyle = Array.isArray(contentOuterStyle) ? [{ height: "100%" }, ...contentOuterStyle] : contentOuterStyle ? [{ height: "100%" }, contentOuterStyle] : { height: "100%" };
|
|
1492
|
+
return createVNode(Fragment, null, [createVNode("div", { class: [`${prefixCls}-container`, tableCls.value] }, [createVNode(Component, mergeProps({
|
|
1493
|
+
ref: contentComRef,
|
|
1494
|
+
class: [`${prefixCls}-content`, { [`${prefixCls}-content-scroll-x`]: !splitTable.value }],
|
|
1495
|
+
style
|
|
1496
|
+
}, scrollbar.value && !splitTable.value ? _objectSpread2({ outerStyle: contentScrollbarOuterStyle }, contentScrollbarRestProps) : {}, { onScroll: handleScroll }), { default: () => [content ? createVNode("div", { class: `${prefixCls}-element` }, [content()]) : renderContent()] })]), slots.footer && createVNode("div", { class: `${prefixCls}-footer` }, [slots.footer()])]);
|
|
1497
|
+
};
|
|
1498
|
+
const renderPagination = () => {
|
|
1499
|
+
var _slots$paginationLef, _slots$paginationRig;
|
|
1500
|
+
const paginationProps = isObject(props.pagination) ? omit(props.pagination, [
|
|
1501
|
+
"current",
|
|
1502
|
+
"pageSize",
|
|
1503
|
+
"defaultCurrent",
|
|
1504
|
+
"defaultPageSize"
|
|
1505
|
+
]) : {};
|
|
1506
|
+
return createVNode("div", { class: paginationCls.value }, [
|
|
1507
|
+
(_slots$paginationLef = slots["pagination-left"]) === null || _slots$paginationLef === void 0 ? void 0 : _slots$paginationLef.call(slots),
|
|
1508
|
+
createVNode(Pagination, mergeProps({
|
|
1509
|
+
total: validData.value.length,
|
|
1510
|
+
current: page.value,
|
|
1511
|
+
pageSize: pageSize.value,
|
|
1512
|
+
onChange: (page) => {
|
|
1513
|
+
handlePageChange(page);
|
|
1514
|
+
handleChange("pagination");
|
|
1515
|
+
},
|
|
1516
|
+
onPageSizeChange: (pageSize) => {
|
|
1517
|
+
handlePageSizeChange(pageSize);
|
|
1518
|
+
handleChange("pagination");
|
|
1519
|
+
}
|
|
1520
|
+
}, paginationProps), null),
|
|
1521
|
+
(_slots$paginationRig = slots["pagination-right"]) === null || _slots$paginationRig === void 0 ? void 0 : _slots$paginationRig.call(slots)
|
|
1522
|
+
]);
|
|
1523
|
+
};
|
|
1524
|
+
const style = computed(() => {
|
|
1525
|
+
var _props$scroll17;
|
|
1526
|
+
if (isString((_props$scroll17 = props.scroll) === null || _props$scroll17 === void 0 ? void 0 : _props$scroll17.y)) {
|
|
1527
|
+
var _props$scroll18;
|
|
1528
|
+
return { height: (_props$scroll18 = props.scroll) === null || _props$scroll18 === void 0 ? void 0 : _props$scroll18.y };
|
|
1529
|
+
}
|
|
1530
|
+
});
|
|
1531
|
+
const render = () => {
|
|
1532
|
+
var _slots$columns;
|
|
1533
|
+
if (slots.default) return createVNode("div", {
|
|
1534
|
+
class: cls.value,
|
|
1535
|
+
role: "table"
|
|
1536
|
+
}, [renderTable(slots.default)]);
|
|
1537
|
+
children.value = (_slots$columns = slots.columns) === null || _slots$columns === void 0 ? void 0 : _slots$columns.call(slots);
|
|
1538
|
+
return createVNode("div", {
|
|
1539
|
+
class: cls.value,
|
|
1540
|
+
style: style.value,
|
|
1541
|
+
role: "table"
|
|
1542
|
+
}, [children.value, createVNode(Spin, mergedSpinProps.value, { default: () => [
|
|
1543
|
+
props.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && isPaginationTop.value && renderPagination(),
|
|
1544
|
+
renderTable(),
|
|
1545
|
+
props.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && !isPaginationTop.value && renderPagination()
|
|
1546
|
+
] })]);
|
|
1547
|
+
};
|
|
1548
|
+
__expose({
|
|
1549
|
+
selectAll,
|
|
1550
|
+
select,
|
|
1551
|
+
expandAll,
|
|
1552
|
+
expand,
|
|
1553
|
+
resetFilters,
|
|
1554
|
+
clearFilters,
|
|
1555
|
+
resetSorters,
|
|
1556
|
+
clearSorters,
|
|
1557
|
+
scrollIntoView: (options) => {
|
|
1558
|
+
var _virtualListRef$value;
|
|
1559
|
+
return (_virtualListRef$value = virtualListRef.value) === null || _virtualListRef$value === void 0 ? void 0 : _virtualListRef$value.scrollTo(options);
|
|
1560
|
+
}
|
|
1561
|
+
});
|
|
1562
|
+
return (_ctx, _cache) => {
|
|
1563
|
+
return openBlock(), createBlock(VNodeRenderer, { content: render() }, null, 8, ["content"]);
|
|
1564
|
+
};
|
|
1565
|
+
}
|
|
1566
|
+
}));
|
|
1567
|
+
//#endregion
|
|
1568
|
+
export { table_vue_vue_type_script_setup_true_lang_default as default };
|