ele-admin-plus 1.2.1-beta.2 → 1.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/core-components.d.ts +1 -0
- package/es/core-components.js +60 -58
- package/es/ele-admin-layout/components/layout-tabs.d.ts +1 -6
- package/es/ele-admin-layout/components/layout-tabs.js +18 -76
- package/es/ele-admin-layout/index.d.ts +26 -30
- package/es/ele-admin-layout/index.js +7 -2
- package/es/ele-admin-layout/props.d.ts +11 -10
- package/es/ele-admin-layout/types.d.ts +2 -0
- 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/el.d.ts +3 -0
- package/es/ele-app/plus.d.ts +21 -0
- package/es/ele-app/style/overwrite/css-var.scss +0 -2
- package/es/ele-app/style/overwrite/index.js +0 -1
- package/es/ele-app/style/overwrite/index.scss +0 -1
- package/es/ele-app/style/overwrite/input/index.scss +2 -0
- package/es/ele-app/style/scrollbar/css-var.scss +17 -16
- package/es/ele-app/types.d.ts +8 -1
- 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 +19 -16
- 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 +13 -6
- package/es/ele-bottom-bar/index.js +37 -15
- package/es/ele-bottom-bar/props.d.ts +5 -2
- package/es/ele-bottom-bar/props.js +3 -1
- package/es/ele-bottom-bar/style/index.scss +5 -0
- 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 +6 -6
- 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 +12 -5
- package/es/ele-cropper/components/cropper-tools.js +41 -13
- package/es/ele-cropper/index.d.ts +6 -4
- package/es/ele-cropper/index.js +2 -1
- package/es/ele-cropper/props.d.ts +5 -2
- package/es/ele-cropper/props.js +2 -0
- package/es/ele-cropper/style/index.scss +3 -2
- package/es/ele-cropper/types.d.ts +16 -0
- package/es/ele-cropper-modal/index.d.ts +7 -5
- package/es/ele-cropper-modal/index.js +2 -1
- package/es/ele-cropper-modal/props.d.ts +2 -4
- package/es/ele-data-table/components/table-columns.d.ts +32 -0
- package/es/ele-data-table/components/table-columns.js +114 -0
- package/es/ele-data-table/index.d.ts +223 -41
- package/es/ele-data-table/index.js +202 -120
- package/es/ele-data-table/props.d.ts +22 -26
- 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.d.ts +1 -45
- package/es/ele-data-table/util.js +2 -106
- package/es/ele-drawer/index.d.ts +22 -22
- package/es/ele-drawer/props.d.ts +13 -12
- package/es/ele-dropdown/components/pro-dropdown.d.ts +237 -0
- package/es/ele-dropdown/components/pro-dropdown.js +204 -0
- package/es/ele-dropdown/index.d.ts +534 -48
- package/es/ele-dropdown/index.js +110 -25
- package/es/ele-dropdown/props.d.ts +120 -25
- package/es/ele-dropdown/props.js +54 -7
- package/es/ele-dropdown/style/index.js +4 -1
- package/es/ele-dropdown/style/index.scss +174 -6
- package/es/ele-edit-tag/index.d.ts +22 -20
- 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/components/file-grid-item.d.ts +11 -20
- package/es/ele-file-list/components/file-grid-item.js +19 -58
- package/es/ele-file-list/components/file-grid.d.ts +15 -19
- package/es/ele-file-list/components/file-grid.js +16 -39
- package/es/ele-file-list/components/file-table-item.d.ts +11 -20
- package/es/ele-file-list/components/file-table-item.js +19 -58
- package/es/ele-file-list/components/file-table.d.ts +15 -19
- package/es/ele-file-list/components/file-table.js +17 -37
- package/es/ele-file-list/index.d.ts +37 -16
- package/es/ele-file-list/index.js +118 -20
- package/es/ele-file-list/props.d.ts +4 -5
- package/es/ele-file-list/props.js +5 -8
- package/es/ele-file-list/style/index.scss +10 -5
- package/es/ele-file-list/types.d.ts +13 -1
- package/es/ele-icon-select/components/icon-grid.d.ts +9 -7
- package/es/ele-icon-select/index.d.ts +39 -38
- 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-image-viewer/index.d.ts +120 -0
- package/es/ele-image-viewer/index.js +88 -0
- package/es/ele-image-viewer/props.d.ts +58 -0
- package/es/ele-image-viewer/props.js +35 -0
- package/es/ele-image-viewer/style/css-var.scss +8 -0
- package/es/ele-image-viewer/style/index.js +2 -0
- package/es/ele-image-viewer/style/index.scss +117 -0
- package/es/ele-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 +8 -10
- 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/components/item-title.d.ts +48 -0
- package/es/ele-menus/components/item-title.js +108 -0
- package/es/ele-menus/components/menu-items.d.ts +78 -0
- package/es/ele-menus/components/menu-items.js +269 -0
- package/es/ele-menus/index.d.ts +79 -20
- package/es/ele-menus/index.js +280 -210
- package/es/ele-menus/props.d.ts +3 -3
- package/es/ele-menus/style/index.scss +4 -0
- package/es/ele-menus/util.d.ts +1 -62
- package/es/ele-menus/util.js +3 -244
- package/es/ele-modal/index.d.ts +33 -32
- package/es/ele-modal/index.js +30 -64
- package/es/ele-modal/props.d.ts +16 -15
- package/es/ele-modal/util.d.ts +32 -25
- package/es/ele-modal/util.js +239 -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 +43 -46
- package/es/ele-popconfirm/props.d.ts +22 -21
- package/es/ele-popover/index.d.ts +33 -36
- package/es/ele-popover/props.d.ts +11 -11
- package/es/ele-popover/props.js +1 -1
- 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/components/pro-iframe.d.ts +6 -6
- package/es/ele-pro-layout/components/pro-iframe.js +6 -4
- package/es/ele-pro-layout/index.d.ts +44 -48
- package/es/ele-pro-layout/index.js +13 -4
- package/es/ele-pro-layout/props.d.ts +19 -17
- package/es/ele-pro-layout/props.js +3 -3
- package/es/ele-pro-layout/types.d.ts +9 -5
- package/es/ele-pro-layout/util.d.ts +6 -0
- package/es/ele-pro-layout/util.js +12 -0
- package/es/ele-pro-table/components/table-tools.d.ts +405 -35
- package/es/ele-pro-table/components/table-tools.js +225 -143
- 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 +7 -6
- package/es/ele-pro-table/components/tool-column.js +15 -9
- package/es/ele-pro-table/components/tool-export.d.ts +30 -27
- 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-body-cell.js +1 -1
- package/es/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
- package/es/ele-pro-table/components/tool-print-header-cell.js +3 -2
- package/es/ele-pro-table/components/tool-print.d.ts +38 -37
- package/es/ele-pro-table/components/tool-print.js +357 -336
- package/es/ele-pro-table/index.d.ts +1015 -89
- package/es/ele-pro-table/index.js +60 -14
- package/es/ele-pro-table/props.d.ts +24 -27
- package/es/ele-pro-table/props.js +4 -2
- 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.d.ts +3 -1
- package/es/ele-segmented/index.js +30 -3
- package/es/ele-segmented/style/index.scss +7 -1
- 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 +10 -10
- package/es/ele-steps/props.d.ts +5 -5
- package/es/ele-tab-tool/index.d.ts +6 -1
- package/es/ele-tab-tool/index.js +44 -3
- package/es/ele-tab-tool/props.d.ts +2 -0
- package/es/ele-tab-tool/props.js +3 -1
- package/es/ele-tab-wrap/components/tab-dropdown.js +9 -26
- package/es/ele-tab-wrap/index.js +21 -2
- package/es/ele-table/index.d.ts +2 -2
- package/es/ele-table/props.d.ts +2 -1
- package/es/ele-table/style/index.scss +1 -2
- package/es/ele-table-select/index.d.ts +24 -22
- 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 +39 -52
- package/es/ele-tabs/index.js +290 -118
- package/es/ele-tabs/props.d.ts +11 -30
- package/es/ele-tabs/props.js +4 -2
- package/es/ele-tabs/style/index.scss +186 -170
- package/es/ele-tabs/types.d.ts +25 -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 +5 -3
- 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 +18 -18
- package/es/ele-toolbar/props.d.ts +4 -3
- package/es/ele-tooltip/index.d.ts +27 -26
- package/es/ele-tooltip/props.d.ts +9 -8
- package/es/ele-tooltip/style/css-var.scss +4 -0
- package/es/ele-tour/index.d.ts +1 -1
- package/es/ele-tree-select/index.d.ts +19 -19
- 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/components/list-item.d.ts +31 -5
- package/es/ele-upload-list/components/list-item.js +146 -66
- package/es/ele-upload-list/index.d.ts +57 -30
- package/es/ele-upload-list/index.js +180 -97
- package/es/ele-upload-list/props.d.ts +24 -10
- package/es/ele-upload-list/props.js +20 -8
- package/es/ele-upload-list/style/css-var.scss +8 -0
- package/es/ele-upload-list/style/index.js +1 -1
- package/es/ele-upload-list/style/index.scss +426 -132
- package/es/ele-upload-list/types.d.ts +35 -11
- package/es/ele-virtual-table/components/body-cell.d.ts +13 -29
- 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 +8 -8
- package/es/ele-virtual-table/components/header-row.d.ts +8 -8
- package/es/ele-virtual-table/index.d.ts +27 -36
- package/es/ele-virtual-table/index.js +8 -6
- package/es/ele-virtual-table/props.d.ts +13 -15
- 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/CornerLeftFilled.d.ts +2 -0
- package/es/icons/CornerLeftFilled.js +26 -0
- package/es/icons/CornerRightFilled.d.ts +2 -0
- package/es/icons/CornerRightFilled.js +26 -0
- package/es/icons/EyeOutlined.d.ts +2 -0
- package/es/icons/EyeOutlined.js +30 -0
- package/es/icons/FileOutlined.js +4 -4
- package/es/icons/SizeCompactOutlined.d.ts +2 -0
- package/es/icons/SizeCompactOutlined.js +34 -0
- package/es/icons/SizeMiddleOutlined.d.ts +2 -0
- package/es/icons/SizeMiddleOutlined.js +34 -0
- package/es/icons/SizeSlackOutlined.d.ts +2 -0
- package/es/icons/SizeSlackOutlined.js +34 -0
- package/es/icons/index.d.ts +6 -0
- package/es/icons/index.js +162 -150
- package/es/lang/en_US.js +5 -1
- package/es/lang/zh_CN.js +5 -1
- package/es/lang/zh_TW.js +5 -1
- package/es/style/plus.scss +1 -0
- package/es/style/themes/default.scss +92 -9
- package/es/style/themes/rounded.scss +9 -5
- package/es/style/themes/theme-util.scss +4 -0
- package/es/style/util.scss +10 -3
- package/es/utils/core.d.ts +4 -2
- package/es/utils/hook.d.ts +77 -4
- package/es/utils/hook.js +159 -6
- package/es/utils/menu-util.js +11 -5
- package/es/utils/message-box.js +5 -1
- package/es/utils/message.js +2 -2
- package/lib/core-components.cjs +60 -58
- package/lib/core-components.d.ts +1 -0
- package/lib/ele-admin-layout/components/layout-tabs.cjs +17 -75
- package/lib/ele-admin-layout/components/layout-tabs.d.ts +1 -6
- package/lib/ele-admin-layout/index.cjs +7 -2
- package/lib/ele-admin-layout/index.d.ts +26 -30
- package/lib/ele-admin-layout/props.d.ts +11 -10
- package/lib/ele-admin-layout/types.d.ts +2 -0
- 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/el.d.ts +3 -0
- package/lib/ele-app/plus.d.ts +21 -0
- package/lib/ele-app/style/overwrite/css-var.scss +0 -2
- package/lib/ele-app/style/overwrite/index.cjs +0 -1
- package/lib/ele-app/style/overwrite/index.scss +0 -1
- package/lib/ele-app/style/overwrite/input/index.scss +2 -0
- package/lib/ele-app/style/scrollbar/css-var.scss +17 -16
- package/lib/ele-app/types.d.ts +8 -1
- 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 +19 -16
- 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.cjs +36 -14
- package/lib/ele-bottom-bar/index.d.ts +13 -6
- package/lib/ele-bottom-bar/props.cjs +3 -1
- package/lib/ele-bottom-bar/props.d.ts +5 -2
- package/lib/ele-bottom-bar/style/index.scss +5 -0
- 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 +6 -6
- 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.cjs +40 -12
- package/lib/ele-cropper/components/cropper-tools.d.ts +12 -5
- package/lib/ele-cropper/index.cjs +2 -1
- package/lib/ele-cropper/index.d.ts +6 -4
- package/lib/ele-cropper/props.cjs +2 -0
- package/lib/ele-cropper/props.d.ts +5 -2
- package/lib/ele-cropper/style/index.scss +3 -2
- package/lib/ele-cropper/types.d.ts +16 -0
- package/lib/ele-cropper-modal/index.cjs +2 -1
- package/lib/ele-cropper-modal/index.d.ts +7 -5
- package/lib/ele-cropper-modal/props.d.ts +2 -4
- package/lib/ele-data-table/components/table-columns.cjs +113 -0
- package/lib/ele-data-table/components/table-columns.d.ts +32 -0
- package/lib/ele-data-table/index.cjs +199 -117
- package/lib/ele-data-table/index.d.ts +223 -41
- package/lib/ele-data-table/props.d.ts +22 -26
- 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 +0 -104
- package/lib/ele-data-table/util.d.ts +1 -45
- package/lib/ele-drawer/index.d.ts +22 -22
- package/lib/ele-drawer/props.d.ts +13 -12
- package/lib/ele-dropdown/components/pro-dropdown.cjs +203 -0
- package/lib/ele-dropdown/components/pro-dropdown.d.ts +237 -0
- package/lib/ele-dropdown/index.cjs +113 -28
- package/lib/ele-dropdown/index.d.ts +534 -48
- package/lib/ele-dropdown/props.cjs +53 -6
- package/lib/ele-dropdown/props.d.ts +120 -25
- package/lib/ele-dropdown/style/index.cjs +4 -1
- package/lib/ele-dropdown/style/index.scss +174 -6
- package/lib/ele-edit-tag/index.cjs +10 -2
- package/lib/ele-edit-tag/index.d.ts +22 -20
- 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/components/file-grid-item.cjs +18 -57
- package/lib/ele-file-list/components/file-grid-item.d.ts +11 -20
- package/lib/ele-file-list/components/file-grid.cjs +15 -38
- package/lib/ele-file-list/components/file-grid.d.ts +15 -19
- package/lib/ele-file-list/components/file-table-item.cjs +18 -57
- package/lib/ele-file-list/components/file-table-item.d.ts +11 -20
- package/lib/ele-file-list/components/file-table.cjs +16 -36
- package/lib/ele-file-list/components/file-table.d.ts +15 -19
- package/lib/ele-file-list/index.cjs +117 -19
- package/lib/ele-file-list/index.d.ts +37 -16
- package/lib/ele-file-list/props.cjs +4 -7
- package/lib/ele-file-list/props.d.ts +4 -5
- package/lib/ele-file-list/style/index.scss +10 -5
- package/lib/ele-file-list/types.d.ts +13 -1
- package/lib/ele-icon-select/components/icon-grid.d.ts +9 -7
- package/lib/ele-icon-select/index.cjs +9 -5
- package/lib/ele-icon-select/index.d.ts +39 -38
- package/lib/ele-icon-select/props.cjs +2 -0
- package/lib/ele-icon-select/props.d.ts +18 -14
- package/lib/ele-image-viewer/index.cjs +87 -0
- package/lib/ele-image-viewer/index.d.ts +120 -0
- package/lib/ele-image-viewer/props.cjs +35 -0
- package/lib/ele-image-viewer/props.d.ts +58 -0
- package/lib/ele-image-viewer/style/css-var.scss +8 -0
- package/lib/ele-image-viewer/style/index.cjs +3 -0
- package/lib/ele-image-viewer/style/index.scss +117 -0
- package/lib/ele-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 +8 -10
- 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/components/item-title.cjs +107 -0
- package/lib/ele-menus/components/item-title.d.ts +48 -0
- package/lib/ele-menus/components/menu-items.cjs +268 -0
- package/lib/ele-menus/components/menu-items.d.ts +78 -0
- package/lib/ele-menus/index.cjs +278 -208
- package/lib/ele-menus/index.d.ts +79 -20
- package/lib/ele-menus/props.d.ts +3 -3
- package/lib/ele-menus/style/index.scss +4 -0
- package/lib/ele-menus/util.cjs +1 -242
- package/lib/ele-menus/util.d.ts +1 -62
- package/lib/ele-modal/index.cjs +28 -62
- package/lib/ele-modal/index.d.ts +33 -32
- package/lib/ele-modal/props.d.ts +16 -15
- package/lib/ele-modal/util.cjs +239 -132
- package/lib/ele-modal/util.d.ts +32 -25
- 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 +43 -46
- package/lib/ele-popconfirm/props.d.ts +22 -21
- package/lib/ele-popover/index.d.ts +33 -36
- package/lib/ele-popover/props.cjs +1 -1
- package/lib/ele-popover/props.d.ts +11 -11
- 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/components/pro-iframe.cjs +6 -4
- package/lib/ele-pro-layout/components/pro-iframe.d.ts +6 -6
- package/lib/ele-pro-layout/index.cjs +13 -4
- package/lib/ele-pro-layout/index.d.ts +44 -48
- package/lib/ele-pro-layout/props.cjs +3 -3
- package/lib/ele-pro-layout/props.d.ts +19 -17
- package/lib/ele-pro-layout/types.d.ts +9 -5
- package/lib/ele-pro-layout/util.cjs +12 -0
- package/lib/ele-pro-layout/util.d.ts +6 -0
- package/lib/ele-pro-table/components/table-tools.cjs +223 -141
- package/lib/ele-pro-table/components/table-tools.d.ts +405 -35
- 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 +14 -8
- package/lib/ele-pro-table/components/tool-column.d.ts +7 -6
- package/lib/ele-pro-table/components/tool-export.cjs +201 -181
- package/lib/ele-pro-table/components/tool-export.d.ts +30 -27
- package/lib/ele-pro-table/components/tool-print-body-cell.cjs +1 -1
- package/lib/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
- package/lib/ele-pro-table/components/tool-print-header-cell.cjs +3 -2
- 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 +38 -37
- package/lib/ele-pro-table/index.cjs +59 -13
- package/lib/ele-pro-table/index.d.ts +1015 -89
- package/lib/ele-pro-table/props.cjs +4 -2
- package/lib/ele-pro-table/props.d.ts +24 -27
- 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 +29 -2
- package/lib/ele-segmented/index.d.ts +3 -1
- package/lib/ele-segmented/style/index.scss +7 -1
- 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 +10 -10
- package/lib/ele-steps/props.d.ts +5 -5
- package/lib/ele-tab-tool/index.cjs +43 -2
- package/lib/ele-tab-tool/index.d.ts +6 -1
- package/lib/ele-tab-tool/props.cjs +3 -1
- package/lib/ele-tab-tool/props.d.ts +2 -0
- package/lib/ele-tab-wrap/components/tab-dropdown.cjs +8 -25
- package/lib/ele-tab-wrap/index.cjs +20 -1
- package/lib/ele-table/index.d.ts +2 -2
- package/lib/ele-table/props.d.ts +2 -1
- package/lib/ele-table/style/index.scss +1 -2
- package/lib/ele-table-select/index.cjs +20 -17
- package/lib/ele-table-select/index.d.ts +24 -22
- 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 +288 -116
- package/lib/ele-tabs/index.d.ts +39 -52
- package/lib/ele-tabs/props.cjs +4 -2
- package/lib/ele-tabs/props.d.ts +11 -30
- package/lib/ele-tabs/style/index.scss +186 -170
- package/lib/ele-tabs/types.d.ts +25 -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 +5 -3
- 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 +18 -18
- package/lib/ele-toolbar/props.d.ts +4 -3
- package/lib/ele-tooltip/index.d.ts +27 -26
- package/lib/ele-tooltip/props.d.ts +9 -8
- package/lib/ele-tooltip/style/css-var.scss +4 -0
- 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 +19 -19
- 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 +144 -64
- package/lib/ele-upload-list/components/list-item.d.ts +31 -5
- package/lib/ele-upload-list/index.cjs +178 -95
- package/lib/ele-upload-list/index.d.ts +57 -30
- package/lib/ele-upload-list/props.cjs +20 -8
- package/lib/ele-upload-list/props.d.ts +24 -10
- package/lib/ele-upload-list/style/css-var.scss +8 -0
- package/lib/ele-upload-list/style/index.cjs +1 -1
- package/lib/ele-upload-list/style/index.scss +426 -132
- package/lib/ele-upload-list/types.d.ts +35 -11
- package/lib/ele-virtual-table/components/body-cell.d.ts +13 -29
- 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 +8 -8
- package/lib/ele-virtual-table/components/header-row.d.ts +8 -8
- package/lib/ele-virtual-table/index.cjs +7 -5
- package/lib/ele-virtual-table/index.d.ts +27 -36
- package/lib/ele-virtual-table/props.d.ts +13 -15
- 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/CornerLeftFilled.cjs +25 -0
- package/lib/icons/CornerLeftFilled.d.ts +2 -0
- package/lib/icons/CornerRightFilled.cjs +25 -0
- package/lib/icons/CornerRightFilled.d.ts +2 -0
- package/lib/icons/EyeOutlined.cjs +29 -0
- package/lib/icons/EyeOutlined.d.ts +2 -0
- package/lib/icons/FileOutlined.cjs +4 -4
- package/lib/icons/SizeCompactOutlined.cjs +33 -0
- package/lib/icons/SizeCompactOutlined.d.ts +2 -0
- package/lib/icons/SizeMiddleOutlined.cjs +33 -0
- package/lib/icons/SizeMiddleOutlined.d.ts +2 -0
- package/lib/icons/SizeSlackOutlined.cjs +33 -0
- package/lib/icons/SizeSlackOutlined.d.ts +2 -0
- package/lib/icons/index.cjs +12 -0
- package/lib/icons/index.d.ts +6 -0
- package/lib/lang/en_US.cjs +5 -1
- package/lib/lang/zh_CN.cjs +5 -1
- package/lib/lang/zh_TW.cjs +5 -1
- package/lib/style/plus.scss +1 -0
- package/lib/style/themes/default.scss +92 -9
- package/lib/style/themes/rounded.scss +9 -5
- package/lib/style/themes/theme-util.scss +4 -0
- package/lib/style/util.scss +10 -3
- package/lib/utils/core.d.ts +4 -2
- package/lib/utils/hook.cjs +158 -5
- package/lib/utils/hook.d.ts +77 -4
- package/lib/utils/menu-util.cjs +9 -3
- package/lib/utils/message-box.cjs +4 -0
- package/lib/utils/message.cjs +1 -1
- package/package.json +38 -37
- package/typings/global.d.ts +1 -0
- package/es/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
- package/es/ele-app/style/overwrite/image-viewer/index.js +0 -1
- package/es/ele-app/style/overwrite/image-viewer/index.scss +0 -10
- package/es/ele-tabs/components/tab-title.d.ts +0 -52
- package/es/ele-tabs/components/tab-title.js +0 -115
- package/lib/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
- package/lib/ele-app/style/overwrite/image-viewer/index.cjs +0 -2
- package/lib/ele-app/style/overwrite/image-viewer/index.scss +0 -10
- package/lib/ele-tabs/components/tab-title.cjs +0 -114
- package/lib/ele-tabs/components/tab-title.d.ts +0 -52
- /package/es/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
- /package/lib/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
package/es/ele-menus/index.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, onMounted, watch,
|
|
1
|
+
import { defineComponent, ref, shallowRef, computed, onMounted, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createSlots, renderList, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode, createVNode, resolveDynamicComponent, normalizeStyle } from "vue";
|
|
2
2
|
import { ElMenu, ElSubMenu, ElIcon } from "element-plus";
|
|
3
|
-
import EleTooltip from "../ele-tooltip/index";
|
|
4
|
-
import { pick, contentIsEllipsis } from "../utils/core";
|
|
5
3
|
import { EllipsisOutlined } from "../icons";
|
|
6
|
-
import {
|
|
4
|
+
import { pick, contentIsEllipsis } from "../utils/core";
|
|
5
|
+
import EleTooltip from "../ele-tooltip/index";
|
|
6
|
+
import MenuItems from "./components/menu-items";
|
|
7
|
+
import { useMenuEllipsis, getMenuItems, getPopperClass } from "./util";
|
|
7
8
|
import { menusProps, menusEmits, menuPropKeys } from "./props";
|
|
8
|
-
const
|
|
9
|
+
const _sfc_main = defineComponent({
|
|
9
10
|
name: "EleMenus",
|
|
11
|
+
components: { ElMenu, ElSubMenu, ElIcon, EleTooltip, MenuItems },
|
|
10
12
|
props: menusProps,
|
|
11
13
|
emits: menusEmits,
|
|
12
|
-
setup(props, {
|
|
13
|
-
|
|
14
|
+
setup(props, { emit }) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const isWebkit = (_b = (_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes) == null ? void 0 : _b.call(_a, "WebKit");
|
|
14
17
|
const menuRef = ref(null);
|
|
15
18
|
const ellipsisRef = ref(null);
|
|
16
19
|
const sliceIndex = ref(-1);
|
|
20
|
+
const menuItems = shallowRef([]);
|
|
21
|
+
const moreMenuItems = shallowRef([]);
|
|
17
22
|
const tooltipVirtualRef = ref();
|
|
18
23
|
const tooltipContent = ref("");
|
|
19
24
|
const tooltipVisible = ref(false);
|
|
@@ -22,54 +27,26 @@ const index = defineComponent({
|
|
|
22
27
|
const collapseTooltipDisabled = computed(
|
|
23
28
|
() => isCompact.value ? !props.collapse : props.tooltipDisabled
|
|
24
29
|
);
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
getMoreEl: () => {
|
|
31
|
-
var _a;
|
|
32
|
-
return (_a = ellipsisRef.value) == null ? void 0 : _a.$el;
|
|
33
|
-
},
|
|
34
|
-
onEllipsis: (index2) => {
|
|
35
|
-
if (sliceIndex.value !== index2) {
|
|
36
|
-
sliceIndex.value = index2;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
onMounted(() => {
|
|
41
|
-
var _a;
|
|
42
|
-
if (props.ellipsis && isHorizontal.value && ((_a = menuRef.value) == null ? void 0 : _a.$el)) {
|
|
43
|
-
computedEllipsis();
|
|
44
|
-
observe();
|
|
30
|
+
const menuProps = computed(() => pick(props, menuPropKeys));
|
|
31
|
+
const open = (index2) => {
|
|
32
|
+
if (menuRef.value) {
|
|
33
|
+
menuRef.value.open(index2);
|
|
45
34
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
()
|
|
50
|
-
isHorizontal,
|
|
51
|
-
() => {
|
|
52
|
-
var _a;
|
|
53
|
-
return (_a = menuRef.value) == null ? void 0 : _a.$el;
|
|
54
|
-
},
|
|
55
|
-
() => props.items
|
|
56
|
-
],
|
|
57
|
-
() => {
|
|
58
|
-
var _a;
|
|
59
|
-
if (props.ellipsis && isHorizontal.value && ((_a = menuRef.value) == null ? void 0 : _a.$el)) {
|
|
60
|
-
observe();
|
|
61
|
-
} else {
|
|
62
|
-
unobserve();
|
|
63
|
-
sliceIndex.value = -1;
|
|
64
|
-
}
|
|
35
|
+
};
|
|
36
|
+
const close = (index2) => {
|
|
37
|
+
if (menuRef.value) {
|
|
38
|
+
menuRef.value.open(index2);
|
|
65
39
|
}
|
|
66
|
-
|
|
40
|
+
};
|
|
41
|
+
const hideTooltip = () => {
|
|
42
|
+
tooltipVisible.value = false;
|
|
43
|
+
};
|
|
67
44
|
const triggerTooltip = (e) => {
|
|
68
|
-
var
|
|
45
|
+
var _a2;
|
|
69
46
|
if (props.textEllipsisTooltip) {
|
|
70
|
-
const itemEl = (
|
|
47
|
+
const itemEl = (_a2 = e.currentTarget) == null ? void 0 : _a2.parentNode;
|
|
71
48
|
if (itemEl) {
|
|
72
|
-
const titleEl = itemEl.querySelector(
|
|
49
|
+
const titleEl = itemEl.querySelector(".ele-menu-title");
|
|
73
50
|
const text = titleEl == null ? void 0 : titleEl.innerText;
|
|
74
51
|
if (text && contentIsEllipsis(titleEl, "horizontal")) {
|
|
75
52
|
tooltipVirtualRef.value = itemEl;
|
|
@@ -81,32 +58,14 @@ const index = defineComponent({
|
|
|
81
58
|
}
|
|
82
59
|
hideTooltip();
|
|
83
60
|
};
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
};
|
|
87
|
-
const open = (index2) => {
|
|
88
|
-
if (menuRef.value) {
|
|
89
|
-
menuRef.value.open(index2);
|
|
90
|
-
}
|
|
61
|
+
const handleOpen = (index2, indexPath) => {
|
|
62
|
+
emit("open", index2, indexPath);
|
|
91
63
|
};
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
menuRef.value.open(index2);
|
|
95
|
-
}
|
|
64
|
+
const handleClose = (index2, indexPath) => {
|
|
65
|
+
emit("close", index2, indexPath);
|
|
96
66
|
};
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
const menuEl = (_a = menuRef.value) == null ? void 0 : _a.$el;
|
|
100
|
-
if (menuEl) {
|
|
101
|
-
const el = menuEl.querySelector(".el-menu-item.is-active") || menuEl.querySelector(".el-sub-menu.is-active");
|
|
102
|
-
if (el) {
|
|
103
|
-
if (typeof el["scrollIntoViewIfNeeded"] === "function") {
|
|
104
|
-
el.scrollIntoViewIfNeeded(true);
|
|
105
|
-
} else {
|
|
106
|
-
el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
67
|
+
const handleSelect = (index2, indexPath, item, routerResult) => {
|
|
68
|
+
emit("select", index2, indexPath, item, routerResult);
|
|
110
69
|
};
|
|
111
70
|
const handleItemClick = (item, e) => {
|
|
112
71
|
emit("itemClick", item, e);
|
|
@@ -127,148 +86,259 @@ const index = defineComponent({
|
|
|
127
86
|
hideTooltip();
|
|
128
87
|
emit("parentMouseleave", item, e);
|
|
129
88
|
};
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
{
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
collapse: isCompact.value ? true : props.collapse,
|
|
141
|
-
class: [
|
|
142
|
-
"ele-menu",
|
|
143
|
-
{ "ele-menu-dark": props.theme === "dark" },
|
|
144
|
-
{ "is-night": props.theme === "dark" },
|
|
145
|
-
{ "ele-menu-colorful": props.colorful },
|
|
146
|
-
{ "is-colorful": props.colorful },
|
|
147
|
-
{ "is-compact": isCompact.value },
|
|
148
|
-
{ "is-compact-collapse": isCompact.value && props.collapse }
|
|
149
|
-
],
|
|
150
|
-
onOpen: (index2, indexPath) => {
|
|
151
|
-
emit("open", index2, indexPath);
|
|
152
|
-
},
|
|
153
|
-
onClose: (index2, indexPath) => {
|
|
154
|
-
emit("close", index2, indexPath);
|
|
155
|
-
},
|
|
156
|
-
onSelect: (index2, indexPath, item, routerResult) => {
|
|
157
|
-
emit("select", index2, indexPath, item, routerResult);
|
|
89
|
+
const scrollToActive = () => {
|
|
90
|
+
var _a2;
|
|
91
|
+
const menuEl = (_a2 = menuRef.value) == null ? void 0 : _a2.$el;
|
|
92
|
+
if (menuEl) {
|
|
93
|
+
const el = menuEl.querySelector(".el-menu-item.is-active") || menuEl.querySelector(".el-sub-menu.is-active");
|
|
94
|
+
if (el) {
|
|
95
|
+
if (typeof el["scrollIntoViewIfNeeded"] === "function") {
|
|
96
|
+
el.scrollIntoViewIfNeeded(true);
|
|
97
|
+
} else {
|
|
98
|
+
el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
158
99
|
}
|
|
159
|
-
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const { observe, unobserve, computedEllipsis } = useMenuEllipsis({
|
|
104
|
+
getMenuEl: () => {
|
|
105
|
+
var _a2;
|
|
106
|
+
return (_a2 = menuRef.value) == null ? void 0 : _a2.$el;
|
|
107
|
+
},
|
|
108
|
+
getMoreEl: () => {
|
|
109
|
+
var _a2;
|
|
110
|
+
return (_a2 = ellipsisRef.value) == null ? void 0 : _a2.$el;
|
|
111
|
+
},
|
|
112
|
+
onEllipsis: (index2) => {
|
|
113
|
+
if (sliceIndex.value !== index2) {
|
|
114
|
+
sliceIndex.value = index2;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
onMounted(() => {
|
|
119
|
+
var _a2;
|
|
120
|
+
if (props.ellipsis && isHorizontal.value && ((_a2 = menuRef.value) == null ? void 0 : _a2.$el)) {
|
|
121
|
+
computedEllipsis();
|
|
122
|
+
observe();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
watch(
|
|
126
|
+
[
|
|
127
|
+
() => props.ellipsis,
|
|
128
|
+
isHorizontal,
|
|
160
129
|
() => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
props.theme,
|
|
172
|
-
props.popupTheme,
|
|
173
|
-
props.colorful,
|
|
174
|
-
props.popupColorful,
|
|
175
|
-
props.firstPopperClass,
|
|
176
|
-
true,
|
|
177
|
-
handleItemClick,
|
|
178
|
-
handleItemMouseenter,
|
|
179
|
-
handleItemMouseleave,
|
|
180
|
-
isWebkit,
|
|
181
|
-
handleParentMouseenter,
|
|
182
|
-
handleParentMouseleave
|
|
183
|
-
);
|
|
184
|
-
if (moreItems) {
|
|
185
|
-
const ellipsisProps = props.ellipsisProps || {};
|
|
186
|
-
const popperClass = getPopperClass(
|
|
187
|
-
ellipsisProps.popperClass,
|
|
188
|
-
props.theme,
|
|
189
|
-
props.popupTheme,
|
|
190
|
-
props.colorful,
|
|
191
|
-
props.popupColorful,
|
|
192
|
-
props.firstPopperClass,
|
|
193
|
-
true,
|
|
194
|
-
isWebkit
|
|
195
|
-
);
|
|
196
|
-
nodes.push(
|
|
197
|
-
h(
|
|
198
|
-
ElSubMenu,
|
|
199
|
-
{
|
|
200
|
-
teleported: true,
|
|
201
|
-
class: ellipsisClass,
|
|
202
|
-
key: "sub-menu-more",
|
|
203
|
-
...ellipsisProps,
|
|
204
|
-
index: "sub-menu-more",
|
|
205
|
-
ref: ellipsisRef,
|
|
206
|
-
popperClass
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
default: () => {
|
|
210
|
-
return renderItems(
|
|
211
|
-
moreItems,
|
|
212
|
-
slots.icon,
|
|
213
|
-
slots.title,
|
|
214
|
-
collapseTooltipDisabled.value,
|
|
215
|
-
props.theme,
|
|
216
|
-
props.popupTheme,
|
|
217
|
-
props.colorful,
|
|
218
|
-
props.popupColorful,
|
|
219
|
-
props.firstPopperClass,
|
|
220
|
-
false,
|
|
221
|
-
handleItemClick,
|
|
222
|
-
handleItemMouseenter,
|
|
223
|
-
handleItemMouseleave,
|
|
224
|
-
isWebkit,
|
|
225
|
-
handleParentMouseenter,
|
|
226
|
-
handleParentMouseleave
|
|
227
|
-
);
|
|
228
|
-
},
|
|
229
|
-
title: () => {
|
|
230
|
-
return h(ElIcon, ellipsisProps.iconProps || {}, () => {
|
|
231
|
-
return h(
|
|
232
|
-
ellipsisProps.icon ?? EllipsisOutlined,
|
|
233
|
-
{ style: ellipsisProps.iconStyle }
|
|
234
|
-
);
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
)
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
if (props.textEllipsisTooltip) {
|
|
242
|
-
nodes.push(
|
|
243
|
-
h(EleTooltip, {
|
|
244
|
-
trigger: "click",
|
|
245
|
-
placement: "right",
|
|
246
|
-
fallbackPlacements: [
|
|
247
|
-
"top-end",
|
|
248
|
-
"top",
|
|
249
|
-
"top-start",
|
|
250
|
-
"bottom-end",
|
|
251
|
-
"bottom",
|
|
252
|
-
"bottom-start",
|
|
253
|
-
"left"
|
|
254
|
-
],
|
|
255
|
-
persistent: false,
|
|
256
|
-
enterable: false,
|
|
257
|
-
triggerKeys: [],
|
|
258
|
-
...props.textEllipsisTooltip === true ? {} : props.textEllipsisTooltip,
|
|
259
|
-
virtualTriggering: true,
|
|
260
|
-
virtualRef: tooltipVirtualRef.value,
|
|
261
|
-
content: tooltipContent.value,
|
|
262
|
-
visible: tooltipVisible.value
|
|
263
|
-
})
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
return nodes;
|
|
130
|
+
var _a2;
|
|
131
|
+
return (_a2 = menuRef.value) == null ? void 0 : _a2.$el;
|
|
132
|
+
},
|
|
133
|
+
() => props.items
|
|
134
|
+
],
|
|
135
|
+
() => {
|
|
136
|
+
var _a2;
|
|
137
|
+
if (props.ellipsis && isHorizontal.value && ((_a2 = menuRef.value) == null ? void 0 : _a2.$el)) {
|
|
138
|
+
observe();
|
|
139
|
+
return;
|
|
267
140
|
}
|
|
268
|
-
|
|
141
|
+
unobserve();
|
|
142
|
+
sliceIndex.value = -1;
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
watch(
|
|
146
|
+
[() => props.items, sliceIndex, isHorizontal],
|
|
147
|
+
() => {
|
|
148
|
+
const { items, moreItems } = getMenuItems(
|
|
149
|
+
props.items,
|
|
150
|
+
sliceIndex.value,
|
|
151
|
+
isHorizontal.value
|
|
152
|
+
);
|
|
153
|
+
menuItems.value = items;
|
|
154
|
+
moreMenuItems.value = moreItems;
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
immediate: true,
|
|
158
|
+
deep: true
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
return {
|
|
162
|
+
EllipsisOutlined,
|
|
163
|
+
getPopperClass,
|
|
164
|
+
isWebkit,
|
|
165
|
+
menuRef,
|
|
166
|
+
ellipsisRef,
|
|
167
|
+
menuItems,
|
|
168
|
+
moreMenuItems,
|
|
169
|
+
tooltipVirtualRef,
|
|
170
|
+
tooltipContent,
|
|
171
|
+
tooltipVisible,
|
|
172
|
+
isCompact,
|
|
173
|
+
collapseTooltipDisabled,
|
|
174
|
+
menuProps,
|
|
175
|
+
open,
|
|
176
|
+
close,
|
|
177
|
+
handleOpen,
|
|
178
|
+
handleClose,
|
|
179
|
+
handleSelect,
|
|
180
|
+
handleItemClick,
|
|
181
|
+
handleItemMouseenter,
|
|
182
|
+
handleItemMouseleave,
|
|
183
|
+
handleParentMouseenter,
|
|
184
|
+
handleParentMouseleave,
|
|
185
|
+
scrollToActive
|
|
269
186
|
};
|
|
270
187
|
}
|
|
271
188
|
});
|
|
189
|
+
const _export_sfc = (sfc, props) => {
|
|
190
|
+
const target = sfc.__vccOpts || sfc;
|
|
191
|
+
for (const [key, val] of props) {
|
|
192
|
+
target[key] = val;
|
|
193
|
+
}
|
|
194
|
+
return target;
|
|
195
|
+
};
|
|
196
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
197
|
+
const _component_MenuItems = resolveComponent("MenuItems");
|
|
198
|
+
const _component_ElIcon = resolveComponent("ElIcon");
|
|
199
|
+
const _component_ElSubMenu = resolveComponent("ElSubMenu");
|
|
200
|
+
const _component_EleTooltip = resolveComponent("EleTooltip");
|
|
201
|
+
const _component_ElMenu = resolveComponent("ElMenu");
|
|
202
|
+
return openBlock(), createBlock(_component_ElMenu, mergeProps(_ctx.menuProps, {
|
|
203
|
+
ref: "menuRef",
|
|
204
|
+
ellipsis: false,
|
|
205
|
+
mode: _ctx.isCompact ? "vertical" : _ctx.mode,
|
|
206
|
+
collapse: _ctx.isCompact ? true : _ctx.collapse,
|
|
207
|
+
class: [
|
|
208
|
+
"ele-menu",
|
|
209
|
+
{ "ele-menu-dark": _ctx.theme === "dark" },
|
|
210
|
+
{ "is-night": _ctx.theme === "dark" },
|
|
211
|
+
{ "ele-menu-colorful": _ctx.colorful },
|
|
212
|
+
{ "is-colorful": _ctx.colorful },
|
|
213
|
+
{ "is-compact": _ctx.isCompact },
|
|
214
|
+
{ "is-compact-collapse": _ctx.isCompact && _ctx.collapse }
|
|
215
|
+
],
|
|
216
|
+
onOpen: _ctx.handleOpen,
|
|
217
|
+
onClose: _ctx.handleClose,
|
|
218
|
+
onSelect: _ctx.handleSelect
|
|
219
|
+
}), {
|
|
220
|
+
default: withCtx(() => {
|
|
221
|
+
var _a;
|
|
222
|
+
return [
|
|
223
|
+
_ctx.menuItems && _ctx.menuItems.length ? (openBlock(), createBlock(_component_MenuItems, {
|
|
224
|
+
key: 0,
|
|
225
|
+
items: _ctx.menuItems,
|
|
226
|
+
first: true,
|
|
227
|
+
tipDisabled: _ctx.collapseTooltipDisabled,
|
|
228
|
+
parentIsGroup: false,
|
|
229
|
+
theme: _ctx.theme,
|
|
230
|
+
popTheme: _ctx.popupTheme,
|
|
231
|
+
colorful: _ctx.colorful,
|
|
232
|
+
popupColorful: _ctx.popupColorful,
|
|
233
|
+
firstPopClass: _ctx.firstPopperClass,
|
|
234
|
+
webkit: _ctx.isWebkit,
|
|
235
|
+
onItemClick: _ctx.handleItemClick,
|
|
236
|
+
onItemMouseenter: _ctx.handleItemMouseenter,
|
|
237
|
+
onItemMouseleave: _ctx.handleItemMouseleave,
|
|
238
|
+
onParentMouseenter: _ctx.handleParentMouseenter,
|
|
239
|
+
onParentMouseleave: _ctx.handleParentMouseleave
|
|
240
|
+
}, createSlots({ _: 2 }, [
|
|
241
|
+
renderList(Object.keys(_ctx.$slots), (name) => {
|
|
242
|
+
return {
|
|
243
|
+
name,
|
|
244
|
+
fn: withCtx((slotProps) => [
|
|
245
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
246
|
+
])
|
|
247
|
+
};
|
|
248
|
+
})
|
|
249
|
+
]), 1032, ["items", "tipDisabled", "theme", "popTheme", "colorful", "popupColorful", "firstPopClass", "webkit", "onItemClick", "onItemMouseenter", "onItemMouseleave", "onParentMouseenter", "onParentMouseleave"])) : createCommentVNode("", true),
|
|
250
|
+
_ctx.moreMenuItems && _ctx.moreMenuItems.length ? (openBlock(), createBlock(_component_ElSubMenu, mergeProps({
|
|
251
|
+
key: "sub-menu-more",
|
|
252
|
+
teleported: true
|
|
253
|
+
}, _ctx.ellipsisProps || {}, {
|
|
254
|
+
ref: "ellipsisRef",
|
|
255
|
+
index: "sub-menu-more",
|
|
256
|
+
popperClass: _ctx.getPopperClass(
|
|
257
|
+
(_a = _ctx.ellipsisProps) == null ? void 0 : _a.popperClass,
|
|
258
|
+
_ctx.theme,
|
|
259
|
+
_ctx.popupTheme,
|
|
260
|
+
_ctx.colorful,
|
|
261
|
+
_ctx.popupColorful,
|
|
262
|
+
_ctx.firstPopperClass,
|
|
263
|
+
true,
|
|
264
|
+
_ctx.isWebkit
|
|
265
|
+
),
|
|
266
|
+
class: "ele-sub-menu-ellipsis"
|
|
267
|
+
}), {
|
|
268
|
+
title: withCtx(() => {
|
|
269
|
+
var _a2;
|
|
270
|
+
return [
|
|
271
|
+
createVNode(_component_ElIcon, normalizeProps(guardReactiveProps(((_a2 = _ctx.ellipsisProps) == null ? void 0 : _a2.iconProps) || {})), {
|
|
272
|
+
default: withCtx(() => {
|
|
273
|
+
var _a3, _b;
|
|
274
|
+
return [
|
|
275
|
+
(openBlock(), createBlock(resolveDynamicComponent(((_a3 = _ctx.ellipsisProps) == null ? void 0 : _a3.icon) ?? _ctx.EllipsisOutlined), {
|
|
276
|
+
style: normalizeStyle((_b = _ctx.ellipsisProps) == null ? void 0 : _b.iconStyle)
|
|
277
|
+
}, null, 8, ["style"]))
|
|
278
|
+
];
|
|
279
|
+
}),
|
|
280
|
+
_: 1
|
|
281
|
+
}, 16)
|
|
282
|
+
];
|
|
283
|
+
}),
|
|
284
|
+
default: withCtx(() => [
|
|
285
|
+
createVNode(_component_MenuItems, {
|
|
286
|
+
items: _ctx.moreMenuItems,
|
|
287
|
+
first: false,
|
|
288
|
+
tipDisabled: _ctx.collapseTooltipDisabled,
|
|
289
|
+
parentIsGroup: false,
|
|
290
|
+
theme: _ctx.theme,
|
|
291
|
+
popTheme: _ctx.popupTheme,
|
|
292
|
+
colorful: _ctx.colorful,
|
|
293
|
+
popupColorful: _ctx.popupColorful,
|
|
294
|
+
firstPopClass: _ctx.firstPopperClass,
|
|
295
|
+
webkit: _ctx.isWebkit,
|
|
296
|
+
onItemClick: _ctx.handleItemClick,
|
|
297
|
+
onItemMouseenter: _ctx.handleItemMouseenter,
|
|
298
|
+
onItemMouseleave: _ctx.handleItemMouseleave,
|
|
299
|
+
onParentMouseenter: _ctx.handleParentMouseenter,
|
|
300
|
+
onParentMouseleave: _ctx.handleParentMouseleave
|
|
301
|
+
}, createSlots({ _: 2 }, [
|
|
302
|
+
renderList(Object.keys(_ctx.$slots), (name) => {
|
|
303
|
+
return {
|
|
304
|
+
name,
|
|
305
|
+
fn: withCtx((slotProps) => [
|
|
306
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
307
|
+
])
|
|
308
|
+
};
|
|
309
|
+
})
|
|
310
|
+
]), 1032, ["items", "tipDisabled", "theme", "popTheme", "colorful", "popupColorful", "firstPopClass", "webkit", "onItemClick", "onItemMouseenter", "onItemMouseleave", "onParentMouseenter", "onParentMouseleave"])
|
|
311
|
+
]),
|
|
312
|
+
_: 3
|
|
313
|
+
}, 16, ["popperClass"])) : createCommentVNode("", true),
|
|
314
|
+
_ctx.textEllipsisTooltip ? (openBlock(), createBlock(_component_EleTooltip, mergeProps({
|
|
315
|
+
key: 2,
|
|
316
|
+
trigger: "click",
|
|
317
|
+
placement: "right",
|
|
318
|
+
fallbackPlacements: [
|
|
319
|
+
"top-end",
|
|
320
|
+
"top",
|
|
321
|
+
"top-start",
|
|
322
|
+
"bottom-end",
|
|
323
|
+
"bottom",
|
|
324
|
+
"bottom-start",
|
|
325
|
+
"left"
|
|
326
|
+
],
|
|
327
|
+
persistent: false,
|
|
328
|
+
enterable: false,
|
|
329
|
+
triggerKeys: []
|
|
330
|
+
}, _ctx.textEllipsisTooltip === true ? {} : _ctx.textEllipsisTooltip, {
|
|
331
|
+
virtualTriggering: true,
|
|
332
|
+
virtualRef: _ctx.tooltipVirtualRef,
|
|
333
|
+
content: _ctx.tooltipContent,
|
|
334
|
+
visible: _ctx.tooltipVisible
|
|
335
|
+
}), null, 16, ["virtualRef", "content", "visible"])) : createCommentVNode("", true)
|
|
336
|
+
];
|
|
337
|
+
}),
|
|
338
|
+
_: 3
|
|
339
|
+
}, 16, ["mode", "collapse", "class", "onOpen", "onClose", "onSelect"]);
|
|
340
|
+
}
|
|
341
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
272
342
|
export {
|
|
273
343
|
index as default
|
|
274
344
|
};
|
package/es/ele-menus/props.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const menusProps: {
|
|
|
38
38
|
defaultOpeneds: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
|
|
39
39
|
uniqueOpened: BooleanConstructor;
|
|
40
40
|
router: BooleanConstructor;
|
|
41
|
-
menuTrigger: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "
|
|
41
|
+
menuTrigger: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
|
|
42
42
|
collapse: BooleanConstructor;
|
|
43
43
|
backgroundColor: StringConstructor;
|
|
44
44
|
textColor: StringConstructor;
|
|
@@ -48,7 +48,7 @@ export declare const menusProps: {
|
|
|
48
48
|
ellipsis: import('element-plus/es/utils/index').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
49
49
|
popperOffset: import('element-plus/es/utils/index').EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
50
50
|
ellipsisIcon: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => (string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>) & {}) | (() => string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>) | ((new (...args: any[]) => (string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>) & {}) | (() => string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>))[], unknown, unknown, () => any, boolean>;
|
|
51
|
-
popperEffect: import('element-plus/es/utils/index').EpPropFinalized<
|
|
51
|
+
popperEffect: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "dark", boolean>;
|
|
52
52
|
popperClass: StringConstructor;
|
|
53
53
|
showTimeout: import('element-plus/es/utils/index').EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
54
54
|
hideTimeout: import('element-plus/es/utils/index').EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
@@ -75,5 +75,5 @@ export declare const menusEmits: {
|
|
|
75
75
|
parentMouseleave: (_item: MenuItem, _e: MouseEvent) => boolean;
|
|
76
76
|
close: (index: string, indexPath: string[]) => boolean;
|
|
77
77
|
open: (index: string, indexPath: string[]) => boolean;
|
|
78
|
-
select: (index: string, indexPath: string[], item: import('element-plus').MenuItemClicked, routerResult?: Promise<void | import('vue-router').NavigationFailure>
|
|
78
|
+
select: (index: string, indexPath: string[], item: import('element-plus').MenuItemClicked, routerResult?: Promise<void | import('vue-router').NavigationFailure>) => boolean;
|
|
79
79
|
};
|
package/es/ele-menus/util.d.ts
CHANGED
|
@@ -1,66 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ClassValue, ClassValues } from '../ele-app/types';
|
|
3
|
-
import { MenuItem, MenuTheme, PopupMenuTheme, PopupColorful, MenuResult, MenuEllipsisOption, MenuItemEvent } from './types';
|
|
1
|
+
import { MenuItem, MenuTheme, PopupMenuTheme, PopupColorful, MenuResult, MenuEllipsisOption } from './types';
|
|
4
2
|
|
|
5
|
-
/** 子菜单项链接类名 */
|
|
6
|
-
export declare const linkClass = "ele-menu-link";
|
|
7
|
-
/** 菜单标题类名 */
|
|
8
|
-
export declare const titleClass = "ele-menu-title";
|
|
9
|
-
/** 子菜单项事件触发元素类名 */
|
|
10
|
-
export declare const triggerClass = "ele-menu-trigger";
|
|
11
|
-
/** 菜单溢出隐藏项类名 */
|
|
12
|
-
export declare const overflowClass = "ele-menu-overflow";
|
|
13
|
-
/** 菜单省略项的类名 */
|
|
14
|
-
export declare const ellipsisClass = "ele-sub-menu-ellipsis";
|
|
15
|
-
/**
|
|
16
|
-
* 合并类名
|
|
17
|
-
* @param class1 类名
|
|
18
|
-
* @param class2 用户自定义类名
|
|
19
|
-
*/
|
|
20
|
-
export declare function mergeClass(class1?: ClassValue, class2?: ClassValue): ClassValues;
|
|
21
|
-
/**
|
|
22
|
-
* 生成菜单链接节点
|
|
23
|
-
* @param path 链接地址
|
|
24
|
-
*/
|
|
25
|
-
export declare function getLinkNode(path?: string): VNode | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* 生成事件触发节点
|
|
28
|
-
* @param item 菜单数据
|
|
29
|
-
* @param path 链接地址
|
|
30
|
-
* @param onItemClick 点击事件
|
|
31
|
-
* @param onItemMouseenter 鼠标进入事件
|
|
32
|
-
* @param onItemMouseleave 鼠标离开事件
|
|
33
|
-
*/
|
|
34
|
-
export declare function getTriggerNode(item: MenuItem, path?: string, onItemClick?: MenuItemEvent, onItemMouseenter?: MenuItemEvent, onItemMouseleave?: MenuItemEvent): VNode | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* 生成菜单内容节点
|
|
37
|
-
* @param icons 图标节点
|
|
38
|
-
* @param titles 标题节点
|
|
39
|
-
* @param badge 徽章节点
|
|
40
|
-
* @param trigger 事件触发元素节点
|
|
41
|
-
*/
|
|
42
|
-
export declare function getNodes(icons?: VNode[], titles?: VNode[], badge?: VNode | null, trigger?: VNode | null): VNode[];
|
|
43
|
-
/**
|
|
44
|
-
* 递归生成菜单节点
|
|
45
|
-
* @param items 菜单数据
|
|
46
|
-
* @param sIcon 图标插槽
|
|
47
|
-
* @param sTitle 标题插槽
|
|
48
|
-
* @param tipDisabled 是否禁用折叠的tooltip
|
|
49
|
-
* @param theme 主题
|
|
50
|
-
* @param popTheme 气泡菜单主题
|
|
51
|
-
* @param colorful 是否彩色图标
|
|
52
|
-
* @param popupColorful 气泡菜单是否彩色图标
|
|
53
|
-
* @param firstPopClass 第一级气泡菜单类名
|
|
54
|
-
* @param first 是否是第一级菜单
|
|
55
|
-
* @param onItemClick 子菜单项点击事件
|
|
56
|
-
* @param onItemMouseenter 子菜单项鼠标进入事件
|
|
57
|
-
* @param onItemMouseenter 子菜单项鼠标离开事件
|
|
58
|
-
* @param webkit 是否是webkit内核
|
|
59
|
-
* @param onParentMouseenter 父级菜单项鼠标进入事件
|
|
60
|
-
* @param onParentMouseleave 父级菜单项鼠标离开事件
|
|
61
|
-
* @param parentIsGroup 父级是否是分组菜单
|
|
62
|
-
*/
|
|
63
|
-
export declare function renderItems(items?: MenuItem[], sIcon?: Slot, sTitle?: Slot, tipDisabled?: boolean, theme?: MenuTheme, popTheme?: PopupMenuTheme, colorful?: boolean, popupColorful?: PopupColorful, firstPopClass?: string, first?: boolean, onItemClick?: MenuItemEvent, onItemMouseenter?: MenuItemEvent, onItemMouseleave?: MenuItemEvent, webkit?: boolean, onParentMouseenter?: MenuItemEvent, onParentMouseleave?: MenuItemEvent, parentIsGroup?: boolean): VNode[];
|
|
64
3
|
/**
|
|
65
4
|
* 生成气泡菜单的类名
|
|
66
5
|
* @param customerClass 自定义的类名
|