ele-admin-plus 1.2.1-beta.2 → 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 +26 -30
- package/es/ele-admin-layout/props.d.ts +11 -10
- package/es/ele-alert/index.d.ts +14 -14
- package/es/ele-alert/props.d.ts +9 -8
- package/es/ele-app/components/message-body.d.ts +5 -4
- package/es/ele-app/components/message-box-icon.d.ts +7 -6
- package/es/ele-app/style/overwrite/input/index.scss +2 -0
- package/es/ele-avatar-group/index.d.ts +15 -14
- package/es/ele-avatar-group/props.d.ts +10 -7
- package/es/ele-basic-select/index.d.ts +17 -14
- package/es/ele-basic-select/index.js +14 -7
- 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 +4 -4
- package/es/ele-check-card/index.js +8 -3
- 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 +10 -10
- 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 +4 -3
- package/es/ele-cropper/index.d.ts +3 -3
- package/es/ele-cropper/props.d.ts +2 -1
- package/es/ele-cropper-modal/index.d.ts +4 -4
- 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 +5 -1
- package/es/ele-drawer/index.d.ts +14 -14
- package/es/ele-drawer/props.d.ts +11 -10
- package/es/ele-dropdown/index.d.ts +22 -22
- package/es/ele-dropdown/index.js +45 -39
- 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 +5 -4
- package/es/ele-ellipsis/props.d.ts +1 -1
- package/es/ele-file-list/index.d.ts +4 -4
- package/es/ele-icon-select/components/icon-grid.d.ts +8 -6
- package/es/ele-icon-select/index.d.ts +37 -36
- package/es/ele-icon-select/index.js +6 -2
- 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/props.d.ts +1 -1
- package/es/ele-menus/style/index.scss +4 -0
- package/es/ele-modal/index.d.ts +24 -23
- package/es/ele-modal/index.js +30 -64
- 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 +18 -6
- package/es/ele-pagination/index.js +3 -2
- 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 +32 -32
- package/es/ele-popconfirm/props.d.ts +19 -17
- package/es/ele-popover/index.d.ts +22 -22
- package/es/ele-popover/props.d.ts +11 -10
- package/es/ele-printer/index.d.ts +8 -8
- package/es/ele-printer/props.d.ts +6 -5
- package/es/ele-printer/util.d.ts +5 -5
- package/es/ele-printer/util.js +68 -43
- package/es/ele-pro-layout/index.d.ts +43 -47
- package/es/ele-pro-layout/props.d.ts +16 -14
- package/es/ele-pro-table/components/table-tools.d.ts +402 -32
- package/es/ele-pro-table/components/table-tools.js +223 -140
- package/es/ele-pro-table/components/tool-column-list.d.ts +12 -0
- package/es/ele-pro-table/components/tool-column-list.js +33 -6
- package/es/ele-pro-table/components/tool-column.d.ts +8 -7
- package/es/ele-pro-table/components/tool-column.js +11 -5
- package/es/ele-pro-table/components/tool-export.d.ts +33 -30
- package/es/ele-pro-table/components/tool-export.js +204 -184
- 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 +41 -40
- package/es/ele-pro-table/components/tool-print.js +357 -336
- package/es/ele-pro-table/index.d.ts +1006 -70
- package/es/ele-pro-table/index.js +63 -13
- package/es/ele-pro-table/props.d.ts +17 -18
- package/es/ele-pro-table/props.js +3 -1
- package/es/ele-pro-table/style/index.scss +43 -12
- package/es/ele-pro-table/types.d.ts +54 -0
- package/es/ele-pro-table/util.d.ts +51 -9
- package/es/ele-pro-table/util.js +89 -28
- 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.js +3 -0
- package/es/ele-split-panel/index.d.ts +7 -7
- 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-table/index.d.ts +2 -2
- package/es/ele-table/props.d.ts +2 -1
- package/es/ele-table-select/index.d.ts +22 -20
- package/es/ele-table-select/index.js +5 -2
- 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 +5 -2
- package/es/ele-tool/index.js +2 -5
- package/es/ele-tool/props.d.ts +4 -1
- package/es/ele-tool/props.js +3 -1
- package/es/ele-tool/style/index.scss +13 -0
- package/es/ele-toolbar/index.d.ts +17 -17
- package/es/ele-toolbar/props.d.ts +4 -3
- package/es/ele-tooltip/index.d.ts +13 -12
- package/es/ele-tooltip/props.d.ts +7 -6
- package/es/ele-tour/index.d.ts +1 -1
- package/es/ele-tree-select/index.d.ts +18 -18
- package/es/ele-tree-select/index.js +5 -2
- package/es/ele-tree-select/props.d.ts +12 -8
- package/es/ele-tree-select/props.js +3 -1
- package/es/ele-upload-list/index.d.ts +7 -9
- 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 +11 -27
- package/es/ele-virtual-table/components/body-row.d.ts +13 -29
- package/es/ele-virtual-table/components/cell-checkbox.d.ts +3 -2
- package/es/ele-virtual-table/components/cell-filter.d.ts +6 -6
- package/es/ele-virtual-table/components/footer-row.d.ts +3 -3
- package/es/ele-virtual-table/components/header-cell.d.ts +7 -7
- package/es/ele-virtual-table/components/header-row.d.ts +7 -7
- package/es/ele-virtual-table/index.d.ts +20 -21
- package/es/ele-virtual-table/props.d.ts +11 -11
- package/es/ele-watermark/index.d.ts +5 -4
- 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 +12 -5
- package/es/style/themes/rounded.scss +3 -2
- package/es/utils/hook.d.ts +75 -4
- package/es/utils/hook.js +155 -6
- package/lib/ele-admin-layout/index.d.ts +26 -30
- package/lib/ele-admin-layout/props.d.ts +11 -10
- package/lib/ele-alert/index.d.ts +14 -14
- package/lib/ele-alert/props.d.ts +9 -8
- package/lib/ele-app/components/message-body.d.ts +5 -4
- package/lib/ele-app/components/message-box-icon.d.ts +7 -6
- package/lib/ele-app/style/overwrite/input/index.scss +2 -0
- package/lib/ele-avatar-group/index.d.ts +15 -14
- package/lib/ele-avatar-group/props.d.ts +10 -7
- package/lib/ele-basic-select/index.cjs +14 -7
- package/lib/ele-basic-select/index.d.ts +17 -14
- 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 +8 -3
- package/lib/ele-check-card/index.d.ts +4 -4
- 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.d.ts +10 -10
- 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.d.ts +4 -3
- package/lib/ele-cropper/index.d.ts +3 -3
- package/lib/ele-cropper/props.d.ts +2 -1
- package/lib/ele-cropper-modal/index.d.ts +4 -4
- 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 +5 -1
- package/lib/ele-drawer/index.d.ts +14 -14
- package/lib/ele-drawer/props.d.ts +11 -10
- package/lib/ele-dropdown/index.cjs +45 -39
- package/lib/ele-dropdown/index.d.ts +22 -22
- 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.d.ts +5 -4
- package/lib/ele-ellipsis/props.d.ts +1 -1
- package/lib/ele-file-list/index.d.ts +4 -4
- package/lib/ele-icon-select/components/icon-grid.d.ts +8 -6
- package/lib/ele-icon-select/index.cjs +9 -5
- package/lib/ele-icon-select/index.d.ts +37 -36
- 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.d.ts +2 -2
- package/lib/ele-menus/props.d.ts +1 -1
- package/lib/ele-menus/style/index.scss +4 -0
- package/lib/ele-modal/index.cjs +28 -62
- package/lib/ele-modal/index.d.ts +24 -23
- 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 +3 -2
- package/lib/ele-pagination/index.d.ts +18 -6
- package/lib/ele-pagination/props.d.ts +8 -2
- package/lib/ele-pagination/style/index.scss +70 -0
- package/lib/ele-popconfirm/index.d.ts +32 -32
- package/lib/ele-popconfirm/props.d.ts +19 -17
- package/lib/ele-popover/index.d.ts +22 -22
- package/lib/ele-popover/props.d.ts +11 -10
- package/lib/ele-printer/index.d.ts +8 -8
- package/lib/ele-printer/props.d.ts +6 -5
- package/lib/ele-printer/util.cjs +68 -43
- package/lib/ele-printer/util.d.ts +5 -5
- package/lib/ele-pro-layout/index.d.ts +43 -47
- package/lib/ele-pro-layout/props.d.ts +16 -14
- package/lib/ele-pro-table/components/table-tools.cjs +221 -138
- package/lib/ele-pro-table/components/table-tools.d.ts +402 -32
- package/lib/ele-pro-table/components/tool-column-list.cjs +32 -5
- package/lib/ele-pro-table/components/tool-column-list.d.ts +12 -0
- package/lib/ele-pro-table/components/tool-column.cjs +10 -4
- package/lib/ele-pro-table/components/tool-column.d.ts +8 -7
- package/lib/ele-pro-table/components/tool-export.cjs +201 -181
- package/lib/ele-pro-table/components/tool-export.d.ts +33 -30
- 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 +354 -333
- package/lib/ele-pro-table/components/tool-print.d.ts +41 -40
- package/lib/ele-pro-table/index.cjs +60 -10
- package/lib/ele-pro-table/index.d.ts +1006 -70
- package/lib/ele-pro-table/props.cjs +3 -1
- package/lib/ele-pro-table/props.d.ts +17 -18
- package/lib/ele-pro-table/style/index.scss +43 -12
- package/lib/ele-pro-table/types.d.ts +54 -0
- package/lib/ele-pro-table/util.cjs +89 -28
- package/lib/ele-pro-table/util.d.ts +51 -9
- 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 +3 -0
- package/lib/ele-split-panel/index.d.ts +7 -7
- 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-table/index.d.ts +2 -2
- package/lib/ele-table/props.d.ts +2 -1
- package/lib/ele-table-select/index.cjs +20 -17
- package/lib/ele-table-select/index.d.ts +22 -20
- 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 +2 -5
- package/lib/ele-tool/index.d.ts +5 -2
- package/lib/ele-tool/props.cjs +3 -1
- package/lib/ele-tool/props.d.ts +4 -1
- package/lib/ele-tool/style/index.scss +13 -0
- package/lib/ele-toolbar/index.d.ts +17 -17
- package/lib/ele-toolbar/props.d.ts +4 -3
- package/lib/ele-tooltip/index.d.ts +13 -12
- package/lib/ele-tooltip/props.d.ts +7 -6
- package/lib/ele-tour/index.d.ts +1 -1
- package/lib/ele-tree-select/index.cjs +4 -1
- package/lib/ele-tree-select/index.d.ts +18 -18
- package/lib/ele-tree-select/props.cjs +3 -1
- package/lib/ele-tree-select/props.d.ts +12 -8
- package/lib/ele-upload-list/index.d.ts +7 -9
- 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.d.ts +11 -27
- package/lib/ele-virtual-table/components/body-row.d.ts +13 -29
- package/lib/ele-virtual-table/components/cell-checkbox.d.ts +3 -2
- package/lib/ele-virtual-table/components/cell-filter.d.ts +6 -6
- package/lib/ele-virtual-table/components/footer-row.d.ts +3 -3
- package/lib/ele-virtual-table/components/header-cell.d.ts +7 -7
- package/lib/ele-virtual-table/components/header-row.d.ts +7 -7
- package/lib/ele-virtual-table/index.d.ts +20 -21
- package/lib/ele-virtual-table/props.d.ts +11 -11
- 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 +12 -5
- package/lib/style/themes/rounded.scss +3 -2
- package/lib/utils/hook.cjs +154 -5
- package/lib/utils/hook.d.ts +75 -4
- package/package.json +14 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createBlock, createCommentVNode } from "vue";
|
|
2
2
|
import { ElIcon } from "element-plus";
|
|
3
|
-
import { ReloadOutlined, ColumnHeightOutlined, FullscreenOutlined, FullscreenExitOutlined } from "../../icons";
|
|
3
|
+
import { ReloadOutlined, DownloadOutlined, PrinterOutlined, ColumnHeightOutlined, FullscreenOutlined, FullscreenExitOutlined, SizeSlackOutlined, MenuOutlined, SizeCompactOutlined } from "../../icons";
|
|
4
4
|
import EleDropdown from "../../ele-dropdown/index";
|
|
5
5
|
import { useLocale } from "../../ele-config-provider/receiver";
|
|
6
6
|
import { getSizeCacheKey } from "../util";
|
|
@@ -8,11 +8,14 @@ import EleTool from "../../ele-tool/index";
|
|
|
8
8
|
import ToolColumn from "./tool-column";
|
|
9
9
|
import ToolExport from "./tool-export";
|
|
10
10
|
import ToolPrint from "./tool-print";
|
|
11
|
+
const ownSlots = ["default", "printTop", "printBottom"];
|
|
11
12
|
const _sfc_main = defineComponent({
|
|
12
13
|
name: "TableTools",
|
|
13
14
|
components: {
|
|
14
15
|
ElIcon,
|
|
15
16
|
ReloadOutlined,
|
|
17
|
+
DownloadOutlined,
|
|
18
|
+
PrinterOutlined,
|
|
16
19
|
ColumnHeightOutlined,
|
|
17
20
|
FullscreenOutlined,
|
|
18
21
|
FullscreenExitOutlined,
|
|
@@ -89,6 +92,8 @@ const _sfc_main = defineComponent({
|
|
|
89
92
|
},
|
|
90
93
|
setup(props, { emit }) {
|
|
91
94
|
const { lang } = useLocale("table", props);
|
|
95
|
+
const toolExportRef = ref(null);
|
|
96
|
+
const toolPrintRef = ref(null);
|
|
92
97
|
const placement = computed(() => props.maximized ? "bottom" : "top");
|
|
93
98
|
const reload = () => {
|
|
94
99
|
emit("reload");
|
|
@@ -105,13 +110,43 @@ const _sfc_main = defineComponent({
|
|
|
105
110
|
const toggleMaximized = () => {
|
|
106
111
|
emit("update:maximized", !props.maximized);
|
|
107
112
|
};
|
|
113
|
+
const openExportModal = () => {
|
|
114
|
+
if (toolExportRef.value) {
|
|
115
|
+
toolExportRef.value.openModal();
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const openPrintModal = () => {
|
|
119
|
+
if (toolPrintRef.value) {
|
|
120
|
+
toolPrintRef.value.openModal();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const printData = (params) => {
|
|
124
|
+
if (toolPrintRef.value) {
|
|
125
|
+
toolPrintRef.value.printData(params);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
const exportData = (params) => {
|
|
129
|
+
if (toolExportRef.value) {
|
|
130
|
+
toolExportRef.value.exportData(params);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
108
133
|
return {
|
|
134
|
+
ownSlots,
|
|
135
|
+
SizeSlackOutlined,
|
|
136
|
+
MenuOutlined,
|
|
137
|
+
SizeCompactOutlined,
|
|
109
138
|
lang,
|
|
139
|
+
toolExportRef,
|
|
140
|
+
toolPrintRef,
|
|
110
141
|
placement,
|
|
111
142
|
reload,
|
|
112
143
|
updateSize,
|
|
113
144
|
updateColumns,
|
|
114
|
-
toggleMaximized
|
|
145
|
+
toggleMaximized,
|
|
146
|
+
openExportModal,
|
|
147
|
+
openPrintModal,
|
|
148
|
+
printData,
|
|
149
|
+
exportData
|
|
115
150
|
};
|
|
116
151
|
}
|
|
117
152
|
});
|
|
@@ -123,151 +158,199 @@ const _export_sfc = (sfc, props) => {
|
|
|
123
158
|
return target;
|
|
124
159
|
};
|
|
125
160
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
161
|
+
const _component_ToolExport = resolveComponent("ToolExport");
|
|
162
|
+
const _component_ToolPrint = resolveComponent("ToolPrint");
|
|
126
163
|
const _component_ReloadOutlined = resolveComponent("ReloadOutlined");
|
|
127
164
|
const _component_ElIcon = resolveComponent("ElIcon");
|
|
128
165
|
const _component_EleTool = resolveComponent("EleTool");
|
|
166
|
+
const _component_DownloadOutlined = resolveComponent("DownloadOutlined");
|
|
167
|
+
const _component_PrinterOutlined = resolveComponent("PrinterOutlined");
|
|
129
168
|
const _component_ColumnHeightOutlined = resolveComponent("ColumnHeightOutlined");
|
|
130
169
|
const _component_EleDropdown = resolveComponent("EleDropdown");
|
|
131
170
|
const _component_ToolColumn = resolveComponent("ToolColumn");
|
|
132
171
|
const _component_FullscreenExitOutlined = resolveComponent("FullscreenExitOutlined");
|
|
133
172
|
const _component_FullscreenOutlined = resolveComponent("FullscreenOutlined");
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
placement:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
173
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
174
|
+
createVNode(_component_ToolExport, {
|
|
175
|
+
ref: "toolExportRef",
|
|
176
|
+
locale: _ctx.lang,
|
|
177
|
+
cacheKey: _ctx.cacheKey,
|
|
178
|
+
modalProps: _ctx.exportConfig.modalProps,
|
|
179
|
+
columns: _ctx.exportConfig.columns || _ctx.columns,
|
|
180
|
+
selections: _ctx.selections,
|
|
181
|
+
pageData: _ctx.pageData,
|
|
182
|
+
datasource: _ctx.exportConfig.datasource,
|
|
183
|
+
spanMethod: _ctx.spanMethod,
|
|
184
|
+
tableHeader: _ctx.exportConfig.showHeader ?? _ctx.tableHeader,
|
|
185
|
+
showSummary: _ctx.showSummary,
|
|
186
|
+
sumText: _ctx.sumText,
|
|
187
|
+
summaryMethod: _ctx.summaryMethod,
|
|
188
|
+
pageIndex: _ctx.pageIndex,
|
|
189
|
+
treeProps: _ctx.treeProps,
|
|
190
|
+
fetch: _ctx.fetch,
|
|
191
|
+
defaultFileName: _ctx.exportConfig.fileName,
|
|
192
|
+
defaultDataType: _ctx.exportConfig.dataType,
|
|
193
|
+
defaultShowFooter: _ctx.exportConfig.showFooter,
|
|
194
|
+
defaultShowTreeIndex: _ctx.exportConfig.showTreeIndex,
|
|
195
|
+
beforeExport: _ctx.exportConfig.beforeExport
|
|
196
|
+
}, null, 8, ["locale", "cacheKey", "modalProps", "columns", "selections", "pageData", "datasource", "spanMethod", "tableHeader", "showSummary", "sumText", "summaryMethod", "pageIndex", "treeProps", "fetch", "defaultFileName", "defaultDataType", "defaultShowFooter", "defaultShowTreeIndex", "beforeExport"]),
|
|
197
|
+
createVNode(_component_ToolPrint, {
|
|
198
|
+
ref: "toolPrintRef",
|
|
199
|
+
locale: _ctx.lang,
|
|
200
|
+
cacheKey: _ctx.cacheKey,
|
|
201
|
+
modalProps: _ctx.printConfig.modalProps,
|
|
202
|
+
printerProps: _ctx.printConfig.printerProps,
|
|
203
|
+
tableProps: _ctx.printConfig.tableProps,
|
|
204
|
+
columns: _ctx.printConfig.columns || _ctx.columns,
|
|
205
|
+
selections: _ctx.selections,
|
|
206
|
+
pageData: _ctx.pageData,
|
|
207
|
+
datasource: _ctx.printConfig.datasource,
|
|
208
|
+
spanMethod: _ctx.spanMethod,
|
|
209
|
+
tableHeader: _ctx.printConfig.showHeader ?? _ctx.tableHeader,
|
|
210
|
+
showSummary: _ctx.showSummary,
|
|
211
|
+
sumText: _ctx.sumText,
|
|
212
|
+
summaryMethod: _ctx.summaryMethod,
|
|
213
|
+
cellStyle: _ctx.cellStyle,
|
|
214
|
+
cellClassName: _ctx.cellClassName,
|
|
215
|
+
headerCellStyle: _ctx.headerCellStyle,
|
|
216
|
+
headerCellClassName: _ctx.headerCellClassName,
|
|
217
|
+
pageIndex: _ctx.pageIndex,
|
|
218
|
+
treeProps: _ctx.treeProps,
|
|
219
|
+
fetch: _ctx.fetch,
|
|
220
|
+
defaultDataType: _ctx.printConfig.dataType,
|
|
221
|
+
defaultShowFooter: _ctx.printConfig.showFooter,
|
|
222
|
+
defaultShowTreeIndex: _ctx.printConfig.showTreeIndex,
|
|
223
|
+
beforePrint: _ctx.printConfig.beforePrint
|
|
224
|
+
}, createSlots({ _: 2 }, [
|
|
225
|
+
renderList(Object.keys(_ctx.$slots), (name) => {
|
|
226
|
+
return {
|
|
227
|
+
name,
|
|
228
|
+
fn: withCtx((slotProps) => [
|
|
229
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
230
|
+
])
|
|
231
|
+
};
|
|
232
|
+
})
|
|
233
|
+
]), 1032, ["locale", "cacheKey", "modalProps", "printerProps", "tableProps", "columns", "selections", "pageData", "datasource", "spanMethod", "tableHeader", "showSummary", "sumText", "summaryMethod", "cellStyle", "cellClassName", "headerCellStyle", "headerCellClassName", "pageIndex", "treeProps", "fetch", "defaultDataType", "defaultShowFooter", "defaultShowTreeIndex", "beforePrint"]),
|
|
234
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tools, (tool, index) => {
|
|
235
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
236
|
+
tool === "reload" ? (openBlock(), createBlock(_component_EleTool, {
|
|
237
|
+
key: index + "-reload",
|
|
238
|
+
placement: _ctx.placement,
|
|
239
|
+
title: _ctx.lang.refresh,
|
|
240
|
+
onClick: _ctx.reload
|
|
241
|
+
}, {
|
|
242
|
+
default: withCtx(() => [
|
|
243
|
+
createVNode(_component_ElIcon, null, {
|
|
244
|
+
default: withCtx(() => [
|
|
245
|
+
createVNode(_component_ReloadOutlined)
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
})
|
|
249
|
+
]),
|
|
250
|
+
_: 2
|
|
251
|
+
}, 1032, ["placement", "title", "onClick"])) : tool === "export" ? (openBlock(), createBlock(_component_EleTool, {
|
|
252
|
+
key: index + "-export",
|
|
253
|
+
title: _ctx.lang.export,
|
|
254
|
+
placement: _ctx.placement,
|
|
255
|
+
clickHideTooltip: true,
|
|
256
|
+
onClick: _ctx.openExportModal
|
|
257
|
+
}, {
|
|
258
|
+
default: withCtx(() => [
|
|
259
|
+
createVNode(_component_ElIcon, { style: { "transform": "scale(1.1)", "transform-origin": "bottom" } }, {
|
|
260
|
+
default: withCtx(() => [
|
|
261
|
+
createVNode(_component_DownloadOutlined)
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
})
|
|
265
|
+
]),
|
|
266
|
+
_: 2
|
|
267
|
+
}, 1032, ["title", "placement", "onClick"])) : tool === "print" ? (openBlock(), createBlock(_component_EleTool, {
|
|
268
|
+
key: index + "-print",
|
|
269
|
+
title: _ctx.lang.print,
|
|
270
|
+
placement: _ctx.placement,
|
|
271
|
+
clickHideTooltip: true,
|
|
272
|
+
onClick: _ctx.openPrintModal
|
|
273
|
+
}, {
|
|
274
|
+
default: withCtx(() => [
|
|
275
|
+
createVNode(_component_ElIcon, null, {
|
|
276
|
+
default: withCtx(() => [
|
|
277
|
+
createVNode(_component_PrinterOutlined)
|
|
278
|
+
]),
|
|
279
|
+
_: 1
|
|
280
|
+
})
|
|
281
|
+
]),
|
|
282
|
+
_: 2
|
|
283
|
+
}, 1032, ["title", "placement", "onClick"])) : tool === "size" ? (openBlock(), createBlock(_component_EleTool, {
|
|
284
|
+
key: index + "-size",
|
|
285
|
+
placement: _ctx.placement,
|
|
286
|
+
title: _ctx.lang.sizes
|
|
287
|
+
}, {
|
|
288
|
+
default: withCtx(() => [
|
|
289
|
+
createVNode(_component_EleDropdown, {
|
|
290
|
+
trigger: "click",
|
|
291
|
+
placement: "bottom",
|
|
292
|
+
popperClass: "ele-tool-size-popper",
|
|
293
|
+
modelValue: _ctx.size,
|
|
294
|
+
items: [
|
|
295
|
+
{ title: _ctx.lang.sizeLarge, command: "large", icon: _ctx.SizeSlackOutlined },
|
|
296
|
+
{
|
|
297
|
+
title: _ctx.lang.sizeDefault,
|
|
298
|
+
command: "default",
|
|
299
|
+
icon: _ctx.MenuOutlined,
|
|
300
|
+
iconStyle: { transform: "scale(0.94)", transformOrigin: "left" }
|
|
301
|
+
},
|
|
302
|
+
{ title: _ctx.lang.sizeSmall, command: "small", icon: _ctx.SizeCompactOutlined }
|
|
303
|
+
],
|
|
304
|
+
popperOptions: {
|
|
305
|
+
modifiers: [{ name: "offset", options: { offset: [0, 10] } }]
|
|
306
|
+
},
|
|
307
|
+
onCommand: _ctx.updateSize
|
|
308
|
+
}, {
|
|
309
|
+
default: withCtx(() => [
|
|
310
|
+
createVNode(_component_ElIcon, null, {
|
|
311
|
+
default: withCtx(() => [
|
|
312
|
+
createVNode(_component_ColumnHeightOutlined)
|
|
313
|
+
]),
|
|
314
|
+
_: 1
|
|
315
|
+
})
|
|
316
|
+
]),
|
|
317
|
+
_: 1
|
|
318
|
+
}, 8, ["modelValue", "items", "onCommand"])
|
|
319
|
+
]),
|
|
320
|
+
_: 2
|
|
321
|
+
}, 1032, ["placement", "title"])) : tool === "columns" ? (openBlock(), createBlock(_component_ToolColumn, {
|
|
322
|
+
key: index + "-columns",
|
|
323
|
+
placement: _ctx.placement,
|
|
324
|
+
locale: _ctx.lang,
|
|
325
|
+
columns: _ctx.columns,
|
|
326
|
+
sortable: _ctx.columnSortable,
|
|
327
|
+
allowFixed: _ctx.columnFixed,
|
|
328
|
+
cacheKey: _ctx.cacheKey,
|
|
329
|
+
"onUpdate:columns": _ctx.updateColumns
|
|
330
|
+
}, null, 8, ["placement", "locale", "columns", "sortable", "allowFixed", "cacheKey", "onUpdate:columns"])) : tool === "maximized" ? (openBlock(), createBlock(_component_EleTool, {
|
|
331
|
+
key: index + "-maximized",
|
|
332
|
+
placement: _ctx.placement,
|
|
333
|
+
title: _ctx.lang.maximized,
|
|
334
|
+
clickHideTooltip: true,
|
|
335
|
+
onClick: _ctx.toggleMaximized
|
|
336
|
+
}, {
|
|
337
|
+
default: withCtx(() => [
|
|
338
|
+
createVNode(_component_ElIcon, null, {
|
|
339
|
+
default: withCtx(() => [
|
|
340
|
+
_ctx.maximized ? (openBlock(), createBlock(_component_FullscreenExitOutlined, { key: 0 })) : (openBlock(), createBlock(_component_FullscreenOutlined, { key: 1 }))
|
|
341
|
+
]),
|
|
342
|
+
_: 1
|
|
343
|
+
})
|
|
344
|
+
]),
|
|
345
|
+
_: 2
|
|
346
|
+
}, 1032, ["placement", "title", "onClick"])) : tool && !_ctx.ownSlots.includes(tool) && _ctx.$slots[tool] ? renderSlot(_ctx.$slots, tool, {
|
|
347
|
+
key: 6,
|
|
348
|
+
pageIndex: _ctx.pageIndex,
|
|
349
|
+
fetch: _ctx.fetch
|
|
350
|
+
}) : createCommentVNode("", true)
|
|
351
|
+
], 64);
|
|
352
|
+
}), 256))
|
|
353
|
+
], 64);
|
|
271
354
|
}
|
|
272
355
|
const tableTools = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
273
356
|
export {
|
|
@@ -10,6 +10,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
10
10
|
sortable: BooleanConstructor;
|
|
11
11
|
/** 是否开启开关固定列 */
|
|
12
12
|
allowFixed: BooleanConstructor;
|
|
13
|
+
/** 是否开启列宽设置 */
|
|
14
|
+
allowWidth: BooleanConstructor;
|
|
15
|
+
/** 列宽输入框提示文本 */
|
|
16
|
+
columnWidthPlaceholder: StringConstructor;
|
|
13
17
|
}, {
|
|
14
18
|
handleSortChange: (colItems: ColItem[]) => void;
|
|
15
19
|
handleCheckedChange: (colItem: ColItem, checked: boolean) => void;
|
|
@@ -20,6 +24,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
20
24
|
handleChildSortChange: (colItems: ColItem[], parent?: ColItem) => void;
|
|
21
25
|
handleChildFixedLeftTooltip: (el: HTMLElement) => void;
|
|
22
26
|
handleChildFixedRightTooltip: (el: HTMLElement) => void;
|
|
27
|
+
handleColWidthChange: (item: ColItem, width?: string) => void;
|
|
23
28
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
29
|
sortChange: (_colItems: ColItem[], _parent?: ColItem) => true;
|
|
25
30
|
checkedChange: (_item: ColItem, _checked: boolean) => true;
|
|
@@ -27,6 +32,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
27
32
|
fixedRight: (_item: ColItem) => true;
|
|
28
33
|
fixedLeftTooltip: (_el: HTMLElement) => true;
|
|
29
34
|
fixedRightTooltip: (_el: HTMLElement) => true;
|
|
35
|
+
colWidthChange: (_item: ColItem, _width?: string | number) => true;
|
|
30
36
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
31
37
|
/** 列配置数据 */
|
|
32
38
|
data: PropType<ColItem[]>;
|
|
@@ -36,6 +42,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
36
42
|
sortable: BooleanConstructor;
|
|
37
43
|
/** 是否开启开关固定列 */
|
|
38
44
|
allowFixed: BooleanConstructor;
|
|
45
|
+
/** 是否开启列宽设置 */
|
|
46
|
+
allowWidth: BooleanConstructor;
|
|
47
|
+
/** 列宽输入框提示文本 */
|
|
48
|
+
columnWidthPlaceholder: StringConstructor;
|
|
39
49
|
}>> & {
|
|
40
50
|
onSortChange?: ((_colItems: ColItem[], _parent?: ColItem | undefined) => any) | undefined;
|
|
41
51
|
onCheckedChange?: ((_item: ColItem, _checked: boolean) => any) | undefined;
|
|
@@ -43,8 +53,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
43
53
|
onFixedRight?: ((_item: ColItem) => any) | undefined;
|
|
44
54
|
onFixedLeftTooltip?: ((_el: HTMLElement) => any) | undefined;
|
|
45
55
|
onFixedRightTooltip?: ((_el: HTMLElement) => any) | undefined;
|
|
56
|
+
onColWidthChange?: ((_item: ColItem, _width?: string | number | undefined) => any) | undefined;
|
|
46
57
|
}, {
|
|
47
58
|
sortable: boolean;
|
|
48
59
|
allowFixed: boolean;
|
|
60
|
+
allowWidth: boolean;
|
|
49
61
|
}, {}>;
|
|
50
62
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, createVNode, createCommentVNode, normalizeClass } from "vue";
|
|
2
2
|
import VueDraggable from "vuedraggable";
|
|
3
|
-
import { ElCheckbox, ElIcon } from "element-plus";
|
|
3
|
+
import { ElCheckbox, ElIcon, ElInput } from "element-plus";
|
|
4
4
|
import { HolderOutlined, VerticalRightOutlined, VerticalLeftOutlined } from "../../icons";
|
|
5
5
|
const _sfc_main = defineComponent({
|
|
6
6
|
name: "ToolColumnList",
|
|
@@ -8,6 +8,7 @@ const _sfc_main = defineComponent({
|
|
|
8
8
|
VueDraggable,
|
|
9
9
|
ElCheckbox,
|
|
10
10
|
ElIcon,
|
|
11
|
+
ElInput,
|
|
11
12
|
HolderOutlined,
|
|
12
13
|
VerticalRightOutlined,
|
|
13
14
|
VerticalLeftOutlined
|
|
@@ -20,7 +21,11 @@ const _sfc_main = defineComponent({
|
|
|
20
21
|
/** 是否开启列拖拽排序 */
|
|
21
22
|
sortable: Boolean,
|
|
22
23
|
/** 是否开启开关固定列 */
|
|
23
|
-
allowFixed: Boolean
|
|
24
|
+
allowFixed: Boolean,
|
|
25
|
+
/** 是否开启列宽设置 */
|
|
26
|
+
allowWidth: Boolean,
|
|
27
|
+
/** 列宽输入框提示文本 */
|
|
28
|
+
columnWidthPlaceholder: String
|
|
24
29
|
},
|
|
25
30
|
emits: {
|
|
26
31
|
sortChange: (_colItems, _parent) => true,
|
|
@@ -28,7 +33,8 @@ const _sfc_main = defineComponent({
|
|
|
28
33
|
fixedLeft: (_item) => true,
|
|
29
34
|
fixedRight: (_item) => true,
|
|
30
35
|
fixedLeftTooltip: (_el) => true,
|
|
31
|
-
fixedRightTooltip: (_el) => true
|
|
36
|
+
fixedRightTooltip: (_el) => true,
|
|
37
|
+
colWidthChange: (_item, _width) => true
|
|
32
38
|
},
|
|
33
39
|
setup(props, { emit }) {
|
|
34
40
|
const handleSortChange = (colItems) => {
|
|
@@ -58,6 +64,9 @@ const _sfc_main = defineComponent({
|
|
|
58
64
|
const handleChildFixedRightTooltip = (el) => {
|
|
59
65
|
emit("fixedRightTooltip", el);
|
|
60
66
|
};
|
|
67
|
+
const handleColWidthChange = (item, width) => {
|
|
68
|
+
emit("colWidthChange", item, width);
|
|
69
|
+
};
|
|
61
70
|
return {
|
|
62
71
|
handleSortChange,
|
|
63
72
|
handleCheckedChange,
|
|
@@ -67,7 +76,8 @@ const _sfc_main = defineComponent({
|
|
|
67
76
|
handleFixedRightTooltip,
|
|
68
77
|
handleChildSortChange,
|
|
69
78
|
handleChildFixedLeftTooltip,
|
|
70
|
-
handleChildFixedRightTooltip
|
|
79
|
+
handleChildFixedRightTooltip,
|
|
80
|
+
handleColWidthChange
|
|
71
81
|
};
|
|
72
82
|
}
|
|
73
83
|
});
|
|
@@ -91,12 +101,17 @@ const _hoisted_5 = {
|
|
|
91
101
|
};
|
|
92
102
|
const _hoisted_6 = ["onClick"];
|
|
93
103
|
const _hoisted_7 = ["onClick"];
|
|
104
|
+
const _hoisted_8 = {
|
|
105
|
+
key: 2,
|
|
106
|
+
class: "ele-tool-column-input"
|
|
107
|
+
};
|
|
94
108
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
95
109
|
const _component_HolderOutlined = resolveComponent("HolderOutlined");
|
|
96
110
|
const _component_ElIcon = resolveComponent("ElIcon");
|
|
97
111
|
const _component_ElCheckbox = resolveComponent("ElCheckbox");
|
|
98
112
|
const _component_VerticalRightOutlined = resolveComponent("VerticalRightOutlined");
|
|
99
113
|
const _component_VerticalLeftOutlined = resolveComponent("VerticalLeftOutlined");
|
|
114
|
+
const _component_ElInput = resolveComponent("ElInput");
|
|
100
115
|
const _component_ToolColumnList = resolveComponent("ToolColumnList", true);
|
|
101
116
|
const _component_VueDraggable = resolveComponent("VueDraggable");
|
|
102
117
|
return openBlock(), createBlock(_component_VueDraggable, {
|
|
@@ -158,6 +173,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
158
173
|
_: 1
|
|
159
174
|
})
|
|
160
175
|
], 42, _hoisted_7)
|
|
176
|
+
])) : createCommentVNode("", true),
|
|
177
|
+
_ctx.allowWidth ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
178
|
+
createVNode(_component_ElInput, {
|
|
179
|
+
size: "small",
|
|
180
|
+
maxlength: 12,
|
|
181
|
+
modelValue: d.width,
|
|
182
|
+
placeholder: _ctx.columnWidthPlaceholder,
|
|
183
|
+
"onUpdate:modelValue": (v) => _ctx.handleColWidthChange(d, v)
|
|
184
|
+
}, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
|
|
161
185
|
])) : createCommentVNode("", true)
|
|
162
186
|
]),
|
|
163
187
|
d.children && d.children.length ? (openBlock(), createBlock(_component_ToolColumnList, {
|
|
@@ -165,13 +189,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
189
|
data: d.children,
|
|
166
190
|
parent: d,
|
|
167
191
|
sortable: _ctx.sortable,
|
|
192
|
+
allowWidth: _ctx.allowWidth,
|
|
193
|
+
columnWidthPlaceholder: _ctx.columnWidthPlaceholder,
|
|
168
194
|
onSortChange: _ctx.handleChildSortChange,
|
|
169
195
|
onCheckedChange: _ctx.handleCheckedChange,
|
|
170
196
|
onFixedLeft: _ctx.handleFixedLeft,
|
|
171
197
|
onFixedRight: _ctx.handleFixedRight,
|
|
172
198
|
onFixedLeftTooltip: _ctx.handleChildFixedLeftTooltip,
|
|
173
|
-
onFixedRightTooltip: _ctx.handleChildFixedRightTooltip
|
|
174
|
-
|
|
199
|
+
onFixedRightTooltip: _ctx.handleChildFixedRightTooltip,
|
|
200
|
+
onColWidthChange: _ctx.handleColWidthChange
|
|
201
|
+
}, null, 8, ["data", "parent", "sortable", "allowWidth", "columnWidthPlaceholder", "onSortChange", "onCheckedChange", "onFixedLeft", "onFixedRight", "onFixedLeftTooltip", "onFixedRightTooltip", "onColWidthChange"])) : createCommentVNode("", true)
|
|
175
202
|
])
|
|
176
203
|
]),
|
|
177
204
|
_: 1
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { EleToolInstance } from '../../ele-app/plus';
|
|
2
|
+
import { EleToolInstance, EleTooltipProps } from '../../ele-app/plus';
|
|
3
3
|
import { Columns } from '../../ele-data-table/types';
|
|
4
4
|
import { ColItem, TableLocale } from '../types';
|
|
5
5
|
|
|
6
6
|
declare const _default: import('vue').DefineComponent<{
|
|
7
7
|
/** 提示位置 */
|
|
8
|
-
placement: PropType<
|
|
8
|
+
placement: PropType<EleTooltipProps["placement"]>;
|
|
9
9
|
/** 表格国际化 */
|
|
10
10
|
locale: {
|
|
11
11
|
type: PropType<TableLocale>;
|
|
@@ -23,11 +23,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
23
23
|
toolRef: import('vue').Ref<EleToolInstance>;
|
|
24
24
|
colItems: import('vue').Ref<{
|
|
25
25
|
uid: string;
|
|
26
|
-
label?: string
|
|
27
|
-
checked?: boolean
|
|
28
|
-
fixed?:
|
|
26
|
+
label?: string;
|
|
27
|
+
checked?: boolean;
|
|
28
|
+
fixed?: boolean | string;
|
|
29
29
|
children?: any[] | undefined;
|
|
30
|
-
type?: string
|
|
30
|
+
type?: string;
|
|
31
|
+
width?: number | string;
|
|
31
32
|
}[]>;
|
|
32
33
|
isCheckAll: import('vue').Ref<boolean>;
|
|
33
34
|
isIndeterminate: import('vue').Ref<boolean>;
|
|
@@ -43,7 +44,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
43
44
|
'update:columns': (_columns: Columns, _tableColumns: Columns) => true;
|
|
44
45
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
45
46
|
/** 提示位置 */
|
|
46
|
-
placement: PropType<
|
|
47
|
+
placement: PropType<EleTooltipProps["placement"]>;
|
|
47
48
|
/** 表格国际化 */
|
|
48
49
|
locale: {
|
|
49
50
|
type: PropType<TableLocale>;
|