ele-admin-plus 1.2.1-beta.1 → 1.2.1-beta.3
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/ele-admin-layout/index.d.ts +29 -24
- package/es/ele-admin-layout/props.d.ts +15 -11
- package/es/ele-admin-layout/props.js +4 -1
- package/es/ele-admin-layout/style/index.scss +7 -2
- package/es/ele-admin-layout/style/sidebar.scss +2 -0
- package/es/ele-alert/index.d.ts +15 -15
- package/es/ele-alert/index.js +3 -3
- package/es/ele-alert/props.d.ts +9 -8
- package/es/ele-app/components/message-body.d.ts +6 -5
- package/es/ele-app/components/message-body.js +2 -2
- package/es/ele-app/components/message-box-icon.d.ts +7 -6
- package/es/ele-app/plus.d.ts +3 -0
- package/es/ele-app/style/overwrite/input/index.scss +2 -0
- package/es/ele-avatar-group/index.d.ts +19 -18
- package/es/ele-avatar-group/index.js +15 -15
- package/es/ele-avatar-group/props.d.ts +10 -7
- package/es/ele-basic-select/index.d.ts +22 -19
- package/es/ele-basic-select/index.js +30 -23
- package/es/ele-basic-select/props.d.ts +11 -6
- package/es/ele-basic-select/props.js +3 -1
- package/es/ele-basic-select/util.d.ts +6 -0
- package/es/ele-basic-select/util.js +13 -0
- package/es/ele-bottom-bar/index.d.ts +4 -4
- package/es/ele-bottom-bar/props.d.ts +3 -2
- package/es/ele-breadcrumb/index.d.ts +3 -3
- package/es/ele-breadcrumb/props.d.ts +1 -1
- package/es/ele-card/index.d.ts +14 -14
- package/es/ele-card/props.d.ts +8 -6
- package/es/ele-check-card/components/card-item.d.ts +3 -2
- package/es/ele-check-card/index.d.ts +5 -5
- package/es/ele-check-card/index.js +12 -7
- package/es/ele-check-card/props.d.ts +3 -2
- package/es/ele-config-provider/index.d.ts +4 -4
- package/es/ele-config-provider/props.d.ts +3 -3
- package/es/ele-config-provider/types.d.ts +1 -0
- package/es/ele-copyable/index.d.ts +12 -12
- package/es/ele-copyable/index.js +6 -6
- package/es/ele-copyable/props.d.ts +7 -5
- package/es/ele-count-up/index.d.ts +1 -1
- package/es/ele-cropper/components/cropper-tools.d.ts +6 -5
- package/es/ele-cropper/components/cropper-tools.js +10 -10
- package/es/ele-cropper/index.d.ts +16 -16
- package/es/ele-cropper/index.js +39 -39
- package/es/ele-cropper/props.d.ts +2 -1
- package/es/ele-cropper-modal/index.d.ts +5 -5
- package/es/ele-cropper-modal/index.js +3 -3
- package/es/ele-cropper-modal/props.d.ts +1 -4
- package/es/ele-data-table/index.d.ts +22 -22
- package/es/ele-data-table/props.d.ts +16 -16
- package/es/ele-data-table/style/index.scss +1 -1
- package/es/ele-data-table/types.d.ts +2 -0
- package/es/ele-data-table/util.js +6 -2
- package/es/ele-drawer/index.d.ts +18 -18
- package/es/ele-drawer/index.js +18 -18
- package/es/ele-drawer/props.d.ts +11 -10
- package/es/ele-dropdown/index.d.ts +24 -24
- package/es/ele-dropdown/index.js +54 -48
- package/es/ele-dropdown/props.d.ts +13 -12
- package/es/ele-dropdown/types.d.ts +2 -0
- package/es/ele-edit-tag/index.d.ts +21 -19
- package/es/ele-edit-tag/index.js +10 -2
- package/es/ele-edit-tag/props.d.ts +13 -8
- package/es/ele-edit-tag/props.js +3 -1
- package/es/ele-ellipsis/index.d.ts +6 -5
- package/es/ele-ellipsis/index.js +3 -3
- package/es/ele-ellipsis/props.d.ts +1 -1
- package/es/ele-file-list/components/file-grid-item.d.ts +5 -5
- package/es/ele-file-list/components/file-grid-item.js +15 -15
- package/es/ele-file-list/components/file-grid.d.ts +6 -6
- package/es/ele-file-list/components/file-grid.js +15 -15
- package/es/ele-file-list/components/file-table-item.d.ts +5 -5
- package/es/ele-file-list/components/file-table-item.js +15 -15
- package/es/ele-file-list/components/file-table.d.ts +7 -7
- package/es/ele-file-list/components/file-table.js +19 -19
- package/es/ele-file-list/index.d.ts +10 -10
- package/es/ele-file-list/index.js +22 -22
- package/es/ele-file-list-tool/index.d.ts +1 -1
- package/es/ele-file-list-tool/index.js +2 -2
- package/es/ele-icon-select/components/icon-grid.d.ts +10 -8
- package/es/ele-icon-select/components/icon-grid.js +6 -6
- package/es/ele-icon-select/index.d.ts +44 -43
- package/es/ele-icon-select/index.js +29 -25
- package/es/ele-icon-select/props.d.ts +18 -14
- package/es/ele-icon-select/props.js +2 -0
- package/es/ele-loading/index.d.ts +4 -4
- package/es/ele-loading/props.d.ts +3 -2
- package/es/ele-map-picker/components/map-view.d.ts +26 -28
- package/es/ele-map-picker/components/map-view.js +1 -0
- package/es/ele-map-picker/index.d.ts +10 -10
- package/es/ele-map-picker/props.d.ts +6 -5
- package/es/ele-map-picker/style/index.scss +1 -1
- package/es/ele-menus/index.d.ts +2 -2
- package/es/ele-menus/index.js +15 -15
- package/es/ele-menus/props.d.ts +1 -1
- package/es/ele-menus/style/index.scss +5 -0
- package/es/ele-menus/util.d.ts +7 -0
- package/es/ele-menus/util.js +49 -26
- package/es/ele-modal/index.d.ts +30 -29
- package/es/ele-modal/index.js +48 -82
- package/es/ele-modal/props.d.ts +14 -13
- package/es/ele-modal/util.d.ts +31 -24
- package/es/ele-modal/util.js +235 -132
- package/es/ele-pagination/index.d.ts +20 -8
- package/es/ele-pagination/index.js +9 -8
- package/es/ele-pagination/props.d.ts +8 -2
- package/es/ele-pagination/style/index.scss +70 -0
- package/es/ele-popconfirm/index.d.ts +37 -47
- package/es/ele-popconfirm/index.js +15 -15
- package/es/ele-popconfirm/props.d.ts +18 -21
- package/es/ele-popover/index.d.ts +27 -37
- package/es/ele-popover/index.js +15 -15
- package/es/ele-popover/props.d.ts +11 -15
- package/es/ele-popover/props.js +1 -0
- package/es/ele-printer/index.d.ts +9 -9
- package/es/ele-printer/index.js +19 -22
- package/es/ele-printer/props.d.ts +6 -5
- package/es/ele-printer/style/index.scss +2 -2
- package/es/ele-printer/types.d.ts +0 -2
- package/es/ele-printer/util.d.ts +7 -28
- package/es/ele-printer/util.js +111 -77
- package/es/ele-pro-layout/index.d.ts +44 -48
- package/es/ele-pro-layout/index.js +2 -2
- package/es/ele-pro-layout/props.d.ts +17 -15
- package/es/ele-pro-layout/props.js +1 -1
- package/es/ele-pro-table/components/table-tools.d.ts +405 -35
- package/es/ele-pro-table/components/table-tools.js +227 -151
- package/es/ele-pro-table/components/tool-column-list.d.ts +21 -9
- package/es/ele-pro-table/components/tool-column-list.js +64 -37
- package/es/ele-pro-table/components/tool-column.d.ts +31 -44
- package/es/ele-pro-table/components/tool-column.js +87 -103
- package/es/ele-pro-table/components/tool-export.d.ts +37 -34
- package/es/ele-pro-table/components/tool-export.js +223 -215
- package/es/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
- package/es/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
- package/es/ele-pro-table/components/tool-print.d.ts +47 -43
- package/es/ele-pro-table/components/tool-print.js +380 -369
- package/es/ele-pro-table/index.d.ts +1020 -81
- package/es/ele-pro-table/index.js +103 -76
- package/es/ele-pro-table/props.d.ts +18 -19
- package/es/ele-pro-table/props.js +4 -2
- package/es/ele-pro-table/style/index.scss +44 -12
- package/es/ele-pro-table/types.d.ts +54 -0
- package/es/ele-pro-table/util.d.ts +84 -34
- package/es/ele-pro-table/util.js +186 -94
- package/es/ele-qr-code/components/canvas-render.d.ts +67 -0
- package/es/ele-qr-code/components/canvas-render.js +147 -0
- package/es/ele-qr-code/index.d.ts +5 -9
- package/es/ele-qr-code/index.js +33 -136
- package/es/ele-qr-code/props.d.ts +5 -2
- package/es/ele-qr-code/props.js +3 -1
- package/es/ele-qr-code/types.d.ts +5 -0
- package/es/ele-qr-code-svg/index.d.ts +6 -5
- package/es/ele-qr-code-svg/index.js +11 -14
- package/es/ele-segmented/index.d.ts +1 -1
- package/es/ele-segmented/index.js +6 -3
- package/es/ele-split-panel/index.d.ts +8 -8
- package/es/ele-split-panel/index.js +3 -3
- package/es/ele-split-panel/props.d.ts +4 -3
- package/es/ele-steps/index.d.ts +2 -2
- package/es/ele-steps/props.d.ts +2 -2
- package/es/ele-tab-wrap/components/tab-dropdown.d.ts +1 -1
- package/es/ele-tab-wrap/components/tab-dropdown.js +3 -3
- package/es/ele-table/index.d.ts +2 -2
- package/es/ele-table/props.d.ts +2 -1
- package/es/ele-table-select/index.d.ts +29 -27
- package/es/ele-table-select/index.js +47 -39
- package/es/ele-table-select/props.d.ts +11 -7
- package/es/ele-table-select/props.js +2 -0
- package/es/ele-tabs/index.d.ts +19 -34
- package/es/ele-tabs/index.js +133 -86
- package/es/ele-tabs/props.d.ts +10 -24
- package/es/ele-tabs/props.js +3 -1
- package/es/ele-tabs/style/index.scss +42 -2
- package/es/ele-tabs/types.d.ts +2 -11
- package/es/ele-text/index.d.ts +2 -2
- package/es/ele-text/props.d.ts +2 -1
- package/es/ele-tool/index.d.ts +11 -5
- package/es/ele-tool/index.js +32 -32
- package/es/ele-tool/props.d.ts +4 -1
- package/es/ele-tool/props.js +3 -1
- package/es/ele-tool/style/index.js +0 -1
- package/es/ele-toolbar/index.d.ts +3253 -7
- package/es/ele-toolbar/index.js +44 -5
- package/es/ele-toolbar/props.d.ts +10 -5
- package/es/ele-toolbar/props.js +2 -0
- package/es/ele-toolbar/style/index.js +1 -0
- package/es/ele-toolbar/types.d.ts +15 -0
- package/es/ele-tooltip/index.d.ts +22 -21
- package/es/ele-tooltip/index.js +25 -25
- package/es/ele-tooltip/props.d.ts +7 -6
- package/es/ele-tour/index.d.ts +4 -4
- package/es/ele-tour/index.js +10 -10
- package/es/ele-tree-select/index.d.ts +27 -27
- package/es/ele-tree-select/index.js +33 -30
- package/es/ele-tree-select/props.d.ts +12 -8
- package/es/ele-tree-select/props.js +3 -1
- package/es/ele-upload-list/components/list-item.d.ts +3 -3
- package/es/ele-upload-list/components/list-item.js +7 -7
- package/es/ele-upload-list/index.d.ts +11 -13
- package/es/ele-upload-list/index.js +13 -13
- package/es/ele-upload-list/props.d.ts +4 -3
- package/es/ele-upload-list/style/index.scss +4 -0
- package/es/ele-virtual-table/components/body-cell.d.ts +19 -35
- package/es/ele-virtual-table/components/body-cell.js +24 -24
- package/es/ele-virtual-table/components/body-row.d.ts +20 -36
- package/es/ele-virtual-table/components/body-row.js +21 -21
- package/es/ele-virtual-table/components/cell-checkbox.d.ts +4 -3
- package/es/ele-virtual-table/components/cell-checkbox.js +3 -3
- package/es/ele-virtual-table/components/cell-filter.d.ts +11 -11
- package/es/ele-virtual-table/components/cell-filter.js +18 -18
- package/es/ele-virtual-table/components/footer-row.d.ts +4 -4
- package/es/ele-virtual-table/components/footer-row.js +3 -3
- package/es/ele-virtual-table/components/header-cell.d.ts +12 -12
- package/es/ele-virtual-table/components/header-cell.js +15 -15
- package/es/ele-virtual-table/components/header-row.d.ts +12 -12
- package/es/ele-virtual-table/components/header-row.js +15 -15
- package/es/ele-virtual-table/index.d.ts +36 -35
- package/es/ele-virtual-table/index.js +50 -48
- package/es/ele-virtual-table/props.d.ts +11 -11
- package/es/ele-virtual-table/util.js +3 -3
- package/es/ele-watermark/index.d.ts +5 -4
- package/es/ele-watermark/index.js +1 -0
- package/es/ele-watermark/props.d.ts +2 -1
- package/es/ele-xg-player/index.d.ts +3 -3
- package/es/icons/SizeCompactOutlined.d.ts +2 -0
- package/es/icons/SizeCompactOutlined.js +34 -0
- package/es/icons/SizeSlackOutlined.d.ts +2 -0
- package/es/icons/SizeSlackOutlined.js +34 -0
- package/es/icons/index.d.ts +2 -0
- package/es/icons/index.js +46 -42
- package/es/lang/en_US.js +1 -0
- package/es/lang/zh_CN.js +1 -0
- package/es/lang/zh_TW.js +1 -0
- package/es/style/themes/default.scss +20 -13
- package/es/style/themes/rounded.scss +4 -9
- package/es/utils/core.d.ts +7 -1
- package/es/utils/hook.d.ts +75 -4
- package/es/utils/hook.js +155 -6
- package/lib/ele-admin-layout/index.d.ts +29 -24
- package/lib/ele-admin-layout/props.cjs +4 -1
- package/lib/ele-admin-layout/props.d.ts +15 -11
- package/lib/ele-admin-layout/style/index.scss +7 -2
- package/lib/ele-admin-layout/style/sidebar.scss +2 -0
- package/lib/ele-alert/index.cjs +3 -3
- package/lib/ele-alert/index.d.ts +15 -15
- package/lib/ele-alert/props.d.ts +9 -8
- package/lib/ele-app/components/message-body.cjs +2 -2
- package/lib/ele-app/components/message-body.d.ts +6 -5
- package/lib/ele-app/components/message-box-icon.d.ts +7 -6
- package/lib/ele-app/plus.d.ts +3 -0
- package/lib/ele-app/style/overwrite/input/index.scss +2 -0
- package/lib/ele-avatar-group/index.cjs +15 -15
- package/lib/ele-avatar-group/index.d.ts +19 -18
- package/lib/ele-avatar-group/props.d.ts +10 -7
- package/lib/ele-basic-select/index.cjs +30 -23
- package/lib/ele-basic-select/index.d.ts +22 -19
- package/lib/ele-basic-select/props.cjs +3 -1
- package/lib/ele-basic-select/props.d.ts +11 -6
- package/lib/ele-basic-select/util.cjs +13 -0
- package/lib/ele-basic-select/util.d.ts +6 -0
- package/lib/ele-bottom-bar/index.d.ts +4 -4
- package/lib/ele-bottom-bar/props.d.ts +3 -2
- package/lib/ele-breadcrumb/index.d.ts +3 -3
- package/lib/ele-breadcrumb/props.d.ts +1 -1
- package/lib/ele-card/index.d.ts +14 -14
- package/lib/ele-card/props.d.ts +8 -6
- package/lib/ele-check-card/components/card-item.d.ts +3 -2
- package/lib/ele-check-card/index.cjs +12 -7
- package/lib/ele-check-card/index.d.ts +5 -5
- package/lib/ele-check-card/props.d.ts +3 -2
- package/lib/ele-config-provider/index.d.ts +4 -4
- package/lib/ele-config-provider/props.d.ts +3 -3
- package/lib/ele-config-provider/types.d.ts +1 -0
- package/lib/ele-copyable/index.cjs +6 -6
- package/lib/ele-copyable/index.d.ts +12 -12
- package/lib/ele-copyable/props.d.ts +7 -5
- package/lib/ele-count-up/index.d.ts +1 -1
- package/lib/ele-cropper/components/cropper-tools.cjs +10 -10
- package/lib/ele-cropper/components/cropper-tools.d.ts +6 -5
- package/lib/ele-cropper/index.cjs +39 -39
- package/lib/ele-cropper/index.d.ts +16 -16
- package/lib/ele-cropper/props.d.ts +2 -1
- package/lib/ele-cropper-modal/index.cjs +3 -3
- package/lib/ele-cropper-modal/index.d.ts +5 -5
- package/lib/ele-cropper-modal/props.d.ts +1 -4
- package/lib/ele-data-table/index.d.ts +22 -22
- package/lib/ele-data-table/props.d.ts +16 -16
- package/lib/ele-data-table/style/index.scss +1 -1
- package/lib/ele-data-table/types.d.ts +2 -0
- package/lib/ele-data-table/util.cjs +6 -2
- package/lib/ele-drawer/index.cjs +18 -18
- package/lib/ele-drawer/index.d.ts +18 -18
- package/lib/ele-drawer/props.d.ts +11 -10
- package/lib/ele-dropdown/index.cjs +54 -48
- package/lib/ele-dropdown/index.d.ts +24 -24
- package/lib/ele-dropdown/props.d.ts +13 -12
- package/lib/ele-dropdown/types.d.ts +2 -0
- package/lib/ele-edit-tag/index.cjs +10 -2
- package/lib/ele-edit-tag/index.d.ts +21 -19
- package/lib/ele-edit-tag/props.cjs +3 -1
- package/lib/ele-edit-tag/props.d.ts +13 -8
- package/lib/ele-ellipsis/index.cjs +3 -3
- package/lib/ele-ellipsis/index.d.ts +6 -5
- package/lib/ele-ellipsis/props.d.ts +1 -1
- package/lib/ele-file-list/components/file-grid-item.cjs +15 -15
- package/lib/ele-file-list/components/file-grid-item.d.ts +5 -5
- package/lib/ele-file-list/components/file-grid.cjs +15 -15
- package/lib/ele-file-list/components/file-grid.d.ts +6 -6
- package/lib/ele-file-list/components/file-table-item.cjs +15 -15
- package/lib/ele-file-list/components/file-table-item.d.ts +5 -5
- package/lib/ele-file-list/components/file-table.cjs +19 -19
- package/lib/ele-file-list/components/file-table.d.ts +7 -7
- package/lib/ele-file-list/index.cjs +22 -22
- package/lib/ele-file-list/index.d.ts +10 -10
- package/lib/ele-file-list-tool/index.cjs +2 -2
- package/lib/ele-file-list-tool/index.d.ts +1 -1
- package/lib/ele-icon-select/components/icon-grid.cjs +6 -6
- package/lib/ele-icon-select/components/icon-grid.d.ts +10 -8
- package/lib/ele-icon-select/index.cjs +32 -28
- package/lib/ele-icon-select/index.d.ts +44 -43
- package/lib/ele-icon-select/props.cjs +2 -0
- package/lib/ele-icon-select/props.d.ts +18 -14
- package/lib/ele-loading/index.d.ts +4 -4
- package/lib/ele-loading/props.d.ts +3 -2
- package/lib/ele-map-picker/components/map-view.cjs +1 -0
- package/lib/ele-map-picker/components/map-view.d.ts +26 -28
- package/lib/ele-map-picker/index.d.ts +10 -10
- package/lib/ele-map-picker/props.d.ts +6 -5
- package/lib/ele-map-picker/style/index.scss +1 -1
- package/lib/ele-menus/index.cjs +15 -15
- package/lib/ele-menus/index.d.ts +2 -2
- package/lib/ele-menus/props.d.ts +1 -1
- package/lib/ele-menus/style/index.scss +5 -0
- package/lib/ele-menus/util.cjs +49 -26
- package/lib/ele-menus/util.d.ts +7 -0
- package/lib/ele-modal/index.cjs +46 -80
- package/lib/ele-modal/index.d.ts +30 -29
- package/lib/ele-modal/props.d.ts +14 -13
- package/lib/ele-modal/util.cjs +235 -132
- package/lib/ele-modal/util.d.ts +31 -24
- package/lib/ele-pagination/index.cjs +9 -8
- package/lib/ele-pagination/index.d.ts +20 -8
- package/lib/ele-pagination/props.d.ts +8 -2
- package/lib/ele-pagination/style/index.scss +70 -0
- package/lib/ele-popconfirm/index.cjs +15 -15
- package/lib/ele-popconfirm/index.d.ts +37 -47
- package/lib/ele-popconfirm/props.d.ts +18 -21
- package/lib/ele-popover/index.cjs +15 -15
- package/lib/ele-popover/index.d.ts +27 -37
- package/lib/ele-popover/props.cjs +1 -0
- package/lib/ele-popover/props.d.ts +11 -15
- package/lib/ele-printer/index.cjs +17 -20
- package/lib/ele-printer/index.d.ts +9 -9
- package/lib/ele-printer/props.d.ts +6 -5
- package/lib/ele-printer/style/index.scss +2 -2
- package/lib/ele-printer/types.d.ts +0 -2
- package/lib/ele-printer/util.cjs +111 -77
- package/lib/ele-printer/util.d.ts +7 -28
- package/lib/ele-pro-layout/index.cjs +2 -2
- package/lib/ele-pro-layout/index.d.ts +44 -48
- package/lib/ele-pro-layout/props.cjs +1 -1
- package/lib/ele-pro-layout/props.d.ts +17 -15
- package/lib/ele-pro-table/components/table-tools.cjs +225 -149
- package/lib/ele-pro-table/components/table-tools.d.ts +405 -35
- package/lib/ele-pro-table/components/tool-column-list.cjs +63 -36
- package/lib/ele-pro-table/components/tool-column-list.d.ts +21 -9
- package/lib/ele-pro-table/components/tool-column.cjs +86 -102
- package/lib/ele-pro-table/components/tool-column.d.ts +31 -44
- package/lib/ele-pro-table/components/tool-export.cjs +220 -212
- package/lib/ele-pro-table/components/tool-export.d.ts +37 -34
- package/lib/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
- package/lib/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
- package/lib/ele-pro-table/components/tool-print.cjs +377 -366
- package/lib/ele-pro-table/components/tool-print.d.ts +47 -43
- package/lib/ele-pro-table/index.cjs +100 -73
- package/lib/ele-pro-table/index.d.ts +1020 -81
- package/lib/ele-pro-table/props.cjs +4 -2
- package/lib/ele-pro-table/props.d.ts +18 -19
- package/lib/ele-pro-table/style/index.scss +44 -12
- package/lib/ele-pro-table/types.d.ts +54 -0
- package/lib/ele-pro-table/util.cjs +186 -94
- package/lib/ele-pro-table/util.d.ts +84 -34
- package/lib/ele-qr-code/components/canvas-render.cjs +146 -0
- package/lib/ele-qr-code/components/canvas-render.d.ts +67 -0
- package/lib/ele-qr-code/index.cjs +32 -135
- package/lib/ele-qr-code/index.d.ts +5 -9
- package/lib/ele-qr-code/props.cjs +3 -1
- package/lib/ele-qr-code/props.d.ts +5 -2
- package/lib/ele-qr-code/types.d.ts +5 -0
- package/lib/ele-qr-code-svg/index.cjs +10 -13
- package/lib/ele-qr-code-svg/index.d.ts +6 -5
- package/lib/ele-segmented/index.cjs +6 -3
- package/lib/ele-segmented/index.d.ts +1 -1
- package/lib/ele-split-panel/index.cjs +3 -3
- package/lib/ele-split-panel/index.d.ts +8 -8
- package/lib/ele-split-panel/props.d.ts +4 -3
- package/lib/ele-steps/index.d.ts +2 -2
- package/lib/ele-steps/props.d.ts +2 -2
- package/lib/ele-tab-wrap/components/tab-dropdown.cjs +3 -3
- package/lib/ele-tab-wrap/components/tab-dropdown.d.ts +1 -1
- package/lib/ele-table/index.d.ts +2 -2
- package/lib/ele-table/props.d.ts +2 -1
- package/lib/ele-table-select/index.cjs +62 -54
- package/lib/ele-table-select/index.d.ts +29 -27
- package/lib/ele-table-select/props.cjs +2 -0
- package/lib/ele-table-select/props.d.ts +11 -7
- package/lib/ele-tabs/index.cjs +132 -85
- package/lib/ele-tabs/index.d.ts +19 -34
- package/lib/ele-tabs/props.cjs +3 -1
- package/lib/ele-tabs/props.d.ts +10 -24
- package/lib/ele-tabs/style/index.scss +42 -2
- package/lib/ele-tabs/types.d.ts +2 -11
- package/lib/ele-text/index.d.ts +2 -2
- package/lib/ele-text/props.d.ts +2 -1
- package/lib/ele-tool/index.cjs +31 -31
- package/lib/ele-tool/index.d.ts +11 -5
- package/lib/ele-tool/props.cjs +3 -1
- package/lib/ele-tool/props.d.ts +4 -1
- package/lib/ele-tool/style/index.cjs +0 -1
- package/lib/ele-toolbar/index.cjs +42 -3
- package/lib/ele-toolbar/index.d.ts +3253 -7
- package/lib/ele-toolbar/props.cjs +2 -0
- package/lib/ele-toolbar/props.d.ts +10 -5
- package/lib/ele-toolbar/style/index.cjs +1 -0
- package/lib/ele-toolbar/types.d.ts +15 -0
- package/lib/ele-tooltip/index.cjs +25 -25
- package/lib/ele-tooltip/index.d.ts +22 -21
- package/lib/ele-tooltip/props.d.ts +7 -6
- package/lib/ele-tour/index.cjs +10 -10
- package/lib/ele-tour/index.d.ts +4 -4
- package/lib/ele-tree-select/index.cjs +32 -29
- package/lib/ele-tree-select/index.d.ts +27 -27
- package/lib/ele-tree-select/props.cjs +3 -1
- package/lib/ele-tree-select/props.d.ts +12 -8
- package/lib/ele-upload-list/components/list-item.cjs +7 -7
- package/lib/ele-upload-list/components/list-item.d.ts +3 -3
- package/lib/ele-upload-list/index.cjs +13 -13
- package/lib/ele-upload-list/index.d.ts +11 -13
- package/lib/ele-upload-list/props.d.ts +4 -3
- package/lib/ele-upload-list/style/index.scss +4 -0
- package/lib/ele-virtual-table/components/body-cell.cjs +24 -24
- package/lib/ele-virtual-table/components/body-cell.d.ts +19 -35
- package/lib/ele-virtual-table/components/body-row.cjs +21 -21
- package/lib/ele-virtual-table/components/body-row.d.ts +20 -36
- package/lib/ele-virtual-table/components/cell-checkbox.cjs +3 -3
- package/lib/ele-virtual-table/components/cell-checkbox.d.ts +4 -3
- package/lib/ele-virtual-table/components/cell-filter.cjs +18 -18
- package/lib/ele-virtual-table/components/cell-filter.d.ts +11 -11
- package/lib/ele-virtual-table/components/footer-row.cjs +3 -3
- package/lib/ele-virtual-table/components/footer-row.d.ts +4 -4
- package/lib/ele-virtual-table/components/header-cell.cjs +15 -15
- package/lib/ele-virtual-table/components/header-cell.d.ts +12 -12
- package/lib/ele-virtual-table/components/header-row.cjs +15 -15
- package/lib/ele-virtual-table/components/header-row.d.ts +12 -12
- package/lib/ele-virtual-table/index.cjs +50 -48
- package/lib/ele-virtual-table/index.d.ts +36 -35
- package/lib/ele-virtual-table/props.d.ts +11 -11
- package/lib/ele-virtual-table/util.cjs +3 -3
- package/lib/ele-watermark/index.cjs +1 -0
- package/lib/ele-watermark/index.d.ts +5 -4
- package/lib/ele-watermark/props.d.ts +2 -1
- package/lib/ele-xg-player/index.d.ts +3 -3
- package/lib/icons/SizeCompactOutlined.cjs +33 -0
- package/lib/icons/SizeCompactOutlined.d.ts +2 -0
- package/lib/icons/SizeSlackOutlined.cjs +33 -0
- package/lib/icons/SizeSlackOutlined.d.ts +2 -0
- package/lib/icons/index.cjs +4 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/lang/en_US.cjs +1 -0
- package/lib/lang/zh_CN.cjs +1 -0
- package/lib/lang/zh_TW.cjs +1 -0
- package/lib/style/themes/default.scss +20 -13
- package/lib/style/themes/rounded.scss +4 -9
- package/lib/utils/core.d.ts +7 -1
- package/lib/utils/hook.cjs +154 -5
- package/lib/utils/hook.d.ts +75 -4
- package/package.json +14 -13
|
@@ -18,21 +18,13 @@ function mergeProps(props, globalProps) {
|
|
|
18
18
|
}
|
|
19
19
|
return { ...globalProps, ...props };
|
|
20
20
|
}
|
|
21
|
-
function getTablePage(pagination, globalPagination) {
|
|
22
|
-
const props = getPaginationProps(void 0, pagination, globalPagination);
|
|
23
|
-
return (props == null ? void 0 : props.currentPage) ?? 1;
|
|
24
|
-
}
|
|
25
|
-
function getTableLimit(pagination, globalPagination) {
|
|
26
|
-
const props = getPaginationProps(void 0, pagination, globalPagination);
|
|
27
|
-
return (props == null ? void 0 : props.pageSize) ?? 10;
|
|
28
|
-
}
|
|
29
21
|
function getPaginationProps(size, pagination, globalPagination, pageProps) {
|
|
30
22
|
const props = mergeProps(pagination, globalPagination);
|
|
31
23
|
if (props == null || props === false) {
|
|
32
24
|
return null;
|
|
33
25
|
}
|
|
34
26
|
const defaultProps = {
|
|
35
|
-
|
|
27
|
+
size: size !== "large" ? "small" : "default",
|
|
36
28
|
pagerCount: 5,
|
|
37
29
|
layout: "total, prev, pager, next, sizes, jumper",
|
|
38
30
|
pageSizes: [10, 20, 30, 40, 50, 100],
|
|
@@ -43,6 +35,14 @@ function getPaginationProps(size, pagination, globalPagination, pageProps) {
|
|
|
43
35
|
}
|
|
44
36
|
return Object.assign(defaultProps, core.omit(props, ["autoAmend"]), pageProps);
|
|
45
37
|
}
|
|
38
|
+
function getTablePage(pagination, globalPagination) {
|
|
39
|
+
const props = getPaginationProps(void 0, pagination, globalPagination);
|
|
40
|
+
return (props == null ? void 0 : props.currentPage) ?? 1;
|
|
41
|
+
}
|
|
42
|
+
function getTableLimit(pagination, globalPagination) {
|
|
43
|
+
const props = getPaginationProps(void 0, pagination, globalPagination);
|
|
44
|
+
return (props == null ? void 0 : props.pageSize) ?? 10;
|
|
45
|
+
}
|
|
46
46
|
function isAutoAmend(pagination, globalPagination) {
|
|
47
47
|
const props = mergeProps(pagination, globalPagination);
|
|
48
48
|
if (!props) {
|
|
@@ -182,21 +182,6 @@ function getResponseData(data, lazy, treeProps) {
|
|
|
182
182
|
return temp;
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function reloadData(datasource, sorter, page, limit) {
|
|
186
|
-
const data = sortData(datasource, sorter);
|
|
187
|
-
const total = data.length;
|
|
188
|
-
if (!page || !limit) {
|
|
189
|
-
return { page: 1, data, total };
|
|
190
|
-
}
|
|
191
|
-
const maxPage = Math.ceil(total / limit);
|
|
192
|
-
if (maxPage && page > maxPage) {
|
|
193
|
-
page = maxPage;
|
|
194
|
-
}
|
|
195
|
-
const start = (page - 1) * limit;
|
|
196
|
-
const end = start + limit;
|
|
197
|
-
const list = data.slice(start, end > total ? total : end);
|
|
198
|
-
return { page, data: list, total };
|
|
199
|
-
}
|
|
200
185
|
function sortData(datasource, sorter) {
|
|
201
186
|
if (!datasource || !datasource.length) {
|
|
202
187
|
return [];
|
|
@@ -219,63 +204,94 @@ function sortData(datasource, sorter) {
|
|
|
219
204
|
});
|
|
220
205
|
return data;
|
|
221
206
|
}
|
|
207
|
+
function reloadData(datasource, sorter, page, limit) {
|
|
208
|
+
const data = sortData(datasource, sorter);
|
|
209
|
+
const total = data.length;
|
|
210
|
+
if (!page || !limit) {
|
|
211
|
+
return { page: 1, data, total };
|
|
212
|
+
}
|
|
213
|
+
const maxPage = Math.ceil(total / limit);
|
|
214
|
+
if (maxPage && page > maxPage) {
|
|
215
|
+
page = maxPage;
|
|
216
|
+
}
|
|
217
|
+
const start = (page - 1) * limit;
|
|
218
|
+
const end = start + limit;
|
|
219
|
+
const list = data.slice(start, end > total ? total : end);
|
|
220
|
+
return { page, data: list, total };
|
|
221
|
+
}
|
|
222
222
|
function getColId(column) {
|
|
223
223
|
if (column.columnKey == null || column.columnKey === "") {
|
|
224
224
|
return column.prop;
|
|
225
225
|
}
|
|
226
226
|
return column.columnKey;
|
|
227
227
|
}
|
|
228
|
-
function getInitColumns(columns) {
|
|
228
|
+
function getInitColumns(columns, cacheColsWidth) {
|
|
229
229
|
const data = [];
|
|
230
230
|
columns.forEach((d) => {
|
|
231
231
|
var _a;
|
|
232
232
|
if (!d.hideInTable) {
|
|
233
|
+
const width = getCacheColWidth(cacheColsWidth, d) ?? d.width;
|
|
233
234
|
if ((_a = d.children) == null ? void 0 : _a.length) {
|
|
234
235
|
const children = getInitColumns(d.children);
|
|
235
236
|
if (children.length) {
|
|
236
|
-
data.push({ ...d, children });
|
|
237
|
+
data.push({ ...d, width, children });
|
|
237
238
|
}
|
|
238
239
|
} else {
|
|
239
|
-
data.push({ ...d });
|
|
240
|
+
data.push({ ...d, width });
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
243
|
});
|
|
243
244
|
return data;
|
|
244
245
|
}
|
|
245
246
|
function getInitCacheColumns(columns, cacheKey, sortable) {
|
|
246
|
-
const
|
|
247
|
-
if (!
|
|
248
|
-
return getInitColumns(columns);
|
|
249
|
-
}
|
|
250
|
-
return getCheckedColumns(
|
|
247
|
+
const cacheCols = getCacheCols(getColsCacheKey(cacheKey));
|
|
248
|
+
if (!cacheCols) {
|
|
249
|
+
return getInitColumns(columns, getCacheColsWidth(cacheKey));
|
|
250
|
+
}
|
|
251
|
+
return getCheckedColumns(
|
|
252
|
+
columns,
|
|
253
|
+
cacheCols,
|
|
254
|
+
sortable,
|
|
255
|
+
(item) => item.hideInSetting,
|
|
256
|
+
void 0,
|
|
257
|
+
false,
|
|
258
|
+
getCacheColsWidth(cacheKey)
|
|
259
|
+
);
|
|
251
260
|
}
|
|
252
|
-
function getCheckedColumns(columns, cols, sortable, filter) {
|
|
261
|
+
function getCheckedColumns(columns, cols, sortable, isHideInCol, filter, reserveUnchecked, cacheColsWidth) {
|
|
253
262
|
const data = [];
|
|
254
263
|
if (!columns || !columns.length) {
|
|
255
264
|
return data;
|
|
256
265
|
}
|
|
257
266
|
columns.forEach((d) => {
|
|
258
267
|
const colId = getColId(d);
|
|
259
|
-
if (colId == null) {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
268
|
if (filter && !filter(d)) {
|
|
263
269
|
return;
|
|
264
270
|
}
|
|
265
|
-
const temp = core.findTree(cols, (t) => t.uid === colId);
|
|
266
|
-
|
|
271
|
+
const temp = colId == null ? null : core.findTree(cols, (t) => t.uid === colId);
|
|
272
|
+
const hideInTable = temp ? !temp.checked : d.hideInTable;
|
|
273
|
+
if (!reserveUnchecked && hideInTable) {
|
|
267
274
|
return;
|
|
268
275
|
}
|
|
276
|
+
const width = getCacheColWidth(cacheColsWidth, d) ?? d.width;
|
|
269
277
|
const fixed = (temp == null ? void 0 : temp.fixed) ?? d.fixed;
|
|
270
278
|
const uid = core.uuid(8);
|
|
271
279
|
if (d.children && d.children.length) {
|
|
272
|
-
const children = getCheckedColumns(
|
|
280
|
+
const children = getCheckedColumns(
|
|
281
|
+
d.children,
|
|
282
|
+
cols,
|
|
283
|
+
sortable,
|
|
284
|
+
isHideInCol,
|
|
285
|
+
filter,
|
|
286
|
+
reserveUnchecked,
|
|
287
|
+
cacheColsWidth
|
|
288
|
+
);
|
|
273
289
|
if (children.length) {
|
|
274
|
-
data.push({ ...d, fixed,
|
|
290
|
+
data.push({ ...d, width, fixed, hideInTable, children, uid });
|
|
275
291
|
}
|
|
276
292
|
return;
|
|
277
293
|
}
|
|
278
|
-
data.push({ ...d, fixed, uid });
|
|
294
|
+
data.push({ ...d, width, fixed, hideInTable, uid });
|
|
279
295
|
});
|
|
280
296
|
if (!sortable || !data.length) {
|
|
281
297
|
return data;
|
|
@@ -295,7 +311,7 @@ function getCheckedColumns(columns, cols, sortable, filter) {
|
|
|
295
311
|
}
|
|
296
312
|
i++;
|
|
297
313
|
});
|
|
298
|
-
if (ai == null && a
|
|
314
|
+
if (ai == null && (isHideInCol == null ? void 0 : isHideInCol(a)) && a.fixed === "right") {
|
|
299
315
|
ai = i;
|
|
300
316
|
}
|
|
301
317
|
if (ai == null) {
|
|
@@ -303,10 +319,10 @@ function getCheckedColumns(columns, cols, sortable, filter) {
|
|
|
303
319
|
}
|
|
304
320
|
if (a.fixed === true || a.fixed === "left") {
|
|
305
321
|
ai -= i;
|
|
306
|
-
} else if (a.fixed === "right" || a
|
|
322
|
+
} else if (a.fixed === "right" || (isHideInCol == null ? void 0 : isHideInCol(a)) && !a.fixed) {
|
|
307
323
|
ai += i;
|
|
308
324
|
}
|
|
309
|
-
if (bi == null && b
|
|
325
|
+
if (bi == null && (isHideInCol == null ? void 0 : isHideInCol(b)) && b.fixed === "right") {
|
|
310
326
|
bi = i;
|
|
311
327
|
}
|
|
312
328
|
if (bi == null) {
|
|
@@ -314,82 +330,101 @@ function getCheckedColumns(columns, cols, sortable, filter) {
|
|
|
314
330
|
}
|
|
315
331
|
if (b.fixed === true || b.fixed === "left") {
|
|
316
332
|
bi -= i;
|
|
317
|
-
} else if (b.fixed === "right" || b
|
|
333
|
+
} else if (b.fixed === "right" || (isHideInCol == null ? void 0 : isHideInCol(b)) && !b.fixed) {
|
|
318
334
|
bi += i;
|
|
319
335
|
}
|
|
320
336
|
return ai - bi;
|
|
321
337
|
});
|
|
322
338
|
return data;
|
|
323
339
|
}
|
|
324
|
-
function getColItems(columns,
|
|
340
|
+
function getColItems(columns, locale, filter, cacheCols, sortFixed, cancelFixed, cacheColsWidth) {
|
|
325
341
|
const temp = columns == null ? [] : [...columns];
|
|
326
342
|
if (sortFixed) {
|
|
327
|
-
temp.sort(
|
|
328
|
-
|
|
329
|
-
|
|
343
|
+
temp.sort(
|
|
344
|
+
(a, b) => util.getColFixedNumber(a.fixed) - util.getColFixedNumber(b.fixed)
|
|
345
|
+
);
|
|
330
346
|
}
|
|
331
|
-
|
|
347
|
+
const cols = core.mapTree(temp, (d, _i, parent) => {
|
|
332
348
|
const colId = getColId(d);
|
|
333
349
|
if (colId == null || filter && !filter(d)) {
|
|
334
350
|
return;
|
|
335
351
|
}
|
|
336
|
-
|
|
352
|
+
const old = core.findTree(cacheCols, (t) => t.uid === colId);
|
|
353
|
+
const item = {
|
|
337
354
|
uid: colId,
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
type: d.type
|
|
355
|
+
type: d.type,
|
|
356
|
+
label: d.label || (d.type === "index" ? locale.columnIndex : d.type === "expand" ? locale.columnExpand : locale.columnUntitled),
|
|
357
|
+
checked: (old == null ? void 0 : old.checked) ?? !d.hideInTable,
|
|
358
|
+
fixed: cancelFixed || parent != null ? false : (old == null ? void 0 : old.fixed) ?? d.fixed,
|
|
359
|
+
width: getCacheColWidth(cacheColsWidth, d) ?? d.width
|
|
344
360
|
};
|
|
361
|
+
return item;
|
|
345
362
|
});
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
363
|
+
if (cacheCols && cacheCols.length) {
|
|
364
|
+
cols.sort((a, b) => {
|
|
365
|
+
const oldAI = cacheCols.findIndex((t) => t.uid === a.uid);
|
|
366
|
+
const oldBI = cacheCols.findIndex((t) => t.uid === b.uid);
|
|
367
|
+
const ai = oldAI === -1 ? cols.indexOf(a) : oldAI;
|
|
368
|
+
const bi = oldBI === -1 ? cols.indexOf(b) : oldBI;
|
|
369
|
+
return ai - bi;
|
|
370
|
+
});
|
|
371
|
+
core.eachTree(cols, (item) => {
|
|
372
|
+
var _a;
|
|
373
|
+
if (item.children && item.children.length) {
|
|
374
|
+
const oldC = (_a = core.findTree(cacheCols, (t) => t.uid === item.uid)) == null ? void 0 : _a.children;
|
|
375
|
+
if (oldC && oldC.length) {
|
|
376
|
+
item.children.sort((a, b) => {
|
|
377
|
+
const oldAI = oldC.findIndex((t) => t.uid === a.uid);
|
|
378
|
+
const oldBI = oldC.findIndex((t) => t.uid === b.uid);
|
|
379
|
+
const ai = oldAI === -1 ? cols.indexOf(a) : oldAI;
|
|
380
|
+
const bi = oldBI === -1 ? cols.indexOf(b) : oldBI;
|
|
381
|
+
return ai - bi;
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
});
|
|
351
386
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
if (
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
};
|
|
387
|
+
let checkAll = true;
|
|
388
|
+
let indeterminate = false;
|
|
389
|
+
core.eachTree(cols, (d) => {
|
|
390
|
+
if (!d.checked && checkAll) {
|
|
391
|
+
checkAll = false;
|
|
392
|
+
}
|
|
393
|
+
if (d.checked && !indeterminate) {
|
|
394
|
+
indeterminate = true;
|
|
395
|
+
}
|
|
396
|
+
if (!checkAll && indeterminate) {
|
|
397
|
+
return false;
|
|
364
398
|
}
|
|
365
399
|
});
|
|
400
|
+
return {
|
|
401
|
+
cols,
|
|
402
|
+
checkAll: cols.length > 0 && checkAll,
|
|
403
|
+
indeterminate: !checkAll && indeterminate
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
function getSizeCacheKey(cacheKey) {
|
|
407
|
+
return `${cacheKey}Size`;
|
|
408
|
+
}
|
|
409
|
+
function getColsCacheKey(cacheKey) {
|
|
410
|
+
return cacheKey ? `${cacheKey}Cols` : void 0;
|
|
411
|
+
}
|
|
412
|
+
function getColsWidthCacheKey(cacheKey) {
|
|
413
|
+
return `${cacheKey}ColsWidth`;
|
|
366
414
|
}
|
|
367
415
|
function getCacheCols(cacheKey) {
|
|
368
416
|
if (cacheKey) {
|
|
369
|
-
const
|
|
370
|
-
if (
|
|
417
|
+
const oldJSON = localStorage.getItem(cacheKey);
|
|
418
|
+
if (oldJSON) {
|
|
371
419
|
try {
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
data.forEach((d) => {
|
|
375
|
-
if (d.uid == null && d.id != null) {
|
|
376
|
-
d.uid = d.id;
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
return data;
|
|
380
|
-
}
|
|
420
|
+
const old = JSON.parse(oldJSON);
|
|
421
|
+
return old && Array.isArray(old) ? old : void 0;
|
|
381
422
|
} catch (e) {
|
|
382
423
|
console.error(e);
|
|
383
424
|
}
|
|
384
425
|
}
|
|
385
426
|
}
|
|
386
427
|
}
|
|
387
|
-
function getColsCacheKey(cacheKey) {
|
|
388
|
-
return `${cacheKey}Cols`;
|
|
389
|
-
}
|
|
390
|
-
function getSizeCacheKey(cacheKey) {
|
|
391
|
-
return `${cacheKey}Size`;
|
|
392
|
-
}
|
|
393
428
|
function getCacheSize(cacheKey) {
|
|
394
429
|
if (cacheKey) {
|
|
395
430
|
const size = localStorage.getItem(getSizeCacheKey(cacheKey));
|
|
@@ -398,6 +433,52 @@ function getCacheSize(cacheKey) {
|
|
|
398
433
|
}
|
|
399
434
|
}
|
|
400
435
|
}
|
|
436
|
+
function getCacheColsWidth(cacheKey) {
|
|
437
|
+
if (cacheKey) {
|
|
438
|
+
const oldJSON = localStorage.getItem(getColsWidthCacheKey(cacheKey));
|
|
439
|
+
if (oldJSON) {
|
|
440
|
+
try {
|
|
441
|
+
const old = JSON.parse(oldJSON);
|
|
442
|
+
return old && Array.isArray(old) ? old : void 0;
|
|
443
|
+
} catch (e) {
|
|
444
|
+
console.error(e);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
function getCacheColWidth(cacheColsWidth, column) {
|
|
450
|
+
if (cacheColsWidth == null || column == null) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
const colId = getColId(column);
|
|
454
|
+
const c = core.findTree(cacheColsWidth, (d) => d.uid === colId);
|
|
455
|
+
if (!c || c.width == null) {
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
if (c.width === "" || typeof c.width === "string" && !c.width.trim()) {
|
|
459
|
+
return "";
|
|
460
|
+
}
|
|
461
|
+
const width = Number(c.width);
|
|
462
|
+
return isNaN(width) ? c.width : width;
|
|
463
|
+
}
|
|
464
|
+
function cacheColWidth(width, column, cacheKey) {
|
|
465
|
+
if (cacheKey && column) {
|
|
466
|
+
const colId = getColId(column);
|
|
467
|
+
if (colId) {
|
|
468
|
+
const colsWidth = getCacheColsWidth(cacheKey) || [];
|
|
469
|
+
const old = colsWidth.find((d) => d.uid === colId);
|
|
470
|
+
if (!old) {
|
|
471
|
+
colsWidth.push({ uid: colId, width });
|
|
472
|
+
} else {
|
|
473
|
+
old.width = width;
|
|
474
|
+
}
|
|
475
|
+
localStorage.setItem(
|
|
476
|
+
getColsWidthCacheKey(cacheKey),
|
|
477
|
+
JSON.stringify(colsWidth)
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
401
482
|
function getRowKey(rowKey) {
|
|
402
483
|
if (rowKey != null) {
|
|
403
484
|
return rowKey;
|
|
@@ -413,7 +494,7 @@ function getCellText(column, row, index, pageIndex) {
|
|
|
413
494
|
if (column.type === "index") {
|
|
414
495
|
return util$1.getIndexValue(index, column.index, pageIndex);
|
|
415
496
|
}
|
|
416
|
-
const propValue = core.getValue(row, column.prop);
|
|
497
|
+
const propValue = column.prop == null ? void 0 : core.getValue(row, column.prop);
|
|
417
498
|
if (typeof column.formatter === "function") {
|
|
418
499
|
return column.formatter(row, column, propValue, index);
|
|
419
500
|
}
|
|
@@ -602,7 +683,8 @@ function exportCSV(fileName, headerData, bodyData, footerData) {
|
|
|
602
683
|
const csvRows = [];
|
|
603
684
|
[...headerData, ...bodyData, ...footerData].forEach((item) => {
|
|
604
685
|
const cells = item.map((d) => {
|
|
605
|
-
const
|
|
686
|
+
const str = d.text ?? "";
|
|
687
|
+
const text = typeof str === "string" ? str.replace(/,/g, ",").replace(/\n/g, " ") : str;
|
|
606
688
|
if (!d.isTreeCell || !d.indent) {
|
|
607
689
|
return text;
|
|
608
690
|
}
|
|
@@ -632,16 +714,27 @@ function columnsPrintFilter(item) {
|
|
|
632
714
|
}
|
|
633
715
|
return !item.type || !["selection"].includes(item.type);
|
|
634
716
|
}
|
|
717
|
+
function columnsSettingFilter(item) {
|
|
718
|
+
if (item.hideInSetting) {
|
|
719
|
+
return false;
|
|
720
|
+
}
|
|
721
|
+
return !item.type || !["selection", "index", "expand"].includes(item.type);
|
|
722
|
+
}
|
|
723
|
+
exports.cacheColWidth = cacheColWidth;
|
|
635
724
|
exports.columnsExportFilter = columnsExportFilter;
|
|
636
725
|
exports.columnsPrintFilter = columnsPrintFilter;
|
|
726
|
+
exports.columnsSettingFilter = columnsSettingFilter;
|
|
637
727
|
exports.exportCSV = exportCSV;
|
|
728
|
+
exports.getCacheColWidth = getCacheColWidth;
|
|
638
729
|
exports.getCacheCols = getCacheCols;
|
|
730
|
+
exports.getCacheColsWidth = getCacheColsWidth;
|
|
639
731
|
exports.getCacheSize = getCacheSize;
|
|
640
732
|
exports.getCellText = getCellText;
|
|
641
733
|
exports.getCheckedColumns = getCheckedColumns;
|
|
642
734
|
exports.getColId = getColId;
|
|
643
735
|
exports.getColItems = getColItems;
|
|
644
736
|
exports.getColsCacheKey = getColsCacheKey;
|
|
737
|
+
exports.getColsWidthCacheKey = getColsWidthCacheKey;
|
|
645
738
|
exports.getDefaultFilter = getDefaultFilter;
|
|
646
739
|
exports.getExportBodyNode = getExportBodyNode;
|
|
647
740
|
exports.getExportData = getExportData;
|
|
@@ -658,7 +751,6 @@ exports.getResponseData = getResponseData;
|
|
|
658
751
|
exports.getResponseName = getResponseName;
|
|
659
752
|
exports.getResponseResult = getResponseResult;
|
|
660
753
|
exports.getRowKey = getRowKey;
|
|
661
|
-
exports.getSettingCols = getSettingCols;
|
|
662
754
|
exports.getSizeCacheKey = getSizeCacheKey;
|
|
663
755
|
exports.getTableLimit = getTableLimit;
|
|
664
756
|
exports.getTablePage = getTablePage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElePaginationProps } from '../ele-app/plus';
|
|
2
2
|
import { DataItem, Column, Columns, Sorter, Filter, TableSize, TreeProps, RowKey, SpanMethod, SummaryMethod } from '../ele-data-table/types';
|
|
3
|
-
import { Pages, Orders, Filters, OrderItem, RequestOption, ResponseOption, TablePagination, DatasourceResult, ResponseResult, ReloadDataResult, ColItem, ProProps, ExportBodyNode, ExportDataItem, ExportDataResult } from './types';
|
|
3
|
+
import { Pages, Orders, Filters, OrderItem, RequestOption, ResponseOption, TablePagination, DatasourceResult, ResponseResult, ReloadDataResult, ColItem, ProProps, ExportBodyNode, ExportDataItem, ExportDataResult, CacheKey, TableLocale } from './types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 合并复合属性
|
|
@@ -9,25 +9,25 @@ import { Pages, Orders, Filters, OrderItem, RequestOption, ResponseOption, Table
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function mergeProps<T extends Record<keyof any, any>>(props?: ProProps<T> | null, globalProps?: ProProps<T> | null): ProProps<T>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 获取分页组件属性
|
|
13
|
+
* @param size 表格尺寸
|
|
13
14
|
* @param pagination 分页组件属性
|
|
14
15
|
* @param globalPagination 全局配置分页组件属性
|
|
16
|
+
* @param pageProps 分页相关的属性
|
|
15
17
|
*/
|
|
16
|
-
export declare function
|
|
18
|
+
export declare function getPaginationProps(size: TableSize, pagination: boolean | TablePagination | undefined, globalPagination: boolean | TablePagination | undefined, pageProps?: Pick<ElePaginationProps, 'total' | 'pageSize' | 'currentPage' | 'hasNext'>): ElePaginationProps | null;
|
|
17
19
|
/**
|
|
18
|
-
*
|
|
20
|
+
* 获取默认页码
|
|
19
21
|
* @param pagination 分页组件属性
|
|
20
22
|
* @param globalPagination 全局配置分页组件属性
|
|
21
23
|
*/
|
|
22
|
-
export declare function
|
|
24
|
+
export declare function getTablePage(pagination: boolean | TablePagination | undefined, globalPagination: boolean | TablePagination | undefined): number;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @param size 表格尺寸
|
|
26
|
+
* 获取默认每页数量
|
|
26
27
|
* @param pagination 分页组件属性
|
|
27
28
|
* @param globalPagination 全局配置分页组件属性
|
|
28
|
-
* @param pageProps 分页相关的属性
|
|
29
29
|
*/
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function getTableLimit(pagination: boolean | TablePagination | undefined, globalPagination: boolean | TablePagination | undefined): number;
|
|
31
31
|
/**
|
|
32
32
|
* 判断是否开启自动修正页码
|
|
33
33
|
* @param pagination 分页组件属性
|
|
@@ -54,8 +54,8 @@ export declare function getDefaultFilter(columns?: Columns): Filter;
|
|
|
54
54
|
export declare function getRequestName(globalRequest?: RequestOption, request?: RequestOption): RequestOption;
|
|
55
55
|
/**
|
|
56
56
|
* 获取响应参数名称
|
|
57
|
-
* @param
|
|
58
|
-
* @param
|
|
57
|
+
* @param globalResponse 全局响应参数配置
|
|
58
|
+
* @param response 响应参数配置
|
|
59
59
|
*/
|
|
60
60
|
export declare function getResponseName(globalResponse?: ResponseOption, response?: ResponseOption): ResponseOption;
|
|
61
61
|
/**
|
|
@@ -100,19 +100,19 @@ export declare function getResponseResult(data: DatasourceResult, response?: Res
|
|
|
100
100
|
*/
|
|
101
101
|
export declare function getResponseData(data?: DataItem[] | null, lazy?: boolean, treeProps?: TreeProps): DataItem[] | undefined;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* 排序数据
|
|
104
104
|
* @param datasource 数据源
|
|
105
105
|
* @param sorter 排序方式
|
|
106
|
-
* @param page 页码
|
|
107
|
-
* @param limit 每页数量
|
|
108
106
|
*/
|
|
109
|
-
export declare function
|
|
107
|
+
export declare function sortData(datasource?: DataItem[], sorter?: Sorter): DataItem[];
|
|
110
108
|
/**
|
|
111
|
-
*
|
|
109
|
+
* 前端分页排序
|
|
112
110
|
* @param datasource 数据源
|
|
113
111
|
* @param sorter 排序方式
|
|
112
|
+
* @param page 页码
|
|
113
|
+
* @param limit 每页数量
|
|
114
114
|
*/
|
|
115
|
-
export declare function
|
|
115
|
+
export declare function reloadData(datasource?: DataItem[], sorter?: Sorter, page?: number, limit?: number): ReloadDataResult;
|
|
116
116
|
/**
|
|
117
117
|
* 获取列配置标识
|
|
118
118
|
* @param column 列数据
|
|
@@ -121,8 +121,9 @@ export declare function getColId(column: Column): string | undefined;
|
|
|
121
121
|
/**
|
|
122
122
|
* 获取初始显示的列数据
|
|
123
123
|
* @param columns 列数据
|
|
124
|
+
* @param cacheColsWidth 缓存的列宽
|
|
124
125
|
*/
|
|
125
|
-
export declare function getInitColumns(columns: Columns): Columns;
|
|
126
|
+
export declare function getInitColumns(columns: Columns, cacheColsWidth?: ColItem[]): Columns;
|
|
126
127
|
/**
|
|
127
128
|
* 获取初始显示的列数据
|
|
128
129
|
* @param columns 列数据
|
|
@@ -135,44 +136,86 @@ export declare function getInitCacheColumns(columns: Columns, cacheKey?: string,
|
|
|
135
136
|
* @param columns 原始列数据
|
|
136
137
|
* @param cols 列配置数据
|
|
137
138
|
* @param sortable 是否进行排序
|
|
139
|
+
* @param isHideInCol 用于排序时计算不显示在配置中的列
|
|
140
|
+
* @param filter 强制过滤的列
|
|
141
|
+
* @param reserveUnchecked 是否保留未选中的列
|
|
142
|
+
* @param cacheColsWidth 缓存的列宽
|
|
138
143
|
*/
|
|
139
|
-
export declare function getCheckedColumns(columns: Columns | undefined, cols: ColItem[], sortable?: boolean, filter?: (item: Column) => boolean): Columns;
|
|
144
|
+
export declare function getCheckedColumns(columns: Columns | undefined, cols: ColItem[], sortable: boolean | undefined, isHideInCol?: (item: Column) => boolean | undefined, filter?: (item: Column) => boolean, reserveUnchecked?: boolean, cacheColsWidth?: ColItem[]): Columns;
|
|
140
145
|
/**
|
|
141
146
|
* 获取列展示列表数据
|
|
142
147
|
* @param columns 列配置
|
|
143
|
-
* @param
|
|
144
|
-
* @param indexText 序号列文字
|
|
145
|
-
* @param expandText 展开列文字
|
|
148
|
+
* @param locale 国际化
|
|
146
149
|
* @param filter 过滤列的方法
|
|
150
|
+
* @param cacheCols 缓存的列展示列表数据
|
|
147
151
|
* @param sortFixed 是否对固定列排序
|
|
148
152
|
* @param cancelFixed 是否取消固定列
|
|
153
|
+
* @param cacheColsWidth 缓存的列宽
|
|
149
154
|
*/
|
|
150
|
-
export declare function getColItems(columns
|
|
155
|
+
export declare function getColItems(columns: Columns | undefined, locale: TableLocale, filter?: (item: Column) => boolean, cacheCols?: ColItem[], sortFixed?: boolean, cancelFixed?: boolean, cacheColsWidth?: ColItem[]): {
|
|
156
|
+
cols: ColItem[];
|
|
157
|
+
checkAll: boolean;
|
|
158
|
+
indeterminate: boolean;
|
|
159
|
+
};
|
|
151
160
|
/**
|
|
152
|
-
*
|
|
153
|
-
* @param columns 列数据
|
|
154
|
-
* @param untitledText 未命名列文字
|
|
161
|
+
* 获取表格密度缓存的名称
|
|
155
162
|
* @param cacheKey 缓存的名称
|
|
156
163
|
*/
|
|
157
|
-
export declare function
|
|
164
|
+
export declare function getSizeCacheKey(cacheKey: string): string;
|
|
158
165
|
/**
|
|
159
|
-
*
|
|
166
|
+
* 获取列配置缓存的名称
|
|
160
167
|
* @param cacheKey 缓存的名称
|
|
161
168
|
*/
|
|
162
|
-
export declare function
|
|
169
|
+
export declare function getColsCacheKey<T extends CacheKey>(cacheKey: T): T;
|
|
163
170
|
/**
|
|
164
|
-
*
|
|
171
|
+
* 获取表格列宽缓存的名称
|
|
172
|
+
* @param cacheKey 缓存的名称
|
|
165
173
|
*/
|
|
166
|
-
export declare function
|
|
174
|
+
export declare function getColsWidthCacheKey(cacheKey: string): string;
|
|
167
175
|
/**
|
|
168
|
-
*
|
|
176
|
+
* 获取导出的列配置缓存的名称
|
|
177
|
+
* @param cacheKey 缓存的名称
|
|
169
178
|
*/
|
|
170
|
-
|
|
179
|
+
/**
|
|
180
|
+
* 获取导出的列宽缓存的名称
|
|
181
|
+
* @param cacheKey 缓存的名称
|
|
182
|
+
*/
|
|
183
|
+
/**
|
|
184
|
+
* 获取打印的列配置缓存的名称
|
|
185
|
+
* @param cacheKey 缓存的名称
|
|
186
|
+
*/
|
|
187
|
+
/**
|
|
188
|
+
* 获取打印的列宽缓存的名称
|
|
189
|
+
* @param cacheKey 缓存的名称
|
|
190
|
+
*/
|
|
191
|
+
/**
|
|
192
|
+
* 获取缓存的列配置下拉列表数据
|
|
193
|
+
* @param cacheKey 缓存的名称
|
|
194
|
+
*/
|
|
195
|
+
export declare function getCacheCols(cacheKey?: string): ColItem[] | undefined;
|
|
171
196
|
/**
|
|
172
197
|
* 获取缓存的表格密度
|
|
173
198
|
* @param cacheKey 缓存的名称
|
|
174
199
|
*/
|
|
175
200
|
export declare function getCacheSize(cacheKey?: string): TableSize;
|
|
201
|
+
/**
|
|
202
|
+
* 获取缓存的列宽
|
|
203
|
+
* @param cacheKey 缓存的名称
|
|
204
|
+
*/
|
|
205
|
+
export declare function getCacheColsWidth(cacheKey?: string): ColItem[] | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* 获取列对应的缓存的列宽
|
|
208
|
+
* @param cacheColsWidth 缓存的列宽
|
|
209
|
+
* @param column 列配置
|
|
210
|
+
*/
|
|
211
|
+
export declare function getCacheColWidth(cacheColsWidth?: ColItem[], column?: Column): number | string | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* 缓存列宽
|
|
214
|
+
* @param width 列宽
|
|
215
|
+
* @param column 列配置
|
|
216
|
+
* @param cacheKey 缓存的名称
|
|
217
|
+
*/
|
|
218
|
+
export declare function cacheColWidth(width: number, column?: Column, cacheKey?: string): void;
|
|
176
219
|
/**
|
|
177
220
|
* 获取 rowKey
|
|
178
221
|
* @param rowKey 自定义 rowKey
|
|
@@ -214,13 +257,15 @@ export declare function getExportBodyNode(data: DataItem[], childrenField?: stri
|
|
|
214
257
|
* @param summaryMethod 合计行自定义方法
|
|
215
258
|
* @param childrenField 子级字段名
|
|
216
259
|
* @param showTreeIndex 是否显示层级序号
|
|
260
|
+
* @param showHeader 是否显示表头
|
|
217
261
|
*/
|
|
218
262
|
export declare function getExportData(data: DataItem[], columns: Columns, spanMethod?: SpanMethod, pageIndex?: number, showSummary?: boolean, sumText?: string, summaryMethod?: SummaryMethod, childrenField?: string, showTreeIndex?: boolean, showHeader?: boolean): ExportDataResult;
|
|
219
263
|
/**
|
|
220
|
-
* 导出csv文件
|
|
264
|
+
* 导出 csv 文件
|
|
221
265
|
* @param fileName 文件名
|
|
222
266
|
* @param headerData 表头数据
|
|
223
267
|
* @param bodyData 主体数据
|
|
268
|
+
* @param footerData 表尾数据
|
|
224
269
|
*/
|
|
225
270
|
export declare function exportCSV(fileName: string, headerData: ExportDataItem[][], bodyData: ExportDataItem[][], footerData: ExportDataItem[][]): void;
|
|
226
271
|
/**
|
|
@@ -233,3 +278,8 @@ export declare function columnsExportFilter(item: Column): boolean;
|
|
|
233
278
|
* @param item 列配置
|
|
234
279
|
*/
|
|
235
280
|
export declare function columnsPrintFilter(item: Column): boolean;
|
|
281
|
+
/**
|
|
282
|
+
* 列配置判断列是否显示
|
|
283
|
+
* @param item 列配置
|
|
284
|
+
*/
|
|
285
|
+
export declare function columnsSettingFilter(item: Column): boolean;
|