@titaui/pc 1.10.4 → 1.10.7
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/lib/components/change-okr-modal/index.js +108 -88
- package/lib/components/communication/CommunicationRecord.js +18 -12
- package/lib/components/communication/index.css +48 -9
- package/lib/components/communication/index.js +67 -28
- package/lib/components/communication/style.js +7 -5
- package/lib/components/dynamic/components/obj-status/index.css +2 -19
- package/lib/components/dynamic/components/obj-status/index.js +7 -8
- package/lib/components/dynamic/components/obj-status/utils.js +37 -0
- package/lib/components/dynamic/components/percent/index.css +1 -1
- package/lib/components/dynamic/components/title/index.css +21 -22
- package/lib/components/dynamic/components/title/index.js +20 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.css +6 -6
- package/lib/components/dynamic/dynamic-item/components/header/index.js +12 -6
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-kr.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-o.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +35 -24
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +35 -29
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +6 -34
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +6 -32
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +59 -19
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +27 -19
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +49 -38
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +49 -44
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +41 -29
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +23 -29
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +33 -16
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +11 -24
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +26 -41
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +10 -29
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +26 -41
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +13 -30
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +16 -54
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +31 -80
- package/lib/components/dynamic/dynamic-item/dynamic-progress/utils.js +72 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +35 -28
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +10 -23
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-kr.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-o.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-task.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela.svg +23 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +45 -26
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +41 -33
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +19 -6
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +11 -17
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +21 -23
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +31 -27
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +4 -4
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +8 -18
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -21
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +6 -36
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/dynamic-share-course.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.css +10 -18
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +9 -25
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +34 -30
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -24
- package/lib/components/dynamic/dynamic-item/index.css +4 -4
- package/lib/components/dynamic/dynamic-item/index.js +38 -8
- package/lib/components/dynamic/util.js +41 -81
- package/lib/components/file-list/components/single-file/index.css +9 -8
- package/lib/components/float-fixed-video-modal/img/close.png +0 -0
- package/lib/components/float-fixed-video-modal/img/full.svg +21 -0
- package/lib/components/float-fixed-video-modal/img/muted.svg +21 -0
- package/lib/components/float-fixed-video-modal/img/pause.svg +21 -0
- package/lib/components/float-fixed-video-modal/img/play.svg +22 -0
- package/lib/components/float-fixed-video-modal/img/small.svg +22 -0
- package/lib/components/float-fixed-video-modal/img/smallFaQi.png +0 -0
- package/lib/components/float-fixed-video-modal/img/volume.svg +21 -0
- package/lib/components/float-fixed-video-modal/index.css +243 -0
- package/lib/components/float-fixed-video-modal/index.js +334 -0
- package/lib/components/float-fixed-video-modal/utils.js +25 -0
- package/lib/components/mblog/context.js +3 -1
- package/lib/components/mblog/index.css +7 -0
- package/lib/components/mblog/index.js +31 -4
- package/lib/components/mblog/style.js +4 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +21 -12
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-empty.js +7 -4
- package/lib/components/progress/circle-progress/index.css +1 -0
- package/lib/components/progress/circle-progress/index.js +7 -2
- package/lib/components/search-key-handle/index.js +7 -2
- package/lib/components/video-modal/img/bigFaqi.png +0 -0
- package/lib/components/video-modal/img/muted.svg +16 -0
- package/lib/components/video-modal/img/not-muted.svg +16 -0
- package/lib/components/video-modal/img/pause.svg +17 -0
- package/lib/components/video-modal/img/play.png +0 -0
- package/lib/components/video-modal/img/play.svg +16 -0
- package/lib/components/video-modal/img/small.svg +22 -0
- package/lib/components/video-modal/index.css +213 -0
- package/lib/components/video-modal/index.js +322 -0
- package/lib/components/video-modal/utils.js +25 -0
- package/lib/index.js +16 -0
- package/lib/utils/bs-global.js +8 -4
- package/lib/utils/tools.js +11 -2
- package/package.json +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/guanlian.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-icon.png +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>暂停</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<filter color-interpolation-filters="auto" id="filter-1">
|
|
6
|
+
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>
|
|
7
|
+
</filter>
|
|
8
|
+
</defs>
|
|
9
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
10
|
+
<g id="点击查看视频" transform="translate(-468.000000, -87.000000)">
|
|
11
|
+
<g id="暂停" transform="translate(468.000000, 87.000000)">
|
|
12
|
+
<rect id="矩形备份-5" opacity="0.666846866" x="0" y="0" width="16" height="16"></rect>
|
|
13
|
+
<g id="暂停" filter="url(#filter-1)">
|
|
14
|
+
<g>
|
|
15
|
+
<path d="M10.023464,4.30420899 L14.4700011,11.4186684 C14.9383376,12.1680068 14.7105405,13.1551274 13.9612021,13.623464 C13.7069115,13.7823956 13.4130753,13.8666667 13.1132038,13.8666667 L4.22012956,13.8666667 C3.33647396,13.8666667 2.62012956,13.1503223 2.62012956,12.2666667 C2.62012956,11.9667951 2.70440067,11.6729589 2.86333227,11.4186684 L7.30986938,4.30420899 C7.77820591,3.55487054 8.76532652,3.32707348 9.51466497,3.79541001 C9.72069558,3.92417914 9.89469482,4.09817838 10.023464,4.30420899 Z" id="三角形" fill="#444444" transform="translate(8.666667, 8.000000) rotate(90.000000) translate(-8.666667, -8.000000) "></path>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>播放</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<filter color-interpolation-filters="auto" id="filter-1">
|
|
6
|
+
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>
|
|
7
|
+
</filter>
|
|
8
|
+
</defs>
|
|
9
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
10
|
+
<g id="点击查看视频" transform="translate(-414.000000, -87.000000)">
|
|
11
|
+
<g id="播放" transform="translate(414.000000, 87.000000)">
|
|
12
|
+
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
|
|
13
|
+
<g id="播放" filter="url(#filter-1)">
|
|
14
|
+
<g>
|
|
15
|
+
<rect id="矩形" fill="#444444" x="3.66666667" y="1.66666667" width="2.66666667" height="12.6666667" rx="1.33333333"></rect>
|
|
16
|
+
<rect id="矩形备份" fill="#444444" x="9.66666667" y="1.66666667" width="2.66666667" height="12.6666667" rx="1.33333333"></rect>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>缩小屏幕</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<filter color-interpolation-filters="auto" id="filter-1">
|
|
6
|
+
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>
|
|
7
|
+
</filter>
|
|
8
|
+
</defs>
|
|
9
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
10
|
+
<g id="点击查看视频" transform="translate(-504.000000, -87.000000)">
|
|
11
|
+
<g id="缩小屏幕" transform="translate(504.000000, 87.000000)">
|
|
12
|
+
<rect id="矩形备份-8" x="0" y="0" width="16" height="16"></rect>
|
|
13
|
+
<g id="缩小屏幕" filter="url(#filter-1)">
|
|
14
|
+
<g>
|
|
15
|
+
<path d="M2.66666667,8.84191565 C3.02861599,8.84191565 3.32319545,9.13036037 3.33307721,9.489922 L3.33333333,11.8095238 C3.33333333,12.2760501 3.70604651,12.6555245 4.16995152,12.6664257 L6.47311169,12.6666667 C6.84130152,12.6666667 7.13977836,12.9651435 7.13977836,13.3333333 C7.13977836,13.6952827 6.85133364,13.9898621 6.49177201,13.9997439 L4.19047619,14 C2.99280726,14 2.0196371,13.0388065 2.00029346,11.8457473 L2,9.50858232 C2,9.14039249 2.29847683,8.84191565 2.66666667,8.84191565 Z M13.3333333,8.8699914 C13.7015232,8.8699914 14,9.16846824 14,9.53665807 C14,9.8986074 13.7115553,10.1931869 13.3519937,10.2030686 L11.0486616,10.2033247 C10.5821354,10.2033247 10.202661,10.5760379 10.1917597,11.0399429 L10.1915188,13.3333333 C10.1915188,13.7015232 9.89304196,14 9.52485212,14 C9.1629028,14 8.86832334,13.7115553 8.85844158,13.3519937 L8.85818546,11.0604676 C8.85818546,9.86279866 9.81937893,8.8896285 11.0124381,8.87028486 L11.0486616,8.8699914 L13.3333333,8.8699914 Z M6.47638719,2 C6.83833652,2 7.13291597,2.28844472 7.14279774,2.64800634 L7.14305386,2.66666667 L7.14305386,4.95231104 C7.14305386,6.14997997 6.18186038,7.12315013 4.9888012,7.14249377 L2.66666667,7.14278723 C2.29847683,7.14278723 2,6.8443104 2,6.47612057 C2,6.11417124 2.28844472,5.81959178 2.64800634,5.80971002 L4.95257767,5.8094539 C5.41910392,5.8094539 5.79857834,5.43674073 5.80947961,4.97283571 L5.80972053,2.66666667 C5.80972053,2.29847683 6.10819736,2 6.47638719,2 Z M11.8095238,2 C13.0071927,2 13.9803629,2.96119347 13.9997065,4.15425266 L14,6.46713633 C14,6.83532616 13.7015232,7.13380299 13.3333333,7.13380299 C12.971384,7.13380299 12.6768046,6.84535827 12.6669228,6.48579665 L12.6666667,4.19047619 C12.6666667,3.72394994 12.2939535,3.34447552 11.8300485,3.33357425 L9.56078908,3.33333333 C9.19259925,3.33333333 8.89412242,3.0348565 8.89412242,2.66666667 C8.89412242,2.30471734 9.18256714,2.01013789 9.54212876,2.00025612 L11.8095238,2 Z" id="形状结合" fill="#444444" fill-rule="nonzero"></path>
|
|
16
|
+
<path d="M11.265279,10.3224699 L13.8108634,12.8680544 C14.0712129,13.1284039 14.0712129,13.5505139 13.8108634,13.8108634 C13.5505139,14.0712129 13.1284039,14.0712129 12.8680544,13.8108634 L10.3224699,11.265279 C10.0621204,11.0049295 10.0621204,10.5828195 10.3224699,10.3224699 C10.5828195,10.0621204 11.0049295,10.0621204 11.265279,10.3224699 Z M3.13194565,2.18913661 L5.67753006,4.73472102 C5.93787959,4.99507055 5.93787959,5.41718053 5.67753006,5.67753006 C5.41718053,5.93787959 4.99507055,5.93787959 4.73472102,5.67753006 L2.18913661,3.13194565 C1.92878708,2.87159612 1.92878708,2.44948613 2.18913661,2.18913661 C2.44948613,1.92878708 2.87159612,1.92878708 3.13194565,2.18913661 Z" id="形状" fill="#444444"></path>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>声音</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<filter color-interpolation-filters="auto" id="filter-1">
|
|
6
|
+
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>
|
|
7
|
+
</filter>
|
|
8
|
+
</defs>
|
|
9
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
10
|
+
<g id="点击查看视频" transform="translate(-450.000000, -87.000000)">
|
|
11
|
+
<g id="声音" transform="translate(450.000000, 87.000000)">
|
|
12
|
+
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
|
|
13
|
+
<g id="声音" filter="url(#filter-1)">
|
|
14
|
+
<g>
|
|
15
|
+
<path d="M7.43747973,2.38934893 C8.43638105,1.54323122 9.93143682,1.66906408 10.7752429,2.66990496 C11.135693,3.09743596 11.3333333,3.63877514 11.3333333,4.19804751 L11.3333333,4.19804751 L11.3333333,11.8593368 C11.3333333,13.1671926 10.2743236,14.228681 8.96640827,14.228681 C8.40648254,14.228681 7.8647838,14.0299826 7.43747973,13.6680354 L7.43747973,13.6680354 L7.38734907,13.6255723 L5.84463197,12.0331692 C5.79440129,11.9813208 5.72529575,11.9520527 5.65310585,11.9520527 L5.65310585,11.9520527 L4.9870801,11.9520527 C3.33666263,11.9520527 2,10.6122616 2,8.96110195 L2,8.96110195 L2,7.09628233 C2,5.44512271 3.33666263,4.10533156 4.9870801,4.10533156 L4.9870801,4.10533156 L5.65310585,4.10533156 C5.72529575,4.10533156 5.79440129,4.07606349 5.84463197,4.02421504 L5.84463197,4.02421504 L7.38734907,2.43181202 Z M9.75585962,3.52934405 C9.38740727,3.09232163 8.73526822,3.03743369 8.29926628,3.40674842 L8.29926628,3.40674842 L6.80226255,4.95196579 C6.5008785,5.26305644 6.08624526,5.4386649 5.65310585,5.4386649 L5.65310585,5.4386649 L4.9870801,5.4386649 C4.07374098,5.4386649 3.33333333,6.1808055 3.33333333,7.09628233 L3.33333333,7.09628233 L3.33333333,8.96110195 C3.33333333,9.87657878 4.07374098,10.6187194 4.9870801,10.6187194 L4.9870801,10.6187194 L5.65310585,10.6187194 C6.08624526,10.6187194 6.5008785,10.7943278 6.80226255,11.1054185 L6.80226255,11.1054185 L8.29926628,12.6506359 C8.48581643,12.8086529 8.72216689,12.8953477 8.96640827,12.8953477 C9.53724522,12.8953477 10,12.4315098 10,11.8593368 L10,11.8593368 L10,4.19804751 C10,3.95323447 9.91350763,3.71633083 9.75585962,3.52934405 Z M12.9612676,4.42495852 C13.635995,5.48514051 14,6.71649637 14,8 C14,9.2953183 13.6292471,10.5374117 12.9428229,11.6038598 C12.7435468,11.9134608 12.3310204,12.0028968 12.0214194,11.8036207 C11.7118184,11.6043445 11.6223824,11.1918181 11.8216585,10.8822171 C12.3705856,10.0293885 12.6666667,9.03745996 12.6666667,8 C12.6666667,6.97198971 12.3759736,5.98863335 11.8364174,5.14084242 C11.6387315,4.83022361 11.7302817,4.41816124 12.0409006,4.22047536 C12.3515194,4.02278948 12.7635817,4.11433971 12.9612676,4.42495852 Z" id="形状结合" fill="#444444" fill-rule="nonzero"></path>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
.titaui-pc-float-fixed-video {
|
|
2
|
+
display: none;
|
|
3
|
+
position: fixed;
|
|
4
|
+
bottom: 20px;
|
|
5
|
+
right: 72px;
|
|
6
|
+
width: 360px;
|
|
7
|
+
height: 200px;
|
|
8
|
+
border-radius: 12px;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
z-index: 11;
|
|
11
|
+
box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.titaui-pc-float-fixed-video--show {
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-pc-float-fixed-video__video {
|
|
20
|
+
width: 360px;
|
|
21
|
+
height: 200px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.titaui-pc-float-fixed-video__mask1 {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transition: 0.5s;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
padding: 0 16px;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
width: 360px;
|
|
35
|
+
height: 42px;
|
|
36
|
+
background: linear-gradient(180deg, #5a6068 0%, rgba(45, 60, 81, 0) 100%);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.titaui-pc-float-fixed-video__mask1--show {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
transition: 0.5s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.titaui-pc-float-fixed-video__mask1-title {
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
font-weight: normal;
|
|
47
|
+
color: #ffffff;
|
|
48
|
+
line-height: 18px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.titaui-pc-float-fixed-video__mask1-close {
|
|
52
|
+
width: 14px;
|
|
53
|
+
height: 14px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.titaui-pc-float-fixed-video__mask2 {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transition: 0.5;
|
|
60
|
+
position: absolute;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
width: 360px;
|
|
63
|
+
height: 42px;
|
|
64
|
+
background: linear-gradient(180deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.titaui-pc-float-fixed-video__mask2--show {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
transition: 0.5s;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.titaui-pc-float-fixed-video__controls {
|
|
73
|
+
opacity: 0;
|
|
74
|
+
transition: 0.5s;
|
|
75
|
+
width: 100%;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
padding: 10px 12px;
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
position: absolute;
|
|
82
|
+
bottom: 0;
|
|
83
|
+
z-index: 2;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.titaui-pc-float-fixed-video__controls--show {
|
|
87
|
+
opacity: 1;
|
|
88
|
+
transition: 0.5s;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.titaui-pc-float-fixed-video__controls-left {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.titaui-pc-float-fixed-video__controls-right {
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.titaui-pc-float-fixed-video__controls-play {
|
|
101
|
+
display: inline-flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
width: 16px;
|
|
104
|
+
height: 16px;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.titaui-pc-float-fixed-video__controls-time {
|
|
109
|
+
font-size: 12px;
|
|
110
|
+
color: #ffffff;
|
|
111
|
+
line-height: 18px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.titaui-pc-float-fixed-video__controls-time:nth-of-type(1) {
|
|
115
|
+
margin-left: 6px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.titaui-pc-float-fixed-video__controls-volume {
|
|
119
|
+
display: inline-flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: space-between;
|
|
122
|
+
padding: 0 8px;
|
|
123
|
+
box-sizing: border-box;
|
|
124
|
+
width: 72px;
|
|
125
|
+
height: 22px;
|
|
126
|
+
background: rgba(20, 28, 40, 0.6);
|
|
127
|
+
border-radius: 12px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.titaui-pc-float-fixed-video__controls-volume-progress {
|
|
131
|
+
position: relative;
|
|
132
|
+
width: 34px;
|
|
133
|
+
height: 2px;
|
|
134
|
+
background: rgba(255, 255, 255, 0.4);
|
|
135
|
+
border-radius: 1px;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.titaui-pc-float-fixed-video__controls-volume-progress--hidden {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.titaui-pc-float-fixed-video__controls-volume-current {
|
|
144
|
+
position: absolute;
|
|
145
|
+
bottom: 0;
|
|
146
|
+
left: 0;
|
|
147
|
+
height: 2px;
|
|
148
|
+
background: rgba(255, 255, 255, 0.6);
|
|
149
|
+
border-radius: 1px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.titaui-pc-float-fixed-video__controls-volume-current::after {
|
|
153
|
+
content: '';
|
|
154
|
+
position: absolute;
|
|
155
|
+
right: 0;
|
|
156
|
+
bottom: -1px;
|
|
157
|
+
width: 4px;
|
|
158
|
+
height: 4px;
|
|
159
|
+
border-radius: 50%;
|
|
160
|
+
background: #ffffff;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.titaui-pc-float-fixed-video__controls-volume-current--hidden {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.titaui-pc-float-fixed-video__controls-full {
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
width: 24px;
|
|
172
|
+
height: 24px;
|
|
173
|
+
border-radius: 12px;
|
|
174
|
+
margin-left: 6px;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.titaui-pc-float-fixed-video__controls-full:hover {
|
|
179
|
+
background: rgba(20, 28, 40, 0.6);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.titaui-pc-float-fixed-video__controls-full > img {
|
|
183
|
+
width: 16px;
|
|
184
|
+
height: 16px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.titaui-pc-float-fixed-video__controls-button {
|
|
188
|
+
width: 24px;
|
|
189
|
+
height: 24px;
|
|
190
|
+
border-radius: 12px;
|
|
191
|
+
display: inline-flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.titaui-pc-float-fixed-video__controls-button:hover {
|
|
197
|
+
background: rgba(20, 28, 40, 0.6);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.titaui-pc-float-fixed-video__progress {
|
|
201
|
+
opacity: 0;
|
|
202
|
+
transition: 0.5s;
|
|
203
|
+
position: absolute;
|
|
204
|
+
bottom: 38px;
|
|
205
|
+
width: 100%;
|
|
206
|
+
height: 2px;
|
|
207
|
+
background: #ffffff;
|
|
208
|
+
z-index: 3;
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.titaui-pc-float-fixed-video__progress--show {
|
|
213
|
+
opacity: 1;
|
|
214
|
+
transition: 0.5s;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.titaui-pc-float-fixed-video__progress:hover {
|
|
218
|
+
height: 4px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.titaui-pc-float-fixed-video__progress--show {
|
|
222
|
+
opacity: 1;
|
|
223
|
+
transition: 0.5s;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.titaui-pc-float-fixed-video__progress-current {
|
|
227
|
+
position: absolute;
|
|
228
|
+
left: 0;
|
|
229
|
+
bottom: 0;
|
|
230
|
+
background: #77be16;
|
|
231
|
+
height: 100%;
|
|
232
|
+
z-index: 3;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.titaui-pc-float-fixed-video__progress-current-dot {
|
|
236
|
+
position: absolute;
|
|
237
|
+
right: 0;
|
|
238
|
+
bottom: -2px;
|
|
239
|
+
width: 8px;
|
|
240
|
+
height: 8px;
|
|
241
|
+
border-radius: 50%;
|
|
242
|
+
background: #77be16;
|
|
243
|
+
}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _utils = _interopRequireDefault(require("./utils"));
|
|
15
|
+
|
|
16
|
+
var _bsGlobal = require("../../utils/bs-global");
|
|
17
|
+
|
|
18
|
+
var _videoModal = _interopRequireDefault(require("../video-modal"));
|
|
19
|
+
|
|
20
|
+
var _close = _interopRequireDefault(require("./img/close.png"));
|
|
21
|
+
|
|
22
|
+
var _pause = _interopRequireDefault(require("./img/pause.svg"));
|
|
23
|
+
|
|
24
|
+
var _play = _interopRequireDefault(require("./img/play.svg"));
|
|
25
|
+
|
|
26
|
+
var _volume = _interopRequireDefault(require("./img/volume.svg"));
|
|
27
|
+
|
|
28
|
+
var _full = _interopRequireDefault(require("./img/full.svg"));
|
|
29
|
+
|
|
30
|
+
var _muted = _interopRequireDefault(require("./img/muted.svg"));
|
|
31
|
+
|
|
32
|
+
var _smallFaQi = _interopRequireDefault(require("./img/smallFaQi.png"));
|
|
33
|
+
|
|
34
|
+
require("./index.css");
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
+
|
|
38
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
45
|
+
|
|
46
|
+
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."); }
|
|
47
|
+
|
|
48
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
49
|
+
|
|
50
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
51
|
+
|
|
52
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
53
|
+
|
|
54
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
|
+
|
|
56
|
+
var preCls = "titaui-pc-float-fixed-video";
|
|
57
|
+
|
|
58
|
+
var FloatVideo = function FloatVideo(props) {
|
|
59
|
+
var _props$visible = props.visible,
|
|
60
|
+
visible = _props$visible === void 0 ? true : _props$visible,
|
|
61
|
+
_props$title = props.title,
|
|
62
|
+
title = _props$title === void 0 ? "如何发起考核" : _props$title,
|
|
63
|
+
_props$videoSrc = props.videoSrc,
|
|
64
|
+
videoSrc = _props$videoSrc === void 0 ? "https://club.tita.com/wp-content/uploads/2022/03/1646114589-20220301140309117.mp4" : _props$videoSrc;
|
|
65
|
+
|
|
66
|
+
var _useState = (0, _react.useState)(false),
|
|
67
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
+
isHover = _useState2[0],
|
|
69
|
+
setIsHover = _useState2[1];
|
|
70
|
+
|
|
71
|
+
var _useState3 = (0, _react.useState)(false),
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
videoModalVisible = _useState4[0],
|
|
74
|
+
setVideoModalVisible = _useState4[1];
|
|
75
|
+
|
|
76
|
+
var _useState5 = (0, _react.useState)(true),
|
|
77
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
+
isPlay = _useState6[0],
|
|
79
|
+
setIsPlay = _useState6[1];
|
|
80
|
+
|
|
81
|
+
var _useState7 = (0, _react.useState)(true),
|
|
82
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
83
|
+
isMuted = _useState8[0],
|
|
84
|
+
setIsMuted = _useState8[1];
|
|
85
|
+
|
|
86
|
+
var _useState9 = (0, _react.useState)("00:00"),
|
|
87
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
88
|
+
totalTime = _useState10[0],
|
|
89
|
+
setTotalTime = _useState10[1];
|
|
90
|
+
|
|
91
|
+
var _useState11 = (0, _react.useState)("00:00"),
|
|
92
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
93
|
+
currentTime = _useState12[0],
|
|
94
|
+
setCurrentTime = _useState12[1];
|
|
95
|
+
|
|
96
|
+
var _useState13 = (0, _react.useState)(false),
|
|
97
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
98
|
+
showDot = _useState14[0],
|
|
99
|
+
setShowDot = _useState14[1];
|
|
100
|
+
|
|
101
|
+
var _useState15 = (0, _react.useState)(false),
|
|
102
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
103
|
+
isMouseDown = _useState16[0],
|
|
104
|
+
setIsMouseDown = _useState16[1];
|
|
105
|
+
|
|
106
|
+
var videoRef = (0, _react.useRef)(document.createElement("video"));
|
|
107
|
+
var volumeRef = (0, _react.useRef)(document.createElement("div"));
|
|
108
|
+
var totalProgressRef = (0, _react.useRef)(document.createElement("div"));
|
|
109
|
+
var progressRef = (0, _react.useRef)(document.createElement("div"));
|
|
110
|
+
var boxRef = (0, _react.useRef)(document.createElement("div"));
|
|
111
|
+
|
|
112
|
+
var handlePlayVideo = function handlePlayVideo() {
|
|
113
|
+
setIsPlay(!isPlay);
|
|
114
|
+
|
|
115
|
+
if (isPlay) {
|
|
116
|
+
videoRef.current.pause();
|
|
117
|
+
} else {
|
|
118
|
+
videoRef.current.play();
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var handleChangeVolumeMuted = function handleChangeVolumeMuted() {
|
|
123
|
+
setIsMuted(!isMuted);
|
|
124
|
+
videoRef.current.muted = !videoRef.current.muted;
|
|
125
|
+
}; // 鼠标移入移出进度条区域
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
var handleMouseEnterProgress = function handleMouseEnterProgress() {
|
|
129
|
+
setShowDot(true);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var handleMouseLeaveProgress = function handleMouseLeaveProgress() {
|
|
133
|
+
setShowDot(false);
|
|
134
|
+
}; // 点击音量 音量进度条宽度
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
var getCurrentVolumeWidth = function getCurrentVolumeWidth(e) {
|
|
138
|
+
var currentWidth = e.clientX - (document.documentElement.offsetWidth - 178);
|
|
139
|
+
|
|
140
|
+
if (currentWidth <= 0) {
|
|
141
|
+
setIsMuted(true);
|
|
142
|
+
videoRef.current.muted = true;
|
|
143
|
+
} else if (currentWidth >= 34) {
|
|
144
|
+
volumeRef.current.style.width = "34px";
|
|
145
|
+
videoRef.current.volume = 1;
|
|
146
|
+
} else {
|
|
147
|
+
volumeRef.current.style.width = "".concat(currentWidth, "px");
|
|
148
|
+
videoRef.current.volume = currentWidth / 34;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var handleMouseClickVolume = function handleMouseClickVolume(e) {
|
|
153
|
+
getCurrentVolumeWidth(e);
|
|
154
|
+
}; // 获得点击进度条 进度条的宽度
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
var getCurrentProgressWidth = function getCurrentProgressWidth(e) {
|
|
158
|
+
var currentWidth = e.clientX - (document.documentElement.offsetWidth - 432);
|
|
159
|
+
progressRef.current.style.width = "".concat(currentWidth, "px");
|
|
160
|
+
videoRef.current.currentTime = videoRef.current.duration * currentWidth / 360;
|
|
161
|
+
}; // 点击进度条
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
var handleClickTotalProgress = function handleClickTotalProgress(e) {
|
|
165
|
+
getCurrentProgressWidth(e);
|
|
166
|
+
}; // 拖动进度条
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
var handleMouseDownProgress = function handleMouseDownProgress() {
|
|
170
|
+
setIsMouseDown(true);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
var handleMouseMoveProgress = function handleMouseMoveProgress(e) {
|
|
174
|
+
if (isMouseDown) {
|
|
175
|
+
getCurrentProgressWidth(e);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
var handleMouseUpProgress = function handleMouseUpProgress() {
|
|
180
|
+
setIsMouseDown(false);
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
var handleCloseFloatVideo = function handleCloseFloatVideo() {
|
|
184
|
+
localStorage.setItem("hide_performance_small_video_".concat((0, _bsGlobal.getUserInfo)().Id), "true");
|
|
185
|
+
boxRef.current.style.display = "none";
|
|
186
|
+
videoRef.current.pause();
|
|
187
|
+
videoRef.current.currentTime = 0;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
var handleShowBigVideo = function handleShowBigVideo() {
|
|
191
|
+
handleCloseFloatVideo();
|
|
192
|
+
setVideoModalVisible(true);
|
|
193
|
+
videoRef.current.pause();
|
|
194
|
+
setIsPlay(false);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var handleCloseBigVideo = function handleCloseBigVideo() {
|
|
198
|
+
setVideoModalVisible(false);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
var showSmallVideo = function showSmallVideo() {
|
|
202
|
+
videoRef.current.play();
|
|
203
|
+
setIsPlay(true);
|
|
204
|
+
videoRef.current.muted = true;
|
|
205
|
+
setIsMuted(true);
|
|
206
|
+
boxRef.current.style.display = "block";
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
var handleMouseOverVideo = function handleMouseOverVideo() {
|
|
210
|
+
setIsHover(true);
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
var handleMouseLeaveVideo = function handleMouseLeaveVideo() {
|
|
214
|
+
setIsHover(false);
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
(0, _react.useEffect)(function () {
|
|
218
|
+
videoRef.current.onloadedmetadata = function () {
|
|
219
|
+
setTotalTime(videoRef.current.duration.toString());
|
|
220
|
+
};
|
|
221
|
+
}, [videoRef.current.onloadedmetadata]);
|
|
222
|
+
(0, _react.useEffect)(function () {
|
|
223
|
+
videoRef.current.ontimeupdate = function () {
|
|
224
|
+
setCurrentTime(videoRef.current.currentTime.toString());
|
|
225
|
+
progressRef.current.style.width = "".concat(360 * videoRef.current.currentTime / videoRef.current.duration, "px");
|
|
226
|
+
};
|
|
227
|
+
}, [videoRef.current.ontimeupdate]);
|
|
228
|
+
(0, _react.useEffect)(function () {
|
|
229
|
+
volumeRef.current.style.width = "".concat(34 * videoRef.current.volume, "px");
|
|
230
|
+
}, [videoRef.current.onloadedmetadata]);
|
|
231
|
+
(0, _react.useEffect)(function () {
|
|
232
|
+
if (visible) {
|
|
233
|
+
videoRef.current.play();
|
|
234
|
+
setIsPlay(true);
|
|
235
|
+
videoRef.current.muted = true;
|
|
236
|
+
setIsMuted(true);
|
|
237
|
+
boxRef.current.style.display = "block";
|
|
238
|
+
} else {
|
|
239
|
+
videoRef.current.pause();
|
|
240
|
+
setIsPlay(false);
|
|
241
|
+
videoRef.current.muted = true;
|
|
242
|
+
setIsMuted(true);
|
|
243
|
+
boxRef.current.style.display = "none";
|
|
244
|
+
}
|
|
245
|
+
}, [visible]);
|
|
246
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
247
|
+
className: preCls,
|
|
248
|
+
ref: boxRef,
|
|
249
|
+
onMouseOver: handleMouseOverVideo,
|
|
250
|
+
onMouseLeave: handleMouseLeaveVideo,
|
|
251
|
+
onFocus: handleMouseOverVideo
|
|
252
|
+
}, /*#__PURE__*/_react["default"].createElement("video", {
|
|
253
|
+
ref: videoRef,
|
|
254
|
+
src: videoSrc,
|
|
255
|
+
loop: true,
|
|
256
|
+
autoPlay: true,
|
|
257
|
+
muted: true,
|
|
258
|
+
poster: _smallFaQi["default"],
|
|
259
|
+
className: "".concat(preCls, "__video")
|
|
260
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
261
|
+
className: (0, _classnames["default"])("".concat(preCls, "__progress"), _defineProperty({}, "".concat(preCls, "__progress--show"), isHover)),
|
|
262
|
+
onMouseEnter: handleMouseEnterProgress,
|
|
263
|
+
onMouseLeave: handleMouseLeaveProgress,
|
|
264
|
+
ref: totalProgressRef,
|
|
265
|
+
onClick: handleClickTotalProgress,
|
|
266
|
+
onMouseDown: handleMouseDownProgress,
|
|
267
|
+
onMouseMove: handleMouseMoveProgress,
|
|
268
|
+
onMouseUp: handleMouseUpProgress
|
|
269
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
|
+
className: "".concat(preCls, "__progress-current"),
|
|
271
|
+
ref: progressRef
|
|
272
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
273
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__progress-current-dot"), showDot))
|
|
274
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
275
|
+
className: (0, _classnames["default"])("".concat(preCls, "__controls"), _defineProperty({}, "".concat(preCls, "__controls--show"), isHover))
|
|
276
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
277
|
+
className: "".concat(preCls, "__controls-left")
|
|
278
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
279
|
+
onClick: handlePlayVideo,
|
|
280
|
+
className: (0, _classnames["default"])("".concat(preCls, "__controls-play"), "".concat(preCls, "__controls-button"))
|
|
281
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
282
|
+
src: isPlay ? _play["default"] : _pause["default"],
|
|
283
|
+
alt: "play"
|
|
284
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
285
|
+
className: "".concat(preCls, "__controls-time")
|
|
286
|
+
}, (0, _utils["default"])(currentTime)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
287
|
+
className: "".concat(preCls, "__controls-time")
|
|
288
|
+
}, " / ".concat((0, _utils["default"])(totalTime)))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
289
|
+
className: "".concat(preCls, "__controls-right")
|
|
290
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
291
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-button"), isMuted), _defineProperty({}, "".concat(preCls, "__controls-volume"), !isMuted))
|
|
292
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
293
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-progress--hidden"), isMuted), "".concat(preCls, "__controls-volume-progress")),
|
|
294
|
+
onClick: handleMouseClickVolume
|
|
295
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
296
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-current--hidden"), isMuted), "".concat(preCls, "__controls-volume-current")),
|
|
297
|
+
ref: volumeRef
|
|
298
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
299
|
+
onClick: handleChangeVolumeMuted
|
|
300
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
301
|
+
src: isMuted ? _muted["default"] : _volume["default"],
|
|
302
|
+
className: "".concat(preCls, "__controls-play"),
|
|
303
|
+
alt: "\u97F3\u91CF"
|
|
304
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
305
|
+
className: "".concat(preCls, "__controls-full"),
|
|
306
|
+
onClick: handleShowBigVideo
|
|
307
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
308
|
+
src: _full["default"],
|
|
309
|
+
alt: "full"
|
|
310
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
311
|
+
className: (0, _classnames["default"])("".concat(preCls, "__mask1"), _defineProperty({}, "".concat(preCls, "__mask1--show"), isHover))
|
|
312
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
313
|
+
className: "".concat(preCls, "__mask1-title")
|
|
314
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
315
|
+
onClick: handleCloseFloatVideo
|
|
316
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
317
|
+
src: _close["default"],
|
|
318
|
+
alt: "\u5173\u95ED",
|
|
319
|
+
className: "".concat(preCls, "__mask1-close")
|
|
320
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
321
|
+
className: (0, _classnames["default"])("".concat(preCls, "__mask2"), _defineProperty({}, "".concat(preCls, "__mask2--show"), isHover))
|
|
322
|
+
}), /*#__PURE__*/_react["default"].createElement(_videoModal["default"], {
|
|
323
|
+
title: title,
|
|
324
|
+
videoSrc: videoSrc,
|
|
325
|
+
visible: videoModalVisible,
|
|
326
|
+
onClose: handleCloseBigVideo,
|
|
327
|
+
onCancel: handleCloseBigVideo,
|
|
328
|
+
canMini: true,
|
|
329
|
+
showSmallVideo: showSmallVideo
|
|
330
|
+
}));
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
var _default = FloatVideo;
|
|
334
|
+
exports["default"] = _default;
|