@titaui/pc 1.10.17-beta.2 → 1.10.19

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.
Files changed (31) hide show
  1. package/lib/components/dynamic/components/first-level-tabs/index.js +1 -1
  2. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.css +4 -0
  3. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +107 -0
  4. package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.css +0 -0
  5. package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.js +0 -0
  6. package/lib/components/dynamic/dynamic-item/dynamic-share-content/index.js +42 -0
  7. package/lib/components/dynamic/dynamic-item/index.js +17 -3
  8. package/lib/components/menus/export-modules/demo-menus/menus.js +14 -14
  9. package/lib/components/nav-top/components/user-message/index.js +3 -0
  10. package/lib/components/superset-charts/components/index.js +63 -0
  11. package/lib/components/superset-charts/index.js +13 -0
  12. package/lib/components/superset-charts/init/index.js +42 -0
  13. package/lib/components/superset-charts/init/insert-assets.js +101 -0
  14. package/lib/components/superset-charts/init/use-get-assets.js +193 -0
  15. package/lib/components/superset-charts/interface.js +5 -0
  16. package/lib/components/superset-charts/utils/axios.js +90 -0
  17. package/lib/components/user-selector/empty/index.css +6 -6
  18. package/lib/components/user-selector/selected-panel/index.css +3 -3
  19. package/lib/index.js +7 -7
  20. package/package.json +1 -1
  21. package/lib/components/video-modal/img/bigFaqi.png +0 -0
  22. package/lib/components/video-modal/img/close.png +0 -0
  23. package/lib/components/video-modal/img/full.svg +0 -21
  24. package/lib/components/video-modal/img/muted.svg +0 -14
  25. package/lib/components/video-modal/img/not-muted.svg +0 -22
  26. package/lib/components/video-modal/img/pause.svg +0 -13
  27. package/lib/components/video-modal/img/play.svg +0 -18
  28. package/lib/components/video-modal/img/small.svg +0 -22
  29. package/lib/components/video-modal/index.css +0 -240
  30. package/lib/components/video-modal/index.js +0 -327
  31. package/lib/components/video-modal/utils.js +0 -25
