ele-admin-plus 1.0.0-beta.2 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components.d.ts +3 -0
- package/es/components.js +92 -86
- package/es/ele-alert/index.d.ts +62 -0
- package/es/ele-alert/index.js +129 -0
- package/es/ele-alert/props.d.ts +36 -0
- package/es/ele-alert/props.js +48 -0
- package/es/ele-alert/style/css-var.scss +11 -0
- package/es/ele-alert/style/index.js +1 -0
- package/es/ele-alert/style/index.scss +148 -0
- package/es/ele-app/index.d.ts +1 -0
- package/es/ele-app/style/common.scss +124 -30
- package/es/ele-app/style/css-var.scss +2 -2
- package/es/ele-app/types/index.d.ts +27 -0
- package/es/ele-avatar-group/index.d.ts +3 -0
- package/es/ele-avatar-group/index.js +10 -9
- package/es/ele-avatar-group/props.d.ts +1 -0
- package/es/ele-avatar-group/props.js +3 -1
- package/es/ele-avatar-group/style/index.scss +32 -0
- package/es/ele-basic-select/index.d.ts +2 -19171
- package/es/ele-basic-select/index.js +2 -2
- package/es/ele-bottom-bar/style/index.scss +1 -1
- package/es/ele-breadcrumb/index.d.ts +2 -165
- package/es/ele-card/style/index.scss +28 -26
- package/es/ele-config-provider/index.d.ts +3 -7
- package/es/ele-config-provider/index.js +1 -8
- package/es/ele-config-provider/props.d.ts +9 -2
- package/es/ele-config-provider/props.js +5 -3
- package/{lib/ele-config-provider/use-receiver.d.ts → es/ele-config-provider/receiver.d.ts} +8 -2
- package/es/ele-config-provider/receiver.js +198 -0
- package/es/ele-config-provider/types/index.d.ts +24 -13
- package/es/ele-cropper/components/cropper-tools.js +1 -1
- package/es/ele-cropper/index.d.ts +12 -9
- package/es/ele-cropper/index.js +29 -30
- package/es/ele-cropper/props.d.ts +3 -4
- package/es/ele-cropper/style/index.js +1 -1
- package/es/ele-cropper/types/index.d.ts +10 -2
- package/es/ele-cropper-modal/index.d.ts +6 -6
- package/es/ele-cropper-modal/index.js +1 -1
- package/es/ele-cropper-modal/props.d.ts +2 -2
- package/es/ele-dashboard/index.js +1 -1
- package/es/ele-drawer/index.d.ts +2 -355
- package/es/ele-drawer/index.js +1 -1
- package/es/ele-edit-tag/index.d.ts +2 -804
- package/es/ele-edit-tag/index.js +1 -2
- package/es/ele-ellipsis/index.d.ts +6 -3
- package/es/ele-ellipsis/index.js +16 -23
- package/es/ele-ellipsis/props.d.ts +1 -0
- package/es/ele-file-list/components/file-grid-item.d.ts +5 -24370
- package/es/ele-file-list/components/file-grid-item.js +8 -1
- package/es/ele-file-list/components/file-grid.d.ts +4 -2
- package/es/ele-file-list/components/file-table-item.d.ts +5 -24370
- package/es/ele-file-list/components/file-table-item.js +8 -1
- package/es/ele-file-list/components/file-table.d.ts +4 -2
- package/es/ele-file-list/index.d.ts +2 -1561
- package/es/ele-file-list/index.js +25 -15
- package/es/ele-file-list/style/index.scss +0 -1
- package/es/ele-icon-select/components/icon-grid.d.ts +5 -1
- package/es/ele-icon-select/components/icon-grid.js +24 -14
- package/es/ele-icon-select/components/icon-popper.d.ts +15 -1
- package/es/ele-icon-select/components/icon-popper.js +52 -41
- package/es/ele-icon-select/index.d.ts +14 -0
- package/es/ele-icon-select/index.js +9 -2
- package/es/ele-icon-select/props.d.ts +8 -1
- package/es/ele-icon-select/props.js +14 -0
- package/es/ele-icon-select/style/index.scss +142 -140
- package/es/ele-map-picker/components/map-view.js +4 -5
- package/es/ele-map-picker/index.d.ts +6 -1
- package/es/ele-map-picker/index.js +11 -23
- package/es/ele-map-picker/props.d.ts +10 -4
- package/es/ele-map-picker/props.js +9 -7
- package/es/ele-map-picker/style/index.scss +1 -0
- package/es/ele-menus/index.d.ts +2 -156
- package/es/ele-menus/index.js +3 -12
- package/es/ele-menus/props.d.ts +6 -0
- package/es/ele-menus/props.js +2 -0
- package/es/ele-menus/style/index.scss +12 -5
- package/es/ele-modal/index.d.ts +7 -903
- package/es/ele-modal/index.js +38 -49
- package/es/ele-modal/props.d.ts +10 -0
- package/es/ele-modal/props.js +4 -0
- package/es/ele-modal/style/index.scss +1 -1
- package/es/ele-modal/util.d.ts +3 -3
- package/es/ele-modal/util.js +8 -7
- package/es/ele-page/index.d.ts +8 -2
- package/es/ele-page/props.d.ts +4 -1
- package/es/ele-page/props.js +4 -1
- package/es/ele-pagination/index.d.ts +6 -6
- package/es/ele-pagination/props.d.ts +3 -3
- package/es/ele-printer/index.d.ts +37 -0
- package/es/ele-printer/index.js +119 -0
- package/es/ele-printer/props.d.ts +25 -0
- package/es/ele-printer/props.js +32 -0
- package/es/ele-printer/style/index.js +1 -0
- package/es/ele-printer/style/index.scss +56 -0
- package/es/ele-printer/types/index.d.ts +40 -0
- package/es/ele-printer/util.d.ts +39 -0
- package/es/ele-printer/util.js +174 -0
- package/es/ele-pro-layout/components/pro-iframe.d.ts +29 -0
- package/es/ele-pro-layout/components/pro-iframe.js +116 -0
- package/es/ele-pro-layout/components/pro-sidebar.d.ts +3 -9
- package/es/ele-pro-layout/components/pro-sidebar.js +19 -9
- package/es/ele-pro-layout/components/pro-sidebox.d.ts +2 -1
- package/es/ele-pro-layout/components/pro-sidebox.js +19 -5
- package/es/ele-pro-layout/components/{pro-tab-bar.d.ts → pro-tabs.d.ts} +3 -2
- package/es/ele-pro-layout/components/{pro-tab-bar.js → pro-tabs.js} +4 -3
- package/es/ele-pro-layout/index.js +66 -103
- package/es/ele-pro-layout/props.d.ts +6 -4
- package/es/ele-pro-layout/props.js +9 -8
- package/es/ele-pro-layout/style/collapse.scss +60 -42
- package/es/ele-pro-layout/style/css-var.scss +3 -1
- package/es/ele-pro-layout/style/header.scss +8 -3
- package/es/ele-pro-layout/style/layout-mobile.scss +1 -1
- package/es/ele-pro-layout/style/layout-style.scss +9 -4
- package/es/ele-pro-layout/style/layout.scss +14 -1
- package/es/ele-pro-layout/style/sidebar.scss +21 -6
- package/es/ele-pro-layout/style/tabs.scss +3 -26
- package/es/ele-pro-layout/types/index.d.ts +23 -18
- package/es/ele-pro-layout/util.d.ts +8 -12
- package/es/ele-pro-layout/util.js +74 -22
- package/es/ele-pro-table/components/table-tools.d.ts +2 -2
- package/es/ele-pro-table/components/table-tools.js +1 -1
- package/es/ele-pro-table/components/table-view.d.ts +51 -618
- package/es/ele-pro-table/components/table-view.js +11 -24
- package/es/ele-pro-table/index.d.ts +81 -1674
- package/es/ele-pro-table/index.js +90 -129
- package/es/ele-pro-table/props.d.ts +133 -25
- package/es/ele-pro-table/props.js +36 -30
- package/es/ele-pro-table/style/index.scss +96 -57
- package/es/ele-pro-table/types/index.d.ts +24 -4
- package/es/ele-pro-table/util.d.ts +27 -10
- package/es/ele-pro-table/util.js +49 -13
- package/es/ele-segmented/index.d.ts +33 -0
- package/es/ele-segmented/index.js +77 -0
- package/es/ele-segmented/props.d.ts +23 -0
- package/es/ele-segmented/props.js +25 -0
- package/es/ele-segmented/style/css-var.scss +15 -0
- package/es/ele-segmented/style/index.js +4 -0
- package/es/ele-segmented/style/index.scss +102 -0
- package/es/ele-segmented/types/index.d.ts +25 -0
- package/es/ele-split-panel/index.d.ts +7 -8
- package/es/ele-split-panel/index.js +8 -13
- package/es/ele-split-panel/style/index.scss +26 -25
- package/es/ele-steps/index.d.ts +13 -1
- package/es/ele-steps/index.js +14 -14
- package/es/ele-steps/style/index.scss +24 -9
- package/es/ele-table/style/index.scss +1 -0
- package/es/ele-table-select/index.js +1 -1
- package/es/ele-table-select/types/index.d.ts +7 -0
- package/es/ele-tabs/components/tab-title.d.ts +5 -4
- package/es/ele-tabs/index.d.ts +17 -269
- package/es/ele-tabs/index.js +19 -26
- package/es/ele-tabs/props.d.ts +10 -2
- package/es/ele-tabs/props.js +4 -0
- package/es/ele-tabs/style/css-var.scss +7 -7
- package/es/ele-tabs/style/index.scss +4 -3
- package/es/ele-tabs/types/index.d.ts +1 -5
- package/es/ele-text/index.d.ts +2 -0
- package/es/ele-text/index.js +6 -4
- package/es/ele-text/props.d.ts +7 -1
- package/es/ele-text/props.js +5 -1
- package/es/ele-toolbar/index.d.ts +15 -2
- package/es/ele-toolbar/index.js +18 -18
- package/es/ele-toolbar/props.d.ts +8 -2
- package/es/ele-toolbar/props.js +10 -1
- package/es/ele-toolbar/style/index.scss +2 -17
- package/es/ele-tour/index.d.ts +10 -20739
- package/es/ele-tour/index.js +8 -9
- package/es/ele-tour/style/index.scss +4 -4
- package/es/ele-tour/util.js +1 -0
- package/es/ele-upload-list/components/list-item.d.ts +9 -6
- package/es/ele-upload-list/components/list-item.js +21 -24
- package/es/ele-upload-list/index.d.ts +14 -733
- package/es/ele-upload-list/index.js +15 -15
- package/es/ele-upload-list/props.d.ts +5 -0
- package/es/ele-upload-list/props.js +8 -1
- package/es/ele-upload-list/style/index.scss +15 -5
- package/es/ele-upload-list/types/index.d.ts +1 -1
- package/es/ele-watermark/index.js +1 -1
- package/es/ele-watermark/util.js +8 -10
- package/es/ele-xg-player/index.d.ts +1 -1
- package/es/ele-xg-player/index.js +22 -16
- package/es/icons/ArrowDown.js +1 -1
- package/es/icons/ArrowLeft.d.ts +2 -0
- package/es/icons/ArrowLeft.js +30 -0
- package/es/icons/ArrowUp.d.ts +2 -0
- package/es/icons/ArrowUp.js +31 -0
- package/es/icons/index.d.ts +2 -0
- package/es/icons/index.js +24 -20
- package/es/index.d.ts +0 -2
- package/es/index.js +0 -2
- package/es/lang/en_US.js +2 -2
- package/es/lang/zh_CN.js +1 -1
- package/es/lang/zh_TW.js +1 -1
- package/es/style/index.scss +3 -0
- package/es/style/themes/dark-css-var.scss +7 -3
- package/es/style/themes/dark.scss +1 -1
- package/es/style/themes/default.scss +75 -12
- package/es/utils/core.d.ts +13 -33
- package/es/utils/core.js +19 -39
- package/es/utils/menu-util.js +24 -2
- package/es/utils/message.js +1 -1
- package/es/utils/theme-util.d.ts +1 -1
- package/es/utils/theme-util.js +10 -10
- package/lib/components.d.ts +3 -0
- package/lib/components.js +92 -86
- package/lib/ele-alert/index.d.ts +62 -0
- package/lib/ele-alert/index.js +128 -0
- package/lib/ele-alert/props.d.ts +36 -0
- package/lib/ele-alert/props.js +48 -0
- package/lib/ele-alert/style/css-var.scss +11 -0
- package/lib/ele-alert/style/index.js +2 -0
- package/lib/ele-alert/style/index.scss +148 -0
- package/lib/ele-app/index.d.ts +1 -0
- package/lib/ele-app/style/common.scss +124 -30
- package/lib/ele-app/style/css-var.scss +2 -2
- package/lib/ele-app/types/index.d.ts +27 -0
- package/lib/ele-avatar-group/index.d.ts +3 -0
- package/lib/ele-avatar-group/index.js +10 -9
- package/lib/ele-avatar-group/props.d.ts +1 -0
- package/lib/ele-avatar-group/props.js +3 -1
- package/lib/ele-avatar-group/style/index.scss +32 -0
- package/lib/ele-basic-select/index.d.ts +2 -19171
- package/lib/ele-basic-select/index.js +3 -3
- package/lib/ele-bottom-bar/style/index.scss +1 -1
- package/lib/ele-breadcrumb/index.d.ts +2 -165
- package/lib/ele-card/style/index.scss +28 -26
- package/lib/ele-config-provider/index.d.ts +3 -7
- package/lib/ele-config-provider/index.js +11 -18
- package/lib/ele-config-provider/props.d.ts +9 -2
- package/lib/ele-config-provider/props.js +5 -3
- package/{es/ele-config-provider/use-receiver.d.ts → lib/ele-config-provider/receiver.d.ts} +8 -2
- package/lib/ele-config-provider/receiver.js +200 -0
- package/lib/ele-config-provider/types/index.d.ts +24 -13
- package/lib/ele-cropper/components/cropper-tools.js +2 -2
- package/lib/ele-cropper/index.d.ts +12 -9
- package/lib/ele-cropper/index.js +31 -32
- package/lib/ele-cropper/props.d.ts +3 -4
- package/lib/ele-cropper/style/index.js +1 -1
- package/lib/ele-cropper/types/index.d.ts +10 -2
- package/lib/ele-cropper-modal/index.d.ts +6 -6
- package/lib/ele-cropper-modal/index.js +2 -2
- package/lib/ele-cropper-modal/props.d.ts +2 -2
- package/lib/ele-dashboard/index.js +2 -2
- package/lib/ele-drawer/index.d.ts +2 -355
- package/lib/ele-drawer/index.js +1 -1
- package/lib/ele-edit-tag/index.d.ts +2 -804
- package/lib/ele-edit-tag/index.js +2 -3
- package/lib/ele-ellipsis/index.d.ts +6 -3
- package/lib/ele-ellipsis/index.js +15 -22
- package/lib/ele-ellipsis/props.d.ts +1 -0
- package/lib/ele-file-list/components/file-grid-item.d.ts +5 -24370
- package/lib/ele-file-list/components/file-grid-item.js +8 -1
- package/lib/ele-file-list/components/file-grid.d.ts +4 -2
- package/lib/ele-file-list/components/file-table-item.d.ts +5 -24370
- package/lib/ele-file-list/components/file-table-item.js +8 -1
- package/lib/ele-file-list/components/file-table.d.ts +4 -2
- package/lib/ele-file-list/index.d.ts +2 -1561
- package/lib/ele-file-list/index.js +27 -17
- package/lib/ele-file-list/style/index.scss +0 -1
- package/lib/ele-icon-select/components/icon-grid.d.ts +5 -1
- package/lib/ele-icon-select/components/icon-grid.js +23 -13
- package/lib/ele-icon-select/components/icon-popper.d.ts +15 -1
- package/lib/ele-icon-select/components/icon-popper.js +51 -40
- package/lib/ele-icon-select/index.d.ts +14 -0
- package/lib/ele-icon-select/index.js +10 -3
- package/lib/ele-icon-select/props.d.ts +8 -1
- package/lib/ele-icon-select/props.js +14 -0
- package/lib/ele-icon-select/style/index.scss +142 -140
- package/lib/ele-map-picker/components/map-view.js +4 -5
- package/lib/ele-map-picker/index.d.ts +6 -1
- package/lib/ele-map-picker/index.js +14 -26
- package/lib/ele-map-picker/props.d.ts +10 -4
- package/lib/ele-map-picker/props.js +9 -7
- package/lib/ele-map-picker/style/index.scss +1 -0
- package/lib/ele-menus/index.d.ts +2 -156
- package/lib/ele-menus/index.js +11 -20
- package/lib/ele-menus/props.d.ts +6 -0
- package/lib/ele-menus/props.js +2 -0
- package/lib/ele-menus/style/index.scss +12 -5
- package/lib/ele-modal/index.d.ts +7 -903
- package/lib/ele-modal/index.js +63 -74
- package/lib/ele-modal/props.d.ts +10 -0
- package/lib/ele-modal/props.js +4 -0
- package/lib/ele-modal/style/index.scss +1 -1
- package/lib/ele-modal/util.d.ts +3 -3
- package/lib/ele-modal/util.js +8 -7
- package/lib/ele-page/index.d.ts +8 -2
- package/lib/ele-page/props.d.ts +4 -1
- package/lib/ele-page/props.js +4 -1
- package/lib/ele-pagination/index.d.ts +6 -6
- package/lib/ele-pagination/props.d.ts +3 -3
- package/lib/ele-printer/index.d.ts +37 -0
- package/lib/ele-printer/index.js +118 -0
- package/lib/ele-printer/props.d.ts +25 -0
- package/lib/ele-printer/props.js +32 -0
- package/lib/ele-printer/style/index.js +2 -0
- package/lib/ele-printer/style/index.scss +56 -0
- package/lib/ele-printer/types/index.d.ts +40 -0
- package/lib/ele-printer/util.d.ts +39 -0
- package/lib/ele-printer/util.js +174 -0
- package/lib/ele-pro-layout/components/pro-iframe.d.ts +29 -0
- package/lib/ele-pro-layout/components/pro-iframe.js +115 -0
- package/lib/ele-pro-layout/components/pro-sidebar.d.ts +3 -9
- package/lib/ele-pro-layout/components/pro-sidebar.js +17 -7
- package/lib/ele-pro-layout/components/pro-sidebox.d.ts +2 -1
- package/lib/ele-pro-layout/components/pro-sidebox.js +17 -3
- package/lib/ele-pro-layout/components/{pro-tab-bar.d.ts → pro-tabs.d.ts} +3 -2
- package/lib/ele-pro-layout/components/{pro-tab-bar.js → pro-tabs.js} +4 -3
- package/lib/ele-pro-layout/index.js +65 -102
- package/lib/ele-pro-layout/props.d.ts +6 -4
- package/lib/ele-pro-layout/props.js +9 -8
- package/lib/ele-pro-layout/style/collapse.scss +60 -42
- package/lib/ele-pro-layout/style/css-var.scss +3 -1
- package/lib/ele-pro-layout/style/header.scss +8 -3
- package/lib/ele-pro-layout/style/layout-mobile.scss +1 -1
- package/lib/ele-pro-layout/style/layout-style.scss +9 -4
- package/lib/ele-pro-layout/style/layout.scss +14 -1
- package/lib/ele-pro-layout/style/sidebar.scss +21 -6
- package/lib/ele-pro-layout/style/tabs.scss +3 -26
- package/lib/ele-pro-layout/types/index.d.ts +23 -18
- package/lib/ele-pro-layout/util.d.ts +8 -12
- package/lib/ele-pro-layout/util.js +72 -20
- package/lib/ele-pro-table/components/table-tools.d.ts +2 -2
- package/lib/ele-pro-table/components/table-tools.js +2 -2
- package/lib/ele-pro-table/components/table-view.d.ts +51 -618
- package/lib/ele-pro-table/components/table-view.js +11 -24
- package/lib/ele-pro-table/index.d.ts +81 -1674
- package/lib/ele-pro-table/index.js +125 -164
- package/lib/ele-pro-table/props.d.ts +133 -25
- package/lib/ele-pro-table/props.js +35 -29
- package/lib/ele-pro-table/style/index.scss +96 -57
- package/lib/ele-pro-table/types/index.d.ts +24 -4
- package/lib/ele-pro-table/util.d.ts +27 -10
- package/lib/ele-pro-table/util.js +48 -12
- package/lib/ele-segmented/index.d.ts +33 -0
- package/lib/ele-segmented/index.js +76 -0
- package/lib/ele-segmented/props.d.ts +23 -0
- package/lib/ele-segmented/props.js +25 -0
- package/lib/ele-segmented/style/css-var.scss +15 -0
- package/lib/ele-segmented/style/index.js +5 -0
- package/lib/ele-segmented/style/index.scss +102 -0
- package/lib/ele-segmented/types/index.d.ts +25 -0
- package/lib/ele-split-panel/index.d.ts +7 -8
- package/lib/ele-split-panel/index.js +10 -15
- package/lib/ele-split-panel/style/index.scss +26 -25
- package/lib/ele-steps/index.d.ts +13 -1
- package/lib/ele-steps/index.js +13 -13
- package/lib/ele-steps/style/index.scss +24 -9
- package/lib/ele-table/style/index.scss +1 -0
- package/lib/ele-table-select/index.js +2 -2
- package/lib/ele-table-select/types/index.d.ts +7 -0
- package/lib/ele-tabs/components/tab-title.d.ts +5 -4
- package/lib/ele-tabs/index.d.ts +17 -269
- package/lib/ele-tabs/index.js +21 -28
- package/lib/ele-tabs/props.d.ts +10 -2
- package/lib/ele-tabs/props.js +4 -0
- package/lib/ele-tabs/style/css-var.scss +7 -7
- package/lib/ele-tabs/style/index.scss +4 -3
- package/lib/ele-tabs/types/index.d.ts +1 -5
- package/lib/ele-text/index.d.ts +2 -0
- package/lib/ele-text/index.js +6 -4
- package/lib/ele-text/props.d.ts +7 -1
- package/lib/ele-text/props.js +5 -1
- package/lib/ele-toolbar/index.d.ts +15 -2
- package/lib/ele-toolbar/index.js +17 -17
- package/lib/ele-toolbar/props.d.ts +8 -2
- package/lib/ele-toolbar/props.js +10 -1
- package/lib/ele-toolbar/style/index.scss +2 -17
- package/lib/ele-tour/index.d.ts +10 -20739
- package/lib/ele-tour/index.js +9 -10
- package/lib/ele-tour/style/index.scss +4 -4
- package/lib/ele-tour/util.js +1 -0
- package/lib/ele-upload-list/components/list-item.d.ts +9 -6
- package/lib/ele-upload-list/components/list-item.js +20 -23
- package/lib/ele-upload-list/index.d.ts +14 -733
- package/lib/ele-upload-list/index.js +16 -16
- package/lib/ele-upload-list/props.d.ts +5 -0
- package/lib/ele-upload-list/props.js +8 -1
- package/lib/ele-upload-list/style/index.scss +15 -5
- package/lib/ele-upload-list/types/index.d.ts +1 -1
- package/lib/ele-watermark/index.js +2 -2
- package/lib/ele-watermark/util.js +8 -10
- package/lib/ele-xg-player/index.d.ts +1 -1
- package/lib/ele-xg-player/index.js +21 -15
- package/lib/icons/ArrowDown.js +1 -1
- package/lib/icons/ArrowLeft.d.ts +2 -0
- package/lib/icons/ArrowLeft.js +29 -0
- package/lib/icons/ArrowUp.d.ts +2 -0
- package/lib/icons/ArrowUp.js +30 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/index.js +4 -0
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -16
- package/lib/lang/en_US.js +2 -2
- package/lib/lang/zh_CN.js +1 -1
- package/lib/lang/zh_TW.js +1 -1
- package/lib/style/index.scss +3 -0
- package/lib/style/themes/dark-css-var.scss +7 -3
- package/lib/style/themes/dark.scss +1 -1
- package/lib/style/themes/default.scss +75 -12
- package/lib/utils/core.d.ts +13 -33
- package/lib/utils/core.js +19 -39
- package/lib/utils/menu-util.js +24 -2
- package/lib/utils/message.js +1 -1
- package/lib/utils/theme-util.d.ts +1 -1
- package/lib/utils/theme-util.js +10 -10
- package/package.json +19 -18
- package/typings/global.d.ts +3 -1
- package/es/ele-config-provider/keys.d.ts +0 -8
- package/es/ele-config-provider/keys.js +0 -6
- package/es/ele-config-provider/use-receiver.js +0 -38
- package/es/utils/iframe-component.d.ts +0 -8
- package/es/utils/iframe-component.js +0 -70
- package/es/utils/license-util.d.ts +0 -9
- package/es/utils/license-util.js +0 -176
- package/es/utils/printer.d.ts +0 -100
- package/es/utils/printer.js +0 -612
- package/lib/ele-config-provider/keys.d.ts +0 -8
- package/lib/ele-config-provider/keys.js +0 -6
- package/lib/ele-config-provider/use-receiver.js +0 -38
- package/lib/utils/iframe-component.d.ts +0 -8
- package/lib/utils/iframe-component.js +0 -70
- package/lib/utils/license-util.d.ts +0 -9
- package/lib/utils/license-util.js +0 -176
- package/lib/utils/printer.d.ts +0 -100
- package/lib/utils/printer.js +0 -612
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const printerProps = {
|
|
4
|
+
// 是否打印
|
|
5
|
+
modelValue: Boolean,
|
|
6
|
+
// 页眉样式
|
|
7
|
+
headerStyle: Object,
|
|
8
|
+
// 内容样式
|
|
9
|
+
bodyStyle: Object,
|
|
10
|
+
// 页脚样式
|
|
11
|
+
footerStyle: Object,
|
|
12
|
+
// 标题
|
|
13
|
+
title: String,
|
|
14
|
+
// 页间距
|
|
15
|
+
margin: [String, Number],
|
|
16
|
+
// 纸张方向
|
|
17
|
+
direction: String,
|
|
18
|
+
// 纸张旋转
|
|
19
|
+
orientation: String,
|
|
20
|
+
// 打印位置
|
|
21
|
+
target: String,
|
|
22
|
+
// 是否显示在文档流中
|
|
23
|
+
static: Boolean
|
|
24
|
+
};
|
|
25
|
+
const printerEmits = {
|
|
26
|
+
// 更新打印状态
|
|
27
|
+
"update:modelValue": (_value) => true,
|
|
28
|
+
// 打印完成的事件
|
|
29
|
+
done: () => true
|
|
30
|
+
};
|
|
31
|
+
exports.printerEmits = printerEmits;
|
|
32
|
+
exports.printerProps = printerProps;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* 打印容器 */
|
|
2
|
+
#ele-printer-container {
|
|
3
|
+
pointer-events: none;
|
|
4
|
+
display: none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* 页眉页脚 */
|
|
8
|
+
.ele-printer {
|
|
9
|
+
width: 100%;
|
|
10
|
+
border-spacing: 0;
|
|
11
|
+
border-collapse: collapse;
|
|
12
|
+
table-layout: fixed;
|
|
13
|
+
|
|
14
|
+
td {
|
|
15
|
+
padding: 0;
|
|
16
|
+
border: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:not(.is-open, .is-static) {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ele-printer-header,
|
|
24
|
+
.ele-printer-footer {
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:not(.is-open) .ele-printer-header,
|
|
31
|
+
&:not(.is-open) .ele-printer-footer {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ele-printer-body {
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* 打印状态 */
|
|
41
|
+
html.ele-printing > body {
|
|
42
|
+
color: #000;
|
|
43
|
+
background: #fff;
|
|
44
|
+
|
|
45
|
+
& > * {
|
|
46
|
+
display: none !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#ele-printer-container {
|
|
50
|
+
display: block !important;
|
|
51
|
+
|
|
52
|
+
* {
|
|
53
|
+
pointer-events: none !important;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 纸张方向
|
|
3
|
+
*/
|
|
4
|
+
export type PrintDirection = 'landscape' | 'portrait';
|
|
5
|
+
/**
|
|
6
|
+
* 纸张旋转
|
|
7
|
+
*/
|
|
8
|
+
export type PrintOrientation = 'upright' | 'rotate-left' | 'rotate-right';
|
|
9
|
+
/**
|
|
10
|
+
* 打印位置
|
|
11
|
+
*/
|
|
12
|
+
export type PrintTarget = '_self' | '_blank' | '_iframe';
|
|
13
|
+
/**
|
|
14
|
+
* 打印参数
|
|
15
|
+
*/
|
|
16
|
+
export interface PrintOption {
|
|
17
|
+
/** id */
|
|
18
|
+
printId: string;
|
|
19
|
+
/** 页面标题 */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** 页间距 */
|
|
22
|
+
margin?: string | number;
|
|
23
|
+
/** 纸张方向 */
|
|
24
|
+
direction?: string | null;
|
|
25
|
+
/** 纸张旋转 */
|
|
26
|
+
orientation?: string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* pdf 打印参数
|
|
30
|
+
*/
|
|
31
|
+
export interface PrintPdfOption {
|
|
32
|
+
/** pdf 链接地址 */
|
|
33
|
+
url?: string;
|
|
34
|
+
/** 直接指定 arraybuffer 数据 */
|
|
35
|
+
arraybuffer?: ArrayBuffer;
|
|
36
|
+
/** 打印完成的回调 */
|
|
37
|
+
done?: () => void;
|
|
38
|
+
/** 错误回调 */
|
|
39
|
+
error?: (status: number, result: string) => void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { PrintOption, PrintPdfOption } from './types';
|
|
2
|
+
export declare const printContainerId = "ele-printer-container";
|
|
3
|
+
export declare const printFrameId = "ele-printer-iframe";
|
|
4
|
+
export declare const printingClass = "ele-printing";
|
|
5
|
+
/**
|
|
6
|
+
* 创建并获取打印容器
|
|
7
|
+
*/
|
|
8
|
+
export declare function getPrintContainer(): Element;
|
|
9
|
+
/**
|
|
10
|
+
* 打印
|
|
11
|
+
*/
|
|
12
|
+
export declare function doPrint(option: PrintOption): void;
|
|
13
|
+
/**
|
|
14
|
+
* 在子窗口中打印
|
|
15
|
+
*/
|
|
16
|
+
export declare function doPrintOnFrame(opt: PrintOption): Window | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* 创建并获取打印子窗口
|
|
19
|
+
*/
|
|
20
|
+
export declare function getPrintFrame(): HTMLIFrameElement;
|
|
21
|
+
/**
|
|
22
|
+
* 移除打印子窗口
|
|
23
|
+
*/
|
|
24
|
+
export declare function removePrintFrame(): void;
|
|
25
|
+
/**
|
|
26
|
+
* 生成打印设置的样式
|
|
27
|
+
*/
|
|
28
|
+
export declare function getOptionCss(opt: PrintOption): string;
|
|
29
|
+
/**
|
|
30
|
+
* usePrinter
|
|
31
|
+
*/
|
|
32
|
+
export declare function usePrinter(done: () => void): {
|
|
33
|
+
printId: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 打印 pdf
|
|
37
|
+
* @param option 打印参数
|
|
38
|
+
*/
|
|
39
|
+
export declare function printPdf(option: PrintPdfOption): void;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const core = require("../utils/core");
|
|
5
|
+
const printContainerId = "ele-printer-container";
|
|
6
|
+
const printFrameId = "ele-printer-iframe";
|
|
7
|
+
const printingClass = "ele-printing";
|
|
8
|
+
function getPrintContainer() {
|
|
9
|
+
const container = document.getElementById(printContainerId);
|
|
10
|
+
if (container) {
|
|
11
|
+
return container;
|
|
12
|
+
}
|
|
13
|
+
const elem = document.createElement("div");
|
|
14
|
+
elem.id = printContainerId;
|
|
15
|
+
document.body.appendChild(elem);
|
|
16
|
+
return elem;
|
|
17
|
+
}
|
|
18
|
+
function doPrint(option) {
|
|
19
|
+
const $html = document.querySelector("html");
|
|
20
|
+
if ($html) {
|
|
21
|
+
$html.classList.add(printingClass);
|
|
22
|
+
const elem = document.createElement("style");
|
|
23
|
+
elem.setAttribute("type", "text/css");
|
|
24
|
+
elem.setAttribute("media", "print");
|
|
25
|
+
elem.innerHTML = getOptionCss(option);
|
|
26
|
+
document.body.appendChild(elem);
|
|
27
|
+
const title = document.title;
|
|
28
|
+
if (option.title != null && option.title !== "") {
|
|
29
|
+
document.title = option.title;
|
|
30
|
+
}
|
|
31
|
+
window.print();
|
|
32
|
+
$html.classList.remove(printingClass);
|
|
33
|
+
document.body.removeChild(elem);
|
|
34
|
+
if (option.title != null) {
|
|
35
|
+
document.title = title;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function doPrintOnFrame(opt) {
|
|
40
|
+
var _a;
|
|
41
|
+
const pFrame = getPrintFrame();
|
|
42
|
+
const pWin = pFrame.contentWindow;
|
|
43
|
+
if (!pWin) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
pWin.focus();
|
|
47
|
+
const pDoc = pFrame.contentDocument || pWin.document;
|
|
48
|
+
if (!pDoc) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const container = getPrintContainer();
|
|
52
|
+
Array.from(
|
|
53
|
+
container.querySelectorAll('input[type="text"], input[type="number"]')
|
|
54
|
+
).forEach((el) => {
|
|
55
|
+
el.setAttribute("value", el.value);
|
|
56
|
+
});
|
|
57
|
+
pDoc.open();
|
|
58
|
+
const optHtml = `
|
|
59
|
+
<style type="text/css" media="print">
|
|
60
|
+
${getOptionCss(opt)}
|
|
61
|
+
</style>
|
|
62
|
+
<script>
|
|
63
|
+
const $html = document.querySelector('html');
|
|
64
|
+
if($html && $html.classList && $html.classList.add) {
|
|
65
|
+
$html.classList.add('${printingClass}');
|
|
66
|
+
}
|
|
67
|
+
window.onload = function() {
|
|
68
|
+
if(${opt.title == null ? 0 : 1}) {
|
|
69
|
+
document.title = '${opt.title}';
|
|
70
|
+
}
|
|
71
|
+
window.print();
|
|
72
|
+
window.parent.postMessage('elePrintDone_${opt.printId}', '*');
|
|
73
|
+
};
|
|
74
|
+
<\/script>
|
|
75
|
+
`;
|
|
76
|
+
const html = ((_a = document.querySelector("html")) == null ? void 0 : _a.outerHTML) || "";
|
|
77
|
+
const content = html.replace(/<script/g, '<pre style="display:none;" ').replace(/<\/script>/g, "</pre>").replace(/<\/html>/, `${optHtml}</html>`);
|
|
78
|
+
pDoc.write("<!DOCTYPE html>" + content);
|
|
79
|
+
pDoc.close();
|
|
80
|
+
return pWin;
|
|
81
|
+
}
|
|
82
|
+
function getPrintFrame() {
|
|
83
|
+
removePrintFrame();
|
|
84
|
+
const elem = document.createElement("iframe");
|
|
85
|
+
elem.id = printFrameId;
|
|
86
|
+
elem.style.width = "0px";
|
|
87
|
+
elem.style.height = "0px";
|
|
88
|
+
elem.style.position = "fixed";
|
|
89
|
+
elem.style.visibility = "hidden";
|
|
90
|
+
document.body.appendChild(elem);
|
|
91
|
+
elem.focus();
|
|
92
|
+
return elem;
|
|
93
|
+
}
|
|
94
|
+
function removePrintFrame() {
|
|
95
|
+
const pFrame = document.getElementById(printFrameId);
|
|
96
|
+
if (pFrame && pFrame.parentNode) {
|
|
97
|
+
pFrame.parentNode.removeChild(pFrame);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function getOptionCss(opt) {
|
|
101
|
+
const css = ["@page {"];
|
|
102
|
+
if (opt.margin != null && opt.margin !== "") {
|
|
103
|
+
const v = typeof opt.margin === "number" ? opt.margin + "px" : opt.margin;
|
|
104
|
+
css.push(`margin: ${v};`);
|
|
105
|
+
}
|
|
106
|
+
if (opt.direction != null && opt.direction !== "") {
|
|
107
|
+
css.push(`size: ${opt.direction};`);
|
|
108
|
+
}
|
|
109
|
+
if (opt.orientation != null && opt.orientation !== "") {
|
|
110
|
+
css.push(`page-orientation: ${opt.orientation};`);
|
|
111
|
+
}
|
|
112
|
+
css.push("}");
|
|
113
|
+
return css.join(" ");
|
|
114
|
+
}
|
|
115
|
+
function usePrinter(done) {
|
|
116
|
+
const printId = core.uuid(8);
|
|
117
|
+
const onMessage = (e) => {
|
|
118
|
+
if (e.data === "elePrintDone_" + printId) {
|
|
119
|
+
removePrintFrame();
|
|
120
|
+
done && done();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
window.addEventListener("message", onMessage);
|
|
124
|
+
vue.onBeforeUnmount(() => {
|
|
125
|
+
window.removeEventListener("message", onMessage);
|
|
126
|
+
});
|
|
127
|
+
return { printId };
|
|
128
|
+
}
|
|
129
|
+
function printPdf(option) {
|
|
130
|
+
const pFrame = getPrintFrame();
|
|
131
|
+
pFrame.onload = () => {
|
|
132
|
+
if (!!pFrame.getAttribute("src")) {
|
|
133
|
+
pFrame.focus();
|
|
134
|
+
pFrame.contentWindow && pFrame.contentWindow.print();
|
|
135
|
+
option.done && option.done();
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const doPrint2 = (buffer) => {
|
|
139
|
+
const blob = new window.Blob([buffer], { type: "application/pdf" });
|
|
140
|
+
if (window.navigator && window.navigator["msSaveOrOpenBlob"]) {
|
|
141
|
+
window.navigator["msSaveOrOpenBlob"](blob, "print.pdf");
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
pFrame.setAttribute("src", window.URL.createObjectURL(blob));
|
|
145
|
+
};
|
|
146
|
+
if (option.arraybuffer) {
|
|
147
|
+
doPrint2(option.arraybuffer);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (option.url) {
|
|
151
|
+
const req = new window.XMLHttpRequest();
|
|
152
|
+
req.open("GET", option.url, true);
|
|
153
|
+
req.responseType = "arraybuffer";
|
|
154
|
+
req.onload = () => {
|
|
155
|
+
if ([200, 201].indexOf(req.status) !== -1) {
|
|
156
|
+
doPrint2(req.response);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
option.error && option.error(req.status, req.statusText);
|
|
160
|
+
};
|
|
161
|
+
req.send();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.doPrint = doPrint;
|
|
165
|
+
exports.doPrintOnFrame = doPrintOnFrame;
|
|
166
|
+
exports.getOptionCss = getOptionCss;
|
|
167
|
+
exports.getPrintContainer = getPrintContainer;
|
|
168
|
+
exports.getPrintFrame = getPrintFrame;
|
|
169
|
+
exports.printContainerId = printContainerId;
|
|
170
|
+
exports.printFrameId = printFrameId;
|
|
171
|
+
exports.printPdf = printPdf;
|
|
172
|
+
exports.printingClass = printingClass;
|
|
173
|
+
exports.removePrintFrame = removePrintFrame;
|
|
174
|
+
exports.usePrinter = usePrinter;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { TabItem, IframeItem } from '../types';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
keepAlive: BooleanConstructor;
|
|
5
|
+
transitionName: StringConstructor;
|
|
6
|
+
transitionDelay: NumberConstructor;
|
|
7
|
+
tabData: {
|
|
8
|
+
type: PropType<TabItem[]>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
tabActive: StringConstructor;
|
|
12
|
+
}, {
|
|
13
|
+
active: import("vue").Ref<string | null | undefined>;
|
|
14
|
+
visible: import("vue").Ref<boolean>;
|
|
15
|
+
data: import("vue").ComputedRef<IframeItem[]>;
|
|
16
|
+
onAfterLeave: (delay?: number) => void;
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
keepAlive: BooleanConstructor;
|
|
19
|
+
transitionName: StringConstructor;
|
|
20
|
+
transitionDelay: NumberConstructor;
|
|
21
|
+
tabData: {
|
|
22
|
+
type: PropType<TabItem[]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
tabActive: StringConstructor;
|
|
26
|
+
}>>, {
|
|
27
|
+
keepAlive: boolean;
|
|
28
|
+
}, {}>;
|
|
29
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const _sfc_main = vue.defineComponent({
|
|
4
|
+
name: "ProIframe",
|
|
5
|
+
props: {
|
|
6
|
+
// 是否支持内链缓存
|
|
7
|
+
keepAlive: Boolean,
|
|
8
|
+
// 内链切换动画
|
|
9
|
+
transitionName: String,
|
|
10
|
+
// 内链进入动画延迟时间
|
|
11
|
+
transitionDelay: Number,
|
|
12
|
+
// 页签数据
|
|
13
|
+
tabData: {
|
|
14
|
+
type: Array,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
// 页签选中
|
|
18
|
+
tabActive: String
|
|
19
|
+
},
|
|
20
|
+
setup(props) {
|
|
21
|
+
const state = { timer: null };
|
|
22
|
+
const visible = vue.ref(false);
|
|
23
|
+
const active = vue.ref(null);
|
|
24
|
+
const data = vue.computed(() => {
|
|
25
|
+
const result = [];
|
|
26
|
+
props.tabData.forEach((t) => {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
const isAlive = ((_a = t.meta) == null ? void 0 : _a.keepAlive) !== false;
|
|
29
|
+
if (t.key && ((_b = t.meta) == null ? void 0 : _b.iframe) && !t.refresh && isAlive) {
|
|
30
|
+
result.push({ id: t.key, src: t.meta.iframe });
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return result;
|
|
34
|
+
});
|
|
35
|
+
const onAfterLeave = (delay) => {
|
|
36
|
+
if (props.tabActive && data.value.length && data.value.some((d) => d.id === props.tabActive)) {
|
|
37
|
+
if (delay) {
|
|
38
|
+
state.timer = setTimeout(() => {
|
|
39
|
+
visible.value = true;
|
|
40
|
+
vue.nextTick(() => {
|
|
41
|
+
active.value = props.tabActive;
|
|
42
|
+
});
|
|
43
|
+
}, delay);
|
|
44
|
+
} else {
|
|
45
|
+
visible.value = true;
|
|
46
|
+
vue.nextTick(() => {
|
|
47
|
+
active.value = props.tabActive;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
visible.value = false;
|
|
52
|
+
active.value = null;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const clearTimer = () => {
|
|
56
|
+
if (state.timer) {
|
|
57
|
+
clearTimeout(state.timer);
|
|
58
|
+
state.timer = null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
vue.watch([() => props.tabActive, () => props.tabData], () => {
|
|
62
|
+
clearTimer();
|
|
63
|
+
if (visible.value) {
|
|
64
|
+
active.value = null;
|
|
65
|
+
} else {
|
|
66
|
+
onAfterLeave(props.transitionDelay);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
vue.onBeforeUnmount(() => {
|
|
70
|
+
clearTimer();
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
active,
|
|
74
|
+
visible,
|
|
75
|
+
data,
|
|
76
|
+
onAfterLeave
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
const _export_sfc = (sfc, props) => {
|
|
81
|
+
const target = sfc.__vccOpts || sfc;
|
|
82
|
+
for (const [key, val] of props) {
|
|
83
|
+
target[key] = val;
|
|
84
|
+
}
|
|
85
|
+
return target;
|
|
86
|
+
};
|
|
87
|
+
const _hoisted_1 = { class: "ele-admin-iframe-wrap" };
|
|
88
|
+
const _hoisted_2 = ["id", "src"];
|
|
89
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
90
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
91
|
+
vue.createVNode(vue.TransitionGroup, {
|
|
92
|
+
appear: true,
|
|
93
|
+
name: _ctx.transitionName,
|
|
94
|
+
onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.onAfterLeave())
|
|
95
|
+
}, {
|
|
96
|
+
default: vue.withCtx(() => [
|
|
97
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data, (item) => {
|
|
98
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("iframe", {
|
|
99
|
+
key: item.id,
|
|
100
|
+
id: item.id,
|
|
101
|
+
src: item.src,
|
|
102
|
+
class: "ele-admin-iframe"
|
|
103
|
+
}, null, 8, _hoisted_2)), [
|
|
104
|
+
[vue.vShow, _ctx.active === item.id]
|
|
105
|
+
]);
|
|
106
|
+
}), 128))
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}, 8, ["name"])
|
|
110
|
+
], 512)), [
|
|
111
|
+
[vue.vShow, _ctx.visible]
|
|
112
|
+
]);
|
|
113
|
+
}
|
|
114
|
+
const proIframe = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
115
|
+
module.exports = proIframe;
|
|
@@ -5,10 +5,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
5
5
|
type: PropType<MenuItem[]>;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
|
-
sidebarStyle:
|
|
9
|
-
type: PropType<SidebarStyle>;
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
8
|
+
sidebarStyle: PropType<SidebarStyle>;
|
|
12
9
|
colorfulIcon: BooleanConstructor;
|
|
13
10
|
active: StringConstructor;
|
|
14
11
|
collapse: BooleanConstructor;
|
|
@@ -18,6 +15,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
18
15
|
titleSlot: StringConstructor;
|
|
19
16
|
iconSlot: StringConstructor;
|
|
20
17
|
}, {
|
|
18
|
+
menusRef: import("vue").Ref<HTMLDivElement | null>;
|
|
21
19
|
menuItems: import("vue").ComputedRef<import("../../ele-menus/types").MenuItem[]>;
|
|
22
20
|
onOpen: (index: string, indexPath: string[]) => void;
|
|
23
21
|
onClose: (index: string, indexPath: string[]) => void;
|
|
@@ -29,10 +27,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
29
27
|
type: PropType<MenuItem[]>;
|
|
30
28
|
required: true;
|
|
31
29
|
};
|
|
32
|
-
sidebarStyle:
|
|
33
|
-
type: PropType<SidebarStyle>;
|
|
34
|
-
default: string;
|
|
35
|
-
};
|
|
30
|
+
sidebarStyle: PropType<SidebarStyle>;
|
|
36
31
|
colorfulIcon: BooleanConstructor;
|
|
37
32
|
active: StringConstructor;
|
|
38
33
|
collapse: BooleanConstructor;
|
|
@@ -47,7 +42,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
47
42
|
}, {
|
|
48
43
|
uniqueOpened: boolean;
|
|
49
44
|
collapse: boolean;
|
|
50
|
-
sidebarStyle: SidebarStyle;
|
|
51
45
|
colorfulIcon: boolean;
|
|
52
46
|
}, {}>;
|
|
53
47
|
export default _sfc_main;
|
|
@@ -12,10 +12,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
12
12
|
required: true
|
|
13
13
|
},
|
|
14
14
|
// 侧栏风格
|
|
15
|
-
sidebarStyle:
|
|
16
|
-
type: String,
|
|
17
|
-
default: "dark"
|
|
18
|
-
},
|
|
15
|
+
sidebarStyle: String,
|
|
19
16
|
// 侧栏菜单是否彩色图标
|
|
20
17
|
colorfulIcon: Boolean,
|
|
21
18
|
// 菜单选中
|
|
@@ -38,6 +35,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
38
35
|
close: (_index, _indexPath) => true
|
|
39
36
|
},
|
|
40
37
|
setup(props, { emit }) {
|
|
38
|
+
const { scrollIntoView } = util.useMenuScroll(() => menusRef.value);
|
|
39
|
+
const menusRef = vue.ref(null);
|
|
41
40
|
const menuItems = vue.computed(() => util.getMenuItems(props.menus));
|
|
42
41
|
const onOpen = (index, indexPath) => {
|
|
43
42
|
emit("open", index, indexPath);
|
|
@@ -45,7 +44,15 @@ const _sfc_main = vue.defineComponent({
|
|
|
45
44
|
const onClose = (index, indexPath) => {
|
|
46
45
|
emit("close", index, indexPath);
|
|
47
46
|
};
|
|
48
|
-
|
|
47
|
+
vue.watch(
|
|
48
|
+
() => props.active,
|
|
49
|
+
() => {
|
|
50
|
+
vue.nextTick(() => {
|
|
51
|
+
scrollIntoView();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
return { menusRef, menuItems, onOpen, onClose };
|
|
49
56
|
}
|
|
50
57
|
});
|
|
51
58
|
const _export_sfc = (sfc, props) => {
|
|
@@ -56,7 +63,10 @@ const _export_sfc = (sfc, props) => {
|
|
|
56
63
|
return target;
|
|
57
64
|
};
|
|
58
65
|
const _hoisted_1 = { class: "ele-admin-sidebar" };
|
|
59
|
-
const _hoisted_2 = {
|
|
66
|
+
const _hoisted_2 = {
|
|
67
|
+
ref: "menusRef",
|
|
68
|
+
class: "ele-admin-menus"
|
|
69
|
+
};
|
|
60
70
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
61
71
|
const _component_EleMenus = vue.resolveComponent("EleMenus");
|
|
62
72
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -89,7 +99,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
89
99
|
key: "1"
|
|
90
100
|
} : void 0
|
|
91
101
|
]), 1032, ["items", "theme", "colorful", "collapse", "defaultActive", "defaultOpeneds", "uniqueOpened", "popperEffect", "onOpen", "onClose"])
|
|
92
|
-
]),
|
|
102
|
+
], 512),
|
|
93
103
|
vue.renderSlot(_ctx.$slots, "bottom")
|
|
94
104
|
]);
|
|
95
105
|
}
|
|
@@ -14,6 +14,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
14
14
|
titleSlot: StringConstructor;
|
|
15
15
|
iconSlot: StringConstructor;
|
|
16
16
|
}, {
|
|
17
|
+
menusRef: import("vue").Ref<HTMLDivElement | null>;
|
|
17
18
|
menuItems: import("vue").ComputedRef<import("../../ele-menus/types").MenuItem[]>;
|
|
18
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
20
|
menus: {
|
|
@@ -30,7 +31,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
30
31
|
iconSlot: StringConstructor;
|
|
31
32
|
}>>, {
|
|
32
33
|
collapse: boolean;
|
|
33
|
-
colorfulIcon: boolean;
|
|
34
34
|
compact: boolean;
|
|
35
|
+
colorfulIcon: boolean;
|
|
35
36
|
}, {}>;
|
|
36
37
|
export default _sfc_main;
|
|
@@ -29,7 +29,18 @@ const _sfc_main = vue.defineComponent({
|
|
|
29
29
|
iconSlot: String
|
|
30
30
|
},
|
|
31
31
|
setup(props) {
|
|
32
|
-
|
|
32
|
+
const { scrollIntoView } = util.useMenuScroll(() => menusRef.value);
|
|
33
|
+
const menusRef = vue.ref(null);
|
|
34
|
+
const menuItems = vue.computed(() => util.getMenuItems(props.menus));
|
|
35
|
+
vue.watch(
|
|
36
|
+
() => props.active,
|
|
37
|
+
() => {
|
|
38
|
+
vue.nextTick(() => {
|
|
39
|
+
scrollIntoView();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
return { menusRef, menuItems };
|
|
33
44
|
}
|
|
34
45
|
});
|
|
35
46
|
const _export_sfc = (sfc, props) => {
|
|
@@ -40,7 +51,10 @@ const _export_sfc = (sfc, props) => {
|
|
|
40
51
|
return target;
|
|
41
52
|
};
|
|
42
53
|
const _hoisted_1 = { class: "ele-admin-sidebox" };
|
|
43
|
-
const _hoisted_2 = {
|
|
54
|
+
const _hoisted_2 = {
|
|
55
|
+
ref: "menusRef",
|
|
56
|
+
class: "ele-admin-menus"
|
|
57
|
+
};
|
|
44
58
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
45
59
|
const _component_EleMenus = vue.resolveComponent("EleMenus");
|
|
46
60
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -72,7 +86,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
86
|
key: "1"
|
|
73
87
|
} : void 0
|
|
74
88
|
]), 1032, ["items", "theme", "popupColorful", "collapse", "defaultActive", "popperEffect", "tooltipDisabled"])
|
|
75
|
-
]),
|
|
89
|
+
], 512),
|
|
76
90
|
vue.renderSlot(_ctx.$slots, "boxBottom")
|
|
77
91
|
]);
|
|
78
92
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { TabPaneItem, TabEventOption
|
|
2
|
+
import type { TabPaneItem, TabEventOption } from '../../ele-tabs/types';
|
|
3
|
+
import type { ElDropdownInstance } from '../../ele-app/types';
|
|
3
4
|
import type { TabItem, TabStyle, TabItemEventOption } from '../types';
|
|
4
5
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
5
6
|
tabs: {
|
|
@@ -23,7 +24,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
23
24
|
onTabRemove: (key: string) => void;
|
|
24
25
|
onTabItemClick: (opt: TabEventOption) => void;
|
|
25
26
|
onTabContextMenu: (opt: TabEventOption) => void;
|
|
26
|
-
onTabContextOpen: (ref:
|
|
27
|
+
onTabContextOpen: (ref: ElDropdownInstance) => void;
|
|
27
28
|
onTabSortChange: (data: TabPaneItem[]) => void;
|
|
28
29
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
30
|
tabClick: (_opt: TabItemEventOption) => true;
|
|
@@ -7,7 +7,7 @@ const EleTabTool = require("../../ele-tab-tool/index");
|
|
|
7
7
|
const EleTabWrap = require("../../ele-tab-wrap/index");
|
|
8
8
|
const TabTitle = require("../../ele-tabs/components/tab-title");
|
|
9
9
|
const _sfc_main = vue.defineComponent({
|
|
10
|
-
name: "
|
|
10
|
+
name: "ProTabs",
|
|
11
11
|
components: { ElIcon: elementPlus.ElIcon, House: iconsVue.House, EleTabWrap, EleTabTool, EleTabs, TabTitle },
|
|
12
12
|
props: {
|
|
13
13
|
// 页签数据
|
|
@@ -172,6 +172,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
172
172
|
handleClick: true,
|
|
173
173
|
sortable: _ctx.tabSortable,
|
|
174
174
|
contextMenu: _ctx.tabContextMenu,
|
|
175
|
+
mousewheel: true,
|
|
175
176
|
onTabRemove: _ctx.onTabRemove,
|
|
176
177
|
onTabItemClick: _ctx.onTabItemClick,
|
|
177
178
|
onTabContextMenu: _ctx.onTabContextMenu,
|
|
@@ -198,5 +199,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
198
199
|
_: 3
|
|
199
200
|
}, 8, ["type", "class"]);
|
|
200
201
|
}
|
|
201
|
-
const
|
|
202
|
-
module.exports =
|
|
202
|
+
const proTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
203
|
+
module.exports = proTabs;
|