ele-admin-plus 1.2.1-beta.3 → 1.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/core-components.d.ts +1 -0
- package/es/core-components.js +60 -58
- package/es/ele-admin-layout/components/layout-tabs.d.ts +1 -6
- package/es/ele-admin-layout/components/layout-tabs.js +18 -76
- package/es/ele-admin-layout/index.js +7 -2
- package/es/ele-admin-layout/types.d.ts +2 -0
- package/es/ele-app/el.d.ts +3 -0
- package/es/ele-app/plus.d.ts +21 -0
- package/es/ele-app/style/overwrite/css-var.scss +0 -2
- package/es/ele-app/style/overwrite/index.js +0 -1
- package/es/ele-app/style/overwrite/index.scss +0 -1
- package/es/ele-app/style/scrollbar/css-var.scss +17 -16
- package/es/ele-app/types.d.ts +8 -1
- package/es/ele-basic-select/index.d.ts +2 -2
- package/es/ele-bottom-bar/index.d.ts +9 -2
- package/es/ele-bottom-bar/index.js +37 -15
- package/es/ele-bottom-bar/props.d.ts +2 -0
- package/es/ele-bottom-bar/props.js +3 -1
- package/es/ele-bottom-bar/style/index.scss +5 -0
- package/es/ele-check-card/index.d.ts +2 -2
- package/es/ele-cropper/components/cropper-tools.d.ts +9 -3
- package/es/ele-cropper/components/cropper-tools.js +41 -13
- package/es/ele-cropper/index.d.ts +3 -1
- package/es/ele-cropper/index.js +2 -1
- package/es/ele-cropper/props.d.ts +3 -1
- package/es/ele-cropper/props.js +2 -0
- package/es/ele-cropper/style/index.scss +3 -2
- package/es/ele-cropper/types.d.ts +16 -0
- package/es/ele-cropper-modal/index.d.ts +3 -1
- package/es/ele-cropper-modal/index.js +2 -1
- package/es/ele-cropper-modal/props.d.ts +1 -0
- package/es/ele-data-table/components/table-columns.d.ts +32 -0
- package/es/ele-data-table/components/table-columns.js +114 -0
- package/es/ele-data-table/index.d.ts +205 -23
- package/es/ele-data-table/index.js +202 -120
- package/es/ele-data-table/props.d.ts +14 -18
- package/es/ele-data-table/types.d.ts +2 -2
- package/es/ele-data-table/util.d.ts +1 -45
- package/es/ele-data-table/util.js +2 -110
- package/es/ele-drawer/index.d.ts +8 -8
- package/es/ele-drawer/props.d.ts +2 -2
- package/es/ele-dropdown/components/pro-dropdown.d.ts +237 -0
- package/es/ele-dropdown/components/pro-dropdown.js +204 -0
- package/es/ele-dropdown/index.d.ts +517 -31
- package/es/ele-dropdown/index.js +144 -65
- package/es/ele-dropdown/props.d.ts +109 -15
- package/es/ele-dropdown/props.js +54 -7
- package/es/ele-dropdown/style/index.js +4 -1
- package/es/ele-dropdown/style/index.scss +174 -6
- package/es/ele-dropdown/types.d.ts +0 -2
- package/es/ele-edit-tag/index.d.ts +2 -2
- package/es/ele-file-list/components/file-grid-item.d.ts +11 -20
- package/es/ele-file-list/components/file-grid-item.js +19 -58
- package/es/ele-file-list/components/file-grid.d.ts +15 -19
- package/es/ele-file-list/components/file-grid.js +16 -39
- package/es/ele-file-list/components/file-table-item.d.ts +11 -20
- package/es/ele-file-list/components/file-table-item.js +19 -58
- package/es/ele-file-list/components/file-table.d.ts +15 -19
- package/es/ele-file-list/components/file-table.js +17 -37
- package/es/ele-file-list/index.d.ts +33 -12
- package/es/ele-file-list/index.js +118 -20
- package/es/ele-file-list/props.d.ts +4 -5
- package/es/ele-file-list/props.js +5 -8
- package/es/ele-file-list/style/index.scss +10 -5
- package/es/ele-file-list/types.d.ts +13 -1
- package/es/ele-icon-select/components/icon-grid.d.ts +1 -1
- package/es/ele-icon-select/index.d.ts +2 -2
- package/es/ele-image-viewer/index.d.ts +120 -0
- package/es/ele-image-viewer/index.js +88 -0
- package/es/ele-image-viewer/props.d.ts +58 -0
- package/es/ele-image-viewer/props.js +35 -0
- package/es/ele-image-viewer/style/css-var.scss +8 -0
- package/es/ele-image-viewer/style/index.js +2 -0
- package/es/ele-image-viewer/style/index.scss +117 -0
- package/es/ele-map-picker/components/map-view.d.ts +18 -18
- package/es/ele-menus/components/item-title.d.ts +48 -0
- package/es/ele-menus/components/item-title.js +108 -0
- package/es/ele-menus/components/menu-items.d.ts +78 -0
- package/es/ele-menus/components/menu-items.js +269 -0
- package/es/ele-menus/index.d.ts +77 -18
- package/es/ele-menus/index.js +280 -210
- package/es/ele-menus/props.d.ts +2 -2
- package/es/ele-menus/util.d.ts +1 -62
- package/es/ele-menus/util.js +3 -244
- package/es/ele-modal/index.d.ts +9 -9
- package/es/ele-modal/props.d.ts +2 -2
- package/es/ele-modal/util.d.ts +1 -1
- package/es/ele-modal/util.js +8 -4
- package/es/ele-pagination/index.d.ts +2 -2
- package/es/ele-pagination/props.d.ts +1 -1
- package/es/ele-popconfirm/index.d.ts +11 -14
- package/es/ele-popconfirm/props.d.ts +3 -4
- package/es/ele-popover/index.d.ts +11 -14
- package/es/ele-popover/props.d.ts +0 -1
- package/es/ele-popover/props.js +1 -1
- package/es/ele-printer/util.js +1 -1
- package/es/ele-pro-layout/components/pro-iframe.d.ts +6 -6
- package/es/ele-pro-layout/components/pro-iframe.js +6 -4
- package/es/ele-pro-layout/index.d.ts +1 -1
- package/es/ele-pro-layout/index.js +13 -4
- package/es/ele-pro-layout/props.d.ts +3 -3
- package/es/ele-pro-layout/props.js +3 -3
- package/es/ele-pro-layout/types.d.ts +9 -5
- package/es/ele-pro-layout/util.d.ts +6 -0
- package/es/ele-pro-layout/util.js +12 -0
- package/es/ele-pro-table/components/table-tools.d.ts +24 -24
- package/es/ele-pro-table/components/table-tools.js +6 -7
- package/es/ele-pro-table/components/tool-column.d.ts +7 -7
- package/es/ele-pro-table/components/tool-column.js +4 -4
- package/es/ele-pro-table/components/tool-export.d.ts +5 -5
- package/es/ele-pro-table/components/tool-print-body-cell.js +1 -1
- package/es/ele-pro-table/components/tool-print-header-cell.js +3 -2
- package/es/ele-pro-table/components/tool-print.d.ts +5 -5
- package/es/ele-pro-table/index.d.ts +71 -81
- package/es/ele-pro-table/index.js +19 -23
- package/es/ele-pro-table/props.d.ts +9 -11
- package/es/ele-pro-table/props.js +1 -1
- package/es/ele-segmented/index.d.ts +3 -1
- package/es/ele-segmented/index.js +27 -3
- package/es/ele-segmented/style/index.scss +7 -1
- package/es/ele-steps/index.d.ts +12 -12
- package/es/ele-steps/props.d.ts +3 -3
- package/es/ele-tab-tool/index.d.ts +6 -1
- package/es/ele-tab-tool/index.js +44 -3
- package/es/ele-tab-tool/props.d.ts +2 -0
- package/es/ele-tab-tool/props.js +3 -1
- package/es/ele-tab-wrap/components/tab-dropdown.js +9 -26
- package/es/ele-tab-wrap/index.js +21 -2
- package/es/ele-table/style/index.scss +1 -2
- package/es/ele-table-select/index.d.ts +6 -6
- package/es/ele-tabs/index.d.ts +21 -19
- package/es/ele-tabs/index.js +240 -115
- package/es/ele-tabs/props.d.ts +1 -6
- package/es/ele-tabs/props.js +1 -1
- package/es/ele-tabs/style/index.scss +152 -176
- package/es/ele-tabs/types.d.ts +29 -6
- package/es/ele-tool/index.js +6 -1
- package/es/ele-toolbar/index.d.ts +9 -9
- package/es/ele-tooltip/index.d.ts +15 -15
- package/es/ele-tooltip/props.d.ts +2 -2
- package/es/ele-tooltip/style/css-var.scss +4 -0
- package/es/ele-tree-select/index.d.ts +5 -5
- package/es/ele-upload-list/components/list-item.d.ts +31 -5
- package/es/ele-upload-list/components/list-item.js +146 -66
- package/es/ele-upload-list/index.d.ts +55 -26
- package/es/ele-upload-list/index.js +180 -97
- package/es/ele-upload-list/props.d.ts +22 -9
- package/es/ele-upload-list/props.js +20 -8
- package/es/ele-upload-list/style/css-var.scss +8 -0
- package/es/ele-upload-list/style/index.js +1 -1
- package/es/ele-upload-list/style/index.scss +425 -135
- package/es/ele-upload-list/types.d.ts +35 -11
- package/es/ele-virtual-table/components/body-cell.d.ts +2 -2
- package/es/ele-virtual-table/components/header-cell.d.ts +1 -1
- package/es/ele-virtual-table/components/header-row.d.ts +1 -1
- package/es/ele-virtual-table/index.d.ts +14 -22
- package/es/ele-virtual-table/index.js +8 -6
- package/es/ele-virtual-table/props.d.ts +6 -8
- package/es/icons/CornerLeftFilled.d.ts +2 -0
- package/es/icons/CornerLeftFilled.js +26 -0
- package/es/icons/CornerRightFilled.d.ts +2 -0
- package/es/icons/CornerRightFilled.js +26 -0
- package/es/icons/EyeOutlined.d.ts +2 -0
- package/es/icons/EyeOutlined.js +30 -0
- package/es/icons/FileOutlined.js +4 -4
- package/es/icons/SizeCompactOutlined.js +4 -4
- package/es/icons/SizeMiddleOutlined.d.ts +2 -0
- package/es/icons/SizeMiddleOutlined.js +34 -0
- package/es/icons/SizeSlackOutlined.js +4 -4
- package/es/icons/index.d.ts +4 -0
- package/es/icons/index.js +162 -154
- package/es/lang/en_US.js +4 -1
- package/es/lang/zh_CN.js +4 -1
- package/es/lang/zh_TW.js +4 -1
- package/es/style/plus.scss +1 -0
- package/es/style/themes/default.scss +80 -4
- package/es/style/themes/rounded.scss +6 -3
- package/es/style/themes/theme-util.scss +4 -0
- package/es/style/util.scss +10 -3
- package/es/utils/core.d.ts +4 -2
- package/es/utils/hook.d.ts +2 -0
- package/es/utils/hook.js +5 -1
- package/es/utils/menu-util.js +11 -5
- package/es/utils/message-box.js +5 -1
- package/es/utils/message.js +2 -2
- package/lib/core-components.cjs +60 -58
- package/lib/core-components.d.ts +1 -0
- package/lib/ele-admin-layout/components/layout-tabs.cjs +17 -75
- package/lib/ele-admin-layout/components/layout-tabs.d.ts +1 -6
- package/lib/ele-admin-layout/index.cjs +7 -2
- package/lib/ele-admin-layout/types.d.ts +2 -0
- package/lib/ele-app/el.d.ts +3 -0
- package/lib/ele-app/plus.d.ts +21 -0
- package/lib/ele-app/style/overwrite/css-var.scss +0 -2
- package/lib/ele-app/style/overwrite/index.cjs +0 -1
- package/lib/ele-app/style/overwrite/index.scss +0 -1
- package/lib/ele-app/style/scrollbar/css-var.scss +17 -16
- package/lib/ele-app/types.d.ts +8 -1
- package/lib/ele-basic-select/index.d.ts +2 -2
- package/lib/ele-bottom-bar/index.cjs +36 -14
- package/lib/ele-bottom-bar/index.d.ts +9 -2
- package/lib/ele-bottom-bar/props.cjs +3 -1
- package/lib/ele-bottom-bar/props.d.ts +2 -0
- package/lib/ele-bottom-bar/style/index.scss +5 -0
- package/lib/ele-check-card/index.d.ts +2 -2
- package/lib/ele-cropper/components/cropper-tools.cjs +40 -12
- package/lib/ele-cropper/components/cropper-tools.d.ts +9 -3
- package/lib/ele-cropper/index.cjs +2 -1
- package/lib/ele-cropper/index.d.ts +3 -1
- package/lib/ele-cropper/props.cjs +2 -0
- package/lib/ele-cropper/props.d.ts +3 -1
- package/lib/ele-cropper/style/index.scss +3 -2
- package/lib/ele-cropper/types.d.ts +16 -0
- package/lib/ele-cropper-modal/index.cjs +2 -1
- package/lib/ele-cropper-modal/index.d.ts +3 -1
- package/lib/ele-cropper-modal/props.d.ts +1 -0
- package/lib/ele-data-table/components/table-columns.cjs +113 -0
- package/lib/ele-data-table/components/table-columns.d.ts +32 -0
- package/lib/ele-data-table/index.cjs +199 -117
- package/lib/ele-data-table/index.d.ts +205 -23
- package/lib/ele-data-table/props.d.ts +14 -18
- package/lib/ele-data-table/types.d.ts +2 -2
- package/lib/ele-data-table/util.cjs +0 -108
- package/lib/ele-data-table/util.d.ts +1 -45
- package/lib/ele-drawer/index.d.ts +8 -8
- package/lib/ele-drawer/props.d.ts +2 -2
- package/lib/ele-dropdown/components/pro-dropdown.cjs +203 -0
- package/lib/ele-dropdown/components/pro-dropdown.d.ts +237 -0
- package/lib/ele-dropdown/index.cjs +147 -68
- package/lib/ele-dropdown/index.d.ts +517 -31
- package/lib/ele-dropdown/props.cjs +53 -6
- package/lib/ele-dropdown/props.d.ts +109 -15
- package/lib/ele-dropdown/style/index.cjs +4 -1
- package/lib/ele-dropdown/style/index.scss +174 -6
- package/lib/ele-dropdown/types.d.ts +0 -2
- package/lib/ele-edit-tag/index.d.ts +2 -2
- package/lib/ele-file-list/components/file-grid-item.cjs +18 -57
- package/lib/ele-file-list/components/file-grid-item.d.ts +11 -20
- package/lib/ele-file-list/components/file-grid.cjs +15 -38
- package/lib/ele-file-list/components/file-grid.d.ts +15 -19
- package/lib/ele-file-list/components/file-table-item.cjs +18 -57
- package/lib/ele-file-list/components/file-table-item.d.ts +11 -20
- package/lib/ele-file-list/components/file-table.cjs +16 -36
- package/lib/ele-file-list/components/file-table.d.ts +15 -19
- package/lib/ele-file-list/index.cjs +117 -19
- package/lib/ele-file-list/index.d.ts +33 -12
- package/lib/ele-file-list/props.cjs +4 -7
- package/lib/ele-file-list/props.d.ts +4 -5
- package/lib/ele-file-list/style/index.scss +10 -5
- package/lib/ele-file-list/types.d.ts +13 -1
- package/lib/ele-icon-select/components/icon-grid.d.ts +1 -1
- package/lib/ele-icon-select/index.d.ts +2 -2
- package/lib/ele-image-viewer/index.cjs +87 -0
- package/lib/ele-image-viewer/index.d.ts +120 -0
- package/lib/ele-image-viewer/props.cjs +35 -0
- package/lib/ele-image-viewer/props.d.ts +58 -0
- package/lib/ele-image-viewer/style/css-var.scss +8 -0
- package/lib/ele-image-viewer/style/index.cjs +3 -0
- package/lib/ele-image-viewer/style/index.scss +117 -0
- package/lib/ele-map-picker/components/map-view.d.ts +18 -18
- package/lib/ele-menus/components/item-title.cjs +107 -0
- package/lib/ele-menus/components/item-title.d.ts +48 -0
- package/lib/ele-menus/components/menu-items.cjs +268 -0
- package/lib/ele-menus/components/menu-items.d.ts +78 -0
- package/lib/ele-menus/index.cjs +278 -208
- package/lib/ele-menus/index.d.ts +77 -18
- package/lib/ele-menus/props.d.ts +2 -2
- package/lib/ele-menus/util.cjs +1 -242
- package/lib/ele-menus/util.d.ts +1 -62
- package/lib/ele-modal/index.d.ts +9 -9
- package/lib/ele-modal/props.d.ts +2 -2
- package/lib/ele-modal/util.cjs +8 -4
- package/lib/ele-modal/util.d.ts +1 -1
- package/lib/ele-pagination/index.d.ts +2 -2
- package/lib/ele-pagination/props.d.ts +1 -1
- package/lib/ele-popconfirm/index.d.ts +11 -14
- package/lib/ele-popconfirm/props.d.ts +3 -4
- package/lib/ele-popover/index.d.ts +11 -14
- package/lib/ele-popover/props.cjs +1 -1
- package/lib/ele-popover/props.d.ts +0 -1
- package/lib/ele-printer/util.cjs +1 -1
- package/lib/ele-pro-layout/components/pro-iframe.cjs +6 -4
- package/lib/ele-pro-layout/components/pro-iframe.d.ts +6 -6
- package/lib/ele-pro-layout/index.cjs +13 -4
- package/lib/ele-pro-layout/index.d.ts +1 -1
- package/lib/ele-pro-layout/props.cjs +3 -3
- package/lib/ele-pro-layout/props.d.ts +3 -3
- package/lib/ele-pro-layout/types.d.ts +9 -5
- package/lib/ele-pro-layout/util.cjs +12 -0
- package/lib/ele-pro-layout/util.d.ts +6 -0
- package/lib/ele-pro-table/components/table-tools.cjs +5 -6
- package/lib/ele-pro-table/components/table-tools.d.ts +24 -24
- package/lib/ele-pro-table/components/tool-column.cjs +4 -4
- package/lib/ele-pro-table/components/tool-column.d.ts +7 -7
- package/lib/ele-pro-table/components/tool-export.d.ts +5 -5
- package/lib/ele-pro-table/components/tool-print-body-cell.cjs +1 -1
- package/lib/ele-pro-table/components/tool-print-header-cell.cjs +3 -2
- package/lib/ele-pro-table/components/tool-print.d.ts +5 -5
- package/lib/ele-pro-table/index.cjs +17 -21
- package/lib/ele-pro-table/index.d.ts +71 -81
- package/lib/ele-pro-table/props.cjs +1 -1
- package/lib/ele-pro-table/props.d.ts +9 -11
- package/lib/ele-segmented/index.cjs +26 -2
- package/lib/ele-segmented/index.d.ts +3 -1
- package/lib/ele-segmented/style/index.scss +7 -1
- package/lib/ele-steps/index.d.ts +12 -12
- package/lib/ele-steps/props.d.ts +3 -3
- package/lib/ele-tab-tool/index.cjs +43 -2
- package/lib/ele-tab-tool/index.d.ts +6 -1
- package/lib/ele-tab-tool/props.cjs +3 -1
- package/lib/ele-tab-tool/props.d.ts +2 -0
- package/lib/ele-tab-wrap/components/tab-dropdown.cjs +8 -25
- package/lib/ele-tab-wrap/index.cjs +20 -1
- package/lib/ele-table/style/index.scss +1 -2
- package/lib/ele-table-select/index.d.ts +6 -6
- package/lib/ele-tabs/index.cjs +238 -113
- package/lib/ele-tabs/index.d.ts +21 -19
- package/lib/ele-tabs/props.cjs +1 -1
- package/lib/ele-tabs/props.d.ts +1 -6
- package/lib/ele-tabs/style/index.scss +152 -176
- package/lib/ele-tabs/types.d.ts +29 -6
- package/lib/ele-tool/index.cjs +6 -1
- package/lib/ele-toolbar/index.d.ts +9 -9
- package/lib/ele-tooltip/index.d.ts +15 -15
- package/lib/ele-tooltip/props.d.ts +2 -2
- package/lib/ele-tooltip/style/css-var.scss +4 -0
- package/lib/ele-tree-select/index.d.ts +5 -5
- package/lib/ele-upload-list/components/list-item.cjs +144 -64
- package/lib/ele-upload-list/components/list-item.d.ts +31 -5
- package/lib/ele-upload-list/index.cjs +178 -95
- package/lib/ele-upload-list/index.d.ts +55 -26
- package/lib/ele-upload-list/props.cjs +20 -8
- package/lib/ele-upload-list/props.d.ts +22 -9
- package/lib/ele-upload-list/style/css-var.scss +8 -0
- package/lib/ele-upload-list/style/index.cjs +1 -1
- package/lib/ele-upload-list/style/index.scss +425 -135
- package/lib/ele-upload-list/types.d.ts +35 -11
- package/lib/ele-virtual-table/components/body-cell.d.ts +2 -2
- package/lib/ele-virtual-table/components/header-cell.d.ts +1 -1
- package/lib/ele-virtual-table/components/header-row.d.ts +1 -1
- package/lib/ele-virtual-table/index.cjs +7 -5
- package/lib/ele-virtual-table/index.d.ts +14 -22
- package/lib/ele-virtual-table/props.d.ts +6 -8
- package/lib/icons/CornerLeftFilled.cjs +25 -0
- package/lib/icons/CornerLeftFilled.d.ts +2 -0
- package/lib/icons/CornerRightFilled.cjs +25 -0
- package/lib/icons/CornerRightFilled.d.ts +2 -0
- package/lib/icons/EyeOutlined.cjs +29 -0
- package/lib/icons/EyeOutlined.d.ts +2 -0
- package/lib/icons/FileOutlined.cjs +4 -4
- package/lib/icons/SizeCompactOutlined.cjs +4 -4
- package/lib/icons/SizeMiddleOutlined.cjs +33 -0
- package/lib/icons/SizeMiddleOutlined.d.ts +2 -0
- package/lib/icons/SizeSlackOutlined.cjs +4 -4
- package/lib/icons/index.cjs +8 -0
- package/lib/icons/index.d.ts +4 -0
- package/lib/lang/en_US.cjs +4 -1
- package/lib/lang/zh_CN.cjs +4 -1
- package/lib/lang/zh_TW.cjs +4 -1
- package/lib/style/plus.scss +1 -0
- package/lib/style/themes/default.scss +80 -4
- package/lib/style/themes/rounded.scss +6 -3
- package/lib/style/themes/theme-util.scss +4 -0
- package/lib/style/util.scss +10 -3
- package/lib/utils/core.d.ts +4 -2
- package/lib/utils/hook.cjs +5 -1
- package/lib/utils/hook.d.ts +2 -0
- package/lib/utils/menu-util.cjs +9 -3
- package/lib/utils/message-box.cjs +4 -0
- package/lib/utils/message.cjs +1 -1
- package/package.json +36 -36
- package/typings/global.d.ts +1 -0
- package/es/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
- package/es/ele-app/style/overwrite/image-viewer/index.js +0 -1
- package/es/ele-app/style/overwrite/image-viewer/index.scss +0 -10
- package/es/ele-tabs/components/tab-title.d.ts +0 -52
- package/es/ele-tabs/components/tab-title.js +0 -115
- package/lib/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
- package/lib/ele-app/style/overwrite/image-viewer/index.cjs +0 -2
- package/lib/ele-app/style/overwrite/image-viewer/index.scss +0 -10
- package/lib/ele-tabs/components/tab-title.cjs +0 -114
- package/lib/ele-tabs/components/tab-title.d.ts +0 -52
- /package/es/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
- /package/lib/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, nextTick, onMounted,
|
|
2
|
-
import { ElTable } from "element-plus";
|
|
1
|
+
import { defineComponent, ref, computed, watch, nextTick, onMounted, resolveComponent, openBlock, createBlock, mergeProps, createSlots, withCtx, renderList, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
+
import { ElTable, ElEmpty } from "element-plus";
|
|
3
3
|
import { pick, omit, getValue, eachTree } from "../utils/core";
|
|
4
|
-
import
|
|
4
|
+
import TableColumns from "./components/table-columns";
|
|
5
|
+
import { useEmits, useMethods, useStickyHeader, useScrollAlive, isReserveChecked, getGlobalTooltipProps, getStateCols, getBodyRowClass, getHeadRowClass, isDisableRow, getTableFilter, getRowKeys, valueIsChanged, getRowByKey, arrayIsChanged, getKeysAndList, toggleRowSelectionPro } from "./util";
|
|
5
6
|
import { dataTableProps, dataTableEmits, tablePropKeys } from "./props";
|
|
6
|
-
const
|
|
7
|
+
const ownSlots = ["default", "append", "empty"];
|
|
8
|
+
const _sfc_main = defineComponent({
|
|
7
9
|
name: "EleDataTable",
|
|
10
|
+
components: { ElTable, ElEmpty, TableColumns },
|
|
8
11
|
props: dataTableProps,
|
|
9
12
|
emits: dataTableEmits,
|
|
10
|
-
setup(props, { emit
|
|
13
|
+
setup(props, { emit }) {
|
|
11
14
|
const events = useEmits(emit);
|
|
12
15
|
const methods = useMethods(() => tableRef.value);
|
|
13
16
|
const { isLayoutFixedHead, isLayoutMaximized } = useStickyHeader();
|
|
@@ -32,6 +35,78 @@ const index = defineComponent({
|
|
|
32
35
|
var _a;
|
|
33
36
|
return ((_a = props.treeProps) == null ? void 0 : _a.children) || "children";
|
|
34
37
|
});
|
|
38
|
+
const tableProps = computed(() => {
|
|
39
|
+
const propKeys = tablePropKeys.filter(
|
|
40
|
+
(k) => ![
|
|
41
|
+
"currentRowKey",
|
|
42
|
+
"showOverflowTooltip",
|
|
43
|
+
"tooltipOptions",
|
|
44
|
+
"tooltipEffect"
|
|
45
|
+
].includes(k)
|
|
46
|
+
);
|
|
47
|
+
return {
|
|
48
|
+
...pick(props, propKeys),
|
|
49
|
+
...omit(events, [
|
|
50
|
+
"onUpdate:currentRowKey",
|
|
51
|
+
"onUpdate:selectedRowKeys",
|
|
52
|
+
"onRowClick",
|
|
53
|
+
"onHeaderClick",
|
|
54
|
+
"onSortChange",
|
|
55
|
+
"onFilterChange",
|
|
56
|
+
"onCurrentChange",
|
|
57
|
+
"onSelect",
|
|
58
|
+
"onSelectAll",
|
|
59
|
+
"onSelectionChange"
|
|
60
|
+
])
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
const handleRowClick = (row, column, event) => {
|
|
64
|
+
if (props.rowClickChecked && !isDisableRow(row, props.data.indexOf(row), props.columns)) {
|
|
65
|
+
const selections = methods.getSelectionRows();
|
|
66
|
+
if (props.rowClickChecked === "smart" && (!selections || !selections.length || selections.length === 1)) {
|
|
67
|
+
const key = getValue(row, props.rowKey);
|
|
68
|
+
updateCheckedState(key == null ? [] : [key]);
|
|
69
|
+
} else {
|
|
70
|
+
toggleRowSelection(row);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
events.onRowClick(row, column, event);
|
|
74
|
+
};
|
|
75
|
+
const handleHeaderClick = (column, e) => {
|
|
76
|
+
if (column.sortable && column.filters) {
|
|
77
|
+
const el = e.currentTarget;
|
|
78
|
+
if (el) {
|
|
79
|
+
const caretEl = el.querySelector(".caret-wrapper");
|
|
80
|
+
caretEl && caretEl.dispatchEvent(new MouseEvent("click"));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
events.onHeaderClick(column, e);
|
|
84
|
+
};
|
|
85
|
+
const handleSortChange = (sorter) => {
|
|
86
|
+
const currentSorter = tableState.sorter;
|
|
87
|
+
if (currentSorter && sorter.prop === currentSorter.prop && sorter.order === currentSorter.order) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
tableState.sorter = sorter;
|
|
91
|
+
events.onSortChange(sorter);
|
|
92
|
+
};
|
|
93
|
+
const handleFilterChange = (filter) => {
|
|
94
|
+
tableState.filter = getTableFilter(tableRef.value) ?? filter;
|
|
95
|
+
events.onFilterChange(tableState.filter);
|
|
96
|
+
};
|
|
97
|
+
const handleCurrentChange = (row, old) => {
|
|
98
|
+
if (row != null && row !== old) {
|
|
99
|
+
updateSelectedState(getValue(row, props.rowKey), row);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const handleSelect = (selection, row) => {
|
|
103
|
+
events.onSelect(selection, row);
|
|
104
|
+
updateCheckedState(getRowKeys(selection, props.rowKey), selection);
|
|
105
|
+
};
|
|
106
|
+
const handleSelectAll = (selection) => {
|
|
107
|
+
updateCheckedState(getRowKeys(selection, props.rowKey), selection);
|
|
108
|
+
events.onSelectAll(selection);
|
|
109
|
+
};
|
|
35
110
|
const updateScrollBar = () => {
|
|
36
111
|
var _a;
|
|
37
112
|
const scrollBarRef = (_a = tableRef.value) == null ? void 0 : _a.scrollBarRef;
|
|
@@ -62,7 +137,11 @@ const index = defineComponent({
|
|
|
62
137
|
};
|
|
63
138
|
const setSelectedRows = (rows) => {
|
|
64
139
|
if (rows) {
|
|
65
|
-
updateCheckedState(
|
|
140
|
+
updateCheckedState(
|
|
141
|
+
getRowKeys(rows, props.rowKey),
|
|
142
|
+
rows,
|
|
143
|
+
!!rows.length
|
|
144
|
+
);
|
|
66
145
|
}
|
|
67
146
|
};
|
|
68
147
|
const setSelectedRowKeys = (keys) => {
|
|
@@ -94,7 +173,12 @@ const index = defineComponent({
|
|
|
94
173
|
return;
|
|
95
174
|
}
|
|
96
175
|
if (key != null) {
|
|
97
|
-
const row = getRowByKey(
|
|
176
|
+
const row = getRowByKey(
|
|
177
|
+
key,
|
|
178
|
+
props.data,
|
|
179
|
+
props.rowKey,
|
|
180
|
+
childKey.value
|
|
181
|
+
);
|
|
98
182
|
if (row != null || props.reserveCurrent) {
|
|
99
183
|
tableState.oldRow = tableState.row;
|
|
100
184
|
tableState.row = row || item || void 0;
|
|
@@ -137,7 +221,9 @@ const index = defineComponent({
|
|
|
137
221
|
childKey.value
|
|
138
222
|
);
|
|
139
223
|
const itemKeys = items ? items.map((d) => getValue(d, props.rowKey)) : [];
|
|
140
|
-
const oldKeys = tableState.checked.map(
|
|
224
|
+
const oldKeys = tableState.checked.map(
|
|
225
|
+
(d) => getValue(d, props.rowKey)
|
|
226
|
+
);
|
|
141
227
|
const checkedKeys = [];
|
|
142
228
|
const checked = [];
|
|
143
229
|
keys.forEach((key) => {
|
|
@@ -188,7 +274,12 @@ const index = defineComponent({
|
|
|
188
274
|
const updateSelectedAndChecked = () => {
|
|
189
275
|
const key = tableState.key;
|
|
190
276
|
if (key != null) {
|
|
191
|
-
const row = getRowByKey(
|
|
277
|
+
const row = getRowByKey(
|
|
278
|
+
key,
|
|
279
|
+
props.data,
|
|
280
|
+
props.rowKey,
|
|
281
|
+
childKey.value
|
|
282
|
+
);
|
|
192
283
|
if (row != null) {
|
|
193
284
|
updateSelectedState(key, row);
|
|
194
285
|
} else if (!props.reserveCurrent) {
|
|
@@ -237,7 +328,10 @@ const index = defineComponent({
|
|
|
237
328
|
methods.doLayout();
|
|
238
329
|
updateScrollBar();
|
|
239
330
|
if (sorter) {
|
|
240
|
-
methods.sort(
|
|
331
|
+
methods.sort(
|
|
332
|
+
sorter.prop,
|
|
333
|
+
sorter.order || "ascending"
|
|
334
|
+
);
|
|
241
335
|
}
|
|
242
336
|
});
|
|
243
337
|
}
|
|
@@ -270,8 +364,24 @@ const index = defineComponent({
|
|
|
270
364
|
updateCheckedState(props.selectedRowKeys);
|
|
271
365
|
}
|
|
272
366
|
});
|
|
273
|
-
|
|
367
|
+
return {
|
|
368
|
+
ownSlots,
|
|
369
|
+
getBodyRowClass,
|
|
370
|
+
getHeadRowClass,
|
|
274
371
|
...methods,
|
|
372
|
+
isLayoutFixedHead,
|
|
373
|
+
isLayoutMaximized,
|
|
374
|
+
tableRef,
|
|
375
|
+
tableCols,
|
|
376
|
+
tableOverflowTooltip,
|
|
377
|
+
tableProps,
|
|
378
|
+
handleRowClick,
|
|
379
|
+
handleHeaderClick,
|
|
380
|
+
handleSortChange,
|
|
381
|
+
handleFilterChange,
|
|
382
|
+
handleCurrentChange,
|
|
383
|
+
handleSelect,
|
|
384
|
+
handleSelectAll,
|
|
275
385
|
clearSort,
|
|
276
386
|
clearSelection,
|
|
277
387
|
toggleRowSelection,
|
|
@@ -281,118 +391,90 @@ const index = defineComponent({
|
|
|
281
391
|
setSelectedRows,
|
|
282
392
|
setSelectedRowKeys,
|
|
283
393
|
toggleRowExpansionAll,
|
|
284
|
-
updateSelectedAndChecked
|
|
285
|
-
tableRef
|
|
286
|
-
};
|
|
287
|
-
expose(exposeValue);
|
|
288
|
-
return () => {
|
|
289
|
-
return h(
|
|
290
|
-
ElTable,
|
|
291
|
-
{
|
|
292
|
-
...pick(props, tablePropKeys),
|
|
293
|
-
...omit(events, [
|
|
294
|
-
"onUpdate:currentRowKey",
|
|
295
|
-
"onUpdate:selectedRowKeys"
|
|
296
|
-
]),
|
|
297
|
-
ref: tableRef,
|
|
298
|
-
class: [
|
|
299
|
-
"ele-data-table",
|
|
300
|
-
{ "is-sticky": props.sticky },
|
|
301
|
-
{ "is-layout-fixed-head": props.sticky && isLayoutFixedHead.value },
|
|
302
|
-
{ "is-layout-maximized": props.sticky && isLayoutMaximized.value },
|
|
303
|
-
{ "is-sticky": props.sticky },
|
|
304
|
-
{ "hide-header": !props.showHeader },
|
|
305
|
-
{ "hide-bottom-line": !props.bottomLine }
|
|
306
|
-
],
|
|
307
|
-
currentRowKey: void 0,
|
|
308
|
-
emptyText: props.errorText || props.emptyText,
|
|
309
|
-
rowClassName: (param) => {
|
|
310
|
-
return getBodyRowClass(props.rowClassName, param);
|
|
311
|
-
},
|
|
312
|
-
headerRowClassName: (param) => {
|
|
313
|
-
return getHeadRowClass(
|
|
314
|
-
props.headerRowClassName,
|
|
315
|
-
param,
|
|
316
|
-
props.headerEllipsis
|
|
317
|
-
);
|
|
318
|
-
},
|
|
319
|
-
onRowClick: (row, column, event) => {
|
|
320
|
-
if (props.rowClickChecked && !isDisableRow(row, props.data.indexOf(row), props.columns)) {
|
|
321
|
-
const selections = methods.getSelectionRows();
|
|
322
|
-
if (props.rowClickChecked === "smart" && (!selections || !selections.length || selections.length === 1)) {
|
|
323
|
-
const key = getValue(row, props.rowKey);
|
|
324
|
-
updateCheckedState(key == null ? [] : [key]);
|
|
325
|
-
} else {
|
|
326
|
-
toggleRowSelection(row);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
events.onRowClick(row, column, event);
|
|
330
|
-
},
|
|
331
|
-
onHeaderClick: (column, e) => {
|
|
332
|
-
if (column.sortable && column.filters) {
|
|
333
|
-
const el = e.currentTarget;
|
|
334
|
-
if (el) {
|
|
335
|
-
const caretEl = el.querySelector(".caret-wrapper");
|
|
336
|
-
caretEl && caretEl.dispatchEvent(new MouseEvent("click"));
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
events.onHeaderClick(column, e);
|
|
340
|
-
},
|
|
341
|
-
onSortChange: (sorter) => {
|
|
342
|
-
const currentSorter = tableState.sorter;
|
|
343
|
-
if (currentSorter && sorter.prop === currentSorter.prop && sorter.order === currentSorter.order) {
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
tableState.sorter = sorter;
|
|
347
|
-
events.onSortChange(sorter);
|
|
348
|
-
},
|
|
349
|
-
onFilterChange: (filter) => {
|
|
350
|
-
tableState.filter = getTableFilter(tableRef.value) ?? filter;
|
|
351
|
-
events.onFilterChange(tableState.filter);
|
|
352
|
-
},
|
|
353
|
-
// 重写选中逻辑
|
|
354
|
-
onCurrentChange: (row, old) => {
|
|
355
|
-
if (row != null && row !== old) {
|
|
356
|
-
updateSelectedState(getValue(row, props.rowKey), row);
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
onSelect: (selection, row) => {
|
|
360
|
-
events.onSelect(selection, row);
|
|
361
|
-
updateCheckedState(getRowKeys(selection, props.rowKey), selection);
|
|
362
|
-
},
|
|
363
|
-
onSelectAll: (selection) => {
|
|
364
|
-
updateCheckedState(getRowKeys(selection, props.rowKey), selection);
|
|
365
|
-
events.onSelectAll(selection);
|
|
366
|
-
},
|
|
367
|
-
onSelectionChange: () => {
|
|
368
|
-
},
|
|
369
|
-
// 移除提示组件相关属性
|
|
370
|
-
showOverflowTooltip: void 0,
|
|
371
|
-
tooltipOptions: void 0,
|
|
372
|
-
tooltipEffect: void 0
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
default: () => {
|
|
376
|
-
return getCols(
|
|
377
|
-
tableCols.value,
|
|
378
|
-
props.pageIndex,
|
|
379
|
-
slots,
|
|
380
|
-
props.slotNormalize,
|
|
381
|
-
tableOverflowTooltip.value
|
|
382
|
-
);
|
|
383
|
-
},
|
|
384
|
-
append: slots.append,
|
|
385
|
-
empty: getEmptySlot(
|
|
386
|
-
slots,
|
|
387
|
-
props.emptyProps,
|
|
388
|
-
props.emptyText,
|
|
389
|
-
props.errorText
|
|
390
|
-
)
|
|
391
|
-
}
|
|
392
|
-
);
|
|
394
|
+
updateSelectedAndChecked
|
|
393
395
|
};
|
|
394
396
|
}
|
|
395
397
|
});
|
|
398
|
+
const _export_sfc = (sfc, props) => {
|
|
399
|
+
const target = sfc.__vccOpts || sfc;
|
|
400
|
+
for (const [key, val] of props) {
|
|
401
|
+
target[key] = val;
|
|
402
|
+
}
|
|
403
|
+
return target;
|
|
404
|
+
};
|
|
405
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
406
|
+
const _component_TableColumns = resolveComponent("TableColumns");
|
|
407
|
+
const _component_ElEmpty = resolveComponent("ElEmpty");
|
|
408
|
+
const _component_ElTable = resolveComponent("ElTable");
|
|
409
|
+
return openBlock(), createBlock(_component_ElTable, mergeProps(_ctx.tableProps, {
|
|
410
|
+
ref: "tableRef",
|
|
411
|
+
emptyText: _ctx.errorText || _ctx.emptyText,
|
|
412
|
+
rowClassName: (param) => _ctx.getBodyRowClass(_ctx.rowClassName, param),
|
|
413
|
+
headerRowClassName: (param) => _ctx.getHeadRowClass(_ctx.headerRowClassName, param, _ctx.headerEllipsis),
|
|
414
|
+
class: [
|
|
415
|
+
"ele-data-table",
|
|
416
|
+
{ "is-sticky": _ctx.sticky },
|
|
417
|
+
{ "is-layout-fixed-head": _ctx.sticky && _ctx.isLayoutFixedHead },
|
|
418
|
+
{ "is-layout-maximized": _ctx.sticky && _ctx.isLayoutMaximized },
|
|
419
|
+
{ "is-sticky": _ctx.sticky },
|
|
420
|
+
{ "hide-header": !_ctx.showHeader },
|
|
421
|
+
{ "hide-bottom-line": !_ctx.bottomLine }
|
|
422
|
+
],
|
|
423
|
+
onRowClick: _ctx.handleRowClick,
|
|
424
|
+
onHeaderClick: _ctx.handleHeaderClick,
|
|
425
|
+
onSortChange: _ctx.handleSortChange,
|
|
426
|
+
onFilterChange: _ctx.handleFilterChange,
|
|
427
|
+
onCurrentChange: _ctx.handleCurrentChange,
|
|
428
|
+
onSelect: _ctx.handleSelect,
|
|
429
|
+
onSelectAll: _ctx.handleSelectAll
|
|
430
|
+
}), createSlots({
|
|
431
|
+
default: withCtx(() => [
|
|
432
|
+
_ctx.tableCols && _ctx.tableCols.length ? (openBlock(), createBlock(_component_TableColumns, {
|
|
433
|
+
key: 0,
|
|
434
|
+
columns: _ctx.tableCols,
|
|
435
|
+
pageIndex: _ctx.pageIndex,
|
|
436
|
+
slotNormalize: _ctx.slotNormalize,
|
|
437
|
+
globalTooltip: _ctx.tableOverflowTooltip
|
|
438
|
+
}, createSlots({ _: 2 }, [
|
|
439
|
+
renderList(Object.keys(_ctx.$slots).filter((k) => !_ctx.ownSlots.includes(k)), (name) => {
|
|
440
|
+
return {
|
|
441
|
+
name,
|
|
442
|
+
fn: withCtx((slotProps) => [
|
|
443
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
444
|
+
])
|
|
445
|
+
};
|
|
446
|
+
})
|
|
447
|
+
]), 1032, ["columns", "pageIndex", "slotNormalize", "globalTooltip"])) : createCommentVNode("", true)
|
|
448
|
+
]),
|
|
449
|
+
_: 2
|
|
450
|
+
}, [
|
|
451
|
+
_ctx.$slots.append ? {
|
|
452
|
+
name: "append",
|
|
453
|
+
fn: withCtx((slotProps) => [
|
|
454
|
+
renderSlot(_ctx.$slots, "append", normalizeProps(guardReactiveProps(slotProps || {})))
|
|
455
|
+
]),
|
|
456
|
+
key: "0"
|
|
457
|
+
} : void 0,
|
|
458
|
+
_ctx.$slots.empty || _ctx.emptyProps ? {
|
|
459
|
+
name: "empty",
|
|
460
|
+
fn: withCtx(() => [
|
|
461
|
+
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", {
|
|
462
|
+
key: 0,
|
|
463
|
+
text: _ctx.emptyText,
|
|
464
|
+
error: _ctx.errorText
|
|
465
|
+
}) : _ctx.emptyProps ? (openBlock(), createBlock(_component_ElEmpty, mergeProps({
|
|
466
|
+
key: 1,
|
|
467
|
+
imageSize: 68
|
|
468
|
+
}, !_ctx.emptyProps || _ctx.emptyProps === true ? {} : _ctx.emptyProps, {
|
|
469
|
+
description: _ctx.errorText || _ctx.emptyText,
|
|
470
|
+
class: "ele-table-empty"
|
|
471
|
+
}), null, 16, ["description"])) : createCommentVNode("", true)
|
|
472
|
+
]),
|
|
473
|
+
key: "1"
|
|
474
|
+
} : void 0
|
|
475
|
+
]), 1040, ["emptyText", "rowClassName", "headerRowClassName", "class", "onRowClick", "onHeaderClick", "onSortChange", "onFilterChange", "onCurrentChange", "onSelect", "onSelectAll"]);
|
|
476
|
+
}
|
|
477
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
396
478
|
export {
|
|
397
479
|
index as default
|
|
398
480
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
2
|
import { DataKey, DataItem, Column, Columns, Sorter, Filter, TableEmptyProps, RowClickChecked, RowKey } from './types';
|
|
3
3
|
|
|
4
|
-
declare const normalizeProps: Omit<{
|
|
4
|
+
declare const normalizeProps: import('../ele-app/types').Mutable<Omit<{
|
|
5
5
|
data: {
|
|
6
6
|
type: PropType<any[]>;
|
|
7
7
|
default: () => never[];
|
|
8
8
|
};
|
|
9
9
|
size: {
|
|
10
|
-
readonly type: PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "" | "
|
|
10
|
+
readonly type: PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
11
11
|
readonly required: false;
|
|
12
12
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
13
13
|
__epPropKey: true;
|
|
@@ -40,11 +40,11 @@ declare const normalizeProps: Omit<{
|
|
|
40
40
|
highlightCurrentRow: BooleanConstructor;
|
|
41
41
|
currentRowKey: (NumberConstructor | StringConstructor)[];
|
|
42
42
|
emptyText: StringConstructor;
|
|
43
|
-
expandRowKeys: PropType<
|
|
43
|
+
expandRowKeys: PropType<string[] | undefined>;
|
|
44
44
|
defaultExpandAll: BooleanConstructor;
|
|
45
45
|
defaultSort: PropType<import('element-plus/es/components/table/src/table/defaults').Sort | undefined>;
|
|
46
46
|
tooltipEffect: StringConstructor;
|
|
47
|
-
tooltipOptions: PropType<Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "
|
|
47
|
+
tooltipOptions: PropType<Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
48
48
|
spanMethod: PropType<((data: {
|
|
49
49
|
row: any;
|
|
50
50
|
rowIndex: number;
|
|
@@ -63,13 +63,11 @@ declare const normalizeProps: Omit<{
|
|
|
63
63
|
default: number;
|
|
64
64
|
};
|
|
65
65
|
treeProps: {
|
|
66
|
-
type: PropType<
|
|
67
|
-
hasChildren?: string | undefined;
|
|
68
|
-
children?: string | undefined;
|
|
69
|
-
} | undefined>;
|
|
66
|
+
type: PropType<import('element-plus/es/components/table/src/table/defaults').TreeProps | undefined>;
|
|
70
67
|
default: () => {
|
|
71
68
|
hasChildren: string;
|
|
72
69
|
children: string;
|
|
70
|
+
checkStrictly: boolean;
|
|
73
71
|
};
|
|
74
72
|
};
|
|
75
73
|
lazy: BooleanConstructor;
|
|
@@ -88,8 +86,8 @@ declare const normalizeProps: Omit<{
|
|
|
88
86
|
};
|
|
89
87
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
90
88
|
flexible: BooleanConstructor;
|
|
91
|
-
showOverflowTooltip: PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "
|
|
92
|
-
}, "style"
|
|
89
|
+
showOverflowTooltip: PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
90
|
+
}, "style">>;
|
|
93
91
|
/**
|
|
94
92
|
* 属性
|
|
95
93
|
*/
|
|
@@ -152,7 +150,7 @@ export declare const dataTableProps: {
|
|
|
152
150
|
default: () => never[];
|
|
153
151
|
};
|
|
154
152
|
size: {
|
|
155
|
-
readonly type: PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "" | "
|
|
153
|
+
readonly type: PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
156
154
|
readonly required: false;
|
|
157
155
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
158
156
|
__epPropKey: true;
|
|
@@ -185,11 +183,11 @@ export declare const dataTableProps: {
|
|
|
185
183
|
highlightCurrentRow: BooleanConstructor;
|
|
186
184
|
currentRowKey: (NumberConstructor | StringConstructor)[];
|
|
187
185
|
emptyText: StringConstructor;
|
|
188
|
-
expandRowKeys: PropType<
|
|
186
|
+
expandRowKeys: PropType<string[] | undefined>;
|
|
189
187
|
defaultExpandAll: BooleanConstructor;
|
|
190
188
|
defaultSort: PropType<import('element-plus/es/components/table/src/table/defaults').Sort | undefined>;
|
|
191
189
|
tooltipEffect: StringConstructor;
|
|
192
|
-
tooltipOptions: PropType<Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "
|
|
190
|
+
tooltipOptions: PropType<Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
193
191
|
spanMethod: PropType<((data: {
|
|
194
192
|
row: any;
|
|
195
193
|
rowIndex: number;
|
|
@@ -208,13 +206,11 @@ export declare const dataTableProps: {
|
|
|
208
206
|
default: number;
|
|
209
207
|
};
|
|
210
208
|
treeProps: {
|
|
211
|
-
type: PropType<
|
|
212
|
-
hasChildren?: string | undefined;
|
|
213
|
-
children?: string | undefined;
|
|
214
|
-
} | undefined>;
|
|
209
|
+
type: PropType<import('element-plus/es/components/table/src/table/defaults').TreeProps | undefined>;
|
|
215
210
|
default: () => {
|
|
216
211
|
hasChildren: string;
|
|
217
212
|
children: string;
|
|
213
|
+
checkStrictly: boolean;
|
|
218
214
|
};
|
|
219
215
|
};
|
|
220
216
|
load: PropType<((row: any, treeNode: import('element-plus/es/components/table/src/table/defaults').TreeNode, resolve: (data: any[]) => void) => void) | undefined>;
|
|
@@ -224,7 +220,7 @@ export declare const dataTableProps: {
|
|
|
224
220
|
};
|
|
225
221
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
226
222
|
flexible: BooleanConstructor;
|
|
227
|
-
showOverflowTooltip: PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "
|
|
223
|
+
showOverflowTooltip: PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
228
224
|
};
|
|
229
225
|
export type DataTableProps = ExtractPropTypes<typeof dataTableProps>;
|
|
230
226
|
/**
|
|
@@ -46,10 +46,10 @@ export interface Column extends Omit<TableColumn, 'filterPlacement'> {
|
|
|
46
46
|
hideInPrint?: boolean;
|
|
47
47
|
/** 打印插槽名称 */
|
|
48
48
|
printSlot?: string;
|
|
49
|
+
/** 打印表头插槽名称 */
|
|
50
|
+
printHeaderSlot?: string;
|
|
49
51
|
/** 子级 */
|
|
50
52
|
children?: Columns;
|
|
51
|
-
/** 显示条件 */
|
|
52
|
-
vIf?: any;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import { Slots, VNode } from 'vue';
|
|
2
1
|
import { Emitter } from '../ele-app/types';
|
|
3
|
-
import {
|
|
2
|
+
import { ElTableInstance } from '../ele-app/el';
|
|
4
3
|
import { dataTableEmits } from './props';
|
|
5
4
|
import { DataKey, DataItem, Column, Columns, Sorter, Filter, GetInstance, TableMethods, ShowOverflowTooltip, TooltipEffect, TooltipOptions, RowClass, RowKey } from './types';
|
|
6
5
|
|
|
7
|
-
/**
|
|
8
|
-
* 递归获取表格列节点
|
|
9
|
-
* @param cols 列配置
|
|
10
|
-
* @param pageIndex 序号列起始值
|
|
11
|
-
* @param slots 插槽对象
|
|
12
|
-
* @param slotNormalize 是否过滤非正常的插槽渲染
|
|
13
|
-
* @param globalTooltip 表格提示组件属性
|
|
14
|
-
*/
|
|
15
|
-
export declare function getCols(cols: Columns | undefined, pageIndex: number | undefined, slots: Slots, slotNormalize: boolean, globalTooltip?: ShowOverflowTooltip): VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}>[];
|
|
18
6
|
/**
|
|
19
7
|
* 获取行的类名
|
|
20
8
|
* @param rowClass 自定义行类名
|
|
@@ -53,38 +41,6 @@ export declare function mergeTooltipProps(props?: ShowOverflowTooltip, globalPro
|
|
|
53
41
|
* @param globalProps 表格提示组件属性
|
|
54
42
|
*/
|
|
55
43
|
export declare function getTooltipProps(props?: ShowOverflowTooltip, globalProps?: ShowOverflowTooltip): ShowOverflowTooltip;
|
|
56
|
-
/**
|
|
57
|
-
* 获取插槽
|
|
58
|
-
* @param slots 插槽对象
|
|
59
|
-
* @param name 插槽名称
|
|
60
|
-
*/
|
|
61
|
-
export declare function getSlot(slots: Slots, name?: string): import('vue').Slot<any> | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* 渲染插槽
|
|
64
|
-
* @param slots 插槽对象
|
|
65
|
-
* @param name 插槽名称
|
|
66
|
-
* @param props 插槽数据
|
|
67
|
-
*/
|
|
68
|
-
export declare function renderSlot(slots: Slots, name?: string, props?: any): VNode[] | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* 获取空组件属性
|
|
71
|
-
* @param emptyProps 空组件属性
|
|
72
|
-
* @param emptyText 空文本
|
|
73
|
-
* @param errorText 错误文本
|
|
74
|
-
*/
|
|
75
|
-
export declare function getEmptyProps(emptyProps?: boolean | ElEmptyProps, emptyText?: string, errorText?: string): ElEmptyProps;
|
|
76
|
-
/**
|
|
77
|
-
* 获取空状态插槽
|
|
78
|
-
* @param slots 插槽对象
|
|
79
|
-
* @param emptyProps 空组件属性
|
|
80
|
-
* @param emptyText 空文本
|
|
81
|
-
* @param errorText 错误文本
|
|
82
|
-
*/
|
|
83
|
-
export declare function getEmptySlot(slots: Slots, emptyProps?: boolean | ElEmptyProps, emptyText?: string, errorText?: string): (() => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
84
|
-
[key: string]: any;
|
|
85
|
-
}> | VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
86
|
-
[key: string]: any;
|
|
87
|
-
}>[] | undefined) | undefined;
|
|
88
44
|
/**
|
|
89
45
|
* 切换表格指定数据的选中状态
|
|
90
46
|
* @param tableRef 表格实例
|