ele-admin-plus 1.2.1-beta.3 → 1.2.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/core-components.d.ts +1 -0
- package/es/core-components.js +60 -58
- package/es/ele-admin-layout/components/layout-tabs.d.ts +1 -6
- package/es/ele-admin-layout/components/layout-tabs.js +18 -76
- package/es/ele-admin-layout/index.js +7 -2
- package/es/ele-admin-layout/types.d.ts +2 -0
- package/es/ele-app/el.d.ts +3 -0
- package/es/ele-app/plus.d.ts +21 -0
- package/es/ele-app/style/overwrite/css-var.scss +0 -2
- package/es/ele-app/style/overwrite/date-picker/index.scss +13 -11
- package/es/ele-app/style/overwrite/index.js +0 -1
- package/es/ele-app/style/overwrite/index.scss +0 -1
- package/es/ele-app/style/scrollbar/css-var.scss +17 -16
- package/es/ele-app/types.d.ts +8 -1
- package/es/ele-basic-select/index.d.ts +2 -2
- package/es/ele-bottom-bar/index.d.ts +9 -2
- package/es/ele-bottom-bar/index.js +37 -15
- package/es/ele-bottom-bar/props.d.ts +2 -0
- package/es/ele-bottom-bar/props.js +3 -1
- package/es/ele-bottom-bar/style/index.scss +5 -0
- package/es/ele-check-card/index.d.ts +2 -2
- package/es/ele-cropper/components/cropper-tools.d.ts +9 -3
- package/es/ele-cropper/components/cropper-tools.js +42 -14
- package/es/ele-cropper/index.d.ts +3 -1
- package/es/ele-cropper/index.js +2 -1
- package/es/ele-cropper/props.d.ts +3 -1
- package/es/ele-cropper/props.js +2 -0
- package/es/ele-cropper/style/index.scss +3 -2
- package/es/ele-cropper/types.d.ts +16 -0
- package/es/ele-cropper-modal/index.d.ts +3 -1
- package/es/ele-cropper-modal/index.js +2 -1
- package/es/ele-cropper-modal/props.d.ts +1 -0
- package/es/ele-data-table/components/table-columns.d.ts +32 -0
- package/es/ele-data-table/components/table-columns.js +124 -0
- package/es/ele-data-table/index.d.ts +327 -23
- package/es/ele-data-table/index.js +202 -120
- package/es/ele-data-table/props.d.ts +14 -18
- package/es/ele-data-table/style/index.scss +0 -4
- package/es/ele-data-table/types.d.ts +5 -2
- package/es/ele-data-table/util.d.ts +1 -45
- package/es/ele-data-table/util.js +2 -110
- package/es/ele-drawer/index.d.ts +9 -8
- package/es/ele-drawer/index.js +8 -2
- package/es/ele-drawer/props.d.ts +2 -2
- package/es/ele-dropdown/components/dropdown-menu-item.d.ts +39 -0
- package/es/ele-dropdown/components/dropdown-menu-item.js +132 -0
- package/es/ele-dropdown/components/dropdown-menus.d.ts +44 -0
- package/es/ele-dropdown/components/dropdown-menus.js +111 -0
- package/es/ele-dropdown/components/pro-dropdown.d.ts +238 -0
- package/es/ele-dropdown/components/pro-dropdown.js +205 -0
- package/es/ele-dropdown/index.d.ts +521 -33
- package/es/ele-dropdown/index.js +147 -66
- package/es/ele-dropdown/props.d.ts +109 -15
- package/es/ele-dropdown/props.js +54 -7
- package/es/ele-dropdown/style/index.js +4 -1
- package/es/ele-dropdown/style/index.scss +226 -7
- package/es/ele-dropdown/types.d.ts +2 -2
- package/es/ele-edit-tag/index.d.ts +2 -2
- package/es/ele-file-list/components/file-grid-item.d.ts +11 -20
- package/es/ele-file-list/components/file-grid-item.js +19 -58
- package/es/ele-file-list/components/file-grid.d.ts +15 -19
- package/es/ele-file-list/components/file-grid.js +16 -39
- package/es/ele-file-list/components/file-table-item.d.ts +11 -20
- package/es/ele-file-list/components/file-table-item.js +19 -58
- package/es/ele-file-list/components/file-table.d.ts +15 -19
- package/es/ele-file-list/components/file-table.js +17 -37
- package/es/ele-file-list/index.d.ts +33 -12
- package/es/ele-file-list/index.js +118 -20
- package/es/ele-file-list/props.d.ts +4 -5
- package/es/ele-file-list/props.js +5 -8
- package/es/ele-file-list/style/index.scss +10 -5
- package/es/ele-file-list/types.d.ts +13 -1
- package/es/ele-icon-select/components/icon-grid.d.ts +1 -1
- package/es/ele-icon-select/index.d.ts +2 -2
- package/es/ele-image-viewer/index.d.ts +120 -0
- package/es/ele-image-viewer/index.js +88 -0
- package/es/ele-image-viewer/props.d.ts +58 -0
- package/es/ele-image-viewer/props.js +35 -0
- package/es/ele-image-viewer/style/css-var.scss +8 -0
- package/es/ele-image-viewer/style/index.js +2 -0
- package/es/ele-image-viewer/style/index.scss +117 -0
- package/es/ele-map-picker/components/map-view.d.ts +18 -18
- package/es/ele-menus/components/item-title.d.ts +48 -0
- package/es/ele-menus/components/item-title.js +108 -0
- package/es/ele-menus/components/menu-items.d.ts +78 -0
- package/es/ele-menus/components/menu-items.js +269 -0
- package/es/ele-menus/index.d.ts +77 -18
- package/es/ele-menus/index.js +280 -210
- package/es/ele-menus/props.d.ts +2 -2
- package/es/ele-menus/util.d.ts +1 -62
- package/es/ele-menus/util.js +3 -244
- package/es/ele-modal/index.d.ts +9 -9
- package/es/ele-modal/props.d.ts +2 -2
- package/es/ele-modal/util.d.ts +1 -1
- package/es/ele-modal/util.js +8 -4
- package/es/ele-pagination/index.d.ts +2 -2
- package/es/ele-pagination/props.d.ts +1 -1
- package/es/ele-popconfirm/index.d.ts +11 -14
- package/es/ele-popconfirm/index.js +31 -24
- package/es/ele-popconfirm/props.d.ts +3 -4
- package/es/ele-popover/index.d.ts +11 -14
- package/es/ele-popover/props.d.ts +0 -1
- package/es/ele-popover/props.js +1 -1
- package/es/ele-printer/util.js +1 -1
- package/es/ele-pro-layout/components/pro-iframe.d.ts +6 -6
- package/es/ele-pro-layout/components/pro-iframe.js +6 -4
- package/es/ele-pro-layout/index.d.ts +1 -1
- package/es/ele-pro-layout/index.js +20 -6
- package/es/ele-pro-layout/props.d.ts +3 -3
- package/es/ele-pro-layout/props.js +3 -3
- package/es/ele-pro-layout/types.d.ts +9 -5
- package/es/ele-pro-layout/util.d.ts +6 -0
- package/es/ele-pro-layout/util.js +12 -0
- package/es/ele-pro-table/components/table-tools.d.ts +25 -26
- package/es/ele-pro-table/components/table-tools.js +26 -18
- package/es/ele-pro-table/components/tool-column.d.ts +7 -7
- package/es/ele-pro-table/components/tool-column.js +4 -4
- package/es/ele-pro-table/components/tool-export.d.ts +5 -5
- package/es/ele-pro-table/components/tool-print-body-cell.js +1 -1
- package/es/ele-pro-table/components/tool-print-header-cell.js +3 -2
- package/es/ele-pro-table/components/tool-print.d.ts +5 -5
- package/es/ele-pro-table/index.d.ts +71 -85
- package/es/ele-pro-table/index.js +19 -23
- package/es/ele-pro-table/props.d.ts +9 -11
- package/es/ele-pro-table/props.js +1 -1
- package/es/ele-segmented/index.d.ts +3 -1
- package/es/ele-segmented/index.js +27 -3
- package/es/ele-segmented/style/index.scss +7 -1
- package/es/ele-steps/index.d.ts +12 -12
- package/es/ele-steps/props.d.ts +3 -3
- package/es/ele-tab-tool/index.d.ts +6 -1
- package/es/ele-tab-tool/index.js +44 -3
- package/es/ele-tab-tool/props.d.ts +2 -0
- package/es/ele-tab-tool/props.js +3 -1
- package/es/ele-tab-wrap/components/tab-dropdown.js +9 -26
- package/es/ele-tab-wrap/index.js +21 -2
- package/es/ele-table/style/index.scss +1 -2
- package/es/ele-table-select/index.d.ts +6 -6
- package/es/ele-tabs/index.d.ts +21 -19
- package/es/ele-tabs/index.js +240 -115
- package/es/ele-tabs/props.d.ts +1 -6
- package/es/ele-tabs/props.js +1 -1
- package/es/ele-tabs/style/index.scss +152 -176
- package/es/ele-tabs/types.d.ts +29 -6
- package/es/ele-tool/index.js +6 -1
- package/es/ele-toolbar/index.d.ts +9 -9
- package/es/ele-tooltip/index.d.ts +15 -15
- package/es/ele-tooltip/props.d.ts +2 -2
- package/es/ele-tooltip/style/css-var.scss +4 -0
- package/es/ele-tree-select/index.d.ts +5 -5
- package/es/ele-upload-list/components/list-item.d.ts +31 -5
- package/es/ele-upload-list/components/list-item.js +146 -66
- package/es/ele-upload-list/index.d.ts +55 -26
- package/es/ele-upload-list/index.js +180 -97
- package/es/ele-upload-list/props.d.ts +22 -9
- package/es/ele-upload-list/props.js +20 -8
- package/es/ele-upload-list/style/css-var.scss +8 -0
- package/es/ele-upload-list/style/index.js +1 -1
- package/es/ele-upload-list/style/index.scss +425 -135
- package/es/ele-upload-list/types.d.ts +35 -11
- package/es/ele-virtual-table/components/body-cell.d.ts +2 -2
- package/es/ele-virtual-table/components/header-cell.d.ts +1 -1
- package/es/ele-virtual-table/components/header-row.d.ts +1 -1
- package/es/ele-virtual-table/index.d.ts +14 -22
- package/es/ele-virtual-table/index.js +8 -6
- package/es/ele-virtual-table/props.d.ts +6 -8
- package/es/icons/CornerLeftFilled.d.ts +2 -0
- package/es/icons/CornerLeftFilled.js +26 -0
- package/es/icons/CornerRightFilled.d.ts +2 -0
- package/es/icons/CornerRightFilled.js +26 -0
- package/es/icons/EyeOutlined.d.ts +2 -0
- package/es/icons/EyeOutlined.js +30 -0
- package/es/icons/FileOutlined.js +4 -4
- package/es/icons/SizeCompactOutlined.js +4 -4
- package/es/icons/SizeMiddleOutlined.d.ts +2 -0
- package/es/icons/SizeMiddleOutlined.js +34 -0
- package/es/icons/SizeSlackOutlined.js +4 -4
- package/es/icons/index.d.ts +4 -0
- package/es/icons/index.js +162 -154
- package/es/lang/en_US.js +4 -1
- package/es/lang/zh_CN.js +4 -1
- package/es/lang/zh_TW.js +4 -1
- package/es/style/plus.scss +1 -0
- package/es/style/themes/default.scss +84 -6
- package/es/style/themes/rounded.scss +6 -3
- package/es/style/themes/theme-util.scss +4 -0
- package/es/style/util.scss +10 -3
- package/es/utils/core.d.ts +4 -2
- package/es/utils/hook.d.ts +2 -0
- package/es/utils/hook.js +5 -1
- package/es/utils/menu-util.js +11 -5
- package/es/utils/message-box.js +5 -1
- package/es/utils/message.js +2 -2
- package/lib/core-components.cjs +60 -58
- package/lib/core-components.d.ts +1 -0
- package/lib/ele-admin-layout/components/layout-tabs.cjs +17 -75
- package/lib/ele-admin-layout/components/layout-tabs.d.ts +1 -6
- package/lib/ele-admin-layout/index.cjs +7 -2
- package/lib/ele-admin-layout/types.d.ts +2 -0
- package/lib/ele-app/el.d.ts +3 -0
- package/lib/ele-app/plus.d.ts +21 -0
- package/lib/ele-app/style/overwrite/css-var.scss +0 -2
- package/lib/ele-app/style/overwrite/date-picker/index.scss +13 -11
- package/lib/ele-app/style/overwrite/index.cjs +0 -1
- package/lib/ele-app/style/overwrite/index.scss +0 -1
- package/lib/ele-app/style/scrollbar/css-var.scss +17 -16
- package/lib/ele-app/types.d.ts +8 -1
- package/lib/ele-basic-select/index.d.ts +2 -2
- package/lib/ele-bottom-bar/index.cjs +36 -14
- package/lib/ele-bottom-bar/index.d.ts +9 -2
- package/lib/ele-bottom-bar/props.cjs +3 -1
- package/lib/ele-bottom-bar/props.d.ts +2 -0
- package/lib/ele-bottom-bar/style/index.scss +5 -0
- package/lib/ele-check-card/index.d.ts +2 -2
- package/lib/ele-cropper/components/cropper-tools.cjs +41 -13
- package/lib/ele-cropper/components/cropper-tools.d.ts +9 -3
- package/lib/ele-cropper/index.cjs +2 -1
- package/lib/ele-cropper/index.d.ts +3 -1
- package/lib/ele-cropper/props.cjs +2 -0
- package/lib/ele-cropper/props.d.ts +3 -1
- package/lib/ele-cropper/style/index.scss +3 -2
- package/lib/ele-cropper/types.d.ts +16 -0
- package/lib/ele-cropper-modal/index.cjs +2 -1
- package/lib/ele-cropper-modal/index.d.ts +3 -1
- package/lib/ele-cropper-modal/props.d.ts +1 -0
- package/lib/ele-data-table/components/table-columns.cjs +123 -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 +327 -23
- package/lib/ele-data-table/props.d.ts +14 -18
- package/lib/ele-data-table/style/index.scss +0 -4
- package/lib/ele-data-table/types.d.ts +5 -2
- package/lib/ele-data-table/util.cjs +0 -108
- package/lib/ele-data-table/util.d.ts +1 -45
- package/lib/ele-drawer/index.cjs +8 -2
- package/lib/ele-drawer/index.d.ts +9 -8
- package/lib/ele-drawer/props.d.ts +2 -2
- package/lib/ele-dropdown/components/dropdown-menu-item.cjs +131 -0
- package/lib/ele-dropdown/components/dropdown-menu-item.d.ts +39 -0
- package/lib/ele-dropdown/components/dropdown-menus.cjs +110 -0
- package/lib/ele-dropdown/components/dropdown-menus.d.ts +44 -0
- package/lib/ele-dropdown/components/pro-dropdown.cjs +204 -0
- package/lib/ele-dropdown/components/pro-dropdown.d.ts +238 -0
- package/lib/ele-dropdown/index.cjs +149 -68
- package/lib/ele-dropdown/index.d.ts +521 -33
- package/lib/ele-dropdown/props.cjs +53 -6
- package/lib/ele-dropdown/props.d.ts +109 -15
- package/lib/ele-dropdown/style/index.cjs +4 -1
- package/lib/ele-dropdown/style/index.scss +226 -7
- package/lib/ele-dropdown/types.d.ts +2 -2
- package/lib/ele-edit-tag/index.d.ts +2 -2
- package/lib/ele-file-list/components/file-grid-item.cjs +18 -57
- package/lib/ele-file-list/components/file-grid-item.d.ts +11 -20
- package/lib/ele-file-list/components/file-grid.cjs +15 -38
- package/lib/ele-file-list/components/file-grid.d.ts +15 -19
- package/lib/ele-file-list/components/file-table-item.cjs +18 -57
- package/lib/ele-file-list/components/file-table-item.d.ts +11 -20
- package/lib/ele-file-list/components/file-table.cjs +16 -36
- package/lib/ele-file-list/components/file-table.d.ts +15 -19
- package/lib/ele-file-list/index.cjs +117 -19
- package/lib/ele-file-list/index.d.ts +33 -12
- package/lib/ele-file-list/props.cjs +4 -7
- package/lib/ele-file-list/props.d.ts +4 -5
- package/lib/ele-file-list/style/index.scss +10 -5
- package/lib/ele-file-list/types.d.ts +13 -1
- package/lib/ele-icon-select/components/icon-grid.d.ts +1 -1
- package/lib/ele-icon-select/index.d.ts +2 -2
- package/lib/ele-image-viewer/index.cjs +87 -0
- package/lib/ele-image-viewer/index.d.ts +120 -0
- package/lib/ele-image-viewer/props.cjs +35 -0
- package/lib/ele-image-viewer/props.d.ts +58 -0
- package/lib/ele-image-viewer/style/css-var.scss +8 -0
- package/lib/ele-image-viewer/style/index.cjs +3 -0
- package/lib/ele-image-viewer/style/index.scss +117 -0
- package/lib/ele-map-picker/components/map-view.d.ts +18 -18
- package/lib/ele-menus/components/item-title.cjs +107 -0
- package/lib/ele-menus/components/item-title.d.ts +48 -0
- package/lib/ele-menus/components/menu-items.cjs +268 -0
- package/lib/ele-menus/components/menu-items.d.ts +78 -0
- package/lib/ele-menus/index.cjs +278 -208
- package/lib/ele-menus/index.d.ts +77 -18
- package/lib/ele-menus/props.d.ts +2 -2
- package/lib/ele-menus/util.cjs +1 -242
- package/lib/ele-menus/util.d.ts +1 -62
- package/lib/ele-modal/index.d.ts +9 -9
- package/lib/ele-modal/props.d.ts +2 -2
- package/lib/ele-modal/util.cjs +8 -4
- package/lib/ele-modal/util.d.ts +1 -1
- package/lib/ele-pagination/index.d.ts +2 -2
- package/lib/ele-pagination/props.d.ts +1 -1
- package/lib/ele-popconfirm/index.cjs +31 -24
- package/lib/ele-popconfirm/index.d.ts +11 -14
- package/lib/ele-popconfirm/props.d.ts +3 -4
- package/lib/ele-popover/index.d.ts +11 -14
- package/lib/ele-popover/props.cjs +1 -1
- package/lib/ele-popover/props.d.ts +0 -1
- package/lib/ele-printer/util.cjs +1 -1
- package/lib/ele-pro-layout/components/pro-iframe.cjs +6 -4
- package/lib/ele-pro-layout/components/pro-iframe.d.ts +6 -6
- package/lib/ele-pro-layout/index.cjs +19 -5
- package/lib/ele-pro-layout/index.d.ts +1 -1
- package/lib/ele-pro-layout/props.cjs +3 -3
- package/lib/ele-pro-layout/props.d.ts +3 -3
- package/lib/ele-pro-layout/types.d.ts +9 -5
- package/lib/ele-pro-layout/util.cjs +12 -0
- package/lib/ele-pro-layout/util.d.ts +6 -0
- package/lib/ele-pro-table/components/table-tools.cjs +24 -16
- package/lib/ele-pro-table/components/table-tools.d.ts +25 -26
- package/lib/ele-pro-table/components/tool-column.cjs +4 -4
- package/lib/ele-pro-table/components/tool-column.d.ts +7 -7
- package/lib/ele-pro-table/components/tool-export.d.ts +5 -5
- package/lib/ele-pro-table/components/tool-print-body-cell.cjs +1 -1
- package/lib/ele-pro-table/components/tool-print-header-cell.cjs +3 -2
- package/lib/ele-pro-table/components/tool-print.d.ts +5 -5
- package/lib/ele-pro-table/index.cjs +17 -21
- package/lib/ele-pro-table/index.d.ts +71 -85
- package/lib/ele-pro-table/props.cjs +1 -1
- package/lib/ele-pro-table/props.d.ts +9 -11
- package/lib/ele-segmented/index.cjs +26 -2
- package/lib/ele-segmented/index.d.ts +3 -1
- package/lib/ele-segmented/style/index.scss +7 -1
- package/lib/ele-steps/index.d.ts +12 -12
- package/lib/ele-steps/props.d.ts +3 -3
- package/lib/ele-tab-tool/index.cjs +43 -2
- package/lib/ele-tab-tool/index.d.ts +6 -1
- package/lib/ele-tab-tool/props.cjs +3 -1
- package/lib/ele-tab-tool/props.d.ts +2 -0
- package/lib/ele-tab-wrap/components/tab-dropdown.cjs +8 -25
- package/lib/ele-tab-wrap/index.cjs +20 -1
- package/lib/ele-table/style/index.scss +1 -2
- package/lib/ele-table-select/index.d.ts +6 -6
- package/lib/ele-tabs/index.cjs +238 -113
- package/lib/ele-tabs/index.d.ts +21 -19
- package/lib/ele-tabs/props.cjs +1 -1
- package/lib/ele-tabs/props.d.ts +1 -6
- package/lib/ele-tabs/style/index.scss +152 -176
- package/lib/ele-tabs/types.d.ts +29 -6
- package/lib/ele-tool/index.cjs +6 -1
- package/lib/ele-toolbar/index.d.ts +9 -9
- package/lib/ele-tooltip/index.d.ts +15 -15
- package/lib/ele-tooltip/props.d.ts +2 -2
- package/lib/ele-tooltip/style/css-var.scss +4 -0
- package/lib/ele-tree-select/index.d.ts +5 -5
- package/lib/ele-upload-list/components/list-item.cjs +144 -64
- package/lib/ele-upload-list/components/list-item.d.ts +31 -5
- package/lib/ele-upload-list/index.cjs +178 -95
- package/lib/ele-upload-list/index.d.ts +55 -26
- package/lib/ele-upload-list/props.cjs +20 -8
- package/lib/ele-upload-list/props.d.ts +22 -9
- package/lib/ele-upload-list/style/css-var.scss +8 -0
- package/lib/ele-upload-list/style/index.cjs +1 -1
- package/lib/ele-upload-list/style/index.scss +425 -135
- package/lib/ele-upload-list/types.d.ts +35 -11
- package/lib/ele-virtual-table/components/body-cell.d.ts +2 -2
- package/lib/ele-virtual-table/components/header-cell.d.ts +1 -1
- package/lib/ele-virtual-table/components/header-row.d.ts +1 -1
- package/lib/ele-virtual-table/index.cjs +7 -5
- package/lib/ele-virtual-table/index.d.ts +14 -22
- package/lib/ele-virtual-table/props.d.ts +6 -8
- package/lib/icons/CornerLeftFilled.cjs +25 -0
- package/lib/icons/CornerLeftFilled.d.ts +2 -0
- package/lib/icons/CornerRightFilled.cjs +25 -0
- package/lib/icons/CornerRightFilled.d.ts +2 -0
- package/lib/icons/EyeOutlined.cjs +29 -0
- package/lib/icons/EyeOutlined.d.ts +2 -0
- package/lib/icons/FileOutlined.cjs +4 -4
- package/lib/icons/SizeCompactOutlined.cjs +4 -4
- package/lib/icons/SizeMiddleOutlined.cjs +33 -0
- package/lib/icons/SizeMiddleOutlined.d.ts +2 -0
- package/lib/icons/SizeSlackOutlined.cjs +4 -4
- package/lib/icons/index.cjs +8 -0
- package/lib/icons/index.d.ts +4 -0
- package/lib/lang/en_US.cjs +4 -1
- package/lib/lang/zh_CN.cjs +4 -1
- package/lib/lang/zh_TW.cjs +4 -1
- package/lib/style/plus.scss +1 -0
- package/lib/style/themes/default.scss +84 -6
- package/lib/style/themes/rounded.scss +6 -3
- package/lib/style/themes/theme-util.scss +4 -0
- package/lib/style/util.scss +10 -3
- package/lib/utils/core.d.ts +4 -2
- package/lib/utils/hook.cjs +5 -1
- package/lib/utils/hook.d.ts +2 -0
- package/lib/utils/menu-util.cjs +9 -3
- package/lib/utils/message-box.cjs +4 -0
- package/lib/utils/message.cjs +1 -1
- package/package.json +36 -36
- package/typings/global.d.ts +1 -0
- package/es/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
- package/es/ele-app/style/overwrite/image-viewer/index.js +0 -1
- package/es/ele-app/style/overwrite/image-viewer/index.scss +0 -10
- package/es/ele-tabs/components/tab-title.d.ts +0 -52
- package/es/ele-tabs/components/tab-title.js +0 -115
- package/lib/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
- package/lib/ele-app/style/overwrite/image-viewer/index.cjs +0 -2
- package/lib/ele-app/style/overwrite/image-viewer/index.scss +0 -10
- package/lib/ele-tabs/components/tab-title.cjs +0 -114
- package/lib/ele-tabs/components/tab-title.d.ts +0 -52
- /package/es/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
- /package/lib/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
package/es/ele-tabs/index.js
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, computed,
|
|
1
|
+
import { defineComponent, inject, ref, computed, shallowRef, onMounted, onBeforeUnmount, watch, nextTick, resolveComponent, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementBlock, Fragment, renderList, createElementVNode, renderSlot, createTextVNode, toDisplayString, createVNode, createCommentVNode } from "vue";
|
|
2
2
|
import SortableJs from "sortablejs";
|
|
3
|
-
import { ElTabs, ElTabPane } from "element-plus";
|
|
3
|
+
import { ElTabs, ElTabPane, ElIcon } from "element-plus";
|
|
4
|
+
import { CornerLeftFilled, CornerRightFilled } from "../icons";
|
|
4
5
|
import { pick, omit } from "../utils/core";
|
|
5
6
|
import { useTimer, useMousewheel, useTouchEvent } from "../utils/hook";
|
|
6
|
-
import
|
|
7
|
+
import EleDropdown from "../ele-dropdown/index";
|
|
7
8
|
import { tabsProps, tabsEmits, TAB_WRAP_KEY, tabPropKeys } from "./props";
|
|
8
9
|
const _sfc_main = defineComponent({
|
|
9
10
|
name: "EleTabs",
|
|
10
|
-
components: {
|
|
11
|
+
components: {
|
|
12
|
+
ElTabs,
|
|
13
|
+
ElTabPane,
|
|
14
|
+
ElIcon,
|
|
15
|
+
EleDropdown,
|
|
16
|
+
CornerLeftFilled,
|
|
17
|
+
CornerRightFilled
|
|
18
|
+
},
|
|
11
19
|
props: tabsProps,
|
|
12
20
|
emits: tabsEmits,
|
|
13
21
|
setup(props, { emit }) {
|
|
14
|
-
const [startScrollTimer, _stopScrollTimer, scrollWaiting] = useTimer(320);
|
|
15
22
|
let sortableIns = null;
|
|
23
|
+
let currentSortItemId = null;
|
|
24
|
+
let contextMenuTabItem = null;
|
|
25
|
+
let contextMenuTabName = null;
|
|
16
26
|
const wrapProps = inject(TAB_WRAP_KEY, null);
|
|
27
|
+
const [startScrollTimer, _stopScrollTimer, scrollWaiting] = useTimer(320);
|
|
17
28
|
const { bindMousewheel, unbindMousewheel } = useMousewheel((param) => {
|
|
18
29
|
const { e, direction } = param;
|
|
19
30
|
scrollTabs(direction === "up" ? "prev" : "next", () => {
|
|
@@ -30,9 +41,9 @@ const _sfc_main = defineComponent({
|
|
|
30
41
|
}
|
|
31
42
|
}
|
|
32
43
|
});
|
|
44
|
+
const [startGhostTimer] = useTimer(100);
|
|
33
45
|
const tabRef = ref(null);
|
|
34
|
-
const
|
|
35
|
-
const isWrap = computed(() => wrapProps == null);
|
|
46
|
+
const isOnlyTab = computed(() => wrapProps == null);
|
|
36
47
|
const tabSize = computed(
|
|
37
48
|
() => wrapProps == null ? props.size : wrapProps.size
|
|
38
49
|
);
|
|
@@ -42,15 +53,21 @@ const _sfc_main = defineComponent({
|
|
|
42
53
|
const tabProps = computed(() => {
|
|
43
54
|
return pick(props, tabPropKeys);
|
|
44
55
|
});
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
return props.contextMenus;
|
|
50
|
-
};
|
|
56
|
+
const ctxMenuDropdownRef = ref(null);
|
|
57
|
+
const ctxMenuDropdownItems = shallowRef([]);
|
|
58
|
+
const ctxMenuDropdownVirtualRef = ref();
|
|
51
59
|
const updateModelValue = (name) => {
|
|
52
60
|
emit("update:modelValue", name);
|
|
53
61
|
};
|
|
62
|
+
const handleContextmenu = (e) => {
|
|
63
|
+
if (!props.contextMenu) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const el = e.target;
|
|
67
|
+
if (el && (el.classList.contains("is-icon-close") || el.classList.contains("el-tabs__nav") || el.classList.contains("el-tabs__item"))) {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
54
71
|
const handleTabClick = (pane, e) => {
|
|
55
72
|
emit("tabClick", pane, e);
|
|
56
73
|
};
|
|
@@ -66,41 +83,75 @@ const _sfc_main = defineComponent({
|
|
|
66
83
|
const handleEdit = (name, action) => {
|
|
67
84
|
emit("edit", name, action);
|
|
68
85
|
};
|
|
69
|
-
const handleItemClick = (
|
|
70
|
-
|
|
86
|
+
const handleItemClick = (item, tabName, e) => {
|
|
87
|
+
if (props.handleClick) {
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
}
|
|
90
|
+
emit("tabItemClick", {
|
|
91
|
+
item,
|
|
92
|
+
name: item ? item.name : tabName,
|
|
93
|
+
active: props.modelValue
|
|
94
|
+
});
|
|
71
95
|
};
|
|
72
|
-
const
|
|
73
|
-
|
|
96
|
+
const handleItemCtxMenuVisible = (visible) => {
|
|
97
|
+
if (visible) {
|
|
98
|
+
emit(
|
|
99
|
+
"tabContextOpen",
|
|
100
|
+
ctxMenuDropdownRef.value,
|
|
101
|
+
contextMenuTabItem,
|
|
102
|
+
contextMenuTabName
|
|
103
|
+
);
|
|
104
|
+
}
|
|
74
105
|
};
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
106
|
+
const handleItemCtxMenuClick = (command) => {
|
|
107
|
+
if (contextMenuTabItem != null || contextMenuTabName != null) {
|
|
108
|
+
emit("tabContextMenu", {
|
|
109
|
+
command,
|
|
110
|
+
item: contextMenuTabItem,
|
|
111
|
+
name: contextMenuTabItem ? contextMenuTabItem.name : contextMenuTabName,
|
|
112
|
+
active: props.modelValue
|
|
81
113
|
});
|
|
82
114
|
}
|
|
83
|
-
emit("tabContextOpen", ref2);
|
|
84
115
|
};
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
e.preventDefault();
|
|
116
|
+
const getContextMenus = (item, tabName) => {
|
|
117
|
+
if (typeof props.contextMenus === "function") {
|
|
118
|
+
return props.contextMenus(item, tabName);
|
|
89
119
|
}
|
|
120
|
+
return props.contextMenus;
|
|
90
121
|
};
|
|
91
122
|
const hideAllDropdown = () => {
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
123
|
+
if (ctxMenuDropdownRef.value) {
|
|
124
|
+
ctxMenuDropdownRef.value.handleClose();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const showItemContextMenu = (item, tabName, itemEl) => {
|
|
128
|
+
if (contextMenuTabItem != null && contextMenuTabItem === item || contextMenuTabName != null && contextMenuTabName === tabName) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
hideAllDropdown();
|
|
132
|
+
nextTick(() => {
|
|
133
|
+
contextMenuTabItem = item;
|
|
134
|
+
contextMenuTabName = tabName;
|
|
135
|
+
ctxMenuDropdownItems.value = getContextMenus(item, tabName) || [];
|
|
136
|
+
ctxMenuDropdownVirtualRef.value = itemEl;
|
|
137
|
+
if (props.contextMenu && ctxMenuDropdownItems.value.length) {
|
|
138
|
+
nextTick(() => {
|
|
139
|
+
ctxMenuDropdownRef.value && ctxMenuDropdownRef.value.handleOpen();
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
const handleItemContextmenu = (item, tabName, e) => {
|
|
145
|
+
const itemEl = e.currentTarget;
|
|
146
|
+
if (!props.contextMenu || ctxMenuDropdownVirtualRef.value === itemEl) {
|
|
147
|
+
return;
|
|
98
148
|
}
|
|
149
|
+
e.preventDefault();
|
|
150
|
+
showItemContextMenu(item, tabName, itemEl);
|
|
99
151
|
};
|
|
100
152
|
const getHeaderEl = () => {
|
|
101
153
|
const tabEl = tabRef.value ? tabRef.value.$el : void 0;
|
|
102
|
-
|
|
103
|
-
return el;
|
|
154
|
+
return tabEl ? tabEl.querySelector(".el-tabs__header") : void 0;
|
|
104
155
|
};
|
|
105
156
|
const getNavEl = () => {
|
|
106
157
|
const headerEl = getHeaderEl();
|
|
@@ -126,26 +177,34 @@ const _sfc_main = defineComponent({
|
|
|
126
177
|
}
|
|
127
178
|
}
|
|
128
179
|
};
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
180
|
+
const checkSortGhostTab = () => {
|
|
181
|
+
const navEl = getNavEl();
|
|
182
|
+
if (navEl == null) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (currentSortItemId == null) {
|
|
186
|
+
const el2 = navEl.querySelector(".el-tabs__item.sortable-ghost");
|
|
187
|
+
if (el2 != null) {
|
|
188
|
+
el2.classList.remove("sortable-ghost");
|
|
137
189
|
}
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const el = navEl.querySelector(
|
|
193
|
+
`.el-tabs__item[id="${currentSortItemId}"]`
|
|
194
|
+
);
|
|
195
|
+
if (el != null) {
|
|
196
|
+
el.classList.add("sortable-ghost");
|
|
138
197
|
}
|
|
139
198
|
};
|
|
140
199
|
const bindDragSort = () => {
|
|
141
200
|
unbindDragSort();
|
|
142
|
-
const
|
|
143
|
-
if (!props.sortable || !
|
|
201
|
+
const navEl = getNavEl();
|
|
202
|
+
if (!props.sortable || !navEl) {
|
|
144
203
|
return;
|
|
145
204
|
}
|
|
146
|
-
sortableIns = new SortableJs(
|
|
147
|
-
animation: 300,
|
|
205
|
+
sortableIns = new SortableJs(navEl, {
|
|
148
206
|
draggable: ".el-tabs__item",
|
|
207
|
+
delay: 20,
|
|
149
208
|
onUpdate: ({ oldDraggableIndex, newDraggableIndex }) => {
|
|
150
209
|
if (typeof oldDraggableIndex === "number" && typeof newDraggableIndex === "number") {
|
|
151
210
|
const data = [...props.items];
|
|
@@ -157,6 +216,29 @@ const _sfc_main = defineComponent({
|
|
|
157
216
|
emit("tabSortChange", data);
|
|
158
217
|
}
|
|
159
218
|
},
|
|
219
|
+
onStart: (e) => {
|
|
220
|
+
currentSortItemId = e.item.getAttribute("id");
|
|
221
|
+
checkSortGhostTab();
|
|
222
|
+
startGhostTimer(() => {
|
|
223
|
+
checkSortGhostTab();
|
|
224
|
+
});
|
|
225
|
+
},
|
|
226
|
+
onEnd: () => {
|
|
227
|
+
currentSortItemId = null;
|
|
228
|
+
checkSortGhostTab();
|
|
229
|
+
},
|
|
230
|
+
onChange: () => {
|
|
231
|
+
checkSortGhostTab();
|
|
232
|
+
startGhostTimer(() => {
|
|
233
|
+
checkSortGhostTab();
|
|
234
|
+
});
|
|
235
|
+
},
|
|
236
|
+
onMove: () => {
|
|
237
|
+
checkSortGhostTab();
|
|
238
|
+
startGhostTimer(() => {
|
|
239
|
+
checkSortGhostTab();
|
|
240
|
+
});
|
|
241
|
+
},
|
|
160
242
|
setData: () => {
|
|
161
243
|
}
|
|
162
244
|
});
|
|
@@ -164,6 +246,7 @@ const _sfc_main = defineComponent({
|
|
|
164
246
|
const unbindDragSort = () => {
|
|
165
247
|
sortableIns && sortableIns.destroy();
|
|
166
248
|
sortableIns = null;
|
|
249
|
+
currentSortItemId = null;
|
|
167
250
|
};
|
|
168
251
|
const initMousewheelEvent = () => {
|
|
169
252
|
const el = getHeaderEl();
|
|
@@ -183,15 +266,26 @@ const _sfc_main = defineComponent({
|
|
|
183
266
|
}
|
|
184
267
|
}
|
|
185
268
|
};
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
269
|
+
if (wrapProps && wrapProps.setTabMethods) {
|
|
270
|
+
wrapProps.setTabMethods({
|
|
271
|
+
triggerTabItemClick: handleItemClick,
|
|
272
|
+
triggerItemContextMenu: handleItemContextmenu
|
|
189
273
|
});
|
|
274
|
+
}
|
|
275
|
+
onMounted(() => {
|
|
190
276
|
initMousewheelEvent();
|
|
191
277
|
initTouchEvent();
|
|
192
278
|
bindDragSort();
|
|
193
279
|
});
|
|
194
280
|
onBeforeUnmount(() => {
|
|
281
|
+
if (wrapProps && wrapProps.setTabMethods) {
|
|
282
|
+
wrapProps.setTabMethods({
|
|
283
|
+
triggerTabItemClick: void 0,
|
|
284
|
+
triggerItemContextMenu: void 0
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
contextMenuTabItem = null;
|
|
288
|
+
contextMenuTabName = null;
|
|
195
289
|
const el = getHeaderEl();
|
|
196
290
|
if (el != null) {
|
|
197
291
|
unbindMousewheel(el);
|
|
@@ -212,35 +306,30 @@ const _sfc_main = defineComponent({
|
|
|
212
306
|
initMousewheelEvent();
|
|
213
307
|
}
|
|
214
308
|
);
|
|
215
|
-
watch(
|
|
216
|
-
() => props.modelValue,
|
|
217
|
-
() => {
|
|
218
|
-
nextTick(() => {
|
|
219
|
-
checkScrollActive();
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
309
|
return {
|
|
224
310
|
omit,
|
|
225
311
|
tabRef,
|
|
226
|
-
|
|
227
|
-
isWrap,
|
|
312
|
+
isOnlyTab,
|
|
228
313
|
tabSize,
|
|
229
314
|
tabType,
|
|
230
315
|
tabProps,
|
|
231
|
-
|
|
316
|
+
ctxMenuDropdownRef,
|
|
317
|
+
ctxMenuDropdownItems,
|
|
318
|
+
ctxMenuDropdownVirtualRef,
|
|
232
319
|
updateModelValue,
|
|
320
|
+
handleContextmenu,
|
|
233
321
|
handleTabClick,
|
|
234
322
|
handleTabChange,
|
|
235
323
|
handleTabRemove,
|
|
236
324
|
handleTabAdd,
|
|
237
325
|
handleEdit,
|
|
238
326
|
handleItemClick,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
327
|
+
handleItemCtxMenuVisible,
|
|
328
|
+
handleItemCtxMenuClick,
|
|
329
|
+
handleItemContextmenu,
|
|
242
330
|
hideAllDropdown,
|
|
243
|
-
updateActiveBar
|
|
331
|
+
updateActiveBar,
|
|
332
|
+
scrollTabs
|
|
244
333
|
};
|
|
245
334
|
}
|
|
246
335
|
});
|
|
@@ -251,16 +340,20 @@ const _export_sfc = (sfc, props) => {
|
|
|
251
340
|
}
|
|
252
341
|
return target;
|
|
253
342
|
};
|
|
343
|
+
const _hoisted_1 = ["onClick", "onContextmenu"];
|
|
254
344
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
255
|
-
const
|
|
345
|
+
const _component_CornerLeftFilled = resolveComponent("CornerLeftFilled");
|
|
346
|
+
const _component_ElIcon = resolveComponent("ElIcon");
|
|
347
|
+
const _component_CornerRightFilled = resolveComponent("CornerRightFilled");
|
|
256
348
|
const _component_ElTabPane = resolveComponent("ElTabPane");
|
|
349
|
+
const _component_EleDropdown = resolveComponent("EleDropdown");
|
|
257
350
|
const _component_ElTabs = resolveComponent("ElTabs");
|
|
258
351
|
return openBlock(), createBlock(_component_ElTabs, mergeProps(_ctx.tabProps, {
|
|
259
352
|
ref: "tabRef",
|
|
260
353
|
type: _ctx.tabType === "card" || _ctx.tabType === "border-card" ? _ctx.tabType : void 0,
|
|
261
354
|
class: [
|
|
262
355
|
"ele-tabs",
|
|
263
|
-
{ "ele-tabs-wrap": _ctx.
|
|
356
|
+
{ "ele-tabs-wrap": _ctx.isOnlyTab },
|
|
264
357
|
{ "is-small": _ctx.tabSize === "small" },
|
|
265
358
|
{ "is-large": _ctx.tabSize === "large" },
|
|
266
359
|
{ "is-default": !_ctx.tabType || _ctx.tabType === "default" },
|
|
@@ -270,6 +363,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
270
363
|
{ "is-button": _ctx.tabType === "button" },
|
|
271
364
|
{ "is-tag": _ctx.tabType === "tag" },
|
|
272
365
|
{ "is-center": _ctx.center },
|
|
366
|
+
{ "is-sortable": _ctx.sortable },
|
|
273
367
|
{ "is-flex-table": _ctx.flexTable }
|
|
274
368
|
],
|
|
275
369
|
"onUpdate:modelValue": _ctx.updateModelValue,
|
|
@@ -282,54 +376,86 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
282
376
|
}), createSlots({
|
|
283
377
|
default: withCtx(() => [
|
|
284
378
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index2) => {
|
|
285
|
-
return openBlock(),
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
379
|
+
return openBlock(), createBlock(_component_ElTabPane, mergeProps({
|
|
380
|
+
key: [
|
|
381
|
+
index2,
|
|
382
|
+
item.name,
|
|
383
|
+
item.label,
|
|
384
|
+
!!item.closable,
|
|
385
|
+
!!item.disabled,
|
|
386
|
+
!!item.lazy
|
|
387
|
+
].join("-"),
|
|
388
|
+
ref_for: true
|
|
389
|
+
}, _ctx.omit(item, ["slot", "meta"])), createSlots({
|
|
390
|
+
label: withCtx(() => [
|
|
391
|
+
createElementVNode("div", {
|
|
392
|
+
class: "ele-tab-title",
|
|
393
|
+
onClick: (e) => _ctx.handleItemClick(item, void 0, e),
|
|
394
|
+
onContextmenu: (e) => _ctx.handleItemContextmenu(item, void 0, e)
|
|
395
|
+
}, [
|
|
396
|
+
renderSlot(_ctx.$slots, "label", {
|
|
294
397
|
item,
|
|
295
398
|
label: item.label,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
]),
|
|
317
|
-
key: "1"
|
|
318
|
-
} : void 0
|
|
319
|
-
]), 1032, ["item", "label", "tabName", "active", "handleClick", "contextMenu", "contextMenus", "onContextMenu", "onContextOpen", "onItemClick"])
|
|
320
|
-
]),
|
|
321
|
-
_: 2
|
|
322
|
-
}, [
|
|
323
|
-
item.name && _ctx.$slots[item.slot || item.name] ? {
|
|
324
|
-
name: "default",
|
|
325
|
-
fn: withCtx(() => [
|
|
326
|
-
renderSlot(_ctx.$slots, item.slot || item.name, { item })
|
|
399
|
+
active: _ctx.modelValue
|
|
400
|
+
}, () => [
|
|
401
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
402
|
+
])
|
|
403
|
+
], 40, _hoisted_1),
|
|
404
|
+
_ctx.tabType === "simple" || _ctx.tabType === "indicator" ? (openBlock(), createBlock(_component_ElIcon, {
|
|
405
|
+
key: 0,
|
|
406
|
+
class: "ele-tab-corner-left"
|
|
407
|
+
}, {
|
|
408
|
+
default: withCtx(() => [
|
|
409
|
+
createVNode(_component_CornerLeftFilled)
|
|
410
|
+
]),
|
|
411
|
+
_: 1
|
|
412
|
+
})) : createCommentVNode("", true),
|
|
413
|
+
_ctx.tabType === "simple" || _ctx.tabType === "indicator" ? (openBlock(), createBlock(_component_ElIcon, {
|
|
414
|
+
key: 1,
|
|
415
|
+
class: "ele-tab-corner-right"
|
|
416
|
+
}, {
|
|
417
|
+
default: withCtx(() => [
|
|
418
|
+
createVNode(_component_CornerRightFilled)
|
|
327
419
|
]),
|
|
328
|
-
|
|
329
|
-
} :
|
|
330
|
-
]),
|
|
331
|
-
|
|
332
|
-
|
|
420
|
+
_: 1
|
|
421
|
+
})) : createCommentVNode("", true)
|
|
422
|
+
]),
|
|
423
|
+
_: 2
|
|
424
|
+
}, [
|
|
425
|
+
item.name && _ctx.$slots[item.slot || item.name] ? {
|
|
426
|
+
name: "default",
|
|
427
|
+
fn: withCtx(() => [
|
|
428
|
+
renderSlot(_ctx.$slots, item.slot || item.name, { item })
|
|
429
|
+
]),
|
|
430
|
+
key: "0"
|
|
431
|
+
} : void 0
|
|
432
|
+
]), 1040);
|
|
433
|
+
}), 128)),
|
|
434
|
+
_ctx.contextMenu ? (openBlock(), createBlock(_component_EleDropdown, mergeProps(
|
|
435
|
+
{
|
|
436
|
+
key: 0,
|
|
437
|
+
triggerKeys: [],
|
|
438
|
+
persistent: false,
|
|
439
|
+
placement: "bottom-start",
|
|
440
|
+
popperClass: "ele-tab-popup",
|
|
441
|
+
popperOptions: {
|
|
442
|
+
modifiers: [{ name: "offset", options: { offset: [0, 8] } }]
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
!_ctx.contextMenu || typeof _ctx.contextMenu == "boolean" ? {} : _ctx.contextMenu,
|
|
446
|
+
{
|
|
447
|
+
ref: "ctxMenuDropdownRef",
|
|
448
|
+
componentType: "pro",
|
|
449
|
+
preventContextmenu: true,
|
|
450
|
+
trigger: "contextmenu",
|
|
451
|
+
virtualTriggering: true,
|
|
452
|
+
virtualRef: _ctx.ctxMenuDropdownVirtualRef,
|
|
453
|
+
disabled: !_ctx.ctxMenuDropdownItems.length,
|
|
454
|
+
items: _ctx.ctxMenuDropdownItems,
|
|
455
|
+
onCommand: _ctx.handleItemCtxMenuClick,
|
|
456
|
+
onVisibleChange: _ctx.handleItemCtxMenuVisible
|
|
457
|
+
}
|
|
458
|
+
), null, 16, ["virtualRef", "disabled", "items", "onCommand", "onVisibleChange"])) : createCommentVNode("", true)
|
|
333
459
|
]),
|
|
334
460
|
_: 2
|
|
335
461
|
}, [
|
|
@@ -339,8 +465,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
339
465
|
renderSlot(_ctx.$slots, "add-icon")
|
|
340
466
|
]),
|
|
341
467
|
key: "0"
|
|
342
|
-
} :
|
|
343
|
-
_ctx.$slots.addIcon ? {
|
|
468
|
+
} : _ctx.$slots.addIcon ? {
|
|
344
469
|
name: "addIcon",
|
|
345
470
|
fn: withCtx(() => [
|
|
346
471
|
renderSlot(_ctx.$slots, "addIcon")
|
package/es/ele-tabs/props.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes, InjectionKey } from 'vue';
|
|
2
2
|
import { tabsProps as elTabsProps } from 'element-plus';
|
|
3
3
|
import { EleDropdownProps, EleDropdownInstance } from '../ele-app/plus';
|
|
4
|
-
import { default as TabTitle } from './components/tab-title';
|
|
5
4
|
import { TabPaneItem, TabSize, TabType, ContextMenus, TabEventOption, TabWrapProvide } from './types';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -62,7 +61,7 @@ export declare const tabsEmits: {
|
|
|
62
61
|
/** 页签右键菜单项点击事件 */
|
|
63
62
|
tabContextMenu: (_opt: TabEventOption) => boolean;
|
|
64
63
|
/** 页签右键菜单打开事件 */
|
|
65
|
-
tabContextOpen: (_ref: EleDropdownInstance) => boolean;
|
|
64
|
+
tabContextOpen: (_ref: EleDropdownInstance, _item?: TabPaneItem | null, _name?: string | number | null) => boolean;
|
|
66
65
|
/** 拖动排序改变事件 */
|
|
67
66
|
tabSortChange: (_data: TabPaneItem[]) => boolean;
|
|
68
67
|
"update:modelValue": (name: import('element-plus').TabPaneName) => boolean;
|
|
@@ -77,10 +76,6 @@ export declare const tabsEmits: {
|
|
|
77
76
|
*/
|
|
78
77
|
export type TabPropKeys = Array<keyof typeof elTabsProps>;
|
|
79
78
|
export declare const tabPropKeys: TabPropKeys;
|
|
80
|
-
/**
|
|
81
|
-
* 页签标题实例
|
|
82
|
-
*/
|
|
83
|
-
export type TabTitleInstance = InstanceType<typeof TabTitle> | null;
|
|
84
79
|
/**
|
|
85
80
|
* 标签页容器依赖注入key
|
|
86
81
|
*/
|
package/es/ele-tabs/props.js
CHANGED