@fonixtree/magic-design 0.0.159 → 0.0.161
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/ImageModal/CommonModal/index.js +0 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +1 -1
- package/es/common/SwiperBan/index.less +1 -1
- package/es/common/Video/index.js +9 -6
- package/es/common/Video/index.less +9 -0
- package/es/composite-comp/bol/components/Video/components/ShareBtn/index.less +2 -2
- package/es/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -2
- package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -0
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +31 -22
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +31 -23
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +2 -1
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +31 -22
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +3 -2
- package/es/composite-comp/bol/components/Video/mobile/index.js +0 -1
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +42 -41
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
- package/es/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
- package/es/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
- package/es/locale/en/en.json +1 -0
- package/es/locale/es/es.json +1 -0
- package/es/locale/id/id.json +1 -0
- package/lib/common/ImageModal/CommonModal/index.js +0 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +1 -1
- package/lib/common/SwiperBan/index.less +1 -1
- package/lib/common/Video/index.js +9 -6
- package/lib/common/Video/index.less +9 -0
- package/lib/composite-comp/bol/components/Video/components/ShareBtn/index.less +2 -2
- package/lib/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -2
- package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -0
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +31 -22
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +31 -23
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +2 -1
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +31 -22
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +3 -2
- package/lib/composite-comp/bol/components/Video/mobile/index.js +0 -1
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +42 -41
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
- package/lib/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
- package/lib/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
- package/lib/locale/en/en.json +1 -0
- package/lib/locale/es/es.json +1 -0
- package/lib/locale/id/id.json +1 -0
- package/package.json +1 -1
|
@@ -81,6 +81,27 @@ function (_super) {
|
|
|
81
81
|
/** 视频ref映射 */
|
|
82
82
|
|
|
83
83
|
_this.videoRefMap = {};
|
|
84
|
+
|
|
85
|
+
_this.playOrPause = function (group) {
|
|
86
|
+
(0, _commonUtil.ensure)(function () {
|
|
87
|
+
if (_this.videoRefMap[group.id].playing) {
|
|
88
|
+
_this.videoRefMap[group.id].playing = false;
|
|
89
|
+
|
|
90
|
+
_this.videoRefMap[group.id].el.player.pause();
|
|
91
|
+
} else {
|
|
92
|
+
if (group.video.playPosition == 'Popup') {
|
|
93
|
+
_this.videoRefMap[group.id].el.fullPlay('pc');
|
|
94
|
+
} else {
|
|
95
|
+
_this.videoRefMap[group.id].playing = true;
|
|
96
|
+
|
|
97
|
+
_this.videoRefMap[group.id].el.player.play();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
_this.setState({});
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
84
105
|
return _this;
|
|
85
106
|
}
|
|
86
107
|
|
|
@@ -91,7 +112,7 @@ function (_super) {
|
|
|
91
112
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
113
|
className: "video-layout4-wrap"
|
|
93
114
|
}, data.groupSource.map(function (group) {
|
|
94
|
-
var _a;
|
|
115
|
+
var _a, _b;
|
|
95
116
|
/** 当前是否在播放 */
|
|
96
117
|
|
|
97
118
|
|
|
@@ -101,25 +122,6 @@ function (_super) {
|
|
|
101
122
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
123
|
key: group.id,
|
|
103
124
|
className: "video-item-wrap",
|
|
104
|
-
onClick: function onClick() {
|
|
105
|
-
(0, _commonUtil.ensure)(function () {
|
|
106
|
-
if (_this.videoRefMap[group.id].playing) {
|
|
107
|
-
_this.videoRefMap[group.id].playing = false;
|
|
108
|
-
|
|
109
|
-
_this.videoRefMap[group.id].el.player.pause();
|
|
110
|
-
} else {
|
|
111
|
-
if (group.video.playPosition == 'Popup') {
|
|
112
|
-
_this.videoRefMap[group.id].el.fullPlay('pc');
|
|
113
|
-
} else {
|
|
114
|
-
_this.videoRefMap[group.id].playing = true;
|
|
115
|
-
|
|
116
|
-
_this.videoRefMap[group.id].el.player.play();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
_this.setState({});
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
125
|
style: {
|
|
124
126
|
height: data.pcHeight
|
|
125
127
|
}
|
|
@@ -138,12 +140,16 @@ function (_super) {
|
|
|
138
140
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
139
141
|
source: group.video.sourceUrl
|
|
140
142
|
}),
|
|
143
|
+
play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
|
|
141
144
|
videoId: group.id
|
|
142
145
|
}), !isPlaying && /*#__PURE__*/_react["default"].createElement("div", {
|
|
143
146
|
className: (0, _classnames["default"])('play-btn', {
|
|
144
147
|
middle: group.video.playButton == 'Middle',
|
|
145
148
|
bottomLeft: group.video.playButton == 'Bottom Left'
|
|
146
|
-
})
|
|
149
|
+
}),
|
|
150
|
+
onClick: function onClick() {
|
|
151
|
+
_this.playOrPause(group);
|
|
152
|
+
}
|
|
147
153
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
148
154
|
alt: "",
|
|
149
155
|
src: _playCircle["default"]
|
|
@@ -162,6 +168,9 @@ function (_super) {
|
|
|
162
168
|
data: group,
|
|
163
169
|
layout: 'pc-' + data.customize.layout.pcLayout,
|
|
164
170
|
noShare: true,
|
|
171
|
+
onPlayClick: function onPlayClick() {
|
|
172
|
+
return _this.playOrPause(group);
|
|
173
|
+
},
|
|
165
174
|
position: "relative"
|
|
166
175
|
})));
|
|
167
176
|
}));
|
|
@@ -81,6 +81,27 @@ function (_super) {
|
|
|
81
81
|
/** 视频ref映射 */
|
|
82
82
|
|
|
83
83
|
_this.videoRefMap = {};
|
|
84
|
+
|
|
85
|
+
_this.playOrPause = function (group) {
|
|
86
|
+
(0, _commonUtil.ensure)(function () {
|
|
87
|
+
if (_this.videoRefMap[group.id].playing) {
|
|
88
|
+
_this.videoRefMap[group.id].playing = false;
|
|
89
|
+
|
|
90
|
+
_this.videoRefMap[group.id].el.player.pause();
|
|
91
|
+
} else {
|
|
92
|
+
if (group.video.playPosition == 'Popup') {
|
|
93
|
+
_this.videoRefMap[group.id].el.fullPlay('pc');
|
|
94
|
+
} else {
|
|
95
|
+
_this.videoRefMap[group.id].playing = true;
|
|
96
|
+
|
|
97
|
+
_this.videoRefMap[group.id].el.player.play();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
_this.setState({});
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
84
105
|
return _this;
|
|
85
106
|
}
|
|
86
107
|
|
|
@@ -91,7 +112,7 @@ function (_super) {
|
|
|
91
112
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
113
|
className: "video-layout5-wrap"
|
|
93
114
|
}, data.groupSource.map(function (group) {
|
|
94
|
-
var _a;
|
|
115
|
+
var _a, _b;
|
|
95
116
|
/** 当前是否在播放 */
|
|
96
117
|
|
|
97
118
|
|
|
@@ -101,25 +122,6 @@ function (_super) {
|
|
|
101
122
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
123
|
key: group.id,
|
|
103
124
|
className: "video-item-wrap",
|
|
104
|
-
onClick: function onClick() {
|
|
105
|
-
(0, _commonUtil.ensure)(function () {
|
|
106
|
-
if (_this.videoRefMap[group.id].playing) {
|
|
107
|
-
_this.videoRefMap[group.id].playing = false;
|
|
108
|
-
|
|
109
|
-
_this.videoRefMap[group.id].el.player.pause();
|
|
110
|
-
} else {
|
|
111
|
-
if (group.video.playPosition == 'Popup') {
|
|
112
|
-
_this.videoRefMap[group.id].el.fullPlay('pc');
|
|
113
|
-
} else {
|
|
114
|
-
_this.videoRefMap[group.id].playing = true;
|
|
115
|
-
|
|
116
|
-
_this.videoRefMap[group.id].el.player.play();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
_this.setState({});
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
125
|
style: {
|
|
124
126
|
height: data.pcHeight
|
|
125
127
|
}
|
|
@@ -138,12 +140,16 @@ function (_super) {
|
|
|
138
140
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
139
141
|
source: group.video.sourceUrl
|
|
140
142
|
}),
|
|
143
|
+
play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
|
|
141
144
|
videoId: group.id
|
|
142
145
|
}), !isPlaying && /*#__PURE__*/_react["default"].createElement("div", {
|
|
143
146
|
className: (0, _classnames["default"])('play-btn', {
|
|
144
147
|
middle: group.video.playButton == 'Middle',
|
|
145
148
|
bottomLeft: group.video.playButton == 'Bottom Left'
|
|
146
|
-
})
|
|
149
|
+
}),
|
|
150
|
+
onClick: function onClick() {
|
|
151
|
+
_this.playOrPause(group);
|
|
152
|
+
}
|
|
147
153
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
148
154
|
alt: "",
|
|
149
155
|
src: _playCircle["default"]
|
|
@@ -162,6 +168,9 @@ function (_super) {
|
|
|
162
168
|
data: group,
|
|
163
169
|
layout: 'pc-' + data.customize.layout.pcLayout,
|
|
164
170
|
noShare: true,
|
|
171
|
+
onPlayClick: function onPlayClick() {
|
|
172
|
+
return _this.playOrPause(group);
|
|
173
|
+
},
|
|
165
174
|
position: "relative"
|
|
166
175
|
})));
|
|
167
176
|
}));
|
package/lib/locale/en/en.json
CHANGED
package/lib/locale/es/es.json
CHANGED
package/lib/locale/id/id.json
CHANGED