@titaui/pc 1.10.7 → 1.10.8-2.beta-1
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/.eslintrc.js +2 -2
- package/.prettierignore +4 -4
- package/lib/components/book-demo/utils.js +4 -0
- package/lib/components/button/default-button/index.css +10 -4
- package/lib/components/button/default-button/index.js +13 -2
- package/lib/components/change-okr-modal/index.js +3 -2
- package/lib/components/checkbox/index.css +1 -0
- package/lib/components/communication/CommunicationRecord.js +16 -16
- package/lib/components/communication/index.css +16 -15
- package/lib/components/communication/index.js +23 -6
- package/lib/components/communication/style.js +4 -4
- package/lib/components/create-okr-modal/fields/o-new-name.js +31 -21
- package/lib/components/create-okr-modal/fields/okr-parent.js +1 -5
- package/lib/components/create-okr-modal/kr-items/krDatas.js +16 -16
- package/lib/components/{dynamic/components/dangerous-html → dangerous-html}/index.js +0 -0
- package/lib/components/dialog/index.css +4 -1
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.css +1 -1
- package/lib/components/drawer/index.js +3 -2
- package/lib/components/drawer-manager/index.js +6 -1
- package/lib/components/dynamic/components/first-level-tabs/index.css +12 -2
- package/lib/components/dynamic/components/first-level-tabs/index.js +19 -6
- package/lib/components/dynamic/components/obj-status/index.css +1 -0
- package/lib/components/dynamic/components/obj-status/utils.js +1 -1
- package/lib/components/dynamic/constant.js +12 -2
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.css +71 -0
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +112 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.css +2 -1
- package/lib/components/dynamic/dynamic-item/components/header/index.js +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +27 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +13 -7
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +10 -4
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.css +4 -0
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +102 -0
- package/lib/components/dynamic/dynamic-item/dynamic-chart/utils.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +12 -11
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -5
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -3
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/dynamic-share-course.png +0 -0
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/jiantou-right@3x.png +0 -0
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/user-photo.png +0 -0
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.js +6 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +9 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +2 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +13 -7
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +42 -6
- package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.css +14 -30
- package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +12 -3
- package/lib/components/dynamic/dynamic-item/dynamic-reward/img/reward.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +6 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +18 -51
- package/lib/components/dynamic/dynamic-item/dynamic-reward/utils.js +28 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -2
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +55 -2
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/index.css +58 -3
- package/lib/components/dynamic/dynamic-item/index.js +124 -23
- package/lib/components/dynamic/dynamic-like-ranking/item.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +11 -2
- package/lib/components/dynamic/dynamic-topping/item.js +8 -4
- package/lib/components/dynamic/dynamic.js +5 -2
- package/lib/components/dynamic/img/dynamic-operate.png +0 -0
- package/lib/components/dynamic/img/dynamic-point.svg +13 -0
- package/lib/components/dynamic/img/dynamic-reward-hover.svg +1 -0
- package/lib/components/dynamic/img/dynamic-reward-normal.svg +1 -0
- package/lib/components/dynamic/online-broadcast/data.js +13 -1
- package/lib/components/e-status-dropdown/index.css +3 -0
- package/lib/components/e-status-dropdown/index.js +94 -0
- package/lib/components/edit-kr-wight/style/index.js +2 -2
- package/lib/components/file-list/components/single-file/index.css +6 -5
- package/lib/components/file-list/components/single-file/index.js +1 -1
- package/lib/components/file-list/index.css +1 -0
- package/lib/components/follower-visitor/index.js +6 -4
- package/lib/components/grid-layout/okr-progress/index.js +20 -30
- package/lib/components/help-card/image/not-try.png +0 -0
- package/lib/components/help-card/image/try.png +0 -0
- package/lib/components/help-card/index.css +31 -2
- package/lib/components/help-card/index.js +54 -17
- package/lib/components/invite-people/img/invite-people.svg +62 -0
- package/lib/components/invite-people/index.css +1 -1
- package/lib/components/mblog/index.js +14 -5
- package/lib/components/menus/export-modules/demo-menus/index.js +2 -2
- package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +25 -1
- package/lib/components/menus/export-modules/demo-menus/menus.js +60 -11
- package/lib/components/menus/export-modules/manage-menus/constant.js +1 -1
- package/lib/components/menus/export-modules/manage-menus/index.css +3 -0
- package/lib/components/menus/export-modules/okr-menus/subordinate-menus/index.js +34 -12
- package/lib/components/menus/images/okr-gongsi.svg +17 -0
- package/lib/components/nav-top/components/menu/index.css +24 -0
- package/lib/components/nav-top/components/menu/index.js +9 -1
- package/lib/components/nav-top/components/user-message/components/reply/index.js +9 -8
- package/lib/components/nav-top/components/user-message/components/reply/reply-item.js +15 -5
- package/lib/components/nav-top/components/user-message/index.css +4 -3
- package/lib/components/nav-top/components/user-message/index.js +33 -6
- package/lib/components/nav-top/request.apis.js +22 -8
- package/lib/components/nav-top/useGlobalValue.js +14 -0
- package/lib/components/okr-detail/components/header/o-name.js +11 -4
- package/lib/components/okr-detail/components/header/o-score.js +4 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.css +26 -12
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +11 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +20 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +27 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +29 -10
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +1 -1
- package/lib/components/okr-detail/detail-header/actions.js +40 -44
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +207 -195
- package/lib/components/okr-detail/e-list/index.js +70 -24
- package/lib/components/okr-detail/e-list/util.js +11 -2
- package/lib/components/okr-detail/index.js +4 -0
- package/lib/components/okr-detail/okr-list/index.js +1 -5
- package/lib/components/okr-flow/export-modal/index.js +3 -3
- package/lib/components/okr-flow/root-node/index.js +14 -1
- package/lib/components/okr-progress-detail/index.css +11 -10
- package/lib/components/okr-progress-detail/index.js +5 -1
- package/lib/components/okr-progress-detail/utils.js +4 -4
- package/lib/components/okr-progress-modal/helper.js +20 -27
- package/lib/components/okr-share/common-painter/openDataPainter.js +34 -27
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +40 -36
- package/lib/components/open-data-painter/index.js +5 -1
- package/lib/components/progress/circle-progress/index.js +1 -1
- package/lib/components/rich-editor/basic/schema.js +47 -0
- package/lib/components/rich-editor/consts/events.js +12 -0
- package/lib/components/rich-editor/enums.js +42 -0
- package/lib/components/rich-editor/index.js +58 -0
- package/lib/components/rich-editor/keymap.js +119 -0
- package/lib/components/rich-editor/keymaps/index.js +241 -0
- package/lib/components/rich-editor/models/controller.js +18 -0
- package/lib/components/rich-editor/models/editor.js +47 -0
- package/lib/components/rich-editor/models/plugin.js +20 -0
- package/lib/components/rich-editor/models/schema.js +121 -0
- package/lib/components/rich-editor/plugins/block/block-quote/commond.js +27 -0
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +128 -0
- package/lib/components/rich-editor/plugins/block/heading/commonds.js +31 -0
- package/lib/components/rich-editor/plugins/block/heading/index.js +190 -0
- package/lib/components/rich-editor/plugins/block/index.js +57 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/conversions.js +172 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/indent-list-items-selected.js +163 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/indent-list.js +59 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-forward.js +74 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/index.js +45 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +104 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +92 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +89 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-paragraph-with-list.js +48 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-sibling-list-items.js +61 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/merge-lists.js +34 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/outdent-list-items-selected.js +289 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/wrap-and-join-lists.js +180 -0
- package/lib/components/rich-editor/plugins/block/lists/baseCommand.js +328 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/indent-list.js +60 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/index.js +396 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/join-list-item-forward.js +45 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/listBackspace.js +302 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/outdent-list.js +43 -0
- package/lib/components/rich-editor/plugins/block/lists/index.js +224 -0
- package/lib/components/rich-editor/plugins/block/lists/messages.js +38 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/input-rule.js +152 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/keymap.js +33 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/main.js +94 -0
- package/lib/components/rich-editor/plugins/block/lists/styles.js +15 -0
- package/lib/components/rich-editor/plugins/block/lists/transforms.js +347 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/analytics.js +48 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/find.js +126 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/indentation.js +87 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/node.js +144 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/replace-content.js +31 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/selection.js +201 -0
- package/lib/components/rich-editor/plugins/block/lists/utils.js +52 -0
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +91 -0
- package/lib/components/rich-editor/plugins/core/index.js +90 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/focus-handler.js +67 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/keymap.js +29 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/reactNodeView.js +80 -0
- package/lib/components/rich-editor/plugins/extension/alignment/commond.js +24 -0
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +113 -0
- package/lib/components/rich-editor/plugins/extension/alignment/utils.js +19 -0
- package/lib/components/rich-editor/plugins/extension/index.js +18 -0
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +126 -0
- package/lib/components/rich-editor/plugins/extension/placeholder/styles.js +19 -0
- package/lib/components/rich-editor/plugins/index.js +44 -0
- package/lib/components/rich-editor/plugins/inline/color/commond.js +128 -0
- package/lib/components/rich-editor/plugins/inline/color/consts.js +43 -0
- package/lib/components/rich-editor/plugins/inline/color/index.css +61 -0
- package/lib/components/rich-editor/plugins/inline/color/index.js +217 -0
- package/lib/components/rich-editor/plugins/inline/color/selector.js +252 -0
- package/lib/components/rich-editor/plugins/inline/color/util.js +25 -0
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +149 -0
- package/lib/components/rich-editor/plugins/inline/em/index.js +93 -0
- package/lib/components/rich-editor/plugins/inline/index.js +83 -0
- package/lib/components/rich-editor/plugins/inline/link/commands.js +256 -0
- package/lib/components/rich-editor/plugins/inline/link/index.js +149 -0
- package/lib/components/rich-editor/plugins/inline/link/pm-plugins/fake-cursor-for-toolbar.js +77 -0
- package/lib/components/rich-editor/plugins/inline/link/pm-plugins/main.js +293 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/index.css +84 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/linkEditor.js +150 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/linkToolbar.js +101 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/toolbarBtn.js +117 -0
- package/lib/components/rich-editor/plugins/inline/link/utils.js +33 -0
- package/lib/components/rich-editor/plugins/inline/strong/index.js +139 -0
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +147 -0
- package/lib/components/rich-editor/plugins/util.js +284 -0
- package/lib/components/rich-editor/react/reactNodeView.js +383 -0
- package/lib/components/rich-editor/react/uiProvider.js +185 -0
- package/lib/components/rich-editor/schemas/basic.js +309 -0
- package/lib/components/rich-editor/schemas/index.js +19 -0
- package/lib/components/rich-editor/schemas/list.js +342 -0
- package/lib/components/rich-editor/types/commond.js +5 -0
- package/lib/components/rich-editor/types/index.js +18 -0
- package/lib/components/rich-editor/ui/Popup/index.js +247 -0
- package/lib/components/rich-editor/ui/Popup/utils.js +399 -0
- package/lib/components/rich-editor/ui/editor/index.css +178 -0
- package/lib/components/rich-editor/ui/editor/index.js +153 -0
- package/lib/components/rich-editor/ui/normal-toolbar/index.css +34 -0
- package/lib/components/rich-editor/ui/normal-toolbar/index.js +109 -0
- package/lib/components/rich-editor/utils/browser.js +35 -0
- package/lib/components/rich-editor/utils/commands.js +266 -0
- package/lib/components/rich-editor/utils/document.js +211 -0
- package/lib/components/rich-editor/utils/event.js +79 -0
- package/lib/components/rich-editor/utils/helpers.js +16 -0
- package/lib/components/rich-editor/utils/mark.js +168 -0
- package/lib/components/rich-editor/utils/slice.js +85 -0
- package/lib/components/rich-editor/utils/toolbar.js +228 -0
- package/lib/components/scrollbar/index.js +67 -9
- package/lib/components/scrollbar/scroll-mask/index.css +29 -0
- package/lib/components/scrollbar/scroll-mask/index.js +152 -0
- package/lib/components/superset-charts/components/chart/index.js +54 -0
- package/lib/components/superset-charts/fetch-assets-and-append/append-assets.js +106 -0
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +142 -0
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +79 -0
- package/lib/components/superset-charts/index.js +13 -0
- package/lib/components/superset-charts/interface.js +5 -0
- package/lib/components/superset-charts/utils/axios.js +102 -0
- package/lib/components/toast/index.js +5 -17
- package/lib/components/tree/index.css +3 -2
- package/lib/components/upload/index.js +4 -2
- package/lib/components/upload/util.js +2 -0
- package/lib/components/upload-photo-modal/request-api.js +1 -17
- package/lib/components/user-selector/empty/index.css +6 -6
- package/lib/components/user-selector/selected-panel/index.css +3 -3
- package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.css +118 -121
- package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.js +182 -182
- package/lib/components/{float-fixed-video-modal → video-modal}/img/close.png +0 -0
- package/lib/components/{float-fixed-video-modal → video-modal}/img/full.svg +0 -0
- package/lib/components/video-modal/img/muted.svg +8 -10
- package/lib/components/video-modal/img/not-muted.svg +17 -11
- package/lib/components/video-modal/img/pause.svg +7 -11
- package/lib/components/video-modal/img/play.svg +13 -11
- package/lib/components/video-modal/index.css +38 -168
- package/lib/components/video-modal/index.js +104 -244
- package/lib/components/video-modal/utils.js +2 -2
- package/lib/components/wechat-btn/index.css +10 -0
- package/lib/components/wechat-btn/index.js +232 -0
- package/lib/components/weekly-report/common-painter/openDataPainter.js +5 -1
- package/lib/hooks/useGlobalState.js +63 -0
- package/lib/index.js +39 -7
- package/lib/pages/aha2021/img/canceled.svg +13 -0
- package/lib/pages/aha2021/img/not-try.png +0 -0
- package/lib/pages/aha2021/img/try.png +0 -0
- package/lib/pages/aha2021/index.css +52 -0
- package/lib/pages/aha2021/index.js +73 -14
- package/lib/pages/group-management/tree/group-form/index.js +1 -1
- package/lib/pages/new-okr-list/header/index.js +2 -1
- package/lib/pages/new-okr-list/index.js +10 -13
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -5
- package/lib/pages/pay/image/success.png +0 -0
- package/lib/pages/pay/index.css +79 -0
- package/lib/pages/pay/index.js +66 -0
- package/lib/pages/personal-info/request-api.js +1 -1
- package/lib/utils/auth.js +15 -5
- package/lib/utils/bs-global.js +8 -8
- package/lib/utils/helpers.js +7 -1
- package/lib/utils/open-data.js +82 -2
- package/package.json +121 -101
- package/lib/components/float-fixed-video-modal/img/muted.svg +0 -21
- package/lib/components/float-fixed-video-modal/img/pause.svg +0 -21
- package/lib/components/float-fixed-video-modal/img/play.svg +0 -22
- package/lib/components/float-fixed-video-modal/img/small.svg +0 -22
- package/lib/components/float-fixed-video-modal/img/smallFaQi.png +0 -0
- package/lib/components/float-fixed-video-modal/img/volume.svg +0 -21
- package/lib/components/float-fixed-video-modal/utils.js +0 -25
- package/lib/components/invite-people/img/invite-people.png +0 -0
- package/lib/components/video-modal/img/play.png +0 -0
|
@@ -1,213 +1,83 @@
|
|
|
1
|
-
.titaui-pc-video-
|
|
1
|
+
.titaui-pc-video-modal__full {
|
|
2
2
|
position: relative;
|
|
3
|
-
height: 471px;
|
|
4
|
-
border-bottom-left-radius: 24px;
|
|
5
|
-
border-bottom-right-radius: 24px;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.titaui-pc-video-modal__mask1 {
|
|
11
|
-
opacity: 0;
|
|
12
|
-
transition: 0.5s;
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
width: 840px;
|
|
16
|
-
height: 62px;
|
|
17
|
-
background: linear-gradient(0deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.titaui-pc-video-modal__mask1--show {
|
|
21
|
-
opacity: 1;
|
|
22
|
-
transition: 0.5s;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.titaui-pc-video-modal__mask2 {
|
|
26
|
-
opacity: 0;
|
|
27
|
-
transition: 0.5s;
|
|
28
|
-
position: absolute;
|
|
29
|
-
bottom: 0;
|
|
30
|
-
width: 840px;
|
|
31
|
-
height: 62px;
|
|
32
|
-
background: linear-gradient(180deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.titaui-pc-video-modal__mask2--show {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
transition: 0.5s;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.titaui-pc-video-modal__video {
|
|
41
|
-
width: 840px;
|
|
42
|
-
height: 471px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.titaui-pc-video-modal__controls {
|
|
46
|
-
opacity: 0;
|
|
47
|
-
transition: 0.5s;
|
|
48
|
-
width: 100%;
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
justify-content: space-between;
|
|
52
|
-
padding: 16px 32px 16px 32px;
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
position: absolute;
|
|
55
|
-
bottom: 0;
|
|
56
|
-
z-index: 2;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.titaui-pc-video-modal__controls--show {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
transition: 0.5s;
|
|
62
3
|
}
|
|
63
4
|
|
|
64
|
-
.titaui-pc-video-
|
|
5
|
+
.titaui-pc-video-modal__full-control {
|
|
65
6
|
display: inline-flex;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.titaui-pc-video-modal__controls-button {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
margin-left: 6px;
|
|
71
9
|
width: 24px;
|
|
72
10
|
height: 24px;
|
|
73
11
|
border-radius: 12px;
|
|
74
|
-
display: inline-flex;
|
|
75
12
|
align-items: center;
|
|
76
13
|
justify-content: center;
|
|
14
|
+
z-index: 2;
|
|
77
15
|
}
|
|
78
16
|
|
|
79
|
-
.titaui-pc-video-
|
|
17
|
+
.titaui-pc-video-modal__full-control:hover {
|
|
80
18
|
background: rgba(20, 28, 40, 0.6);
|
|
81
19
|
}
|
|
82
20
|
|
|
83
|
-
.titaui-pc-video-
|
|
84
|
-
width: 16px;
|
|
85
|
-
height: 16px;
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.titaui-pc-video-modal__controls-time {
|
|
90
|
-
font-size: 12px;
|
|
91
|
-
color: #ffffff;
|
|
92
|
-
line-height: 18px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.titaui-pc-video-modal__controls-time:nth-of-type(1) {
|
|
96
|
-
margin-left: 6px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.titaui-pc-video-modal__controls-muted {
|
|
21
|
+
.titaui-pc-video-modal__full-control > img {
|
|
100
22
|
width: 16px;
|
|
101
23
|
height: 16px;
|
|
102
24
|
}
|
|
103
25
|
|
|
104
|
-
.titaui-pc-video-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
justify-content: space-between;
|
|
108
|
-
padding: 0 8px;
|
|
109
|
-
box-sizing: border-box;
|
|
110
|
-
width: 72px;
|
|
111
|
-
height: 22px;
|
|
112
|
-
background: rgba(20, 28, 40, 0.6);
|
|
113
|
-
border-radius: 12px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.titaui-pc-video-modal__controls-volume-progress {
|
|
26
|
+
.titaui-pc-video-modal__small {
|
|
27
|
+
width: 360px;
|
|
28
|
+
height: 200px;
|
|
117
29
|
position: relative;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
border-radius:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
display: none;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.titaui-pc-video-modal__controls-volume-current {
|
|
129
|
-
position: absolute;
|
|
130
|
-
bottom: 0;
|
|
131
|
-
left: 0;
|
|
132
|
-
height: 2px;
|
|
133
|
-
background: rgba(255, 255, 255, 0.6);
|
|
134
|
-
border-radius: 1px;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.titaui-pc-video-modal__controls-volume-current::after {
|
|
138
|
-
content: '';
|
|
139
|
-
position: absolute;
|
|
140
|
-
right: 0;
|
|
141
|
-
bottom: -1px;
|
|
142
|
-
width: 4px;
|
|
143
|
-
height: 4px;
|
|
144
|
-
border-radius: 50%;
|
|
145
|
-
background: #ffffff;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.titaui-pc-video-modal__controls-volume-current--hidden {
|
|
149
|
-
display: none;
|
|
30
|
+
position: fixed;
|
|
31
|
+
bottom: 20px;
|
|
32
|
+
right: 72px;
|
|
33
|
+
border-radius: 12px;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
|
|
36
|
+
z-index: 12;
|
|
150
37
|
}
|
|
151
38
|
|
|
152
|
-
.titaui-pc-video-
|
|
39
|
+
.titaui-pc-video-modal__small-enlarge {
|
|
153
40
|
display: inline-flex;
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.titaui-pc-video-modal__controls-right-shrink {
|
|
41
|
+
cursor: pointer;
|
|
158
42
|
margin-left: 6px;
|
|
159
43
|
width: 24px;
|
|
160
44
|
height: 24px;
|
|
161
45
|
border-radius: 12px;
|
|
162
|
-
display: inline-flex;
|
|
163
46
|
align-items: center;
|
|
164
47
|
justify-content: center;
|
|
48
|
+
z-index: 2;
|
|
165
49
|
}
|
|
166
50
|
|
|
167
|
-
.titaui-pc-video-
|
|
51
|
+
.titaui-pc-video-modal__small-enlarge:hover {
|
|
168
52
|
background: rgba(20, 28, 40, 0.6);
|
|
169
53
|
}
|
|
170
54
|
|
|
171
|
-
.titaui-pc-video-
|
|
55
|
+
.titaui-pc-video-modal__small-enlarge > img {
|
|
172
56
|
width: 16px;
|
|
173
57
|
height: 16px;
|
|
174
58
|
}
|
|
175
59
|
|
|
176
|
-
.titaui-pc-video-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
60
|
+
.titaui-pc-video-modal__small-close {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
margin-left: 6px;
|
|
64
|
+
width: 24px;
|
|
65
|
+
height: 24px;
|
|
66
|
+
border-radius: 12px;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
184
69
|
z-index: 2;
|
|
185
70
|
}
|
|
186
71
|
|
|
187
|
-
.titaui-pc-video-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.titaui-pc-video-modal__progress--show {
|
|
192
|
-
opacity: 1;
|
|
193
|
-
transition: 0.5s;
|
|
72
|
+
.titaui-pc-video-modal__small-close:hover {
|
|
73
|
+
background: rgba(20, 28, 40, 0.6);
|
|
194
74
|
}
|
|
195
75
|
|
|
196
|
-
.titaui-pc-video-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
bottom: 0;
|
|
200
|
-
background: #77be16;
|
|
201
|
-
height: 100%;
|
|
202
|
-
z-index: 3;
|
|
76
|
+
.titaui-pc-video-modal__small-close > img {
|
|
77
|
+
width: 16px;
|
|
78
|
+
height: 16px;
|
|
203
79
|
}
|
|
204
80
|
|
|
205
|
-
.titaui-pc-video-
|
|
206
|
-
|
|
207
|
-
right: 0;
|
|
208
|
-
bottom: -2px;
|
|
209
|
-
width: 8px;
|
|
210
|
-
height: 8px;
|
|
211
|
-
border-radius: 50%;
|
|
212
|
-
background: #77be16;
|
|
81
|
+
.titaui-pc-video-modal__small .titaui-pc-video-box__box {
|
|
82
|
+
border-radius: 0 !important;
|
|
213
83
|
}
|
|
@@ -9,23 +9,19 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
12
|
var _dialog = _interopRequireDefault(require("../dialog"));
|
|
15
13
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _play = _interopRequireDefault(require("./img/play.svg"));
|
|
14
|
+
var _videoBox = _interopRequireDefault(require("./components/video-box"));
|
|
19
15
|
|
|
20
|
-
var
|
|
16
|
+
var _conditionRender = _interopRequireDefault(require("../condition-render"));
|
|
21
17
|
|
|
22
|
-
var
|
|
18
|
+
var _bsGlobal = require("../../utils/bs-global");
|
|
23
19
|
|
|
24
|
-
var
|
|
20
|
+
var _full = _interopRequireDefault(require("./img/full.svg"));
|
|
25
21
|
|
|
26
22
|
var _small = _interopRequireDefault(require("./img/small.svg"));
|
|
27
23
|
|
|
28
|
-
var
|
|
24
|
+
var _close = _interopRequireDefault(require("./img/close.png"));
|
|
29
25
|
|
|
30
26
|
require("./index.css");
|
|
31
27
|
|
|
@@ -35,8 +31,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
31
|
|
|
36
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
33
|
|
|
38
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
-
|
|
40
34
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
41
35
|
|
|
42
36
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -50,195 +44,89 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
50
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
45
|
|
|
52
46
|
var preCls = "titaui-pc-video-modal";
|
|
53
|
-
|
|
54
|
-
var VideoModal = function
|
|
55
|
-
var
|
|
56
|
-
_onClose = props.onClose,
|
|
47
|
+
var userId = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Id;
|
|
48
|
+
var VideoModal = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
49
|
+
var videoSrc = props.videoSrc,
|
|
57
50
|
title = props.title,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_props$
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var _useState = (0, _react.useState)(false),
|
|
51
|
+
videoPoster = props.videoPoster,
|
|
52
|
+
visible = props.visible,
|
|
53
|
+
onClose = props.onClose,
|
|
54
|
+
onOpen = props.onOpen,
|
|
55
|
+
_props$hasextraButton = props.hasextraButton,
|
|
56
|
+
hasextraButton = _props$hasextraButton === void 0 ? true : _props$hasextraButton;
|
|
57
|
+
|
|
58
|
+
var _useState = (0, _react.useState)(true),
|
|
67
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
smallVideoVisible = _useState2[0],
|
|
61
|
+
setSmallVideoVisible = _useState2[1];
|
|
70
62
|
|
|
71
|
-
var _useState3 = (0, _react.useState)(
|
|
63
|
+
var _useState3 = (0, _react.useState)("0"),
|
|
72
64
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var _useState5 = (0, _react.useState)(true),
|
|
77
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
-
isMuted = _useState6[0],
|
|
79
|
-
setIsMuted = _useState6[1];
|
|
80
|
-
|
|
81
|
-
var _useState7 = (0, _react.useState)(false),
|
|
82
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
83
|
-
isMouseDown = _useState8[0],
|
|
84
|
-
setIsMouseDown = _useState8[1];
|
|
85
|
-
|
|
86
|
-
var _useState9 = (0, _react.useState)(false),
|
|
87
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
88
|
-
showDot = _useState10[0],
|
|
89
|
-
setShowDot = _useState10[1];
|
|
90
|
-
|
|
91
|
-
var _useState11 = (0, _react.useState)("00:00"),
|
|
92
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
93
|
-
totalTime = _useState12[0],
|
|
94
|
-
setTotalTime = _useState12[1];
|
|
95
|
-
|
|
96
|
-
var _useState13 = (0, _react.useState)("00:00"),
|
|
97
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
98
|
-
currentTime = _useState14[0],
|
|
99
|
-
setCurrentTime = _useState14[1];
|
|
100
|
-
|
|
101
|
-
var videoRef = (0, _react.useRef)(document.createElement("video"));
|
|
102
|
-
var totalProgressRef = (0, _react.useRef)(document.createElement("div"));
|
|
103
|
-
var progressRef = (0, _react.useRef)(document.createElement("div"));
|
|
104
|
-
var boxRef = (0, _react.useRef)(document.createElement("div"));
|
|
105
|
-
var volumeRef = (0, _react.useRef)(document.createElement("div")); // 播放/暂停
|
|
106
|
-
|
|
107
|
-
var handlePlayVideo = function handlePlayVideo() {
|
|
108
|
-
setIsPlay(!isPlay);
|
|
109
|
-
|
|
110
|
-
if (isPlay) {
|
|
111
|
-
videoRef.current.pause();
|
|
112
|
-
} else {
|
|
113
|
-
videoRef.current.play();
|
|
114
|
-
}
|
|
115
|
-
}; // 音量
|
|
65
|
+
time = _useState4[0],
|
|
66
|
+
setTime = _useState4[1];
|
|
116
67
|
|
|
68
|
+
var modalVideoRef = (0, _react.useRef)(document.createElement("div"));
|
|
69
|
+
var smallVideoRef = (0, _react.useRef)(document.createElement("div")); // 关闭小窗口视频
|
|
117
70
|
|
|
118
|
-
var
|
|
119
|
-
|
|
120
|
-
videoRef.current.muted = !videoRef.current.muted;
|
|
121
|
-
}; // 鼠标移入移出进度条区域
|
|
71
|
+
var handleClickCloseSmallVideo = function handleClickCloseSmallVideo() {
|
|
72
|
+
setSmallVideoVisible(false); // @ts-ignore
|
|
122
73
|
|
|
74
|
+
smallVideoRef.current.closeVideo();
|
|
75
|
+
localStorage.setItem("hide_performance_small_video_".concat(userId), "true");
|
|
76
|
+
}; // 打开dialog弹层 关闭小窗口
|
|
123
77
|
|
|
124
|
-
var handleMouseEnterProgress = function handleMouseEnterProgress() {
|
|
125
|
-
setShowDot(true);
|
|
126
|
-
};
|
|
127
78
|
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
|
|
79
|
+
var handleClickToFull = function handleClickToFull() {
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
setTime(smallVideoRef.current.getCurrentTime());
|
|
82
|
+
onOpen(); // @ts-ignore
|
|
131
83
|
|
|
84
|
+
smallVideoRef.current.closeVideo();
|
|
85
|
+
setSmallVideoVisible(false);
|
|
86
|
+
}; // 关闭dialog弹层 打开小窗口
|
|
132
87
|
|
|
133
|
-
var getCurrentProgressWidth = function getCurrentProgressWidth(e) {
|
|
134
|
-
var currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2;
|
|
135
|
-
progressRef.current.style.width = "".concat(currentWidth, "px");
|
|
136
|
-
videoRef.current.currentTime = videoRef.current.duration * currentWidth / 840;
|
|
137
|
-
}; // 点击音量 音量进度条宽度
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
var getCurrentVolumeWidth = function getCurrentVolumeWidth(e) {
|
|
141
|
-
var currentWidth;
|
|
142
|
-
|
|
143
|
-
if (canMini) {
|
|
144
|
-
currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2 - 712;
|
|
145
|
-
} else {
|
|
146
|
-
currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2 - 742;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (currentWidth <= 0) {
|
|
150
|
-
setIsMuted(true);
|
|
151
|
-
videoRef.current.muted = true;
|
|
152
|
-
} else if (currentWidth >= 34) {
|
|
153
|
-
volumeRef.current.style.width = "34px";
|
|
154
|
-
videoRef.current.volume = 1;
|
|
155
|
-
} else {
|
|
156
|
-
volumeRef.current.style.width = "".concat(currentWidth, "px");
|
|
157
|
-
videoRef.current.volume = currentWidth / 34;
|
|
158
|
-
}
|
|
159
|
-
}; // 点击进度条
|
|
160
88
|
|
|
89
|
+
var handleClickToSmall = function handleClickToSmall() {
|
|
90
|
+
onClose(); // @ts-ignore
|
|
161
91
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}; //
|
|
92
|
+
setTime(modalVideoRef.current.getCurrentTime());
|
|
93
|
+
setSmallVideoVisible(true);
|
|
94
|
+
}; // 关闭过一次自动播放小窗口 之后不再出现
|
|
165
95
|
|
|
166
96
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
97
|
+
(0, _react.useEffect)(function () {
|
|
98
|
+
if (localStorage.getItem("hide_performance_small_video_".concat(userId)) === "true") {
|
|
99
|
+
setSmallVideoVisible(false); // @ts-ignore
|
|
170
100
|
|
|
171
|
-
|
|
172
|
-
if (isMouseDown) {
|
|
173
|
-
getCurrentProgressWidth(e);
|
|
101
|
+
smallVideoRef.current.closeVideo();
|
|
174
102
|
}
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
var handleMouseClickVolume = function handleMouseClickVolume(e) {
|
|
183
|
-
getCurrentVolumeWidth(e);
|
|
184
|
-
}; // 鼠标移入移出视频区域
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
var handleMouseOverVideoModal = function handleMouseOverVideoModal() {
|
|
188
|
-
setIsOverModal(true);
|
|
189
|
-
};
|
|
103
|
+
}, []);
|
|
104
|
+
(0, _react.useEffect)(function () {
|
|
105
|
+
if (visible) {
|
|
106
|
+
setSmallVideoVisible(false);
|
|
107
|
+
}
|
|
108
|
+
}, [visible]); // *---提供给父组件调用(因为有时间的联动,视频默认从0开始需要手动调用此方法)---*
|
|
190
109
|
|
|
191
|
-
var
|
|
192
|
-
|
|
110
|
+
var handleSetDefaultTime = function handleSetDefaultTime() {
|
|
111
|
+
setTime("0");
|
|
193
112
|
};
|
|
194
113
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
showSmallVideo();
|
|
199
|
-
}; // 初始获得总时间
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
(0, _react.useEffect)(function () {
|
|
203
|
-
videoRef.current.onloadedmetadata = function () {
|
|
204
|
-
setTotalTime(videoRef.current.duration.toString());
|
|
114
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
115
|
+
return {
|
|
116
|
+
setDefaultTime: handleSetDefaultTime
|
|
205
117
|
};
|
|
206
|
-
}
|
|
207
|
-
|
|
118
|
+
});
|
|
208
119
|
(0, _react.useEffect)(function () {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
progressRef.current.style.width = "".concat(840 * videoRef.current.currentTime / videoRef.current.duration, "px");
|
|
212
|
-
};
|
|
213
|
-
}, [videoRef.current.ontimeupdate]); // 初始获得音量宽度
|
|
214
|
-
|
|
215
|
-
(0, _react.useEffect)(function () {
|
|
216
|
-
volumeRef.current.style.width = "".concat(34 * videoRef.current.volume, "px");
|
|
217
|
-
}, [videoRef.current.onloadedmetadata]);
|
|
218
|
-
(0, _react.useEffect)(function () {
|
|
219
|
-
if (visible) {
|
|
220
|
-
videoRef.current.play();
|
|
221
|
-
videoRef.current.muted = true;
|
|
222
|
-
setIsMuted(true);
|
|
223
|
-
setIsPlay(true);
|
|
224
|
-
} else {
|
|
225
|
-
videoRef.current.pause();
|
|
226
|
-
videoRef.current.muted = true;
|
|
227
|
-
setIsMuted(true);
|
|
228
|
-
setIsPlay(false);
|
|
120
|
+
if (!hasextraButton) {
|
|
121
|
+
setSmallVideoVisible(false);
|
|
229
122
|
}
|
|
230
|
-
}, [
|
|
231
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(
|
|
123
|
+
}, []);
|
|
124
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
125
|
+
condition: !smallVideoVisible
|
|
126
|
+
}, /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
232
127
|
visible: visible,
|
|
233
128
|
title: title,
|
|
234
|
-
onClose:
|
|
235
|
-
_onClose();
|
|
236
|
-
|
|
237
|
-
videoRef.current.pause();
|
|
238
|
-
videoRef.current.muted = true;
|
|
239
|
-
setIsMuted(true);
|
|
240
|
-
setIsPlay(false);
|
|
241
|
-
},
|
|
129
|
+
onClose: onClose,
|
|
242
130
|
style: {
|
|
243
131
|
width: "840px",
|
|
244
132
|
borderRadius: "24px"
|
|
@@ -246,77 +134,49 @@ var VideoModal = function VideoModal(props) {
|
|
|
246
134
|
noHeadLine: true,
|
|
247
135
|
noFooterLine: true,
|
|
248
136
|
noFooter: true,
|
|
249
|
-
|
|
250
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
251
|
-
className: "".concat(preCls, "__box"),
|
|
252
|
-
onMouseOver: handleMouseOverVideoModal,
|
|
253
|
-
onMouseLeave: handleMouseLeaveVideoModal,
|
|
254
|
-
onFocus: handleMouseOverVideoModal
|
|
255
|
-
}, /*#__PURE__*/_react["default"].createElement("video", {
|
|
256
|
-
ref: videoRef,
|
|
257
|
-
src: videoSrc,
|
|
258
|
-
loop: true,
|
|
259
|
-
autoPlay: true,
|
|
260
|
-
muted: true,
|
|
261
|
-
poster: _bigFaqi["default"],
|
|
262
|
-
className: "".concat(preCls, "__video")
|
|
263
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
264
|
-
className: (0, _classnames["default"])("".concat(preCls, "__progress"), _defineProperty({}, "".concat(preCls, "__progress--show"), isOverModal)),
|
|
265
|
-
onMouseEnter: handleMouseEnterProgress,
|
|
266
|
-
onMouseLeave: handleMouseLeaveProgress,
|
|
267
|
-
ref: totalProgressRef,
|
|
268
|
-
onClick: handleClickTotalProgress,
|
|
269
|
-
onMouseDown: handleMouseDownProgress,
|
|
270
|
-
onMouseMove: handleMouseMoveProgress,
|
|
271
|
-
onMouseUp: handleMouseUpProgress
|
|
272
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
273
|
-
className: "".concat(preCls, "__progress-current"),
|
|
274
|
-
ref: progressRef
|
|
275
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
276
|
-
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__progress-current-dot"), showDot))
|
|
277
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
278
|
-
className: (0, _classnames["default"])("".concat(preCls, "__controls"), _defineProperty({}, "".concat(preCls, "__controls--show"), isOverModal))
|
|
279
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
280
|
-
className: "".concat(preCls, "__controls-left")
|
|
137
|
+
destroyOnClose: true
|
|
281
138
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
282
|
-
className: "".concat(preCls, "
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
139
|
+
className: "".concat(preCls, "__full")
|
|
140
|
+
}, /*#__PURE__*/_react["default"].createElement(_videoBox["default"], {
|
|
141
|
+
videoSrc: videoSrc,
|
|
142
|
+
containerWidth: 840,
|
|
143
|
+
ref: modalVideoRef,
|
|
144
|
+
extraButton: hasextraButton ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
145
|
+
className: "".concat(preCls, "__full-control"),
|
|
146
|
+
onClick: handleClickToSmall
|
|
147
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
148
|
+
src: _small["default"],
|
|
149
|
+
alt: "\u7F29\u5C0F"
|
|
150
|
+
})) : "",
|
|
151
|
+
videoPoster: videoPoster,
|
|
152
|
+
time: time
|
|
153
|
+
})))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
154
|
+
condition: smallVideoVisible
|
|
294
155
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
295
|
-
className:
|
|
296
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
156
|
+
className: "".concat(preCls, "__small")
|
|
157
|
+
}, /*#__PURE__*/_react["default"].createElement(_videoBox["default"], {
|
|
158
|
+
videoSrc: videoSrc,
|
|
159
|
+
containerWidth: 360,
|
|
160
|
+
hasHead: true,
|
|
161
|
+
title: title,
|
|
162
|
+
extraButton: /*#__PURE__*/_react["default"].createElement("div", {
|
|
163
|
+
className: "".concat(preCls, "__small-enlarge"),
|
|
164
|
+
onClick: handleClickToFull
|
|
165
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
166
|
+
src: _full["default"],
|
|
167
|
+
alt: "\u5168\u5C4F"
|
|
168
|
+
})),
|
|
169
|
+
videoPoster: videoPoster,
|
|
170
|
+
headButton: /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
+
className: "".concat(preCls, "__small-close"),
|
|
172
|
+
onClick: handleClickCloseSmallVideo
|
|
173
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
174
|
+
src: _close["default"],
|
|
175
|
+
alt: "\u5173\u95ED"
|
|
176
|
+
})),
|
|
177
|
+
ref: smallVideoRef,
|
|
178
|
+
time: time
|
|
318
179
|
}))));
|
|
319
|
-
};
|
|
320
|
-
|
|
180
|
+
});
|
|
321
181
|
var _default = VideoModal;
|
|
322
182
|
exports["default"] = _default;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var formatSecToTime = function formatSecToTime(value) {
|
|
9
9
|
var result = parseInt(value, 10);
|
|
10
10
|
var m = Math.floor(result / 60 % 60) < 10 ? "0".concat(Math.floor(result / 60 % 60)) : Math.floor(result / 60 % 60);
|
|
11
11
|
var s = Math.floor(result % 60) < 10 ? "0".concat(Math.floor(result % 60)) : Math.floor(result % 60);
|
|
@@ -21,5 +21,5 @@ var formatSecToDate = function formatSecToDate(value) {
|
|
|
21
21
|
return res;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
var _default =
|
|
24
|
+
var _default = formatSecToTime;
|
|
25
25
|
exports["default"] = _default;
|