ele-admin-plus 1.0.0-beta.2 → 1.0.0-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/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 +134 -32
- 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 +58 -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 +7 -5
- 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 +5 -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 +134 -32
- 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 +58 -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 +7 -5
- 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 +5 -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
package/lib/ele-modal/index.js
CHANGED
|
@@ -3,9 +3,8 @@ const vue = require("vue");
|
|
|
3
3
|
const elementPlus = require("element-plus");
|
|
4
4
|
const iconsVue = require("@element-plus/icons-vue");
|
|
5
5
|
const icons = require("../icons");
|
|
6
|
-
const useReceiver = require("../ele-config-provider/use-receiver");
|
|
7
|
-
const licenseUtil = require("../utils/license-util");
|
|
8
6
|
const core = require("../utils/core");
|
|
7
|
+
const receiver = require("../ele-config-provider/receiver");
|
|
9
8
|
const util = require("./util");
|
|
10
9
|
const props = require("./props");
|
|
11
10
|
const _sfc_main = vue.defineComponent({
|
|
@@ -14,48 +13,45 @@ const _sfc_main = vue.defineComponent({
|
|
|
14
13
|
inheritAttrs: false,
|
|
15
14
|
props: props.modalProps,
|
|
16
15
|
emits: props.modalEmits,
|
|
17
|
-
setup(
|
|
18
|
-
const { authenticated } =
|
|
19
|
-
const layoutProvide =
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
const modalRef = vue.ref(null);
|
|
16
|
+
setup(props$1, { emit, attrs }) {
|
|
17
|
+
const { authenticated } = receiver.useLicense();
|
|
18
|
+
const layoutProvide = receiver.useLayoutState();
|
|
19
|
+
const dialogRef = vue.ref(null);
|
|
23
20
|
const container = vue.ref(util.getModalContainer());
|
|
24
|
-
const isFullscreen = vue.ref(
|
|
21
|
+
const isFullscreen = vue.ref(props$1.fullscreen ?? false);
|
|
25
22
|
const isActivated = vue.ref(true);
|
|
23
|
+
const destroyed = vue.ref(false);
|
|
26
24
|
const dialogClass = vue.computed(() => {
|
|
27
25
|
const layoutState = vue.unref(layoutProvide);
|
|
28
26
|
const classes = [util.wrapperClass];
|
|
29
|
-
if (
|
|
27
|
+
if (props$1.responsive ?? layoutState.responsive ?? true) {
|
|
30
28
|
classes.push(util.responsiveClass);
|
|
31
29
|
}
|
|
32
|
-
if (
|
|
30
|
+
if (props$1.form) {
|
|
33
31
|
classes.push("ele-modal-form");
|
|
34
32
|
}
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
classes.push(util.resizableClass + "-" + props2.resizable);
|
|
43
|
-
}
|
|
33
|
+
if (props$1.draggable) {
|
|
34
|
+
classes.push(util.movableClass);
|
|
35
|
+
}
|
|
36
|
+
if (props$1.resizable) {
|
|
37
|
+
classes.push(util.resizableClass);
|
|
38
|
+
if (typeof props$1.resizable === "string") {
|
|
39
|
+
classes.push(util.resizableClass + "-" + props$1.resizable);
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
|
-
if (
|
|
42
|
+
if (props$1.multiple) {
|
|
47
43
|
classes.push(util.multipleClass);
|
|
48
44
|
}
|
|
49
45
|
if (isFullscreen.value) {
|
|
50
46
|
classes.push(util.fullscreenClass);
|
|
51
47
|
}
|
|
52
|
-
if (!
|
|
48
|
+
if (!props$1.modelValue) {
|
|
53
49
|
classes.push(util.closedClass);
|
|
54
50
|
}
|
|
55
|
-
if (!isActivated.value &&
|
|
51
|
+
if (!isActivated.value && props$1.modelValue) {
|
|
56
52
|
classes.push(util.hideClass);
|
|
57
53
|
}
|
|
58
|
-
if (
|
|
54
|
+
if (props$1.inner) {
|
|
59
55
|
classes.push(util.innerClass);
|
|
60
56
|
if (layoutState.collapse && !layoutState.topLayout) {
|
|
61
57
|
classes.push(util.collapseClass);
|
|
@@ -85,17 +81,29 @@ const _sfc_main = vue.defineComponent({
|
|
|
85
81
|
classes.push(util.mobileClass);
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
|
-
if (
|
|
89
|
-
classes.push(
|
|
84
|
+
if (props$1.modalClass) {
|
|
85
|
+
classes.push(props$1.modalClass);
|
|
90
86
|
}
|
|
91
87
|
return classes.join(" ");
|
|
92
88
|
});
|
|
89
|
+
const dialogProps = vue.computed(() => {
|
|
90
|
+
const opt = {
|
|
91
|
+
fullscreen: false,
|
|
92
|
+
modal: props$1.multiple ? false : props$1.modal,
|
|
93
|
+
appendToBody: false,
|
|
94
|
+
showClose: false,
|
|
95
|
+
draggable: false,
|
|
96
|
+
alignCenter: false,
|
|
97
|
+
modalClass: dialogClass.value
|
|
98
|
+
};
|
|
99
|
+
return Object.assign({}, attrs, core.pick(props$1, props.dialogPropKeys), opt);
|
|
100
|
+
});
|
|
93
101
|
const getModalEl = () => {
|
|
94
102
|
var _a, _b;
|
|
95
|
-
return (_b = vue.unref((_a = vue.unref(
|
|
103
|
+
return (_b = vue.unref((_a = vue.unref(dialogRef)) == null ? void 0 : _a.dialogContentRef)) == null ? void 0 : _b.$el;
|
|
96
104
|
};
|
|
97
105
|
const getZIndex = () => {
|
|
98
|
-
return
|
|
106
|
+
return props$1.zIndex ?? 2e3;
|
|
99
107
|
};
|
|
100
108
|
const updateModelValue = (modelValue) => {
|
|
101
109
|
emit("update:modelValue", modelValue);
|
|
@@ -108,26 +116,26 @@ const _sfc_main = vue.defineComponent({
|
|
|
108
116
|
emit("update:fullscreen", isFullscreen.value);
|
|
109
117
|
};
|
|
110
118
|
const mousedownListener = (event) => {
|
|
111
|
-
util.handleMovable(event,
|
|
112
|
-
util.handleResizable(event,
|
|
119
|
+
util.handleMovable(event, props$1);
|
|
120
|
+
util.handleResizable(event, props$1);
|
|
113
121
|
util.setModalTop(event.currentTarget, getZIndex());
|
|
114
122
|
};
|
|
115
123
|
const onOpen = () => {
|
|
116
|
-
if (
|
|
117
|
-
isFullscreen.value =
|
|
124
|
+
if (props$1.resetOnClose || props$1.destroyOnClose) {
|
|
125
|
+
isFullscreen.value = props$1.fullscreen ?? false;
|
|
118
126
|
}
|
|
119
127
|
vue.nextTick(() => {
|
|
120
128
|
const modalEl = getModalEl();
|
|
121
|
-
if (
|
|
122
|
-
util.resetModalStyle(modalEl,
|
|
129
|
+
if (props$1.resetOnClose) {
|
|
130
|
+
util.resetModalStyle(modalEl, props$1.width, props$1.top);
|
|
123
131
|
}
|
|
124
|
-
if (
|
|
132
|
+
if (props$1.position) {
|
|
125
133
|
util.setInitPosition(
|
|
126
134
|
modalEl,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
135
|
+
props$1.resizable,
|
|
136
|
+
props$1.position,
|
|
137
|
+
props$1.moveOut,
|
|
138
|
+
props$1.resetOnClose
|
|
131
139
|
);
|
|
132
140
|
}
|
|
133
141
|
util.setModalTop(modalEl, getZIndex());
|
|
@@ -158,20 +166,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
158
166
|
emit("closeAutoFocus");
|
|
159
167
|
};
|
|
160
168
|
vue.watch(
|
|
161
|
-
() =>
|
|
169
|
+
() => props$1.fullscreen,
|
|
162
170
|
(fullscreen) => {
|
|
163
171
|
isFullscreen.value = fullscreen ?? false;
|
|
164
172
|
}
|
|
165
173
|
);
|
|
166
174
|
vue.watch(
|
|
167
|
-
() =>
|
|
175
|
+
() => props$1.position,
|
|
168
176
|
(position) => {
|
|
169
|
-
if (position &&
|
|
177
|
+
if (position && props$1.modelValue) {
|
|
170
178
|
util.setInitPosition(
|
|
171
179
|
getModalEl(),
|
|
172
|
-
|
|
180
|
+
props$1.resizable,
|
|
173
181
|
position,
|
|
174
|
-
|
|
182
|
+
props$1.moveOut,
|
|
175
183
|
true
|
|
176
184
|
);
|
|
177
185
|
}
|
|
@@ -184,10 +192,11 @@ const _sfc_main = vue.defineComponent({
|
|
|
184
192
|
isActivated.value = false;
|
|
185
193
|
});
|
|
186
194
|
return {
|
|
187
|
-
|
|
195
|
+
dialogRef,
|
|
188
196
|
container,
|
|
189
197
|
isFullscreen,
|
|
190
|
-
|
|
198
|
+
destroyed,
|
|
199
|
+
dialogProps,
|
|
191
200
|
updateModelValue,
|
|
192
201
|
toggleFullscreen,
|
|
193
202
|
onOpen,
|
|
@@ -215,32 +224,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
215
224
|
const _component_Close = vue.resolveComponent("Close");
|
|
216
225
|
const _component_ElDialog = vue.resolveComponent("ElDialog");
|
|
217
226
|
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
218
|
-
to: _ctx.container,
|
|
219
|
-
disabled: !_ctx.
|
|
227
|
+
to: _ctx.multiple ? _ctx.container : "body",
|
|
228
|
+
disabled: !_ctx.appendToBody
|
|
220
229
|
}, [
|
|
221
|
-
vue.createVNode(_component_ElDialog, vue.mergeProps(_ctx
|
|
222
|
-
ref: "
|
|
223
|
-
modelValue: _ctx.modelValue,
|
|
224
|
-
title: _ctx.title,
|
|
225
|
-
width: _ctx.width,
|
|
226
|
-
fullscreen: false,
|
|
227
|
-
top: _ctx.top,
|
|
228
|
-
modal: _ctx.multiple ? false : _ctx.modal,
|
|
229
|
-
appendToBody: _ctx.multiple ? false : _ctx.appendToBody,
|
|
230
|
-
lockScroll: _ctx.lockScroll,
|
|
231
|
-
openDelay: _ctx.openDelay,
|
|
232
|
-
closeDelay: _ctx.closeDelay,
|
|
233
|
-
closeOnClickModal: _ctx.closeOnClickModal,
|
|
234
|
-
closeOnPressEscape: _ctx.closeOnPressEscape,
|
|
235
|
-
showClose: false,
|
|
236
|
-
beforeClose: _ctx.beforeClose,
|
|
237
|
-
draggable: false,
|
|
238
|
-
center: _ctx.center,
|
|
239
|
-
alignCenter: false,
|
|
240
|
-
destroyOnClose: _ctx.destroyOnClose,
|
|
241
|
-
modalClass: _ctx.dialogClass,
|
|
242
|
-
zIndex: _ctx.zIndex,
|
|
243
|
-
trapFocus: _ctx.trapFocus,
|
|
230
|
+
vue.createVNode(_component_ElDialog, vue.mergeProps(_ctx.dialogProps, {
|
|
231
|
+
ref: "dialogRef",
|
|
244
232
|
"onUpdate:modelValue": _ctx.updateModelValue,
|
|
245
233
|
onOpen: _ctx.onOpen,
|
|
246
234
|
onOpened: _ctx.onOpened,
|
|
@@ -256,7 +244,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
256
244
|
}, [
|
|
257
245
|
vue.createElementVNode("div", {
|
|
258
246
|
id: titleId,
|
|
259
|
-
class: vue.normalizeClass(titleClass)
|
|
247
|
+
class: vue.normalizeClass(titleClass),
|
|
248
|
+
style: vue.normalizeStyle(_ctx.titleStyle)
|
|
260
249
|
}, [
|
|
261
250
|
vue.renderSlot(_ctx.$slots, "header", {
|
|
262
251
|
close,
|
|
@@ -265,7 +254,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
265
254
|
}, () => [
|
|
266
255
|
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
267
256
|
])
|
|
268
|
-
],
|
|
257
|
+
], 14, _hoisted_1),
|
|
269
258
|
_ctx.maxable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
270
259
|
key: 0,
|
|
271
260
|
class: "ele-modal-tool",
|
|
@@ -318,7 +307,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
318
307
|
]),
|
|
319
308
|
key: "0"
|
|
320
309
|
} : void 0
|
|
321
|
-
]), 1040, ["
|
|
310
|
+
]), 1040, ["onUpdate:modelValue", "onOpen", "onOpened", "onClose", "onClosed", "onOpenAutoFocus", "onCloseAutoFocus"])
|
|
322
311
|
], 8, ["to", "disabled"]);
|
|
323
312
|
}
|
|
324
313
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
package/lib/ele-modal/props.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PropType, ExtractPropTypes, CSSProperties } from 'vue';
|
|
2
|
+
import { dialogProps } from 'element-plus';
|
|
2
3
|
import type { Resizable, MoveOut, Position } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* 属性
|
|
@@ -31,6 +32,7 @@ export declare const modalProps: {
|
|
|
31
32
|
default: number;
|
|
32
33
|
};
|
|
33
34
|
headerStyle: PropType<CSSProperties>;
|
|
35
|
+
titleStyle: PropType<CSSProperties>;
|
|
34
36
|
bodyStyle: PropType<CSSProperties>;
|
|
35
37
|
footerStyle: PropType<CSSProperties>;
|
|
36
38
|
responsive: {
|
|
@@ -52,6 +54,9 @@ export declare const modalProps: {
|
|
|
52
54
|
openDelay: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
53
55
|
closeDelay: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
54
56
|
top: {
|
|
57
|
+
/**
|
|
58
|
+
* 弹窗组件属性名
|
|
59
|
+
*/
|
|
55
60
|
readonly type: PropType<string>;
|
|
56
61
|
readonly required: false;
|
|
57
62
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
@@ -99,3 +104,8 @@ export declare const modalEmits: {
|
|
|
99
104
|
openAutoFocus: () => boolean;
|
|
100
105
|
closeAutoFocus: () => boolean;
|
|
101
106
|
};
|
|
107
|
+
export type DialogPropKeys = Array<keyof typeof dialogProps>;
|
|
108
|
+
/**
|
|
109
|
+
* 弹窗组件属性名
|
|
110
|
+
*/
|
|
111
|
+
export declare const dialogPropKeys: DialogPropKeys;
|
package/lib/ele-modal/props.js
CHANGED
|
@@ -40,6 +40,8 @@ const modalProps = {
|
|
|
40
40
|
},
|
|
41
41
|
// 标题栏样式
|
|
42
42
|
headerStyle: Object,
|
|
43
|
+
// 标题样式
|
|
44
|
+
titleStyle: Object,
|
|
43
45
|
// 主体样式
|
|
44
46
|
bodyStyle: Object,
|
|
45
47
|
// 底栏样式
|
|
@@ -57,5 +59,7 @@ const modalEmits = {
|
|
|
57
59
|
// 更新全屏状态
|
|
58
60
|
"update:fullscreen": (_fullscreen) => true
|
|
59
61
|
};
|
|
62
|
+
const dialogPropKeys = Object.keys(elementPlus.dialogProps);
|
|
63
|
+
exports.dialogPropKeys = dialogPropKeys;
|
|
60
64
|
exports.modalEmits = modalEmits;
|
|
61
65
|
exports.modalProps = modalProps;
|
package/lib/ele-modal/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Resizable, Position, MoveOut } from './types';
|
|
2
|
-
import { ModalProps } from './props';
|
|
2
|
+
import type { ModalProps } from './props';
|
|
3
3
|
export declare const wrapperClass = "ele-modal";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const containerId = "ele-modal-container";
|
|
5
5
|
export declare const movableClass = "ele-modal-movable";
|
|
6
6
|
export declare const resizableClass = "ele-modal-resizable";
|
|
7
7
|
export declare const multipleClass = "ele-modal-multiple";
|
|
@@ -20,7 +20,7 @@ export declare const topLayoutClass = "ele-state-top-layout";
|
|
|
20
20
|
export declare const expandedClass = "ele-state-expanded";
|
|
21
21
|
export declare const mobileClass = "ele-state-mobile";
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* 创建并获取弹窗容器
|
|
24
24
|
*/
|
|
25
25
|
export declare function getModalContainer(): Element;
|
|
26
26
|
/**
|
package/lib/ele-modal/util.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const titleClass = "el-dialog__title";
|
|
4
4
|
const headerClass = "el-dialog__header";
|
|
5
5
|
const wrapperClass = "ele-modal";
|
|
6
|
-
const
|
|
6
|
+
const containerId = "ele-modal-container";
|
|
7
7
|
const movableClass = "ele-modal-movable";
|
|
8
8
|
const resizableClass = "ele-modal-resizable";
|
|
9
9
|
const multipleClass = "ele-modal-multiple";
|
|
@@ -32,12 +32,12 @@ function initModalStyle(modalEl, resizable) {
|
|
|
32
32
|
modalEl.style.verticalAlign = "top";
|
|
33
33
|
}
|
|
34
34
|
function getModalContainer() {
|
|
35
|
-
const container = document.
|
|
35
|
+
const container = document.getElementById(containerId);
|
|
36
36
|
if (container) {
|
|
37
37
|
return container;
|
|
38
38
|
}
|
|
39
39
|
const elem = document.createElement("div");
|
|
40
|
-
elem.
|
|
40
|
+
elem.id = containerId;
|
|
41
41
|
document.body.appendChild(elem);
|
|
42
42
|
return elem;
|
|
43
43
|
}
|
|
@@ -253,9 +253,10 @@ function setModalPosition(modalEl, resizable, position, moveOut) {
|
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
255
|
initModalStyle(modalEl, resizable);
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
const
|
|
256
|
+
const canOutB = canMoveOut(moveOut, "bottom");
|
|
257
|
+
const canOutR = canMoveOut(moveOut, "right");
|
|
258
|
+
const maxTop = wrapEl.clientHeight - modalEl.clientHeight - (canOutB ? 0 : 2);
|
|
259
|
+
const maxLeft = wrapEl.clientWidth - modalEl.clientWidth - (canOutR ? 0 : 1);
|
|
259
260
|
if (position === "top") {
|
|
260
261
|
modalEl.style.top = "0px";
|
|
261
262
|
modalEl.style.left = `${maxLeft / 2}px`;
|
|
@@ -306,7 +307,7 @@ function setInitPosition(modalEl, resizable, position, moveOut, force) {
|
|
|
306
307
|
exports.closedClass = closedClass;
|
|
307
308
|
exports.collapseClass = collapseClass;
|
|
308
309
|
exports.compactClass = compactClass;
|
|
309
|
-
exports.
|
|
310
|
+
exports.containerId = containerId;
|
|
310
311
|
exports.expandedClass = expandedClass;
|
|
311
312
|
exports.fullscreenClass = fullscreenClass;
|
|
312
313
|
exports.getCurrentStyle = getCurrentStyle;
|
package/lib/ele-page/index.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
2
|
plain: BooleanConstructor;
|
|
3
|
-
multiCard:
|
|
3
|
+
multiCard: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
4
7
|
flexTable: BooleanConstructor;
|
|
5
8
|
hideFooter: BooleanConstructor;
|
|
6
9
|
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
10
|
plain: BooleanConstructor;
|
|
8
|
-
multiCard:
|
|
11
|
+
multiCard: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
9
15
|
flexTable: BooleanConstructor;
|
|
10
16
|
hideFooter: BooleanConstructor;
|
|
11
17
|
}>>, {
|
package/lib/ele-page/props.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ import type { ExtractPropTypes } from 'vue';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const pageProps: {
|
|
6
6
|
plain: BooleanConstructor;
|
|
7
|
-
multiCard:
|
|
7
|
+
multiCard: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
8
11
|
flexTable: BooleanConstructor;
|
|
9
12
|
hideFooter: BooleanConstructor;
|
|
10
13
|
};
|
package/lib/ele-page/props.js
CHANGED
|
@@ -3,13 +3,13 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
3
3
|
type: import("vue").PropType<import("./types").PaginationType>;
|
|
4
4
|
default: string;
|
|
5
5
|
};
|
|
6
|
-
total: NumberConstructor;
|
|
7
6
|
pageSize: NumberConstructor;
|
|
8
7
|
defaultPageSize: NumberConstructor;
|
|
9
|
-
|
|
10
|
-
defaultCurrentPage: NumberConstructor;
|
|
8
|
+
total: NumberConstructor;
|
|
11
9
|
pageCount: NumberConstructor;
|
|
12
10
|
pagerCount: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
11
|
+
currentPage: NumberConstructor;
|
|
12
|
+
defaultCurrentPage: NumberConstructor;
|
|
13
13
|
layout: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
14
14
|
pageSizes: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | ((new (...args: any[]) => number[]) | (() => number[]))[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
15
15
|
popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
@@ -32,13 +32,13 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
32
32
|
type: import("vue").PropType<import("./types").PaginationType>;
|
|
33
33
|
default: string;
|
|
34
34
|
};
|
|
35
|
-
total: NumberConstructor;
|
|
36
35
|
pageSize: NumberConstructor;
|
|
37
36
|
defaultPageSize: NumberConstructor;
|
|
38
|
-
|
|
39
|
-
defaultCurrentPage: NumberConstructor;
|
|
37
|
+
total: NumberConstructor;
|
|
40
38
|
pageCount: NumberConstructor;
|
|
41
39
|
pagerCount: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
40
|
+
currentPage: NumberConstructor;
|
|
41
|
+
defaultCurrentPage: NumberConstructor;
|
|
42
42
|
layout: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
43
43
|
pageSizes: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | ((new (...args: any[]) => number[]) | (() => number[]))[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
44
44
|
popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
@@ -8,13 +8,13 @@ export declare const paginationProps: {
|
|
|
8
8
|
type: PropType<PaginationType>;
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
|
-
total: NumberConstructor;
|
|
12
11
|
pageSize: NumberConstructor;
|
|
13
12
|
defaultPageSize: NumberConstructor;
|
|
14
|
-
|
|
15
|
-
defaultCurrentPage: NumberConstructor;
|
|
13
|
+
total: NumberConstructor;
|
|
16
14
|
pageCount: NumberConstructor;
|
|
17
15
|
pagerCount: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
16
|
+
currentPage: NumberConstructor;
|
|
17
|
+
defaultCurrentPage: NumberConstructor;
|
|
18
18
|
layout: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
19
19
|
pageSizes: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | ((new (...args: any[]) => number[]) | (() => number[]))[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
20
20
|
popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: BooleanConstructor;
|
|
3
|
+
headerStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
4
|
+
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
5
|
+
footerStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
6
|
+
title: StringConstructor;
|
|
7
|
+
margin: (StringConstructor | NumberConstructor)[];
|
|
8
|
+
direction: import("vue").PropType<import("./types").PrintDirection | null>;
|
|
9
|
+
orientation: import("vue").PropType<import("./types").PrintOrientation | null>;
|
|
10
|
+
target: import("vue").PropType<import("./types").PrintTarget | null>;
|
|
11
|
+
static: BooleanConstructor;
|
|
12
|
+
}, {
|
|
13
|
+
container: import("vue").ShallowRef<Element>;
|
|
14
|
+
visible: import("vue").Ref<boolean>;
|
|
15
|
+
print: () => void;
|
|
16
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
'update:modelValue': (_value: boolean) => boolean;
|
|
18
|
+
done: () => boolean;
|
|
19
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
modelValue: BooleanConstructor;
|
|
21
|
+
headerStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
22
|
+
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
23
|
+
footerStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
24
|
+
title: StringConstructor;
|
|
25
|
+
margin: (StringConstructor | NumberConstructor)[];
|
|
26
|
+
direction: import("vue").PropType<import("./types").PrintDirection | null>;
|
|
27
|
+
orientation: import("vue").PropType<import("./types").PrintOrientation | null>;
|
|
28
|
+
target: import("vue").PropType<import("./types").PrintTarget | null>;
|
|
29
|
+
static: BooleanConstructor;
|
|
30
|
+
}>> & {
|
|
31
|
+
onDone?: (() => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((_value: boolean) => any) | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
modelValue: boolean;
|
|
35
|
+
static: boolean;
|
|
36
|
+
}, {}>;
|
|
37
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const receiver = require("../ele-config-provider/receiver");
|
|
4
|
+
const util = require("./util");
|
|
5
|
+
const props = require("./props");
|
|
6
|
+
const _sfc_main = vue.defineComponent({
|
|
7
|
+
name: "ElePrinter",
|
|
8
|
+
props: props.printerProps,
|
|
9
|
+
emits: props.printerEmits,
|
|
10
|
+
setup(props2, { emit }) {
|
|
11
|
+
const { authenticated } = receiver.useLicense();
|
|
12
|
+
const { printId } = util.usePrinter(() => {
|
|
13
|
+
updateModelValue(false);
|
|
14
|
+
onDone();
|
|
15
|
+
});
|
|
16
|
+
const container = vue.shallowRef(util.getPrintContainer());
|
|
17
|
+
const visible = vue.ref(false);
|
|
18
|
+
const print = () => {
|
|
19
|
+
if (!authenticated.value) {
|
|
20
|
+
updateModelValue(false);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
visible.value = true;
|
|
24
|
+
vue.nextTick(() => {
|
|
25
|
+
const option = {
|
|
26
|
+
printId,
|
|
27
|
+
title: props2.title,
|
|
28
|
+
margin: props2.margin,
|
|
29
|
+
direction: props2.direction,
|
|
30
|
+
orientation: props2.orientation
|
|
31
|
+
};
|
|
32
|
+
if (props2.target === "_iframe") {
|
|
33
|
+
util.doPrintOnFrame(option);
|
|
34
|
+
visible.value = false;
|
|
35
|
+
} else {
|
|
36
|
+
util.doPrint(option);
|
|
37
|
+
visible.value = false;
|
|
38
|
+
updateModelValue(false);
|
|
39
|
+
onDone();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const onDone = () => {
|
|
44
|
+
emit("done");
|
|
45
|
+
};
|
|
46
|
+
const updateModelValue = (value) => {
|
|
47
|
+
emit("update:modelValue", value);
|
|
48
|
+
};
|
|
49
|
+
vue.watch(
|
|
50
|
+
() => props2.modelValue,
|
|
51
|
+
(value) => {
|
|
52
|
+
if (value) {
|
|
53
|
+
print();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{ immediate: true }
|
|
57
|
+
);
|
|
58
|
+
return { container, visible, print };
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const _export_sfc = (sfc, props2) => {
|
|
62
|
+
const target = sfc.__vccOpts || sfc;
|
|
63
|
+
for (const [key, val] of props2) {
|
|
64
|
+
target[key] = val;
|
|
65
|
+
}
|
|
66
|
+
return target;
|
|
67
|
+
};
|
|
68
|
+
const _hoisted_1 = { key: 0 };
|
|
69
|
+
const _hoisted_2 = { key: 1 };
|
|
70
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
71
|
+
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
72
|
+
to: _ctx.container,
|
|
73
|
+
disabled: _ctx.static && !_ctx.visible
|
|
74
|
+
}, [
|
|
75
|
+
vue.createElementVNode("table", {
|
|
76
|
+
class: vue.normalizeClass(["ele-printer", { "is-open": _ctx.visible }, { "is-static": _ctx.static }])
|
|
77
|
+
}, [
|
|
78
|
+
_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_1, [
|
|
79
|
+
vue.createElementVNode("tr", null, [
|
|
80
|
+
vue.createElementVNode("td", null, [
|
|
81
|
+
vue.createElementVNode("div", {
|
|
82
|
+
class: "ele-printer-header",
|
|
83
|
+
style: vue.normalizeStyle(_ctx.headerStyle)
|
|
84
|
+
}, [
|
|
85
|
+
vue.renderSlot(_ctx.$slots, "header")
|
|
86
|
+
], 4)
|
|
87
|
+
])
|
|
88
|
+
])
|
|
89
|
+
])) : vue.createCommentVNode("", true),
|
|
90
|
+
vue.createElementVNode("tbody", null, [
|
|
91
|
+
vue.createElementVNode("tr", null, [
|
|
92
|
+
vue.createElementVNode("td", null, [
|
|
93
|
+
vue.createElementVNode("div", {
|
|
94
|
+
class: "ele-printer-body",
|
|
95
|
+
style: vue.normalizeStyle(_ctx.bodyStyle)
|
|
96
|
+
}, [
|
|
97
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
98
|
+
], 4)
|
|
99
|
+
])
|
|
100
|
+
])
|
|
101
|
+
]),
|
|
102
|
+
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_2, [
|
|
103
|
+
vue.createElementVNode("tr", null, [
|
|
104
|
+
vue.createElementVNode("td", null, [
|
|
105
|
+
vue.createElementVNode("div", {
|
|
106
|
+
class: "ele-printer-footer",
|
|
107
|
+
style: vue.normalizeStyle(_ctx.footerStyle)
|
|
108
|
+
}, [
|
|
109
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
110
|
+
], 4)
|
|
111
|
+
])
|
|
112
|
+
])
|
|
113
|
+
])) : vue.createCommentVNode("", true)
|
|
114
|
+
], 2)
|
|
115
|
+
], 8, ["to", "disabled"]);
|
|
116
|
+
}
|
|
117
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
118
|
+
module.exports = index;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PropType, CSSProperties, ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { PrintDirection, PrintOrientation, PrintTarget } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* 属性
|
|
5
|
+
*/
|
|
6
|
+
export declare const printerProps: {
|
|
7
|
+
modelValue: BooleanConstructor;
|
|
8
|
+
headerStyle: PropType<CSSProperties>;
|
|
9
|
+
bodyStyle: PropType<CSSProperties>;
|
|
10
|
+
footerStyle: PropType<CSSProperties>;
|
|
11
|
+
title: StringConstructor;
|
|
12
|
+
margin: (StringConstructor | NumberConstructor)[];
|
|
13
|
+
direction: PropType<PrintDirection | null>;
|
|
14
|
+
orientation: PropType<PrintOrientation | null>;
|
|
15
|
+
target: PropType<PrintTarget | null>;
|
|
16
|
+
static: BooleanConstructor;
|
|
17
|
+
};
|
|
18
|
+
export type PrinterProps = ExtractPropTypes<typeof printerProps>;
|
|
19
|
+
/**
|
|
20
|
+
* 事件
|
|
21
|
+
*/
|
|
22
|
+
export declare const printerEmits: {
|
|
23
|
+
'update:modelValue': (_value: boolean) => boolean;
|
|
24
|
+
done: () => boolean;
|
|
25
|
+
};
|