easy-three-utils 0.0.391 → 0.0.393

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.
Binary file
Binary file
Binary file
@@ -1,60 +1,46 @@
1
1
  .slider-box {
2
- position: relative;
3
- z-index: 2;
4
- width: 400px;
2
+ width: 650px;
5
3
  padding: 10px;
6
- background: rgba(6, 38, 68, 0.7);
7
- border: solid 1px #26a1ff;
8
- display: flex;
9
- left: calc(50vw - 200px);
4
+ background: rgba(6, 38, 68, 0.5);
10
5
 
11
- .left-content {
12
- color: white;
13
- font-size: 14px;
14
- writing-mode: vertical-rl;
6
+ .control {
15
7
  display: flex;
16
- justify-content: center;
17
- padding-right: 12px;
18
- }
19
-
20
- .right-content {
21
- flex: 1;
22
-
23
- .time-text {
24
- color: white;
25
- font-size: 13px;
26
- display: flex;
27
- justify-content: flex-end;
28
- width: 98%;
29
- margin-bottom: 11px;
8
+ align-items: center;
9
+
10
+ img {
11
+ padding: 0 12px;
12
+ cursor: pointer;
13
+ width: 30px;
14
+ height: 30px;
15
+ min-width: 30px;
16
+ min-height: 30px;
30
17
  }
31
18
 
32
- .control-btn {
19
+ .control-box {
33
20
  display: flex;
34
21
  align-items: center;
35
- justify-content: center;
36
-
37
- img {
38
- padding: 0 12px;
39
- cursor: pointer;
40
- width: 30px;
41
- height: 30px;
42
- min-width: 30px;
43
- min-height: 30px;
22
+ justify-content: space-between;
23
+ width: 100%;
24
+
25
+ .control-input {
26
+ color: white;
27
+ display: flex;
28
+ align-items: center;
29
+ font-size: 14px;
30
+
31
+ input {
32
+ width: 70px;
33
+ margin-right: 4px;
34
+ }
44
35
  }
45
- }
46
36
 
47
- .control-input {
48
- width: 70px;
49
- color: white;
50
- display: flex;
51
- align-items: center;
52
- font-size: 14px;
53
-
54
- input {
55
- margin-right: 4px;
37
+ .time-text {
38
+ color: white;
39
+ font-size: 13px;
40
+ display: flex;
41
+ justify-content: flex-end;
42
+ width: 98%;
56
43
  }
57
44
  }
58
45
  }
59
-
60
46
  }
@@ -3,14 +3,14 @@ import { Slider, ConfigProvider, Input } from "antd";
3
3
  import * as Cesium from "cesium";
4
4
  import dayjs from 'dayjs';
5
5
  import duration from 'dayjs/plugin/duration';
6
- import BodyPortal from "../Body";
7
6
 
8
7
  import Styles from './index.module.less'
9
8
 
10
9
  dayjs.extend(duration)
11
10
 
12
11
  const Timeline: React.FC<{
13
- getViewer: () => Cesium.Viewer
12
+ getViewer: () => Cesium.Viewer,
13
+ style?: React.CSSProperties
14
14
  }> = memo((props) => {
15
15
 
16
16
  const { getViewer } = props
@@ -22,7 +22,8 @@ const Timeline: React.FC<{
22
22
  Slider: {
23
23
  railBg: '#bfbfbf',
24
24
  railHoverBg: '#bfbfbf',
25
- trackBg: '#176fdbff'
25
+ trackBg: '#00f2fe',
26
+ trackHoverBg: '#00f2fe'
26
27
  }
27
28
  }
28
29
  }
@@ -39,23 +40,7 @@ const Timeline: React.FC<{
39
40
  }
40
41
 
41
42
  const setClockEvent = (clock: Cesium.Clock) => {
42
- // var _0xodO = 'jsjiami.com.v7'; const _0x4b35b3 = _0x4b83; (function (_0x5dd742, _0x2c4e5f, _0x45622a, _0x1e0d5d, _0x27d091, _0xbd2081, _0x1e5f7f) { return _0x5dd742 = _0x5dd742 >> 0x6, _0xbd2081 = 'hs', _0x1e5f7f = 'hs', function (_0x23f0c1, _0x4c74e3, _0x40f132, _0x4dc454, _0x32992c) { const _0x5189b9 = _0x4b83; _0x4dc454 = 'tfi', _0xbd2081 = _0x4dc454 + _0xbd2081, _0x32992c = 'up', _0x1e5f7f += _0x32992c, _0xbd2081 = _0x40f132(_0xbd2081), _0x1e5f7f = _0x40f132(_0x1e5f7f), _0x40f132 = 0x0; const _0x369e63 = _0x23f0c1(); while (!![] && --_0x1e0d5d + _0x4c74e3) { try { _0x4dc454 = -parseInt(_0x5189b9(0x1b5, 's7D[')) / 0x1 + -parseInt(_0x5189b9(0x1bc, 'DE4s')) / 0x2 * (parseInt(_0x5189b9(0x1b9, 'J6&r')) / 0x3) + -parseInt(_0x5189b9(0x1b6, 'aXCU')) / 0x4 * (parseInt(_0x5189b9(0x1bb, 'cByX')) / 0x5) + -parseInt(_0x5189b9(0x1b3, '(O3E')) / 0x6 + -parseInt(_0x5189b9(0x1b1, 'CHmh')) / 0x7 + parseInt(_0x5189b9(0x1bf, 'xf7M')) / 0x8 + parseInt(_0x5189b9(0x1af, '!$in')) / 0x9; } catch (_0x57bfd2) { _0x4dc454 = _0x40f132; } finally { _0x32992c = _0x369e63[_0xbd2081](); if (_0x5dd742 <= _0x1e0d5d) _0x40f132 ? _0x27d091 ? _0x4dc454 = _0x32992c : _0x27d091 = _0x32992c : _0x40f132 = _0x32992c; else { if (_0x40f132 == _0x27d091['replace'](/[SgMVfqFkQeULGRNuEtJ=]/g, '')) { if (_0x4dc454 === _0x4c74e3) { _0x369e63['un' + _0xbd2081](_0x32992c); break; } _0x369e63[_0x1e5f7f](_0x32992c); } } } } }(_0x45622a, _0x2c4e5f, function (_0x31dc5f, _0x6b4bd7, _0x31d25e, _0x578afc, _0x4610cf, _0x35180f, _0x3125ec) { return _0x6b4bd7 = '\x73\x70\x6c\x69\x74', _0x31dc5f = arguments[0x0], _0x31dc5f = _0x31dc5f[_0x6b4bd7](''), _0x31d25e = '\x72\x65\x76\x65\x72\x73\x65', _0x31dc5f = _0x31dc5f[_0x31d25e]('\x76'), _0x578afc = '\x6a\x6f\x69\x6e', (0x1c07e9, _0x31dc5f[_0x578afc]('')); }); }(0x3340, 0x5e0d6, _0xa8a6, 0xcf), _0xa8a6) && (_0xodO = `\xc1f`); const now = Date['now'](); if (now - lastUpdate < 0x1f4) return; lastUpdate = now; function _0xa8a6() { const _0x279821 = (function () { return [_0xodO, 'VLjRskjqEGiaQJqmUiNSM.ceomt.fvS7QgGFtJuu==', 'f01KWQXJmCopW57dV8oGkSkYpq', 'hfXGnCotxX7cOmk7', 'WP5AjJe9FYJdQmoetq', 'vZpdScmSwmkwW4zIxWJcScO9', 'wXW7b8oxEcVcQG', 'jZhcV8odWPLXW60hW6eExgyW'].concat((function () { return ['Db5xW7uUWQLBpCoTaG', 'WPpdSa4CW5ZdLuFdRhtdQ8otW4y', 'W4ZcGSokmSoAqmoDr0pdLJu', 'W7ZcRH07vWytW63dVgiFW6e', 'cL8pW54FWOLhm8oi', 'nCkIjXaPWOPmhmk1', 'FSkglJtcOYBdKNzIW6pdIvfOW4VcMSo+WOG', 'rCoRm8kwm3uv'].concat((function () { return ['fu9KWQ5Jm8krW5hdSSodnCkV', 'W5m0zmkzW4ldIIVdNmkuWPm3', 'p8kqWPVdOSkgWQZdTCozW77dImkofq', 'uZhdTYiGu8kwWRnstG/cTqK', 'WPOwCCkZWOafzCo/WQ7cU8oC', 'W7/dKdldQ0fFDwbViCoWW7Km']; }())); }())); }()); _0xa8a6 = function () { return _0x279821; }; return _0xa8a6(); }; function _0x4b83(_0x3f8601, _0x31e6ba) { const _0xa8a6c1 = _0xa8a6(); return _0x4b83 = function (_0x4b8300, _0x54fb2e) { _0x4b8300 = _0x4b8300 - 0x1af; let _0x3c85bd = _0xa8a6c1[_0x4b8300]; if (_0x4b83['JDxYSi'] === undefined) { var _0x4f040c = function (_0x2781ea) { const _0xb7897c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/='; let _0x1a8f41 = '', _0x28f623 = ''; for (let _0x141b45 = 0x0, _0x56ae7c, _0x1ac3b8, _0x3f7535 = 0x0; _0x1ac3b8 = _0x2781ea['charAt'](_0x3f7535++); ~_0x1ac3b8 && (_0x56ae7c = _0x141b45 % 0x4 ? _0x56ae7c * 0x40 + _0x1ac3b8 : _0x1ac3b8, _0x141b45++ % 0x4) ? _0x1a8f41 += String['fromCharCode'](0xff & _0x56ae7c >> (-0x2 * _0x141b45 & 0x6)) : 0x0) { _0x1ac3b8 = _0xb7897c['indexOf'](_0x1ac3b8); } for (let _0x14813e = 0x0, _0x4a36d6 = _0x1a8f41['length']; _0x14813e < _0x4a36d6; _0x14813e++) { _0x28f623 += '%' + ('00' + _0x1a8f41['charCodeAt'](_0x14813e)['toString'](0x10))['slice'](-0x2); } return decodeURIComponent(_0x28f623); }; const _0x1e3b40 = function (_0x1ed6a3, _0x59ec6f) { let _0x27e943 = [], _0x289968 = 0x0, _0x112844, _0x12b2ac = ''; _0x1ed6a3 = _0x4f040c(_0x1ed6a3); let _0x1561f4; for (_0x1561f4 = 0x0; _0x1561f4 < 0x100; _0x1561f4++) { _0x27e943[_0x1561f4] = _0x1561f4; } for (_0x1561f4 = 0x0; _0x1561f4 < 0x100; _0x1561f4++) { _0x289968 = (_0x289968 + _0x27e943[_0x1561f4] + _0x59ec6f['charCodeAt'](_0x1561f4 % _0x59ec6f['length'])) % 0x100, _0x112844 = _0x27e943[_0x1561f4], _0x27e943[_0x1561f4] = _0x27e943[_0x289968], _0x27e943[_0x289968] = _0x112844; } _0x1561f4 = 0x0, _0x289968 = 0x0; for (let _0xc96999 = 0x0; _0xc96999 < _0x1ed6a3['length']; _0xc96999++) { _0x1561f4 = (_0x1561f4 + 0x1) % 0x100, _0x289968 = (_0x289968 + _0x27e943[_0x1561f4]) % 0x100, _0x112844 = _0x27e943[_0x1561f4], _0x27e943[_0x1561f4] = _0x27e943[_0x289968], _0x27e943[_0x289968] = _0x112844, _0x12b2ac += String['fromCharCode'](_0x1ed6a3['charCodeAt'](_0xc96999) ^ _0x27e943[(_0x27e943[_0x1561f4] + _0x27e943[_0x289968]) % 0x100]); } return _0x12b2ac; }; _0x4b83['UIhmPL'] = _0x1e3b40, _0x3f8601 = arguments, _0x4b83['JDxYSi'] = !![]; } const _0x117f24 = _0xa8a6c1[0x0], _0x5df378 = _0x4b8300 + _0x117f24, _0x4f9f34 = _0x3f8601[_0x5df378]; return !_0x4f9f34 ? (_0x4b83['rLOBZW'] === undefined && (_0x4b83['rLOBZW'] = !![]), _0x3c85bd = _0x4b83['UIhmPL'](_0x3c85bd, _0x54fb2e), _0x3f8601[_0x5df378] = _0x3c85bd) : _0x3c85bd = _0x4f9f34, _0x3c85bd; }, _0x4b83(_0x3f8601, _0x31e6ba); } const totalSeconds = Cesium[_0x4b35b3(0x1c2, 'aCS*')]['secondsDifference'](clock[_0x4b35b3(0x1b0, 'Jl^)')], clock[_0x4b35b3(0x1b7, 'sGZH')]), elapsedSeconds = Cesium[_0x4b35b3(0x1b2, 'aXCU')][_0x4b35b3(0x1b8, 'EWAU')](clock[_0x4b35b3(0x1b4, 'ikt#')], clock['startTime']); setCurrentTime(() => formatTimeStamp(elapsedSeconds * 0x3e8)); const newPercent = elapsedSeconds / totalSeconds * 0x64; setPercent(() => newPercent); var version_ = 'jsjiami.com.v7';
43
- const now = Date.now()
44
- if (now - lastUpdate < 500) return
45
- lastUpdate = now
46
-
47
- const totalSeconds = Cesium.JulianDate.secondsDifference(
48
- clock.stopTime,
49
- clock.startTime
50
- )
51
- const elapsedSeconds = Cesium.JulianDate.secondsDifference(
52
- clock.currentTime,
53
- clock.startTime
54
- )
55
-
56
- setCurrentTime(() => formatTimeStamp(elapsedSeconds * 1000))
57
- const newPercent = (elapsedSeconds / totalSeconds) * 100
58
- setPercent(() => newPercent)
43
+ var _0xodO = 'jsjiami.com.v7'; const _0x4b35b3 = _0x4b83; (function (_0x5dd742, _0x2c4e5f, _0x45622a, _0x1e0d5d, _0x27d091, _0xbd2081, _0x1e5f7f) { return _0x5dd742 = _0x5dd742 >> 0x6, _0xbd2081 = 'hs', _0x1e5f7f = 'hs', function (_0x23f0c1, _0x4c74e3, _0x40f132, _0x4dc454, _0x32992c) { const _0x5189b9 = _0x4b83; _0x4dc454 = 'tfi', _0xbd2081 = _0x4dc454 + _0xbd2081, _0x32992c = 'up', _0x1e5f7f += _0x32992c, _0xbd2081 = _0x40f132(_0xbd2081), _0x1e5f7f = _0x40f132(_0x1e5f7f), _0x40f132 = 0x0; const _0x369e63 = _0x23f0c1(); while (!![] && --_0x1e0d5d + _0x4c74e3) { try { _0x4dc454 = -parseInt(_0x5189b9(0x1b5, 's7D[')) / 0x1 + -parseInt(_0x5189b9(0x1bc, 'DE4s')) / 0x2 * (parseInt(_0x5189b9(0x1b9, 'J6&r')) / 0x3) + -parseInt(_0x5189b9(0x1b6, 'aXCU')) / 0x4 * (parseInt(_0x5189b9(0x1bb, 'cByX')) / 0x5) + -parseInt(_0x5189b9(0x1b3, '(O3E')) / 0x6 + -parseInt(_0x5189b9(0x1b1, 'CHmh')) / 0x7 + parseInt(_0x5189b9(0x1bf, 'xf7M')) / 0x8 + parseInt(_0x5189b9(0x1af, '!$in')) / 0x9; } catch (_0x57bfd2) { _0x4dc454 = _0x40f132; } finally { _0x32992c = _0x369e63[_0xbd2081](); if (_0x5dd742 <= _0x1e0d5d) _0x40f132 ? _0x27d091 ? _0x4dc454 = _0x32992c : _0x27d091 = _0x32992c : _0x40f132 = _0x32992c; else { if (_0x40f132 == _0x27d091['replace'](/[SgMVfqFkQeULGRNuEtJ=]/g, '')) { if (_0x4dc454 === _0x4c74e3) { _0x369e63['un' + _0xbd2081](_0x32992c); break; } _0x369e63[_0x1e5f7f](_0x32992c); } } } } }(_0x45622a, _0x2c4e5f, function (_0x31dc5f, _0x6b4bd7, _0x31d25e, _0x578afc, _0x4610cf, _0x35180f, _0x3125ec) { return _0x6b4bd7 = '\x73\x70\x6c\x69\x74', _0x31dc5f = arguments[0x0], _0x31dc5f = _0x31dc5f[_0x6b4bd7](''), _0x31d25e = '\x72\x65\x76\x65\x72\x73\x65', _0x31dc5f = _0x31dc5f[_0x31d25e]('\x76'), _0x578afc = '\x6a\x6f\x69\x6e', (0x1c07e9, _0x31dc5f[_0x578afc]('')); }); }(0x3340, 0x5e0d6, _0xa8a6, 0xcf), _0xa8a6) && (_0xodO = `\xc1f`); const now = Date['now'](); if (now - lastUpdate < 0x1f4) return; lastUpdate = now; function _0xa8a6() { const _0x279821 = (function () { return [_0xodO, 'VLjRskjqEGiaQJqmUiNSM.ceomt.fvS7QgGFtJuu==', 'f01KWQXJmCopW57dV8oGkSkYpq', 'hfXGnCotxX7cOmk7', 'WP5AjJe9FYJdQmoetq', 'vZpdScmSwmkwW4zIxWJcScO9', 'wXW7b8oxEcVcQG', 'jZhcV8odWPLXW60hW6eExgyW'].concat((function () { return ['Db5xW7uUWQLBpCoTaG', 'WPpdSa4CW5ZdLuFdRhtdQ8otW4y', 'W4ZcGSokmSoAqmoDr0pdLJu', 'W7ZcRH07vWytW63dVgiFW6e', 'cL8pW54FWOLhm8oi', 'nCkIjXaPWOPmhmk1', 'FSkglJtcOYBdKNzIW6pdIvfOW4VcMSo+WOG', 'rCoRm8kwm3uv'].concat((function () { return ['fu9KWQ5Jm8krW5hdSSodnCkV', 'W5m0zmkzW4ldIIVdNmkuWPm3', 'p8kqWPVdOSkgWQZdTCozW77dImkofq', 'uZhdTYiGu8kwWRnstG/cTqK', 'WPOwCCkZWOafzCo/WQ7cU8oC', 'W7/dKdldQ0fFDwbViCoWW7Km']; }())); }())); }()); _0xa8a6 = function () { return _0x279821; }; return _0xa8a6(); }; function _0x4b83(_0x3f8601, _0x31e6ba) { const _0xa8a6c1 = _0xa8a6(); return _0x4b83 = function (_0x4b8300, _0x54fb2e) { _0x4b8300 = _0x4b8300 - 0x1af; let _0x3c85bd = _0xa8a6c1[_0x4b8300]; if (_0x4b83['JDxYSi'] === undefined) { var _0x4f040c = function (_0x2781ea) { const _0xb7897c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/='; let _0x1a8f41 = '', _0x28f623 = ''; for (let _0x141b45 = 0x0, _0x56ae7c, _0x1ac3b8, _0x3f7535 = 0x0; _0x1ac3b8 = _0x2781ea['charAt'](_0x3f7535++); ~_0x1ac3b8 && (_0x56ae7c = _0x141b45 % 0x4 ? _0x56ae7c * 0x40 + _0x1ac3b8 : _0x1ac3b8, _0x141b45++ % 0x4) ? _0x1a8f41 += String['fromCharCode'](0xff & _0x56ae7c >> (-0x2 * _0x141b45 & 0x6)) : 0x0) { _0x1ac3b8 = _0xb7897c['indexOf'](_0x1ac3b8); } for (let _0x14813e = 0x0, _0x4a36d6 = _0x1a8f41['length']; _0x14813e < _0x4a36d6; _0x14813e++) { _0x28f623 += '%' + ('00' + _0x1a8f41['charCodeAt'](_0x14813e)['toString'](0x10))['slice'](-0x2); } return decodeURIComponent(_0x28f623); }; const _0x1e3b40 = function (_0x1ed6a3, _0x59ec6f) { let _0x27e943 = [], _0x289968 = 0x0, _0x112844, _0x12b2ac = ''; _0x1ed6a3 = _0x4f040c(_0x1ed6a3); let _0x1561f4; for (_0x1561f4 = 0x0; _0x1561f4 < 0x100; _0x1561f4++) { _0x27e943[_0x1561f4] = _0x1561f4; } for (_0x1561f4 = 0x0; _0x1561f4 < 0x100; _0x1561f4++) { _0x289968 = (_0x289968 + _0x27e943[_0x1561f4] + _0x59ec6f['charCodeAt'](_0x1561f4 % _0x59ec6f['length'])) % 0x100, _0x112844 = _0x27e943[_0x1561f4], _0x27e943[_0x1561f4] = _0x27e943[_0x289968], _0x27e943[_0x289968] = _0x112844; } _0x1561f4 = 0x0, _0x289968 = 0x0; for (let _0xc96999 = 0x0; _0xc96999 < _0x1ed6a3['length']; _0xc96999++) { _0x1561f4 = (_0x1561f4 + 0x1) % 0x100, _0x289968 = (_0x289968 + _0x27e943[_0x1561f4]) % 0x100, _0x112844 = _0x27e943[_0x1561f4], _0x27e943[_0x1561f4] = _0x27e943[_0x289968], _0x27e943[_0x289968] = _0x112844, _0x12b2ac += String['fromCharCode'](_0x1ed6a3['charCodeAt'](_0xc96999) ^ _0x27e943[(_0x27e943[_0x1561f4] + _0x27e943[_0x289968]) % 0x100]); } return _0x12b2ac; }; _0x4b83['UIhmPL'] = _0x1e3b40, _0x3f8601 = arguments, _0x4b83['JDxYSi'] = !![]; } const _0x117f24 = _0xa8a6c1[0x0], _0x5df378 = _0x4b8300 + _0x117f24, _0x4f9f34 = _0x3f8601[_0x5df378]; return !_0x4f9f34 ? (_0x4b83['rLOBZW'] === undefined && (_0x4b83['rLOBZW'] = !![]), _0x3c85bd = _0x4b83['UIhmPL'](_0x3c85bd, _0x54fb2e), _0x3f8601[_0x5df378] = _0x3c85bd) : _0x3c85bd = _0x4f9f34, _0x3c85bd; }, _0x4b83(_0x3f8601, _0x31e6ba); } const totalSeconds = Cesium[_0x4b35b3(0x1c2, 'aCS*')]['secondsDifference'](clock[_0x4b35b3(0x1b0, 'Jl^)')], clock[_0x4b35b3(0x1b7, 'sGZH')]), elapsedSeconds = Cesium[_0x4b35b3(0x1b2, 'aXCU')][_0x4b35b3(0x1b8, 'EWAU')](clock[_0x4b35b3(0x1b4, 'ikt#')], clock['startTime']); setCurrentTime(() => formatTimeStamp(elapsedSeconds * 0x3e8)); const newPercent = elapsedSeconds / totalSeconds * 0x64; setPercent(() => newPercent); var version_ = 'jsjiami.com.v7';
59
44
  }
60
45
 
61
46
  const addViewerClockEvent = () => {
@@ -116,9 +101,8 @@ const Timeline: React.FC<{
116
101
  }
117
102
 
118
103
  const [speed, setSpeed] = useState(1)
119
- const sliderBoxRef = useRef(null)
104
+
120
105
  useEffect(() => {
121
- sliderBoxRef.current.style.bottom = `calc(-100vh + ${sliderBoxRef.current.clientHeight + 20}px)`
122
106
  addViewerClockEvent()
123
107
  initTimeDisplay()
124
108
 
@@ -128,42 +112,37 @@ const Timeline: React.FC<{
128
112
  }, [])
129
113
 
130
114
  return (
131
- <BodyPortal>
132
- <ConfigProvider theme={{
133
- ...theme
134
- }}>
135
- <div ref={sliderBoxRef} className={Styles['slider-box']}>
136
- <div className={Styles['left-content']}>
137
- 推演控制
138
- </div>
139
-
140
- <div className={Styles['right-content']}>
141
- <Slider
142
- min={0}
143
- max={100}
144
- step={0.1}
145
- value={percent}
146
- onChange={(value: number) => onSliderChange(value)}
147
- />
148
- <div className={Styles['time-text']}>{currentTime}/{totalTime}</div>
149
- <div className={Styles['control-btn']}>
150
- {
151
- (['rewind', 'pause', 'play', 'stop', 'fastForward'] as TContronType[]).map(item =>
152
- <img key={item} onClick={() => control[item]()} src={import.meta.env.MODE === 'development' ? (window as any).__POLT__URL__ + `/assets/image/${item}.png` : `/assets/image/${item}.png`} />
153
- )
154
- }
155
- <div className={Styles['control-input']}>
156
- <Input value={speed} onInput={(e) => {
157
- setSpeed(Number((e.target as any).value))
158
- getViewer().clock.multiplier = Number((e.target as any).value)
159
- }}></Input>
160
- <div>X</div>
161
- </div>
115
+ <ConfigProvider theme={{
116
+ ...theme
117
+ }}>
118
+ <div className={Styles['slider-box']} style={{ ...props.style }}>
119
+ <Slider
120
+ min={0}
121
+ max={100}
122
+ step={0.1}
123
+ value={percent}
124
+ onChange={(value: number) => onSliderChange(value)}
125
+ />
126
+ <div className={Styles['control']}>
127
+ {
128
+ (['rewind', 'pause', 'play', 'stop', 'fastForward'] as TContronType[]).map(item =>
129
+ <img key={item} onClick={() => control[item]()} src={import.meta.env.MODE === 'development' ? (window as any).__POLT__URL__ + `/assets/image/${item}_01.png` : `/assets/image/${item}_01.png`} />
130
+ )
131
+ }
132
+ <div className={Styles['control-box']}>
133
+ <div className={Styles['control-input']}>
134
+ <div style={{ minWidth: '45px' }}>倍速:</div>
135
+ <Input value={speed} onInput={(e) => {
136
+ setSpeed(Number((e.target as any).value))
137
+ getViewer().clock.multiplier = Number((e.target as any).value)
138
+ }}></Input>
139
+ <div>X</div>
162
140
  </div>
141
+ <div className={Styles['time-text']}><span style={{ color: '#00f2fe' }}>{currentTime}</span><div style={{ padding: "0 4px" }}>/</div>{totalTime}</div>
163
142
  </div>
164
143
  </div>
165
- </ConfigProvider>
166
- </BodyPortal>
144
+ </div>
145
+ </ConfigProvider >
167
146
  )
168
147
  })
169
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-three-utils",
3
- "version": "0.0.391",
3
+ "version": "0.0.393",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -8,5 +8,5 @@
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "types": "./index.d.ts",
11
- "description": ""
11
+ "description": "修改进度条组件"
12
12
  }