@fonixtree/magic-design 1.0.144 → 1.0.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/common/ProductCardModal/index.js +1 -1
- package/es/common/ProductCardModal/index.less +1 -1
- package/es/common/Video/index.js +4 -2
- package/es/common/VideoPC/background.png +0 -0
- package/es/common/VideoPC/closeImg.png +0 -0
- package/es/common/VideoPC/components/index.js +100 -0
- package/es/common/VideoPC/components/index.less +62 -0
- package/es/common/VideoPC/cover.png +0 -0
- package/es/common/VideoPC/index.js +750 -0
- package/es/common/VideoPC/index.less +79 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/dito/components/GroupedCarousel/pc/index.js +0 -1
- package/es/composite-comp/dito/components/SearchDITO/defaultJSON.js +2 -1
- package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +8 -2
- package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +1 -1
- package/es/composite-comp/dito/components/SearchDITO/pc/index.js +1 -2
- package/es/composite-comp/dito/components/SearchDITO/pc/index.less +3 -1
- package/es/composite-comp/dito/components/SlideImage/defaultJSON.js +3 -2
- package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +2 -2
- package/es/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +6 -4
- package/es/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +9 -0
- package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +10 -1
- package/es/core/Renderer/index.js +0 -1
- package/es/utils/coreUtil.js +3 -3
- package/lib/common/ProductCardModal/index.js +1 -1
- package/lib/common/ProductCardModal/index.less +1 -1
- package/lib/common/Video/index.js +4 -2
- package/lib/common/VideoPC/background.png +0 -0
- package/lib/common/VideoPC/closeImg.png +0 -0
- package/lib/common/VideoPC/components/index.js +100 -0
- package/lib/common/VideoPC/components/index.less +62 -0
- package/lib/common/VideoPC/cover.png +0 -0
- package/lib/common/VideoPC/index.js +750 -0
- package/lib/common/VideoPC/index.less +79 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/dito/components/GroupedCarousel/pc/index.js +0 -1
- package/lib/composite-comp/dito/components/SearchDITO/defaultJSON.js +2 -1
- package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +8 -2
- package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +1 -1
- package/lib/composite-comp/dito/components/SearchDITO/pc/index.js +1 -2
- package/lib/composite-comp/dito/components/SearchDITO/pc/index.less +3 -1
- package/lib/composite-comp/dito/components/SlideImage/defaultJSON.js +3 -2
- package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +2 -2
- package/lib/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +6 -4
- package/lib/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +9 -0
- package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +10 -1
- package/lib/core/Renderer/index.js +0 -1
- package/lib/utils/coreUtil.js +3 -3
- package/package.json +1 -1
|
@@ -139,7 +139,7 @@ function ProductCardModal(_a) {
|
|
|
139
139
|
}
|
|
140
140
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
141
141
|
dangerouslySetInnerHTML: {
|
|
142
|
-
__html: (0, _commonUtil.xssDecode)(item.goodsIntroduce)
|
|
142
|
+
__html: (0, _commonUtil.xssDecode)(item.goodsIntroduce || '')
|
|
143
143
|
}
|
|
144
144
|
})), index === active && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
145
145
|
className: "closIcon",
|
package/es/common/Video/index.js
CHANGED
|
@@ -728,9 +728,11 @@ function (_super) {
|
|
|
728
728
|
var _a = this.props,
|
|
729
729
|
videoId = _a.videoId,
|
|
730
730
|
opts = _a.opts,
|
|
731
|
-
play = _a.play
|
|
731
|
+
play = _a.play,
|
|
732
|
+
onClick = _a.onClick;
|
|
732
733
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
733
|
-
className: "video-container"
|
|
734
|
+
className: "video-container",
|
|
735
|
+
onClick: onClick
|
|
734
736
|
}, opts.source ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
735
737
|
className: "video-wrap",
|
|
736
738
|
id: 'video' + videoId
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
require("./index.less");
|
|
9
|
+
|
|
10
|
+
function parseDom(html) {
|
|
11
|
+
var ele = document.createElement('div');
|
|
12
|
+
ele.innerHTML = html;
|
|
13
|
+
return ele.childNodes[0];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var rateHtml = "<div class=\"rate-components\">\n <div class=\"current-rate\">1.0x</div>\n <ul class=\"rate-list\">\n <li data-rate=\"2.0\">2.0x</li>\n <li data-rate=\"1.5\">1.5x</li>\n <li data-rate=\"1.0\" class=\"current\">1.0x</li>\n <li data-rate=\"0.5\">0.5x</li>\n </ul>\n</div>";
|
|
17
|
+
/**
|
|
18
|
+
* 倍速播放组件
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var RateComponent =
|
|
22
|
+
/** @class */
|
|
23
|
+
function () {
|
|
24
|
+
/**
|
|
25
|
+
* @constructor 倍速播放组件构造函数
|
|
26
|
+
*/
|
|
27
|
+
function RateComponent() {
|
|
28
|
+
this.html = parseDom(rateHtml);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
RateComponent.prototype.createEl = function (el) {
|
|
32
|
+
var eleControlbar = el.querySelector('.prism-controlbar');
|
|
33
|
+
eleControlbar.appendChild(this.html);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
RateComponent.prototype.ready = function (player) {
|
|
37
|
+
var currentRateEle = this.html.querySelector('.current-rate');
|
|
38
|
+
var rateListEle = this.html.querySelector('.rate-list');
|
|
39
|
+
var timeId = null;
|
|
40
|
+
var currentEle = rateListEle.querySelector('.current');
|
|
41
|
+
|
|
42
|
+
if (currentEle) {
|
|
43
|
+
currentEle.className = '';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
rateListEle.querySelector("[data-rate=\"" + player._speed + "\"]").className = 'current';
|
|
47
|
+
currentRateEle.innerText = player._speed + 'x'; // 隐藏设置里面的倍速播放
|
|
48
|
+
|
|
49
|
+
var settingRate = document.querySelector('.prism-setting-item.prism-setting-speed');
|
|
50
|
+
|
|
51
|
+
if (settingRate) {
|
|
52
|
+
settingRate.classList.add('player-hidden');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
currentRateEle.onclick = function () {
|
|
56
|
+
rateListEle.style.display = 'block';
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
currentRateEle.onmouseleave = function () {
|
|
60
|
+
timeId = setTimeout(function () {
|
|
61
|
+
rateListEle.style.display = 'none';
|
|
62
|
+
}, 100);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
rateListEle.onmouseenter = function () {
|
|
66
|
+
clearTimeout(timeId);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
rateListEle.onmouseleave = function () {
|
|
70
|
+
rateListEle.style.display = 'none';
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
rateListEle.onclick = function (_a) {
|
|
74
|
+
var target = _a.target;
|
|
75
|
+
var rate = target.dataset.rate;
|
|
76
|
+
|
|
77
|
+
if (rate) {
|
|
78
|
+
player.setSpeed(rate);
|
|
79
|
+
|
|
80
|
+
if (target.className !== 'current') {
|
|
81
|
+
var currentEle_1 = rateListEle.querySelector('.current');
|
|
82
|
+
|
|
83
|
+
if (currentEle_1) {
|
|
84
|
+
currentEle_1.className = '';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
target.className = 'current';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
rateListEle.style.display = 'none';
|
|
91
|
+
currentRateEle.innerText = rate + 'x';
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return RateComponent;
|
|
97
|
+
}();
|
|
98
|
+
|
|
99
|
+
var _default = RateComponent;
|
|
100
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.player-hidden {
|
|
2
|
+
display: none !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.rate-components {
|
|
6
|
+
float: right;
|
|
7
|
+
color: #fff;
|
|
8
|
+
height: 35px;
|
|
9
|
+
position: relative;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
margin-top: 5px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.current-rate {
|
|
15
|
+
display: flex;
|
|
16
|
+
height: 100%;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
width: 70px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.rate-list {
|
|
24
|
+
position: absolute;
|
|
25
|
+
bottom: 46px;
|
|
26
|
+
display: none;
|
|
27
|
+
padding: 0;
|
|
28
|
+
margin: 0;
|
|
29
|
+
list-style: none;
|
|
30
|
+
|
|
31
|
+
li {
|
|
32
|
+
text-align: center;
|
|
33
|
+
width: 70px;
|
|
34
|
+
line-height: 30px;
|
|
35
|
+
background-color: rgba(0, 0, 0, .6);
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
|
|
38
|
+
&.current {
|
|
39
|
+
color: #00c1de;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&+li {
|
|
43
|
+
border-top: 1px solid rgba(78, 78, 78, 0.3);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
background-color: rgba(0, 0, 0, .5);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media(max-width: 768px) {
|
|
55
|
+
.current-rate {
|
|
56
|
+
width: 40px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.rate-list li {
|
|
60
|
+
width: 43px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
Binary file
|