ele-admin-plus 1.2.1-beta.2 → 1.2.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ele-admin-layout/index.d.ts +26 -30
- package/es/ele-admin-layout/props.d.ts +11 -10
- package/es/ele-alert/index.d.ts +14 -14
- package/es/ele-alert/props.d.ts +9 -8
- package/es/ele-app/components/message-body.d.ts +5 -4
- package/es/ele-app/components/message-box-icon.d.ts +7 -6
- package/es/ele-app/style/overwrite/input/index.scss +2 -0
- package/es/ele-avatar-group/index.d.ts +15 -14
- package/es/ele-avatar-group/props.d.ts +10 -7
- package/es/ele-basic-select/index.d.ts +17 -14
- package/es/ele-basic-select/index.js +14 -7
- package/es/ele-basic-select/props.d.ts +11 -6
- package/es/ele-basic-select/props.js +3 -1
- package/es/ele-basic-select/util.d.ts +6 -0
- package/es/ele-basic-select/util.js +13 -0
- package/es/ele-bottom-bar/index.d.ts +4 -4
- package/es/ele-bottom-bar/props.d.ts +3 -2
- package/es/ele-breadcrumb/index.d.ts +3 -3
- package/es/ele-breadcrumb/props.d.ts +1 -1
- package/es/ele-card/index.d.ts +14 -14
- package/es/ele-card/props.d.ts +8 -6
- package/es/ele-check-card/components/card-item.d.ts +3 -2
- package/es/ele-check-card/index.d.ts +4 -4
- package/es/ele-check-card/index.js +8 -3
- package/es/ele-check-card/props.d.ts +3 -2
- package/es/ele-config-provider/index.d.ts +4 -4
- package/es/ele-config-provider/props.d.ts +3 -3
- package/es/ele-config-provider/types.d.ts +1 -0
- package/es/ele-copyable/index.d.ts +10 -10
- package/es/ele-copyable/props.d.ts +7 -5
- package/es/ele-count-up/index.d.ts +1 -1
- package/es/ele-cropper/components/cropper-tools.d.ts +4 -3
- package/es/ele-cropper/index.d.ts +3 -3
- package/es/ele-cropper/props.d.ts +2 -1
- package/es/ele-cropper-modal/index.d.ts +4 -4
- package/es/ele-cropper-modal/props.d.ts +1 -4
- package/es/ele-data-table/index.d.ts +22 -22
- package/es/ele-data-table/props.d.ts +16 -16
- package/es/ele-data-table/style/index.scss +1 -1
- package/es/ele-data-table/types.d.ts +2 -0
- package/es/ele-data-table/util.js +5 -1
- package/es/ele-drawer/index.d.ts +14 -14
- package/es/ele-drawer/props.d.ts +11 -10
- package/es/ele-dropdown/index.d.ts +22 -22
- package/es/ele-dropdown/index.js +45 -39
- package/es/ele-dropdown/props.d.ts +13 -12
- package/es/ele-dropdown/types.d.ts +2 -0
- package/es/ele-edit-tag/index.d.ts +21 -19
- package/es/ele-edit-tag/index.js +10 -2
- package/es/ele-edit-tag/props.d.ts +13 -8
- package/es/ele-edit-tag/props.js +3 -1
- package/es/ele-ellipsis/index.d.ts +5 -4
- package/es/ele-ellipsis/props.d.ts +1 -1
- package/es/ele-file-list/index.d.ts +4 -4
- package/es/ele-icon-select/components/icon-grid.d.ts +8 -6
- package/es/ele-icon-select/index.d.ts +37 -36
- package/es/ele-icon-select/index.js +6 -2
- package/es/ele-icon-select/props.d.ts +18 -14
- package/es/ele-icon-select/props.js +2 -0
- package/es/ele-loading/index.d.ts +4 -4
- package/es/ele-loading/props.d.ts +3 -2
- package/es/ele-map-picker/components/map-view.d.ts +26 -28
- package/es/ele-map-picker/components/map-view.js +1 -0
- package/es/ele-map-picker/index.d.ts +10 -10
- package/es/ele-map-picker/props.d.ts +6 -5
- package/es/ele-map-picker/style/index.scss +1 -1
- package/es/ele-menus/index.d.ts +2 -2
- package/es/ele-menus/props.d.ts +1 -1
- package/es/ele-menus/style/index.scss +4 -0
- package/es/ele-modal/index.d.ts +24 -23
- package/es/ele-modal/index.js +30 -64
- package/es/ele-modal/props.d.ts +14 -13
- package/es/ele-modal/util.d.ts +31 -24
- package/es/ele-modal/util.js +235 -132
- package/es/ele-pagination/index.d.ts +18 -6
- package/es/ele-pagination/index.js +3 -2
- package/es/ele-pagination/props.d.ts +8 -2
- package/es/ele-pagination/style/index.scss +70 -0
- package/es/ele-popconfirm/index.d.ts +32 -32
- package/es/ele-popconfirm/props.d.ts +19 -17
- package/es/ele-popover/index.d.ts +22 -22
- package/es/ele-popover/props.d.ts +11 -10
- package/es/ele-printer/index.d.ts +8 -8
- package/es/ele-printer/props.d.ts +6 -5
- package/es/ele-printer/util.d.ts +5 -5
- package/es/ele-printer/util.js +68 -43
- package/es/ele-pro-layout/index.d.ts +43 -47
- package/es/ele-pro-layout/props.d.ts +16 -14
- package/es/ele-pro-table/components/table-tools.d.ts +402 -32
- package/es/ele-pro-table/components/table-tools.js +223 -140
- package/es/ele-pro-table/components/tool-column-list.d.ts +12 -0
- package/es/ele-pro-table/components/tool-column-list.js +33 -6
- package/es/ele-pro-table/components/tool-column.d.ts +8 -7
- package/es/ele-pro-table/components/tool-column.js +11 -5
- package/es/ele-pro-table/components/tool-export.d.ts +33 -30
- package/es/ele-pro-table/components/tool-export.js +204 -184
- package/es/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
- package/es/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
- package/es/ele-pro-table/components/tool-print.d.ts +41 -40
- package/es/ele-pro-table/components/tool-print.js +357 -336
- package/es/ele-pro-table/index.d.ts +1006 -70
- package/es/ele-pro-table/index.js +63 -13
- package/es/ele-pro-table/props.d.ts +17 -18
- package/es/ele-pro-table/props.js +3 -1
- package/es/ele-pro-table/style/index.scss +43 -12
- package/es/ele-pro-table/types.d.ts +54 -0
- package/es/ele-pro-table/util.d.ts +51 -9
- package/es/ele-pro-table/util.js +89 -28
- package/es/ele-qr-code/components/canvas-render.d.ts +67 -0
- package/es/ele-qr-code/components/canvas-render.js +147 -0
- package/es/ele-qr-code/index.d.ts +5 -9
- package/es/ele-qr-code/index.js +33 -136
- package/es/ele-qr-code/props.d.ts +5 -2
- package/es/ele-qr-code/props.js +3 -1
- package/es/ele-qr-code/types.d.ts +5 -0
- package/es/ele-qr-code-svg/index.d.ts +6 -5
- package/es/ele-qr-code-svg/index.js +11 -14
- package/es/ele-segmented/index.js +3 -0
- package/es/ele-split-panel/index.d.ts +7 -7
- package/es/ele-split-panel/props.d.ts +4 -3
- package/es/ele-steps/index.d.ts +2 -2
- package/es/ele-steps/props.d.ts +2 -2
- package/es/ele-table/index.d.ts +2 -2
- package/es/ele-table/props.d.ts +2 -1
- package/es/ele-table-select/index.d.ts +22 -20
- package/es/ele-table-select/index.js +5 -2
- package/es/ele-table-select/props.d.ts +11 -7
- package/es/ele-table-select/props.js +2 -0
- package/es/ele-tabs/index.d.ts +19 -34
- package/es/ele-tabs/index.js +133 -86
- package/es/ele-tabs/props.d.ts +10 -24
- package/es/ele-tabs/props.js +3 -1
- package/es/ele-tabs/style/index.scss +42 -2
- package/es/ele-tabs/types.d.ts +2 -11
- package/es/ele-text/index.d.ts +2 -2
- package/es/ele-text/props.d.ts +2 -1
- package/es/ele-tool/index.d.ts +5 -2
- package/es/ele-tool/index.js +2 -5
- package/es/ele-tool/props.d.ts +4 -1
- package/es/ele-tool/props.js +3 -1
- package/es/ele-tool/style/index.scss +13 -0
- package/es/ele-toolbar/index.d.ts +17 -17
- package/es/ele-toolbar/props.d.ts +4 -3
- package/es/ele-tooltip/index.d.ts +13 -12
- package/es/ele-tooltip/props.d.ts +7 -6
- package/es/ele-tour/index.d.ts +1 -1
- package/es/ele-tree-select/index.d.ts +18 -18
- package/es/ele-tree-select/index.js +5 -2
- package/es/ele-tree-select/props.d.ts +12 -8
- package/es/ele-tree-select/props.js +3 -1
- package/es/ele-upload-list/index.d.ts +7 -9
- package/es/ele-upload-list/props.d.ts +4 -3
- package/es/ele-upload-list/style/index.scss +4 -0
- package/es/ele-virtual-table/components/body-cell.d.ts +11 -27
- package/es/ele-virtual-table/components/body-row.d.ts +13 -29
- package/es/ele-virtual-table/components/cell-checkbox.d.ts +3 -2
- package/es/ele-virtual-table/components/cell-filter.d.ts +6 -6
- package/es/ele-virtual-table/components/footer-row.d.ts +3 -3
- package/es/ele-virtual-table/components/header-cell.d.ts +7 -7
- package/es/ele-virtual-table/components/header-row.d.ts +7 -7
- package/es/ele-virtual-table/index.d.ts +20 -21
- package/es/ele-virtual-table/props.d.ts +11 -11
- package/es/ele-watermark/index.d.ts +5 -4
- package/es/ele-watermark/props.d.ts +2 -1
- package/es/ele-xg-player/index.d.ts +3 -3
- package/es/icons/SizeCompactOutlined.d.ts +2 -0
- package/es/icons/SizeCompactOutlined.js +34 -0
- package/es/icons/SizeSlackOutlined.d.ts +2 -0
- package/es/icons/SizeSlackOutlined.js +34 -0
- package/es/icons/index.d.ts +2 -0
- package/es/icons/index.js +46 -42
- package/es/lang/en_US.js +1 -0
- package/es/lang/zh_CN.js +1 -0
- package/es/lang/zh_TW.js +1 -0
- package/es/style/themes/default.scss +12 -5
- package/es/style/themes/rounded.scss +3 -2
- package/es/utils/hook.d.ts +75 -4
- package/es/utils/hook.js +155 -6
- package/lib/ele-admin-layout/index.d.ts +26 -30
- package/lib/ele-admin-layout/props.d.ts +11 -10
- package/lib/ele-alert/index.d.ts +14 -14
- package/lib/ele-alert/props.d.ts +9 -8
- package/lib/ele-app/components/message-body.d.ts +5 -4
- package/lib/ele-app/components/message-box-icon.d.ts +7 -6
- package/lib/ele-app/style/overwrite/input/index.scss +2 -0
- package/lib/ele-avatar-group/index.d.ts +15 -14
- package/lib/ele-avatar-group/props.d.ts +10 -7
- package/lib/ele-basic-select/index.cjs +14 -7
- package/lib/ele-basic-select/index.d.ts +17 -14
- package/lib/ele-basic-select/props.cjs +3 -1
- package/lib/ele-basic-select/props.d.ts +11 -6
- package/lib/ele-basic-select/util.cjs +13 -0
- package/lib/ele-basic-select/util.d.ts +6 -0
- package/lib/ele-bottom-bar/index.d.ts +4 -4
- package/lib/ele-bottom-bar/props.d.ts +3 -2
- package/lib/ele-breadcrumb/index.d.ts +3 -3
- package/lib/ele-breadcrumb/props.d.ts +1 -1
- package/lib/ele-card/index.d.ts +14 -14
- package/lib/ele-card/props.d.ts +8 -6
- package/lib/ele-check-card/components/card-item.d.ts +3 -2
- package/lib/ele-check-card/index.cjs +8 -3
- package/lib/ele-check-card/index.d.ts +4 -4
- package/lib/ele-check-card/props.d.ts +3 -2
- package/lib/ele-config-provider/index.d.ts +4 -4
- package/lib/ele-config-provider/props.d.ts +3 -3
- package/lib/ele-config-provider/types.d.ts +1 -0
- package/lib/ele-copyable/index.d.ts +10 -10
- package/lib/ele-copyable/props.d.ts +7 -5
- package/lib/ele-count-up/index.d.ts +1 -1
- package/lib/ele-cropper/components/cropper-tools.d.ts +4 -3
- package/lib/ele-cropper/index.d.ts +3 -3
- package/lib/ele-cropper/props.d.ts +2 -1
- package/lib/ele-cropper-modal/index.d.ts +4 -4
- package/lib/ele-cropper-modal/props.d.ts +1 -4
- package/lib/ele-data-table/index.d.ts +22 -22
- package/lib/ele-data-table/props.d.ts +16 -16
- package/lib/ele-data-table/style/index.scss +1 -1
- package/lib/ele-data-table/types.d.ts +2 -0
- package/lib/ele-data-table/util.cjs +5 -1
- package/lib/ele-drawer/index.d.ts +14 -14
- package/lib/ele-drawer/props.d.ts +11 -10
- package/lib/ele-dropdown/index.cjs +45 -39
- package/lib/ele-dropdown/index.d.ts +22 -22
- package/lib/ele-dropdown/props.d.ts +13 -12
- package/lib/ele-dropdown/types.d.ts +2 -0
- package/lib/ele-edit-tag/index.cjs +10 -2
- package/lib/ele-edit-tag/index.d.ts +21 -19
- package/lib/ele-edit-tag/props.cjs +3 -1
- package/lib/ele-edit-tag/props.d.ts +13 -8
- package/lib/ele-ellipsis/index.d.ts +5 -4
- package/lib/ele-ellipsis/props.d.ts +1 -1
- package/lib/ele-file-list/index.d.ts +4 -4
- package/lib/ele-icon-select/components/icon-grid.d.ts +8 -6
- package/lib/ele-icon-select/index.cjs +9 -5
- package/lib/ele-icon-select/index.d.ts +37 -36
- package/lib/ele-icon-select/props.cjs +2 -0
- package/lib/ele-icon-select/props.d.ts +18 -14
- package/lib/ele-loading/index.d.ts +4 -4
- package/lib/ele-loading/props.d.ts +3 -2
- package/lib/ele-map-picker/components/map-view.cjs +1 -0
- package/lib/ele-map-picker/components/map-view.d.ts +26 -28
- package/lib/ele-map-picker/index.d.ts +10 -10
- package/lib/ele-map-picker/props.d.ts +6 -5
- package/lib/ele-map-picker/style/index.scss +1 -1
- package/lib/ele-menus/index.d.ts +2 -2
- package/lib/ele-menus/props.d.ts +1 -1
- package/lib/ele-menus/style/index.scss +4 -0
- package/lib/ele-modal/index.cjs +28 -62
- package/lib/ele-modal/index.d.ts +24 -23
- package/lib/ele-modal/props.d.ts +14 -13
- package/lib/ele-modal/util.cjs +235 -132
- package/lib/ele-modal/util.d.ts +31 -24
- package/lib/ele-pagination/index.cjs +3 -2
- package/lib/ele-pagination/index.d.ts +18 -6
- package/lib/ele-pagination/props.d.ts +8 -2
- package/lib/ele-pagination/style/index.scss +70 -0
- package/lib/ele-popconfirm/index.d.ts +32 -32
- package/lib/ele-popconfirm/props.d.ts +19 -17
- package/lib/ele-popover/index.d.ts +22 -22
- package/lib/ele-popover/props.d.ts +11 -10
- package/lib/ele-printer/index.d.ts +8 -8
- package/lib/ele-printer/props.d.ts +6 -5
- package/lib/ele-printer/util.cjs +68 -43
- package/lib/ele-printer/util.d.ts +5 -5
- package/lib/ele-pro-layout/index.d.ts +43 -47
- package/lib/ele-pro-layout/props.d.ts +16 -14
- package/lib/ele-pro-table/components/table-tools.cjs +221 -138
- package/lib/ele-pro-table/components/table-tools.d.ts +402 -32
- package/lib/ele-pro-table/components/tool-column-list.cjs +32 -5
- package/lib/ele-pro-table/components/tool-column-list.d.ts +12 -0
- package/lib/ele-pro-table/components/tool-column.cjs +10 -4
- package/lib/ele-pro-table/components/tool-column.d.ts +8 -7
- package/lib/ele-pro-table/components/tool-export.cjs +201 -181
- package/lib/ele-pro-table/components/tool-export.d.ts +33 -30
- package/lib/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
- package/lib/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
- package/lib/ele-pro-table/components/tool-print.cjs +354 -333
- package/lib/ele-pro-table/components/tool-print.d.ts +41 -40
- package/lib/ele-pro-table/index.cjs +60 -10
- package/lib/ele-pro-table/index.d.ts +1006 -70
- package/lib/ele-pro-table/props.cjs +3 -1
- package/lib/ele-pro-table/props.d.ts +17 -18
- package/lib/ele-pro-table/style/index.scss +43 -12
- package/lib/ele-pro-table/types.d.ts +54 -0
- package/lib/ele-pro-table/util.cjs +89 -28
- package/lib/ele-pro-table/util.d.ts +51 -9
- package/lib/ele-qr-code/components/canvas-render.cjs +146 -0
- package/lib/ele-qr-code/components/canvas-render.d.ts +67 -0
- package/lib/ele-qr-code/index.cjs +32 -135
- package/lib/ele-qr-code/index.d.ts +5 -9
- package/lib/ele-qr-code/props.cjs +3 -1
- package/lib/ele-qr-code/props.d.ts +5 -2
- package/lib/ele-qr-code/types.d.ts +5 -0
- package/lib/ele-qr-code-svg/index.cjs +10 -13
- package/lib/ele-qr-code-svg/index.d.ts +6 -5
- package/lib/ele-segmented/index.cjs +3 -0
- package/lib/ele-split-panel/index.d.ts +7 -7
- package/lib/ele-split-panel/props.d.ts +4 -3
- package/lib/ele-steps/index.d.ts +2 -2
- package/lib/ele-steps/props.d.ts +2 -2
- package/lib/ele-table/index.d.ts +2 -2
- package/lib/ele-table/props.d.ts +2 -1
- package/lib/ele-table-select/index.cjs +20 -17
- package/lib/ele-table-select/index.d.ts +22 -20
- package/lib/ele-table-select/props.cjs +2 -0
- package/lib/ele-table-select/props.d.ts +11 -7
- package/lib/ele-tabs/index.cjs +132 -85
- package/lib/ele-tabs/index.d.ts +19 -34
- package/lib/ele-tabs/props.cjs +3 -1
- package/lib/ele-tabs/props.d.ts +10 -24
- package/lib/ele-tabs/style/index.scss +42 -2
- package/lib/ele-tabs/types.d.ts +2 -11
- package/lib/ele-text/index.d.ts +2 -2
- package/lib/ele-text/props.d.ts +2 -1
- package/lib/ele-tool/index.cjs +2 -5
- package/lib/ele-tool/index.d.ts +5 -2
- package/lib/ele-tool/props.cjs +3 -1
- package/lib/ele-tool/props.d.ts +4 -1
- package/lib/ele-tool/style/index.scss +13 -0
- package/lib/ele-toolbar/index.d.ts +17 -17
- package/lib/ele-toolbar/props.d.ts +4 -3
- package/lib/ele-tooltip/index.d.ts +13 -12
- package/lib/ele-tooltip/props.d.ts +7 -6
- package/lib/ele-tour/index.d.ts +1 -1
- package/lib/ele-tree-select/index.cjs +4 -1
- package/lib/ele-tree-select/index.d.ts +18 -18
- package/lib/ele-tree-select/props.cjs +3 -1
- package/lib/ele-tree-select/props.d.ts +12 -8
- package/lib/ele-upload-list/index.d.ts +7 -9
- package/lib/ele-upload-list/props.d.ts +4 -3
- package/lib/ele-upload-list/style/index.scss +4 -0
- package/lib/ele-virtual-table/components/body-cell.d.ts +11 -27
- package/lib/ele-virtual-table/components/body-row.d.ts +13 -29
- package/lib/ele-virtual-table/components/cell-checkbox.d.ts +3 -2
- package/lib/ele-virtual-table/components/cell-filter.d.ts +6 -6
- package/lib/ele-virtual-table/components/footer-row.d.ts +3 -3
- package/lib/ele-virtual-table/components/header-cell.d.ts +7 -7
- package/lib/ele-virtual-table/components/header-row.d.ts +7 -7
- package/lib/ele-virtual-table/index.d.ts +20 -21
- package/lib/ele-virtual-table/props.d.ts +11 -11
- package/lib/ele-watermark/index.d.ts +5 -4
- package/lib/ele-watermark/props.d.ts +2 -1
- package/lib/ele-xg-player/index.d.ts +3 -3
- package/lib/icons/SizeCompactOutlined.cjs +33 -0
- package/lib/icons/SizeCompactOutlined.d.ts +2 -0
- package/lib/icons/SizeSlackOutlined.cjs +33 -0
- package/lib/icons/SizeSlackOutlined.d.ts +2 -0
- package/lib/icons/index.cjs +4 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/lang/en_US.cjs +1 -0
- package/lib/lang/zh_CN.cjs +1 -0
- package/lib/lang/zh_TW.cjs +1 -0
- package/lib/style/themes/default.scss +12 -5
- package/lib/style/themes/rounded.scss +3 -2
- package/lib/utils/hook.cjs +154 -5
- package/lib/utils/hook.d.ts +75 -4
- package/package.json +14 -13
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
+
import { StyleValue } from '../ele-app/types';
|
|
2
3
|
|
|
3
4
|
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
width: NumberConstructor;
|
|
@@ -14,12 +15,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
14
15
|
type: NumberConstructor;
|
|
15
16
|
default: number;
|
|
16
17
|
};
|
|
17
|
-
customStyle: import('vue').PropType<
|
|
18
|
+
customStyle: import('vue').PropType<Exclude<StyleValue, string>>;
|
|
18
19
|
fixed: BooleanConstructor;
|
|
19
20
|
wrapPosition: {
|
|
20
21
|
type: BooleanConstructor;
|
|
21
22
|
default: boolean;
|
|
22
|
-
};
|
|
23
|
+
};
|
|
23
24
|
disabled: BooleanConstructor;
|
|
24
25
|
}, {
|
|
25
26
|
rootKey: Ref<number>;
|
|
@@ -40,12 +41,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
40
41
|
type: NumberConstructor;
|
|
41
42
|
default: number;
|
|
42
43
|
};
|
|
43
|
-
customStyle: import('vue').PropType<
|
|
44
|
+
customStyle: import('vue').PropType<Exclude<StyleValue, string>>;
|
|
44
45
|
fixed: BooleanConstructor;
|
|
45
46
|
wrapPosition: {
|
|
46
47
|
type: BooleanConstructor;
|
|
47
48
|
default: boolean;
|
|
48
|
-
};
|
|
49
|
+
};
|
|
49
50
|
disabled: BooleanConstructor;
|
|
50
51
|
}>>, {
|
|
51
52
|
lineGap: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
import { StyleValue } from '../ele-app/types';
|
|
2
3
|
import { WatermarkGap, WatermarkOffset, WatermarkFont } from './types';
|
|
3
4
|
|
|
4
5
|
export declare const watermarkProps: {
|
|
@@ -26,7 +27,7 @@ export declare const watermarkProps: {
|
|
|
26
27
|
default: number;
|
|
27
28
|
};
|
|
28
29
|
/** 自定义样式 */
|
|
29
|
-
customStyle: PropType<
|
|
30
|
+
customStyle: PropType<Exclude<StyleValue, string>>;
|
|
30
31
|
/** 是否使用固定定位 */
|
|
31
32
|
fixed: BooleanConstructor;
|
|
32
33
|
/** 是否为外层添加定位样式 */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { default as Player } from 'xgplayer';
|
|
2
|
+
import { default as Player, IPlayerOptions } from 'xgplayer';
|
|
3
3
|
|
|
4
4
|
declare const _default: import('vue').DefineComponent<{
|
|
5
5
|
config: {
|
|
6
|
-
type: PropType<
|
|
6
|
+
type: PropType<IPlayerOptions>;
|
|
7
7
|
required: true;
|
|
8
8
|
};
|
|
9
9
|
}, {
|
|
@@ -13,7 +13,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
13
13
|
player: (_player: Player | null) => true;
|
|
14
14
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
15
|
config: {
|
|
16
|
-
type: PropType<
|
|
16
|
+
type: PropType<IPlayerOptions>;
|
|
17
17
|
required: true;
|
|
18
18
|
};
|
|
19
19
|
}>> & {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
|
|
2
|
+
const _sfc_main = defineComponent({
|
|
3
|
+
name: "SizeCompactOutlined"
|
|
4
|
+
});
|
|
5
|
+
const _export_sfc = (sfc, props) => {
|
|
6
|
+
const target = sfc.__vccOpts || sfc;
|
|
7
|
+
for (const [key, val] of props) {
|
|
8
|
+
target[key] = val;
|
|
9
|
+
}
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_1 = {
|
|
13
|
+
viewBox: "0 0 48 48",
|
|
14
|
+
fill: "none",
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
"stroke-width": "4"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M47 14L41 19L35 14M41 1V19M47 34L41 29L35 34M41 47V29" }, null, -1);
|
|
19
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", { d: "M3 7H31" }, null, -1);
|
|
20
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", { d: "M3 41H31" }, null, -1);
|
|
21
|
+
const _hoisted_5 = /* @__PURE__ */ createElementVNode("path", { d: "M3 24H31" }, null, -1);
|
|
22
|
+
const _hoisted_6 = [
|
|
23
|
+
_hoisted_2,
|
|
24
|
+
_hoisted_3,
|
|
25
|
+
_hoisted_4,
|
|
26
|
+
_hoisted_5
|
|
27
|
+
];
|
|
28
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
29
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_6);
|
|
30
|
+
}
|
|
31
|
+
const SizeCompactOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
32
|
+
export {
|
|
33
|
+
SizeCompactOutlined as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
|
|
2
|
+
const _sfc_main = defineComponent({
|
|
3
|
+
name: "SizeSlackOutlined"
|
|
4
|
+
});
|
|
5
|
+
const _export_sfc = (sfc, props) => {
|
|
6
|
+
const target = sfc.__vccOpts || sfc;
|
|
7
|
+
for (const [key, val] of props) {
|
|
8
|
+
target[key] = val;
|
|
9
|
+
}
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_1 = {
|
|
13
|
+
viewBox: "0 0 48 48",
|
|
14
|
+
fill: "none",
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
"stroke-width": "4"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M41 6V42M35 11L41 6L47 11M47 37L41 42L35 37" }, null, -1);
|
|
19
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", { d: "M3 7H31" }, null, -1);
|
|
20
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", { d: "M3 41H31" }, null, -1);
|
|
21
|
+
const _hoisted_5 = /* @__PURE__ */ createElementVNode("path", { d: "M3 24H31" }, null, -1);
|
|
22
|
+
const _hoisted_6 = [
|
|
23
|
+
_hoisted_2,
|
|
24
|
+
_hoisted_3,
|
|
25
|
+
_hoisted_4,
|
|
26
|
+
_hoisted_5
|
|
27
|
+
];
|
|
28
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
29
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_6);
|
|
30
|
+
}
|
|
31
|
+
const SizeSlackOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
32
|
+
export {
|
|
33
|
+
SizeSlackOutlined as default
|
|
34
|
+
};
|
package/es/icons/index.d.ts
CHANGED
|
@@ -86,6 +86,8 @@ export { default as ResizeOutlined } from './ResizeOutlined';
|
|
|
86
86
|
export { default as SearchOutlined } from './SearchOutlined';
|
|
87
87
|
export { default as SettingOutlined } from './SettingOutlined';
|
|
88
88
|
export { default as ShoppingOutlined } from './ShoppingOutlined';
|
|
89
|
+
export { default as SizeCompactOutlined } from './SizeCompactOutlined';
|
|
90
|
+
export { default as SizeSlackOutlined } from './SizeSlackOutlined';
|
|
89
91
|
export { default as SortOutlined } from './SortOutlined';
|
|
90
92
|
export { default as StarFilled } from './StarFilled';
|
|
91
93
|
export { default as StepBackwardFilled } from './StepBackwardFilled';
|
package/es/icons/index.js
CHANGED
|
@@ -86,27 +86,29 @@ import { default as default86 } from "./ResizeOutlined";
|
|
|
86
86
|
import { default as default87 } from "./SearchOutlined";
|
|
87
87
|
import { default as default88 } from "./SettingOutlined";
|
|
88
88
|
import { default as default89 } from "./ShoppingOutlined";
|
|
89
|
-
import { default as default90 } from "./
|
|
90
|
-
import { default as default91 } from "./
|
|
91
|
-
import { default as default92 } from "./
|
|
92
|
-
import { default as default93 } from "./
|
|
93
|
-
import { default as default94 } from "./
|
|
94
|
-
import { default as default95 } from "./
|
|
95
|
-
import { default as default96 } from "./
|
|
96
|
-
import { default as default97 } from "./
|
|
97
|
-
import { default as default98 } from "./
|
|
98
|
-
import { default as default99 } from "./
|
|
99
|
-
import { default as default100 } from "./
|
|
100
|
-
import { default as default101 } from "./
|
|
101
|
-
import { default as default102 } from "./
|
|
102
|
-
import { default as default103 } from "./
|
|
103
|
-
import { default as default104 } from "./
|
|
104
|
-
import { default as default105 } from "./
|
|
105
|
-
import { default as default106 } from "./
|
|
106
|
-
import { default as default107 } from "./
|
|
107
|
-
import { default as default108 } from "./
|
|
108
|
-
import { default as default109 } from "./
|
|
109
|
-
import { default as default110 } from "./
|
|
89
|
+
import { default as default90 } from "./SizeCompactOutlined";
|
|
90
|
+
import { default as default91 } from "./SizeSlackOutlined";
|
|
91
|
+
import { default as default92 } from "./SortOutlined";
|
|
92
|
+
import { default as default93 } from "./StarFilled";
|
|
93
|
+
import { default as default94 } from "./StepBackwardFilled";
|
|
94
|
+
import { default as default95 } from "./StepForwardFilled";
|
|
95
|
+
import { default as default96 } from "./SuitcaseOutlined";
|
|
96
|
+
import { default as default97 } from "./SunOutlined";
|
|
97
|
+
import { default as default98 } from "./SwapOutlined";
|
|
98
|
+
import { default as default99 } from "./SyncOutlined";
|
|
99
|
+
import { default as default100 } from "./TableOutlined";
|
|
100
|
+
import { default as default101 } from "./TagOutlined";
|
|
101
|
+
import { default as default102 } from "./TimerOutlined";
|
|
102
|
+
import { default as default103 } from "./UndoOutlined";
|
|
103
|
+
import { default as default104 } from "./UnlockOutlined";
|
|
104
|
+
import { default as default105 } from "./UploadOutlined";
|
|
105
|
+
import { default as default106 } from "./UserOutlined";
|
|
106
|
+
import { default as default107 } from "./VerticalAlignMiddleOutlined";
|
|
107
|
+
import { default as default108 } from "./VerticalLeftOutlined";
|
|
108
|
+
import { default as default109 } from "./VerticalRightOutlined";
|
|
109
|
+
import { default as default110 } from "./WarningOutlined";
|
|
110
|
+
import { default as default111 } from "./ZoomInOutlined";
|
|
111
|
+
import { default as default112 } from "./ZoomOutOutlined";
|
|
110
112
|
export {
|
|
111
113
|
default2 as AnalysisOutlined,
|
|
112
114
|
default3 as ApplicationOutlined,
|
|
@@ -196,25 +198,27 @@ export {
|
|
|
196
198
|
default87 as SearchOutlined,
|
|
197
199
|
default88 as SettingOutlined,
|
|
198
200
|
default89 as ShoppingOutlined,
|
|
199
|
-
default90 as
|
|
200
|
-
default91 as
|
|
201
|
-
default92 as
|
|
202
|
-
default93 as
|
|
203
|
-
default94 as
|
|
204
|
-
default95 as
|
|
205
|
-
default96 as
|
|
206
|
-
default97 as
|
|
207
|
-
default98 as
|
|
208
|
-
default99 as
|
|
209
|
-
default100 as
|
|
210
|
-
default101 as
|
|
211
|
-
default102 as
|
|
212
|
-
default103 as
|
|
213
|
-
default104 as
|
|
214
|
-
default105 as
|
|
215
|
-
default106 as
|
|
216
|
-
default107 as
|
|
217
|
-
default108 as
|
|
218
|
-
default109 as
|
|
219
|
-
default110 as
|
|
201
|
+
default90 as SizeCompactOutlined,
|
|
202
|
+
default91 as SizeSlackOutlined,
|
|
203
|
+
default92 as SortOutlined,
|
|
204
|
+
default93 as StarFilled,
|
|
205
|
+
default94 as StepBackwardFilled,
|
|
206
|
+
default95 as StepForwardFilled,
|
|
207
|
+
default96 as SuitcaseOutlined,
|
|
208
|
+
default97 as SunOutlined,
|
|
209
|
+
default98 as SwapOutlined,
|
|
210
|
+
default99 as SyncOutlined,
|
|
211
|
+
default100 as TableOutlined,
|
|
212
|
+
default101 as TagOutlined,
|
|
213
|
+
default102 as TimerOutlined,
|
|
214
|
+
default103 as UndoOutlined,
|
|
215
|
+
default104 as UnlockOutlined,
|
|
216
|
+
default105 as UploadOutlined,
|
|
217
|
+
default106 as UserOutlined,
|
|
218
|
+
default107 as VerticalAlignMiddleOutlined,
|
|
219
|
+
default108 as VerticalLeftOutlined,
|
|
220
|
+
default109 as VerticalRightOutlined,
|
|
221
|
+
default110 as WarningOutlined,
|
|
222
|
+
default111 as ZoomInOutlined,
|
|
223
|
+
default112 as ZoomOutOutlined
|
|
220
224
|
};
|
package/es/lang/en_US.js
CHANGED
package/es/lang/zh_CN.js
CHANGED
package/es/lang/zh_TW.js
CHANGED
|
@@ -505,7 +505,13 @@ $ele: map.deep-merge(
|
|
|
505
505
|
'sm-radius': 24px,
|
|
506
506
|
'sm-space': 4px,
|
|
507
507
|
'sm-gap': 8px,
|
|
508
|
-
'sm-font-size': 14px
|
|
508
|
+
'sm-font-size': 14px,
|
|
509
|
+
'lg-height': 40px,
|
|
510
|
+
'lg-padding': 0 8px,
|
|
511
|
+
'lg-radius': 40px,
|
|
512
|
+
'lg-space': 8px,
|
|
513
|
+
'lg-gap': 8px 12px,
|
|
514
|
+
'lg-font-size': 14px
|
|
509
515
|
),
|
|
510
516
|
'segmented': (
|
|
511
517
|
// 分段器
|
|
@@ -714,15 +720,16 @@ $ele: map.deep-merge(
|
|
|
714
720
|
// 高级表格列配置
|
|
715
721
|
'width': 220px,
|
|
716
722
|
'max-height': 480px,
|
|
717
|
-
'header-padding': 6px
|
|
723
|
+
'header-padding': 6px 14px 4px 14px,
|
|
718
724
|
'header-border': 1px solid elVar('border-color', 'light'),
|
|
719
725
|
'body-padding': 6px 0,
|
|
720
|
-
'item-padding':
|
|
726
|
+
'item-padding': 14px,
|
|
721
727
|
'item-height': 28px,
|
|
722
728
|
'item-hover-bg': elVar('color-primary', 'light-9'),
|
|
723
729
|
'item-radius': 0,
|
|
724
|
-
'btn-space':
|
|
725
|
-
'btn-
|
|
730
|
+
'btn-space': 1px,
|
|
731
|
+
'btn-size': 18px,
|
|
732
|
+
'btn-offset': -6px,
|
|
726
733
|
'btn-radius': elVar('border-radius', 'small'),
|
|
727
734
|
'btn-color': elVar('text-color', 'placeholder'),
|
|
728
735
|
'btn-hover-color': elVar('text-color', 'primary'),
|
|
@@ -109,7 +109,8 @@ $ele-rounded: map.deep-merge(
|
|
|
109
109
|
'active-bg': none,
|
|
110
110
|
'active-border': 1px solid elVar('color', 'primary'),
|
|
111
111
|
'active-font-weight': bold,
|
|
112
|
-
'sm-radius': elVar('border-radius', 'base')
|
|
112
|
+
'sm-radius': elVar('border-radius', 'base'),
|
|
113
|
+
'lg-radius': $radius-large
|
|
113
114
|
),
|
|
114
115
|
'segmented': (
|
|
115
116
|
'radius': elVar('border-radius', 'small')
|
|
@@ -164,7 +165,7 @@ $ele-rounded: map.deep-merge(
|
|
|
164
165
|
),
|
|
165
166
|
'tool-column': (
|
|
166
167
|
'body-padding': 6px 4px,
|
|
167
|
-
'item-padding':
|
|
168
|
+
'item-padding': 10px,
|
|
168
169
|
'item-radius': elVar('border-radius', 'small'),
|
|
169
170
|
'btn-hover-bg': elVar('color-primary', 'light-8'),
|
|
170
171
|
'btn-active-bg': elVar('color-primary', 'light-7')
|
package/es/utils/hook.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
|
-
* useTimer返回结果
|
|
4
|
+
* useTimer 返回结果
|
|
3
5
|
*/
|
|
4
6
|
export type UseTimerResult = [
|
|
5
|
-
(callback
|
|
6
|
-
() => void
|
|
7
|
+
(callback?: () => void, timeout?: number) => void,
|
|
8
|
+
() => void,
|
|
9
|
+
Ref<boolean>
|
|
7
10
|
];
|
|
8
11
|
/**
|
|
9
12
|
* 定时器
|
|
@@ -12,7 +15,7 @@ export type UseTimerResult = [
|
|
|
12
15
|
*/
|
|
13
16
|
export declare function useTimer(ms?: number | (() => number), cb?: () => void): UseTimerResult;
|
|
14
17
|
/**
|
|
15
|
-
* useMediaQuery返回结果
|
|
18
|
+
* useMediaQuery 返回结果
|
|
16
19
|
*/
|
|
17
20
|
export type UseMediaQueryResult = [MediaQueryList, () => void, () => void];
|
|
18
21
|
/**
|
|
@@ -38,3 +41,71 @@ export declare function useCollapseAnim(): {
|
|
|
38
41
|
handleLeave: (el: HTMLElement) => void;
|
|
39
42
|
handleAfterLeave: (el: HTMLElement) => void;
|
|
40
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* 鼠标滚轮事件回调方法参数
|
|
46
|
+
*/
|
|
47
|
+
export interface UseMousewheelCallbackParam {
|
|
48
|
+
/** 事件对象 */
|
|
49
|
+
e: MouseEvent;
|
|
50
|
+
/** 方向 */
|
|
51
|
+
direction: 'up' | 'down';
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 鼠标滚轮事件
|
|
55
|
+
* @param cb 回调
|
|
56
|
+
*/
|
|
57
|
+
export declare function useMousewheel(cb?: (p: UseMousewheelCallbackParam) => void): {
|
|
58
|
+
handleMousewheel: (e: MouseEvent) => void;
|
|
59
|
+
handleFirefoxMousewheel: (e: MouseEvent) => void;
|
|
60
|
+
bindMousewheel: (el: HTMLElement) => void;
|
|
61
|
+
unbindMousewheel: (el: HTMLElement) => void;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 触摸事件回调参数
|
|
65
|
+
*/
|
|
66
|
+
export interface UseTouchEventCallbackParam<T> {
|
|
67
|
+
/** 事件对象 */
|
|
68
|
+
e: T;
|
|
69
|
+
/** 开始横向位置 */
|
|
70
|
+
startX: number | null;
|
|
71
|
+
/** 开始纵向位置 */
|
|
72
|
+
startY: number | null;
|
|
73
|
+
/** 横向移动距离 */
|
|
74
|
+
distanceX?: number | null;
|
|
75
|
+
/** 纵向移动距离 */
|
|
76
|
+
distanceY?: number | null;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 触摸事件参数
|
|
80
|
+
*/
|
|
81
|
+
export interface UseTouchEventOption<T> {
|
|
82
|
+
/** 触摸开始的回调 */
|
|
83
|
+
start?: (param: UseTouchEventCallbackParam<T>) => void;
|
|
84
|
+
/** 触摸移动的回调 */
|
|
85
|
+
move?: (param: UseTouchEventCallbackParam<T>) => void;
|
|
86
|
+
/** 触摸结束的回调 */
|
|
87
|
+
end?: (param: UseTouchEventCallbackParam<T>) => void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 触摸事件
|
|
91
|
+
* @param option 参数
|
|
92
|
+
*/
|
|
93
|
+
export declare function useTouchEvent(option?: UseTouchEventOption<TouchEvent>): {
|
|
94
|
+
handleTouchStart: (e: TouchEvent) => void;
|
|
95
|
+
handleTouchMove: (e: TouchEvent) => void;
|
|
96
|
+
handleTouchEnd: (e: TouchEvent) => void;
|
|
97
|
+
bindTouchEvent: (el: HTMLElement) => void;
|
|
98
|
+
unbindTouchEvent: (el: HTMLElement) => void;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* 移动事件对象
|
|
102
|
+
*/
|
|
103
|
+
export type MoveEvent = MouseEvent | TouchEvent;
|
|
104
|
+
/**
|
|
105
|
+
* 鼠标移动事件或触摸移动事件
|
|
106
|
+
* @param option 参数
|
|
107
|
+
*/
|
|
108
|
+
export declare function useMoveEvent(option?: UseTouchEventOption<MoveEvent>): {
|
|
109
|
+
handleMousedown: (e: MouseEvent) => void;
|
|
110
|
+
handleTouchstart: (e: TouchEvent) => void;
|
|
111
|
+
};
|
package/es/utils/hook.js
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import { onBeforeUnmount } from "vue";
|
|
1
|
+
import { ref, onBeforeUnmount } from "vue";
|
|
2
2
|
function useTimer(ms, cb) {
|
|
3
3
|
let timer = null;
|
|
4
|
+
const waiting = ref(false);
|
|
4
5
|
const stopTimer = () => {
|
|
5
6
|
if (timer != null) {
|
|
6
7
|
clearTimeout(timer);
|
|
7
8
|
timer = null;
|
|
8
9
|
}
|
|
10
|
+
waiting.value = false;
|
|
9
11
|
};
|
|
10
12
|
const startTimer = (callback, timeout) => {
|
|
11
13
|
stopTimer();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
waiting.value = true;
|
|
15
|
+
const to = timeout ?? (typeof ms === "function" ? ms() : ms);
|
|
16
|
+
timer = setTimeout(() => {
|
|
17
|
+
const func = callback ?? cb;
|
|
18
|
+
func && func();
|
|
19
|
+
waiting.value = false;
|
|
20
|
+
}, to);
|
|
16
21
|
};
|
|
17
22
|
onBeforeUnmount(() => {
|
|
18
23
|
stopTimer();
|
|
19
24
|
});
|
|
20
|
-
return [startTimer, stopTimer];
|
|
25
|
+
return [startTimer, stopTimer, waiting];
|
|
21
26
|
}
|
|
22
27
|
function useMediaQuery(query, onChange) {
|
|
23
28
|
const mediaQuery = window.matchMedia(query);
|
|
@@ -103,9 +108,153 @@ function useCollapseAnim() {
|
|
|
103
108
|
handleAfterLeave
|
|
104
109
|
};
|
|
105
110
|
}
|
|
111
|
+
function useMousewheel(cb) {
|
|
112
|
+
const handleMousewheel = (e) => {
|
|
113
|
+
const delta = e.wheelDelta || e.detail;
|
|
114
|
+
cb && cb({ e, direction: delta > 0 ? "up" : "down" });
|
|
115
|
+
};
|
|
116
|
+
const handleFirefoxMousewheel = (e) => {
|
|
117
|
+
const delta = e.wheelDelta || e.detail;
|
|
118
|
+
cb && cb({ e, direction: delta < 0 ? "up" : "down" });
|
|
119
|
+
};
|
|
120
|
+
const bindMousewheel = (el) => {
|
|
121
|
+
el.addEventListener("mousewheel", handleMousewheel, { passive: false });
|
|
122
|
+
el.addEventListener("DOMMouseScroll", handleFirefoxMousewheel);
|
|
123
|
+
};
|
|
124
|
+
const unbindMousewheel = (el) => {
|
|
125
|
+
el.removeEventListener("mousewheel", handleMousewheel);
|
|
126
|
+
el.removeEventListener("DOMMouseScroll", handleFirefoxMousewheel);
|
|
127
|
+
};
|
|
128
|
+
return {
|
|
129
|
+
handleMousewheel,
|
|
130
|
+
handleFirefoxMousewheel,
|
|
131
|
+
bindMousewheel,
|
|
132
|
+
unbindMousewheel
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function useTouchEvent(option) {
|
|
136
|
+
let startX = null;
|
|
137
|
+
let startY = null;
|
|
138
|
+
let distanceX = null;
|
|
139
|
+
let distanceY = null;
|
|
140
|
+
const handleTouchStart = (e) => {
|
|
141
|
+
startX = e.touches[0].clientX;
|
|
142
|
+
startY = e.touches[0].clientY;
|
|
143
|
+
if (option && option.start) {
|
|
144
|
+
option.start({ e, startX, startY });
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const handleTouchMove = (e) => {
|
|
148
|
+
if (startX != null && startY != null) {
|
|
149
|
+
const currentX = e.touches[0].clientX;
|
|
150
|
+
const currentY = e.touches[0].clientY;
|
|
151
|
+
distanceX = currentX - startX;
|
|
152
|
+
distanceY = currentY - startY;
|
|
153
|
+
if (option && option.move) {
|
|
154
|
+
option.move({ e, startX, startY, distanceX, distanceY });
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const handleTouchEnd = (e) => {
|
|
159
|
+
if (option && option.end) {
|
|
160
|
+
option.end({ e, startX, startY, distanceX, distanceY });
|
|
161
|
+
}
|
|
162
|
+
startX = null;
|
|
163
|
+
startY = null;
|
|
164
|
+
distanceX = null;
|
|
165
|
+
distanceY = null;
|
|
166
|
+
};
|
|
167
|
+
const bindTouchEvent = (el) => {
|
|
168
|
+
el.addEventListener("touchstart", handleTouchStart);
|
|
169
|
+
el.addEventListener("touchmove", handleTouchMove);
|
|
170
|
+
el.addEventListener("touchend", handleTouchEnd);
|
|
171
|
+
};
|
|
172
|
+
const unbindTouchEvent = (el) => {
|
|
173
|
+
el.removeEventListener("touchstart", handleTouchStart);
|
|
174
|
+
el.removeEventListener("touchmove", handleTouchMove);
|
|
175
|
+
el.removeEventListener("touchend", handleTouchEnd);
|
|
176
|
+
};
|
|
177
|
+
return {
|
|
178
|
+
handleTouchStart,
|
|
179
|
+
handleTouchMove,
|
|
180
|
+
handleTouchEnd,
|
|
181
|
+
bindTouchEvent,
|
|
182
|
+
unbindTouchEvent
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function useMoveEvent(option) {
|
|
186
|
+
let startX = null;
|
|
187
|
+
let startY = null;
|
|
188
|
+
let distanceX = null;
|
|
189
|
+
let distanceY = null;
|
|
190
|
+
const unbindEvent = () => {
|
|
191
|
+
document.removeEventListener("mousemove", mousemoveFn);
|
|
192
|
+
document.removeEventListener("mouseup", mouseupFn);
|
|
193
|
+
document.removeEventListener("touchmove", touchmoveFn);
|
|
194
|
+
document.removeEventListener("touchend", touchendFn);
|
|
195
|
+
};
|
|
196
|
+
const emitStart = (clientX, clientY, e) => {
|
|
197
|
+
startX = clientX;
|
|
198
|
+
startY = clientY;
|
|
199
|
+
if (option && option.start) {
|
|
200
|
+
option.start({ e, startX, startY });
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const emitMove = (currentX, currentY, e) => {
|
|
204
|
+
if (startX != null && startY != null) {
|
|
205
|
+
distanceX = currentX - startX;
|
|
206
|
+
distanceY = currentY - startY;
|
|
207
|
+
if (option && option.move) {
|
|
208
|
+
option.move({ e, startX, startY, distanceX, distanceY });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
const emitEnd = (e) => {
|
|
213
|
+
unbindEvent();
|
|
214
|
+
if (option && option.end) {
|
|
215
|
+
option.end({ e, startX, startY, distanceX, distanceY });
|
|
216
|
+
}
|
|
217
|
+
startX = null;
|
|
218
|
+
startY = null;
|
|
219
|
+
distanceX = null;
|
|
220
|
+
distanceY = null;
|
|
221
|
+
};
|
|
222
|
+
const mousemoveFn = function(e) {
|
|
223
|
+
emitMove(e.clientX, e.clientY, e);
|
|
224
|
+
};
|
|
225
|
+
const touchmoveFn = function(e) {
|
|
226
|
+
emitMove(e.touches[0].clientX, e.touches[0].clientY, e);
|
|
227
|
+
};
|
|
228
|
+
const mouseupFn = (e) => {
|
|
229
|
+
emitEnd(e);
|
|
230
|
+
};
|
|
231
|
+
const touchendFn = (e) => {
|
|
232
|
+
emitEnd(e);
|
|
233
|
+
};
|
|
234
|
+
const handleMousedown = (e) => {
|
|
235
|
+
emitStart(e.clientX, e.clientY, e);
|
|
236
|
+
document.addEventListener("mousemove", mousemoveFn);
|
|
237
|
+
document.addEventListener("mouseup", mouseupFn);
|
|
238
|
+
};
|
|
239
|
+
const handleTouchstart = (e) => {
|
|
240
|
+
emitStart(e.touches[0].clientX, e.touches[0].clientY, e);
|
|
241
|
+
document.addEventListener("touchmove", touchmoveFn);
|
|
242
|
+
document.addEventListener("touchend", touchendFn);
|
|
243
|
+
};
|
|
244
|
+
onBeforeUnmount(() => {
|
|
245
|
+
unbindEvent();
|
|
246
|
+
});
|
|
247
|
+
return {
|
|
248
|
+
handleMousedown,
|
|
249
|
+
handleTouchstart
|
|
250
|
+
};
|
|
251
|
+
}
|
|
106
252
|
export {
|
|
107
253
|
useCollapseAnim,
|
|
108
254
|
useMediaQuery,
|
|
255
|
+
useMousewheel,
|
|
256
|
+
useMoveEvent,
|
|
109
257
|
useTimer,
|
|
258
|
+
useTouchEvent,
|
|
110
259
|
useWindowListener
|
|
111
260
|
};
|