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
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const elementPlus = require("element-plus");
|
|
4
4
|
const core = require("../utils/core");
|
|
5
|
+
const TableColumns = require("./components/table-columns");
|
|
5
6
|
const util = require("./util");
|
|
6
7
|
const props = require("./props");
|
|
7
|
-
const
|
|
8
|
+
const ownSlots = ["default", "append", "empty"];
|
|
9
|
+
const _sfc_main = vue.defineComponent({
|
|
8
10
|
name: "EleDataTable",
|
|
11
|
+
components: { ElTable: elementPlus.ElTable, ElEmpty: elementPlus.ElEmpty, TableColumns },
|
|
9
12
|
props: props.dataTableProps,
|
|
10
13
|
emits: props.dataTableEmits,
|
|
11
|
-
setup(props$1, { emit
|
|
14
|
+
setup(props$1, { emit }) {
|
|
12
15
|
const events = util.useEmits(emit);
|
|
13
16
|
const methods = util.useMethods(() => tableRef.value);
|
|
14
17
|
const { isLayoutFixedHead, isLayoutMaximized } = util.useStickyHeader();
|
|
@@ -33,6 +36,78 @@ const index = vue.defineComponent({
|
|
|
33
36
|
var _a;
|
|
34
37
|
return ((_a = props$1.treeProps) == null ? void 0 : _a.children) || "children";
|
|
35
38
|
});
|
|
39
|
+
const tableProps = vue.computed(() => {
|
|
40
|
+
const propKeys = props.tablePropKeys.filter(
|
|
41
|
+
(k) => ![
|
|
42
|
+
"currentRowKey",
|
|
43
|
+
"showOverflowTooltip",
|
|
44
|
+
"tooltipOptions",
|
|
45
|
+
"tooltipEffect"
|
|
46
|
+
].includes(k)
|
|
47
|
+
);
|
|
48
|
+
return {
|
|
49
|
+
...core.pick(props$1, propKeys),
|
|
50
|
+
...core.omit(events, [
|
|
51
|
+
"onUpdate:currentRowKey",
|
|
52
|
+
"onUpdate:selectedRowKeys",
|
|
53
|
+
"onRowClick",
|
|
54
|
+
"onHeaderClick",
|
|
55
|
+
"onSortChange",
|
|
56
|
+
"onFilterChange",
|
|
57
|
+
"onCurrentChange",
|
|
58
|
+
"onSelect",
|
|
59
|
+
"onSelectAll",
|
|
60
|
+
"onSelectionChange"
|
|
61
|
+
])
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
const handleRowClick = (row, column, event) => {
|
|
65
|
+
if (props$1.rowClickChecked && !util.isDisableRow(row, props$1.data.indexOf(row), props$1.columns)) {
|
|
66
|
+
const selections = methods.getSelectionRows();
|
|
67
|
+
if (props$1.rowClickChecked === "smart" && (!selections || !selections.length || selections.length === 1)) {
|
|
68
|
+
const key = core.getValue(row, props$1.rowKey);
|
|
69
|
+
updateCheckedState(key == null ? [] : [key]);
|
|
70
|
+
} else {
|
|
71
|
+
toggleRowSelection(row);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
events.onRowClick(row, column, event);
|
|
75
|
+
};
|
|
76
|
+
const handleHeaderClick = (column, e) => {
|
|
77
|
+
if (column.sortable && column.filters) {
|
|
78
|
+
const el = e.currentTarget;
|
|
79
|
+
if (el) {
|
|
80
|
+
const caretEl = el.querySelector(".caret-wrapper");
|
|
81
|
+
caretEl && caretEl.dispatchEvent(new MouseEvent("click"));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
events.onHeaderClick(column, e);
|
|
85
|
+
};
|
|
86
|
+
const handleSortChange = (sorter) => {
|
|
87
|
+
const currentSorter = tableState.sorter;
|
|
88
|
+
if (currentSorter && sorter.prop === currentSorter.prop && sorter.order === currentSorter.order) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
tableState.sorter = sorter;
|
|
92
|
+
events.onSortChange(sorter);
|
|
93
|
+
};
|
|
94
|
+
const handleFilterChange = (filter) => {
|
|
95
|
+
tableState.filter = util.getTableFilter(tableRef.value) ?? filter;
|
|
96
|
+
events.onFilterChange(tableState.filter);
|
|
97
|
+
};
|
|
98
|
+
const handleCurrentChange = (row, old) => {
|
|
99
|
+
if (row != null && row !== old) {
|
|
100
|
+
updateSelectedState(core.getValue(row, props$1.rowKey), row);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const handleSelect = (selection, row) => {
|
|
104
|
+
events.onSelect(selection, row);
|
|
105
|
+
updateCheckedState(util.getRowKeys(selection, props$1.rowKey), selection);
|
|
106
|
+
};
|
|
107
|
+
const handleSelectAll = (selection) => {
|
|
108
|
+
updateCheckedState(util.getRowKeys(selection, props$1.rowKey), selection);
|
|
109
|
+
events.onSelectAll(selection);
|
|
110
|
+
};
|
|
36
111
|
const updateScrollBar = () => {
|
|
37
112
|
var _a;
|
|
38
113
|
const scrollBarRef = (_a = tableRef.value) == null ? void 0 : _a.scrollBarRef;
|
|
@@ -63,7 +138,11 @@ const index = vue.defineComponent({
|
|
|
63
138
|
};
|
|
64
139
|
const setSelectedRows = (rows) => {
|
|
65
140
|
if (rows) {
|
|
66
|
-
updateCheckedState(
|
|
141
|
+
updateCheckedState(
|
|
142
|
+
util.getRowKeys(rows, props$1.rowKey),
|
|
143
|
+
rows,
|
|
144
|
+
!!rows.length
|
|
145
|
+
);
|
|
67
146
|
}
|
|
68
147
|
};
|
|
69
148
|
const setSelectedRowKeys = (keys) => {
|
|
@@ -95,7 +174,12 @@ const index = vue.defineComponent({
|
|
|
95
174
|
return;
|
|
96
175
|
}
|
|
97
176
|
if (key != null) {
|
|
98
|
-
const row = util.getRowByKey(
|
|
177
|
+
const row = util.getRowByKey(
|
|
178
|
+
key,
|
|
179
|
+
props$1.data,
|
|
180
|
+
props$1.rowKey,
|
|
181
|
+
childKey.value
|
|
182
|
+
);
|
|
99
183
|
if (row != null || props$1.reserveCurrent) {
|
|
100
184
|
tableState.oldRow = tableState.row;
|
|
101
185
|
tableState.row = row || item || void 0;
|
|
@@ -138,7 +222,9 @@ const index = vue.defineComponent({
|
|
|
138
222
|
childKey.value
|
|
139
223
|
);
|
|
140
224
|
const itemKeys = items ? items.map((d) => core.getValue(d, props$1.rowKey)) : [];
|
|
141
|
-
const oldKeys = tableState.checked.map(
|
|
225
|
+
const oldKeys = tableState.checked.map(
|
|
226
|
+
(d) => core.getValue(d, props$1.rowKey)
|
|
227
|
+
);
|
|
142
228
|
const checkedKeys = [];
|
|
143
229
|
const checked = [];
|
|
144
230
|
keys.forEach((key) => {
|
|
@@ -189,7 +275,12 @@ const index = vue.defineComponent({
|
|
|
189
275
|
const updateSelectedAndChecked = () => {
|
|
190
276
|
const key = tableState.key;
|
|
191
277
|
if (key != null) {
|
|
192
|
-
const row = util.getRowByKey(
|
|
278
|
+
const row = util.getRowByKey(
|
|
279
|
+
key,
|
|
280
|
+
props$1.data,
|
|
281
|
+
props$1.rowKey,
|
|
282
|
+
childKey.value
|
|
283
|
+
);
|
|
193
284
|
if (row != null) {
|
|
194
285
|
updateSelectedState(key, row);
|
|
195
286
|
} else if (!props$1.reserveCurrent) {
|
|
@@ -238,7 +329,10 @@ const index = vue.defineComponent({
|
|
|
238
329
|
methods.doLayout();
|
|
239
330
|
updateScrollBar();
|
|
240
331
|
if (sorter) {
|
|
241
|
-
methods.sort(
|
|
332
|
+
methods.sort(
|
|
333
|
+
sorter.prop,
|
|
334
|
+
sorter.order || "ascending"
|
|
335
|
+
);
|
|
242
336
|
}
|
|
243
337
|
});
|
|
244
338
|
}
|
|
@@ -271,8 +365,24 @@ const index = vue.defineComponent({
|
|
|
271
365
|
updateCheckedState(props$1.selectedRowKeys);
|
|
272
366
|
}
|
|
273
367
|
});
|
|
274
|
-
|
|
368
|
+
return {
|
|
369
|
+
ownSlots,
|
|
370
|
+
getBodyRowClass: util.getBodyRowClass,
|
|
371
|
+
getHeadRowClass: util.getHeadRowClass,
|
|
275
372
|
...methods,
|
|
373
|
+
isLayoutFixedHead,
|
|
374
|
+
isLayoutMaximized,
|
|
375
|
+
tableRef,
|
|
376
|
+
tableCols,
|
|
377
|
+
tableOverflowTooltip,
|
|
378
|
+
tableProps,
|
|
379
|
+
handleRowClick,
|
|
380
|
+
handleHeaderClick,
|
|
381
|
+
handleSortChange,
|
|
382
|
+
handleFilterChange,
|
|
383
|
+
handleCurrentChange,
|
|
384
|
+
handleSelect,
|
|
385
|
+
handleSelectAll,
|
|
276
386
|
clearSort,
|
|
277
387
|
clearSelection,
|
|
278
388
|
toggleRowSelection,
|
|
@@ -282,116 +392,88 @@ const index = vue.defineComponent({
|
|
|
282
392
|
setSelectedRows,
|
|
283
393
|
setSelectedRowKeys,
|
|
284
394
|
toggleRowExpansionAll,
|
|
285
|
-
updateSelectedAndChecked
|
|
286
|
-
tableRef
|
|
287
|
-
};
|
|
288
|
-
expose(exposeValue);
|
|
289
|
-
return () => {
|
|
290
|
-
return vue.h(
|
|
291
|
-
elementPlus.ElTable,
|
|
292
|
-
{
|
|
293
|
-
...core.pick(props$1, props.tablePropKeys),
|
|
294
|
-
...core.omit(events, [
|
|
295
|
-
"onUpdate:currentRowKey",
|
|
296
|
-
"onUpdate:selectedRowKeys"
|
|
297
|
-
]),
|
|
298
|
-
ref: tableRef,
|
|
299
|
-
class: [
|
|
300
|
-
"ele-data-table",
|
|
301
|
-
{ "is-sticky": props$1.sticky },
|
|
302
|
-
{ "is-layout-fixed-head": props$1.sticky && isLayoutFixedHead.value },
|
|
303
|
-
{ "is-layout-maximized": props$1.sticky && isLayoutMaximized.value },
|
|
304
|
-
{ "is-sticky": props$1.sticky },
|
|
305
|
-
{ "hide-header": !props$1.showHeader },
|
|
306
|
-
{ "hide-bottom-line": !props$1.bottomLine }
|
|
307
|
-
],
|
|
308
|
-
currentRowKey: void 0,
|
|
309
|
-
emptyText: props$1.errorText || props$1.emptyText,
|
|
310
|
-
rowClassName: (param) => {
|
|
311
|
-
return util.getBodyRowClass(props$1.rowClassName, param);
|
|
312
|
-
},
|
|
313
|
-
headerRowClassName: (param) => {
|
|
314
|
-
return util.getHeadRowClass(
|
|
315
|
-
props$1.headerRowClassName,
|
|
316
|
-
param,
|
|
317
|
-
props$1.headerEllipsis
|
|
318
|
-
);
|
|
319
|
-
},
|
|
320
|
-
onRowClick: (row, column, event) => {
|
|
321
|
-
if (props$1.rowClickChecked && !util.isDisableRow(row, props$1.data.indexOf(row), props$1.columns)) {
|
|
322
|
-
const selections = methods.getSelectionRows();
|
|
323
|
-
if (props$1.rowClickChecked === "smart" && (!selections || !selections.length || selections.length === 1)) {
|
|
324
|
-
const key = core.getValue(row, props$1.rowKey);
|
|
325
|
-
updateCheckedState(key == null ? [] : [key]);
|
|
326
|
-
} else {
|
|
327
|
-
toggleRowSelection(row);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
events.onRowClick(row, column, event);
|
|
331
|
-
},
|
|
332
|
-
onHeaderClick: (column, e) => {
|
|
333
|
-
if (column.sortable && column.filters) {
|
|
334
|
-
const el = e.currentTarget;
|
|
335
|
-
if (el) {
|
|
336
|
-
const caretEl = el.querySelector(".caret-wrapper");
|
|
337
|
-
caretEl && caretEl.dispatchEvent(new MouseEvent("click"));
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
events.onHeaderClick(column, e);
|
|
341
|
-
},
|
|
342
|
-
onSortChange: (sorter) => {
|
|
343
|
-
const currentSorter = tableState.sorter;
|
|
344
|
-
if (currentSorter && sorter.prop === currentSorter.prop && sorter.order === currentSorter.order) {
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
tableState.sorter = sorter;
|
|
348
|
-
events.onSortChange(sorter);
|
|
349
|
-
},
|
|
350
|
-
onFilterChange: (filter) => {
|
|
351
|
-
tableState.filter = util.getTableFilter(tableRef.value) ?? filter;
|
|
352
|
-
events.onFilterChange(tableState.filter);
|
|
353
|
-
},
|
|
354
|
-
// 重写选中逻辑
|
|
355
|
-
onCurrentChange: (row, old) => {
|
|
356
|
-
if (row != null && row !== old) {
|
|
357
|
-
updateSelectedState(core.getValue(row, props$1.rowKey), row);
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
onSelect: (selection, row) => {
|
|
361
|
-
events.onSelect(selection, row);
|
|
362
|
-
updateCheckedState(util.getRowKeys(selection, props$1.rowKey), selection);
|
|
363
|
-
},
|
|
364
|
-
onSelectAll: (selection) => {
|
|
365
|
-
updateCheckedState(util.getRowKeys(selection, props$1.rowKey), selection);
|
|
366
|
-
events.onSelectAll(selection);
|
|
367
|
-
},
|
|
368
|
-
onSelectionChange: () => {
|
|
369
|
-
},
|
|
370
|
-
// 移除提示组件相关属性
|
|
371
|
-
showOverflowTooltip: void 0,
|
|
372
|
-
tooltipOptions: void 0,
|
|
373
|
-
tooltipEffect: void 0
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
default: () => {
|
|
377
|
-
return util.getCols(
|
|
378
|
-
tableCols.value,
|
|
379
|
-
props$1.pageIndex,
|
|
380
|
-
slots,
|
|
381
|
-
props$1.slotNormalize,
|
|
382
|
-
tableOverflowTooltip.value
|
|
383
|
-
);
|
|
384
|
-
},
|
|
385
|
-
append: slots.append,
|
|
386
|
-
empty: util.getEmptySlot(
|
|
387
|
-
slots,
|
|
388
|
-
props$1.emptyProps,
|
|
389
|
-
props$1.emptyText,
|
|
390
|
-
props$1.errorText
|
|
391
|
-
)
|
|
392
|
-
}
|
|
393
|
-
);
|
|
395
|
+
updateSelectedAndChecked
|
|
394
396
|
};
|
|
395
397
|
}
|
|
396
398
|
});
|
|
399
|
+
const _export_sfc = (sfc, props2) => {
|
|
400
|
+
const target = sfc.__vccOpts || sfc;
|
|
401
|
+
for (const [key, val] of props2) {
|
|
402
|
+
target[key] = val;
|
|
403
|
+
}
|
|
404
|
+
return target;
|
|
405
|
+
};
|
|
406
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
407
|
+
const _component_TableColumns = vue.resolveComponent("TableColumns");
|
|
408
|
+
const _component_ElEmpty = vue.resolveComponent("ElEmpty");
|
|
409
|
+
const _component_ElTable = vue.resolveComponent("ElTable");
|
|
410
|
+
return vue.openBlock(), vue.createBlock(_component_ElTable, vue.mergeProps(_ctx.tableProps, {
|
|
411
|
+
ref: "tableRef",
|
|
412
|
+
emptyText: _ctx.errorText || _ctx.emptyText,
|
|
413
|
+
rowClassName: (param) => _ctx.getBodyRowClass(_ctx.rowClassName, param),
|
|
414
|
+
headerRowClassName: (param) => _ctx.getHeadRowClass(_ctx.headerRowClassName, param, _ctx.headerEllipsis),
|
|
415
|
+
class: [
|
|
416
|
+
"ele-data-table",
|
|
417
|
+
{ "is-sticky": _ctx.sticky },
|
|
418
|
+
{ "is-layout-fixed-head": _ctx.sticky && _ctx.isLayoutFixedHead },
|
|
419
|
+
{ "is-layout-maximized": _ctx.sticky && _ctx.isLayoutMaximized },
|
|
420
|
+
{ "is-sticky": _ctx.sticky },
|
|
421
|
+
{ "hide-header": !_ctx.showHeader },
|
|
422
|
+
{ "hide-bottom-line": !_ctx.bottomLine }
|
|
423
|
+
],
|
|
424
|
+
onRowClick: _ctx.handleRowClick,
|
|
425
|
+
onHeaderClick: _ctx.handleHeaderClick,
|
|
426
|
+
onSortChange: _ctx.handleSortChange,
|
|
427
|
+
onFilterChange: _ctx.handleFilterChange,
|
|
428
|
+
onCurrentChange: _ctx.handleCurrentChange,
|
|
429
|
+
onSelect: _ctx.handleSelect,
|
|
430
|
+
onSelectAll: _ctx.handleSelectAll
|
|
431
|
+
}), vue.createSlots({
|
|
432
|
+
default: vue.withCtx(() => [
|
|
433
|
+
_ctx.tableCols && _ctx.tableCols.length ? (vue.openBlock(), vue.createBlock(_component_TableColumns, {
|
|
434
|
+
key: 0,
|
|
435
|
+
columns: _ctx.tableCols,
|
|
436
|
+
pageIndex: _ctx.pageIndex,
|
|
437
|
+
slotNormalize: _ctx.slotNormalize,
|
|
438
|
+
globalTooltip: _ctx.tableOverflowTooltip
|
|
439
|
+
}, vue.createSlots({ _: 2 }, [
|
|
440
|
+
vue.renderList(Object.keys(_ctx.$slots).filter((k) => !_ctx.ownSlots.includes(k)), (name) => {
|
|
441
|
+
return {
|
|
442
|
+
name,
|
|
443
|
+
fn: vue.withCtx((slotProps) => [
|
|
444
|
+
vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
445
|
+
])
|
|
446
|
+
};
|
|
447
|
+
})
|
|
448
|
+
]), 1032, ["columns", "pageIndex", "slotNormalize", "globalTooltip"])) : vue.createCommentVNode("", true)
|
|
449
|
+
]),
|
|
450
|
+
_: 2
|
|
451
|
+
}, [
|
|
452
|
+
_ctx.$slots.append ? {
|
|
453
|
+
name: "append",
|
|
454
|
+
fn: vue.withCtx((slotProps) => [
|
|
455
|
+
vue.renderSlot(_ctx.$slots, "append", vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
456
|
+
]),
|
|
457
|
+
key: "0"
|
|
458
|
+
} : void 0,
|
|
459
|
+
_ctx.$slots.empty || _ctx.emptyProps ? {
|
|
460
|
+
name: "empty",
|
|
461
|
+
fn: vue.withCtx(() => [
|
|
462
|
+
_ctx.$slots.empty ? vue.renderSlot(_ctx.$slots, "empty", {
|
|
463
|
+
key: 0,
|
|
464
|
+
text: _ctx.emptyText,
|
|
465
|
+
error: _ctx.errorText
|
|
466
|
+
}) : _ctx.emptyProps ? (vue.openBlock(), vue.createBlock(_component_ElEmpty, vue.mergeProps({
|
|
467
|
+
key: 1,
|
|
468
|
+
imageSize: 68
|
|
469
|
+
}, !_ctx.emptyProps || _ctx.emptyProps === true ? {} : _ctx.emptyProps, {
|
|
470
|
+
description: _ctx.errorText || _ctx.emptyText,
|
|
471
|
+
class: "ele-table-empty"
|
|
472
|
+
}), null, 16, ["description"])) : vue.createCommentVNode("", true)
|
|
473
|
+
]),
|
|
474
|
+
key: "1"
|
|
475
|
+
} : void 0
|
|
476
|
+
]), 1040, ["emptyText", "rowClassName", "headerRowClassName", "class", "onRowClick", "onHeaderClick", "onSortChange", "onFilterChange", "onCurrentChange", "onSelect", "onSelectAll"]);
|
|
477
|
+
}
|
|
478
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
397
479
|
module.exports = index;
|