@@ -1,240 +0,0 @@
1
- .titaui-pc-video-modal__box {
2
- width: 100%;
3
- height: 100%;
4
- position: relative;
5
- border-bottom-right-radius: 24px;
6
- border-bottom-left-radius: 24px;
7
- overflow: hidden;
8
- cursor: pointer;
9
- }
10
-
11
- .titaui-pc-video-modal__box:hover .titaui-pc-video-modal__mask1 {
12
- opacity: 1;
13
- transition: 0.5s;
14
- }
15
-
16
- .titaui-pc-video-modal__box:hover .titaui-pc-video-modal__mask2 {
17
- opacity: 1;
18
- transition: 0.5s;
19
- }
20
-
21
- .titaui-pc-video-modal__box:hover .titaui-pc-video-modal__progress {
22
- opacity: 1;
23
- transition: 0.5s;
24
- }
25
-
26
- .titaui-pc-video-modal__mouseMove {
27
- width: 100%;
28
- height: 30px;
29
- position: absolute;
30
- bottom: 40px;
31
- z-index: 12;
32
- }
33
-
34
- .titaui-pc-video-modal__mouseMove:hover .titaui-pc-video-modal__progress {
35
- height: 4px;
36
- }
37
-
38
- .titaui-pc-video-modal__mouseMove--small {
39
- height: 20px;
40
- bottom: 30px;
41
- }
42
-
43
- .titaui-pc-video-modal__progress {
44
- opacity: 0;
45
- transition: 0.5s;
46
- position: absolute;
47
- bottom: 14px;
48
- width: 100%;
49
- height: 2px;
50
- background: #ffffff;
51
- z-index: 2;
52
- }
53
-
54
- .titaui-pc-video-modal__progress--small {
55
- bottom: 12px;
56
- }
57
-
58
- .titaui-pc-video-modal__progress-current {
59
- position: absolute;
60
- left: 0;
61
- bottom: 0;
62
- background: #77be16;
63
- height: 100%;
64
- z-index: 3;
65
- }
66
-
67
- .titaui-pc-video-modal__progress-current-dot {
68
- position: absolute;
69
- right: 0;
70
- bottom: -2px;
71
- width: 8px;
72
- height: 8px;
73
- border-radius: 50%;
74
- background: #77be16;
75
- }
76
-
77
- .titaui-pc-video-modal__controls {
78
- width: 100%;
79
- display: flex;
80
- align-items: center;
81
- justify-content: space-between;
82
- padding: 16px 32px 16px 32px;
83
- box-sizing: border-box;
84
- position: absolute;
85
- bottom: 0;
86
- z-index: 2;
87
- }
88
-
89
- .titaui-pc-video-modal__controls--small {
90
- padding: 10px 12px;
91
- }
92
-
93
- .titaui-pc-video-modal__controls-left {
94
- display: inline-flex;
95
- align-items: center;
96
- justify-content: center;
97
- }
98
-
99
- .titaui-pc-video-modal__controls-button {
100
- width: 24px;
101
- height: 24px;
102
- border-radius: 12px;
103
- display: inline-flex;
104
- align-items: center;
105
- justify-content: center;
106
- }
107
-
108
- .titaui-pc-video-modal__controls-button:hover {
109
- background: rgba(20, 28, 40, 0.6);
110
- }
111
-
112
- .titaui-pc-video-modal__controls-play {
113
- display: inline-flex;
114
- align-items: center;
115
- cursor: pointer;
116
- }
117
-
118
- .titaui-pc-video-modal__controls-play img {
119
- width: 16px;
120
- height: 16px;
121
- }
122
-
123
- .titaui-pc-video-modal__controls-time {
124
- font-size: 12px;
125
- color: #ffffff;
126
- line-height: 18px;
127
- }
128
-
129
- .titaui-pc-video-modal__controls-time:nth-of-type(1) {
130
- margin-left: 6px;
131
- }
132
-
133
- .titaui-pc-video-modal__controls-muted {
134
- width: 16px;
135
- height: 16px;
136
- }
137
-
138
- .titaui-pc-video-modal__controls-volume {
139
- display: inline-flex;
140
- align-items: center;
141
- justify-content: space-between;
142
- padding: 0 8px;
143
- box-sizing: border-box;
144
- width: 72px;
145
- height: 22px;
146
- background: rgba(20, 28, 40, 0.6);
147
- border-radius: 12px;
148
- }
149
-
150
- .titaui-pc-video-modal__controls-volume-progress {
151
- position: relative;
152
- width: 34px;
153
- height: 2px;
154
- background: rgba(255, 255, 255, 0.4);
155
- border-radius: 1px;
156
- }
157
-
158
- .titaui-pc-video-modal__controls-volume-progress--hidden {
159
- display: none;
160
- }
161
-
162
- .titaui-pc-video-modal__controls-volume-current {
163
- position: absolute;
164
- bottom: 0;
165
- left: 0;
166
- height: 2px;
167
- background: rgba(255, 255, 255, 0.6);
168
- border-radius: 1px;
169
- }
170
-
171
- .titaui-pc-video-modal__controls-volume-current::after {
172
- content: '';
173
- position: absolute;
174
- right: 0;
175
- bottom: -1px;
176
- width: 4px;
177
- height: 4px;
178
- border-radius: 50%;
179
- background: #ffffff;
180
- }
181
-
182
- .titaui-pc-video-modal__controls-volume-current--hidden {
183
- display: none;
184
- }
185
-
186
- .titaui-pc-video-modal__controls-right {
187
- display: inline-flex;
188
- align-items: center;
189
- }
190
-
191
- .titaui-pc-video-modal__title {
192
- width: 100%;
193
- height: 100%;
194
- display: flex;
195
- align-items: center;
196
- justify-content: space-between;
197
- }
198
-
199
- .titaui-pc-video-modal__mask1 {
200
- opacity: 0;
201
- transition: 0.5s;
202
- position: absolute;
203
- top: 0;
204
- padding: 0 16px;
205
- box-sizing: border-box;
206
- width: 100%;
207
- height: 62px;
208
- background: linear-gradient(0deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
209
- }
210
-
211
- .titaui-pc-video-modal__mask1--small {
212
- height: 42px;
213
- }
214
-
215
- .titaui-pc-video-modal__mask1-title {
216
- font-size: 12px;
217
- font-weight: normal;
218
- color: #ffffff;
219
- line-height: 18px;
220
- }
221
-
222
- .titaui-pc-video-modal__mask1-close {
223
- width: 14px;
224
- height: 14px;
225
- cursor: pointer;
226
- }
227
-
228
- .titaui-pc-video-modal__mask2 {
229
- opacity: 0;
230
- transition: 0.5s;
231
- position: absolute;
232
- bottom: 0;
233
- width: 100%;
234
- height: 62px;
235
- background: linear-gradient(180deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
236
- }
237
-
238
- .titaui-pc-video-modal__mask2--small {
239
- height: 42px;
240
- }
@@ -1,327 +0,0 @@
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 _play = _interopRequireDefault(require("./img/play.svg"));
17
-
18
- var _pause = _interopRequireDefault(require("./img/pause.svg"));
19
-
20
- var _muted = _interopRequireDefault(require("./img/muted.svg"));
21
-
22
- var _notMuted = _interopRequireDefault(require("./img/not-muted.svg"));
23
-
24
- require("./index.css");
25
-
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
-
28
- 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); }
29
-
30
- 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; }
31
-
32
- 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; }
33
-
34
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
-
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."); }
37
-
38
- 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); }
39
-
40
- 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; }
41
-
42
- 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; }
43
-
44
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
-
46
- var preCls = "titaui-pc-video-modal";
47
- var VideoModal = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
48
- var videoSrc = props.videoSrc,
49
- containerWidth = props.containerWidth,
50
- hasHead = props.hasHead,
51
- title = props.title,
52
- extraButton = props.extraButton,
53
- videoPoster = props.videoPoster,
54
- headButton = props.headButton;
55
-
56
- var _useState = (0, _react.useState)(true),
57
- _useState2 = _slicedToArray(_useState, 2),
58
- isPlay = _useState2[0],
59
- setIsPlay = _useState2[1];
60
-
61
- var _useState3 = (0, _react.useState)(true),
62
- _useState4 = _slicedToArray(_useState3, 2),
63
- isMuted = _useState4[0],
64
- setIsMuted = _useState4[1];
65
-
66
- var _useState5 = (0, _react.useState)(false),
67
- _useState6 = _slicedToArray(_useState5, 2),
68
- isMouseDown = _useState6[0],
69
- setIsMouseDown = _useState6[1];
70
-
71
- var _useState7 = (0, _react.useState)(false),
72
- _useState8 = _slicedToArray(_useState7, 2),
73
- showDot = _useState8[0],
74
- setShowDot = _useState8[1];
75
-
76
- var _useState9 = (0, _react.useState)("00:00"),
77
- _useState10 = _slicedToArray(_useState9, 2),
78
- totalTime = _useState10[0],
79
- setTotalTime = _useState10[1];
80
-
81
- var _useState11 = (0, _react.useState)("00:00"),
82
- _useState12 = _slicedToArray(_useState11, 2),
83
- currentTime = _useState12[0],
84
- setCurrentTime = _useState12[1];
85
-
86
- var _useState13 = (0, _react.useState)(false),
87
- _useState14 = _slicedToArray(_useState13, 2),
88
- isSmallVideo = _useState14[0],
89
- setIsSmallVideo = _useState14[1];
90
-
91
- var _useState15 = (0, _react.useState)("0px"),
92
- _useState16 = _slicedToArray(_useState15, 2),
93
- progressWidth = _useState16[0],
94
- setProgressWidth = _useState16[1];
95
-
96
- var _useState17 = (0, _react.useState)("0px"),
97
- _useState18 = _slicedToArray(_useState17, 2),
98
- volumeWidth = _useState18[0],
99
- setVolumeWidth = _useState18[1];
100
-
101
- var videoRef = (0, _react.useRef)(document.createElement("video"));
102
- var videoBoxRef = (0, _react.useRef)(document.createElement("div"));
103
- var volumeBoxRef = (0, _react.useRef)(document.createElement("div")); // *---播放/暂停---*
104
-
105
- var handlePlayVideo = function handlePlayVideo() {
106
- setIsPlay(!isPlay);
107
-
108
- if (isPlay) {
109
- videoRef.current.pause();
110
- } else {
111
- videoRef.current.play();
112
- }
113
- }; //* ---进度条---*
114
- // 鼠标移入进度条区域
115
-
116
-
117
- var handleMouseEnterProgress = function handleMouseEnterProgress() {
118
- setShowDot(true);
119
- }; // 鼠标移出进度条区域
120
-
121
-
122
- var handleMouseLeaveProgress = function handleMouseLeaveProgress() {
123
- setShowDot(false);
124
- setIsMouseDown(false);
125
- }; // 获得点击进度条任意位置 计算实时进度条的宽度
126
-
127
-
128
- var getCurrentProgressWidth = function getCurrentProgressWidth(e) {
129
- var videoContainerLeft = videoBoxRef.current.getBoundingClientRect().left;
130
- var currentWidth = e.clientX - videoContainerLeft;
131
- setProgressWidth("".concat(currentWidth, "px"));
132
- videoRef.current.currentTime = videoRef.current.duration * currentWidth / containerWidth;
133
- }; // 点击进度条
134
-
135
-
136
- var handleClickTotalProgress = function handleClickTotalProgress(e) {
137
- getCurrentProgressWidth(e);
138
- }; // 拖动进度条
139
-
140
-
141
- var handleMouseDownProgress = function handleMouseDownProgress() {
142
- setIsMouseDown(true);
143
- };
144
-
145
- var handleMouseMoveProgress = function handleMouseMoveProgress(e) {
146
- if (isMouseDown) {
147
- getCurrentProgressWidth(e);
148
- }
149
- };
150
-
151
- var handleMouseUpProgress = function handleMouseUpProgress() {
152
- setIsMouseDown(false);
153
- }; // *---音量---*
154
- // 静音/声音 切换
155
-
156
-
157
- var handleChangeVolumeMuted = function handleChangeVolumeMuted() {
158
- setIsMuted(!isMuted);
159
- videoRef.current.muted = !videoRef.current.muted;
160
- }; // 点击音量进度条 计算音量进度条宽度
161
-
162
-
163
- var getCurrentVolumeWidth = function getCurrentVolumeWidth(e) {
164
- var volumeBoxLeft = volumeBoxRef.current.getBoundingClientRect().left;
165
- var currentWidth = e.clientX - volumeBoxLeft;
166
- var VolumeTotalProgressWidth = 34;
167
-
168
- if (currentWidth <= 0) {
169
- setIsMuted(true);
170
- videoRef.current.muted = true;
171
- } else if (currentWidth >= VolumeTotalProgressWidth) {
172
- setVolumeWidth("34px");
173
- videoRef.current.volume = 1;
174
- } else {
175
- setVolumeWidth("".concat(currentWidth, "px"));
176
- videoRef.current.volume = currentWidth / volumeBoxRef.current.clientWidth;
177
- }
178
- }; // 点击音量进度条
179
-
180
-
181
- var handleMouseClickVolume = function handleMouseClickVolume(e) {
182
- getCurrentVolumeWidth(e);
183
- }; // *---提供父组件调用---*
184
- // 暂停视频并静音
185
-
186
-
187
- var handleCloseAndPauseVideo = function handleCloseAndPauseVideo() {
188
- videoRef.current.pause();
189
- videoRef.current.currentTime = 0;
190
- videoRef.current.muted = true;
191
- setIsPlay(false);
192
- }; // 播放视频
193
-
194
-
195
- var handleOpenVideo = function handleOpenVideo() {
196
- videoRef.current.play();
197
- videoRef.current.muted = true;
198
- setIsMuted(true);
199
- setIsPlay(true);
200
- }; // const handleGetCurrentTime = () => {
201
- // return videoRef.current.currentTime
202
- // }
203
-
204
-
205
- (0, _react.useImperativeHandle)(ref, function () {
206
- return {
207
- closeVideo: handleCloseAndPauseVideo,
208
- playVideo: handleOpenVideo // getCurrentTime: handleGetCurrentTime
209
-
210
- };
211
- }); // *---初始化---*
212
- // 初始获得总时间
213
-
214
- (0, _react.useEffect)(function () {
215
- videoRef.current.onloadedmetadata = function () {
216
- setTotalTime(videoRef.current.duration.toString());
217
- };
218
- }, []); // 获得实时播放时间
219
-
220
- (0, _react.useEffect)(function () {
221
- videoRef.current.ontimeupdate = function () {
222
- setCurrentTime(videoRef.current.currentTime.toString());
223
- setProgressWidth("".concat(containerWidth * videoRef.current.currentTime / videoRef.current.duration, "px"));
224
- };
225
- }, []); // 初始获得音量宽度
226
-
227
- (0, _react.useEffect)(function () {
228
- var VolumeTotalProgressWidth = 34;
229
- setVolumeWidth("".concat(VolumeTotalProgressWidth * videoRef.current.volume, "px"));
230
- }, []); // 初始判断是否是小窗口
231
-
232
- (0, _react.useEffect)(function () {
233
- var FullVideoWidth = 840;
234
-
235
- if (containerWidth < FullVideoWidth) {
236
- setIsSmallVideo(true);
237
- }
238
- }, []); // const handleKeyDown = (e) => {
239
- // switch(e.keyCode) {
240
- // case 32:
241
- // handlePlayVideo();
242
- // case 13:
243
- // videoRef.current.volume += 1;
244
- // }
245
- // }
246
- // useEffect(() => {
247
- // document.addEventListener('keydown', handleKeyDown);
248
- // }, [])
249
-
250
- return /*#__PURE__*/_react["default"].createElement("div", {
251
- className: "".concat(preCls, "__box"),
252
- ref: videoBoxRef
253
- }, /*#__PURE__*/_react["default"].createElement("video", {
254
- ref: videoRef,
255
- src: videoSrc,
256
- loop: true,
257
- autoPlay: true,
258
- muted: true,
259
- poster: videoPoster,
260
- style: {
261
- width: "100%",
262
- height: "100%"
263
- },
264
- onClick: handlePlayVideo
265
- }), /*#__PURE__*/_react["default"].createElement("div", {
266
- className: (0, _classnames["default"])("".concat(preCls, "__mouseMove"), _defineProperty({}, "".concat(preCls, "__mouseMove--small"), isSmallVideo)),
267
- onMouseMove: handleMouseMoveProgress,
268
- onMouseUp: handleMouseUpProgress,
269
- onMouseEnter: handleMouseEnterProgress,
270
- onMouseLeave: handleMouseLeaveProgress
271
- }, /*#__PURE__*/_react["default"].createElement("div", {
272
- className: (0, _classnames["default"])("".concat(preCls, "__progress"), _defineProperty({}, "".concat(preCls, "__progress--small"), isSmallVideo)),
273
- onClick: handleClickTotalProgress,
274
- onMouseDown: handleMouseDownProgress
275
- }, /*#__PURE__*/_react["default"].createElement("div", {
276
- className: "".concat(preCls, "__progress-current"),
277
- style: {
278
- width: progressWidth
279
- }
280
- }, /*#__PURE__*/_react["default"].createElement("div", {
281
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__progress-current-dot"), showDot))
282
- })))), /*#__PURE__*/_react["default"].createElement("div", {
283
- className: (0, _classnames["default"])("".concat(preCls, "__mask1"), _defineProperty({}, "".concat(preCls, "__mask1--small"), isSmallVideo))
284
- }, hasHead && /*#__PURE__*/_react["default"].createElement("div", {
285
- className: (0, _classnames["default"])("".concat(preCls, "__title"))
286
- }, /*#__PURE__*/_react["default"].createElement("div", {
287
- className: "".concat(preCls, "__mask1-title")
288
- }, title), headButton)), /*#__PURE__*/_react["default"].createElement("div", {
289
- className: (0, _classnames["default"])("".concat(preCls, "__mask2"), _defineProperty({}, "".concat(preCls, "__mask2--small"), isSmallVideo))
290
- }, /*#__PURE__*/_react["default"].createElement("div", {
291
- className: (0, _classnames["default"])("".concat(preCls, "__controls"), _defineProperty({}, "".concat(preCls, "__controls--small"), isSmallVideo))
292
- }, /*#__PURE__*/_react["default"].createElement("div", {
293
- className: "".concat(preCls, "__controls-left")
294
- }, /*#__PURE__*/_react["default"].createElement("div", {
295
- className: "".concat(preCls, "__controls-button"),
296
- onClick: handlePlayVideo
297
- }, /*#__PURE__*/_react["default"].createElement("img", {
298
- src: isPlay ? _pause["default"] : _play["default"],
299
- className: "".concat(preCls, "__controls-play"),
300
- alt: "\u64AD\u653E/\u6682\u505C"
301
- })), /*#__PURE__*/_react["default"].createElement("span", {
302
- className: "".concat(preCls, "__controls-time")
303
- }, (0, _utils["default"])(currentTime)), /*#__PURE__*/_react["default"].createElement("span", {
304
- className: "".concat(preCls, "__controls-time")
305
- }, " / ".concat((0, _utils["default"])(totalTime)))), /*#__PURE__*/_react["default"].createElement("div", {
306
- className: "".concat(preCls, "__controls-right")
307
- }, /*#__PURE__*/_react["default"].createElement("div", {
308
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-button"), isMuted), _defineProperty({}, "".concat(preCls, "__controls-volume"), !isMuted))
309
- }, /*#__PURE__*/_react["default"].createElement("div", {
310
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-progress--hidden"), isMuted), "".concat(preCls, "__controls-volume-progress")),
311
- onClick: handleMouseClickVolume,
312
- ref: volumeBoxRef
313
- }, /*#__PURE__*/_react["default"].createElement("div", {
314
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-current--hidden"), isMuted), "".concat(preCls, "__controls-volume-current")),
315
- style: {
316
- width: volumeWidth
317
- }
318
- })), /*#__PURE__*/_react["default"].createElement("div", {
319
- onClick: handleChangeVolumeMuted,
320
- className: "".concat(preCls, "__controls-play")
321
- }, /*#__PURE__*/_react["default"].createElement("img", {
322
- src: isMuted ? _muted["default"] : _notMuted["default"],
323
- alt: "\u97F3\u91CF"
324
- }))), extraButton))));
325
- });
326
- var _default = VideoModal;
327
- exports["default"] = _default;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var formatSecToTime = function formatSecToTime(value) {
9
- var result = parseInt(value, 10);
10
- var m = Math.floor(result / 60 % 60) < 10 ? "0".concat(Math.floor(result / 60 % 60)) : Math.floor(result / 60 % 60);
11
- var s = Math.floor(result % 60) < 10 ? "0".concat(Math.floor(result % 60)) : Math.floor(result % 60);
12
- var res = "";
13
-
14
- if (m !== "00") {
15
- res += "".concat(m, ":");
16
- } else {
17
- res += "00:";
18
- }
19
-
20
- res += "".concat(s);
21
- return res;
22
- };
23
-
24
- var _default = formatSecToTime;
25
- exports["default"] = _default;