@fonixtree/magic-design 0.0.162 → 0.0.164
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/ColorPicker/index.less +2 -1
- package/es/common/Video/index.js +172 -55
- package/es/common/Video/index.less +3 -2
- package/es/composite-comp/bol/components/Carousel/defaultJSON.js +2 -2
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +2 -1
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +6 -1
- package/es/composite-comp/bol/components/Carousel/pc/index.js +8 -2
- package/es/composite-comp/bol/components/Carousel/pc/index.less +7 -2
- package/es/composite-comp/bol/components/Text/index.js +2 -5
- package/es/composite-comp/bol/components/Text/index.less +2 -2
- package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +1 -0
- package/es/composite-comp/bol/components/Video/imgs/play-circle.png +0 -0
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +1 -1
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +1 -1
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +5 -0
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +5 -0
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +10 -0
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +5 -0
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +5 -0
- package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +5 -0
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/es/core/Designer/ConfigPanel/index.js +10 -1
- package/es/meta-comp/components/Text/index.js +2 -1
- package/es/utils/commonUtil.js +218 -2
- package/lib/common/ColorPicker/index.less +2 -1
- package/lib/common/Video/index.js +172 -55
- package/lib/common/Video/index.less +3 -2
- package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +2 -2
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +2 -1
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +6 -1
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +8 -2
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +7 -2
- package/lib/composite-comp/bol/components/Text/index.js +2 -5
- package/lib/composite-comp/bol/components/Text/index.less +2 -2
- package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/imgs/play-circle.png +0 -0
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +1 -1
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +1 -1
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +5 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +5 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +10 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +5 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +5 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +5 -0
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/lib/core/Designer/ConfigPanel/index.js +10 -1
- package/lib/meta-comp/components/Text/index.js +2 -1
- package/lib/utils/commonUtil.js +218 -2
- package/package.json +1 -1
package/es/common/Video/index.js
CHANGED
|
@@ -204,7 +204,7 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var
|
|
207
|
+
var createAliVideo = function createAliVideo(domId, opts) {
|
|
208
208
|
if (opts === void 0) {
|
|
209
209
|
opts = {};
|
|
210
210
|
}
|
|
@@ -301,12 +301,125 @@ var createVideo = function createVideo(domId, opts) {
|
|
|
301
301
|
});
|
|
302
302
|
};
|
|
303
303
|
|
|
304
|
-
var
|
|
304
|
+
var createYoutuVideo = function createYoutuVideo(domId, opts) {
|
|
305
|
+
if (opts === void 0) {
|
|
306
|
+
opts = {};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
310
|
+
var videoId;
|
|
311
|
+
return __generator(this, function (_a) {
|
|
312
|
+
switch (_a.label) {
|
|
313
|
+
case 0:
|
|
314
|
+
videoId = opts.source.split('youtu.be/')[1];
|
|
315
|
+
return [4
|
|
316
|
+
/*yield*/
|
|
317
|
+
, (0, _commonUtil.asyncNextTick)(function () {
|
|
318
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
319
|
+
var player;
|
|
320
|
+
return __generator(this, function (_a) {
|
|
321
|
+
player = new YT.Player('video' + domId, {
|
|
322
|
+
height: '100%',
|
|
323
|
+
width: '100%',
|
|
324
|
+
videoId: videoId,
|
|
325
|
+
events: {
|
|
326
|
+
onReady: function onReady() {
|
|
327
|
+
if (!opts.videoSound) {
|
|
328
|
+
player.mute();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (opts.speed) {
|
|
332
|
+
player.setPlaybackRate(opts.speed);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (opts.startAt) {
|
|
336
|
+
player.seekTo(opts.startAt);
|
|
337
|
+
player.pauseVideo();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if (opts.loop) {
|
|
341
|
+
player.setLoop(true);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (opts.autoplay) {
|
|
345
|
+
player.playVideo();
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
return [2
|
|
351
|
+
/*return*/
|
|
352
|
+
, player];
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
}, 500, 10)];
|
|
356
|
+
|
|
357
|
+
case 1:
|
|
358
|
+
return [2
|
|
359
|
+
/*return*/
|
|
360
|
+
, _a.sent()];
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
var createVideo = function createVideo(type, domId, opts) {
|
|
367
|
+
if (opts === void 0) {
|
|
368
|
+
opts = {};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
372
|
+
return __generator(this, function (_a) {
|
|
373
|
+
switch (_a.label) {
|
|
374
|
+
case 0:
|
|
375
|
+
if (!(type == 'ali')) return [3
|
|
376
|
+
/*break*/
|
|
377
|
+
, 2];
|
|
378
|
+
return [4
|
|
379
|
+
/*yield*/
|
|
380
|
+
, createAliVideo(domId, opts)];
|
|
381
|
+
|
|
382
|
+
case 1:
|
|
383
|
+
return [2
|
|
384
|
+
/*return*/
|
|
385
|
+
, _a.sent()];
|
|
386
|
+
|
|
387
|
+
case 2:
|
|
388
|
+
if (!(type == 'youtu')) return [3
|
|
389
|
+
/*break*/
|
|
390
|
+
, 4];
|
|
391
|
+
return [4
|
|
392
|
+
/*yield*/
|
|
393
|
+
, createYoutuVideo(domId, opts)];
|
|
394
|
+
|
|
395
|
+
case 3:
|
|
396
|
+
return [2
|
|
397
|
+
/*return*/
|
|
398
|
+
, _a.sent()];
|
|
399
|
+
|
|
400
|
+
case 4:
|
|
401
|
+
return [2
|
|
402
|
+
/*return*/
|
|
403
|
+
];
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
var getVideoType = function getVideoType(opts) {
|
|
410
|
+
if (/youtu/.test(opts.source)) {
|
|
411
|
+
return 'youtu';
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
return 'ali';
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
var Video =
|
|
305
418
|
/** @class */
|
|
306
419
|
function (_super) {
|
|
307
|
-
__extends(
|
|
420
|
+
__extends(Video, _super);
|
|
308
421
|
|
|
309
|
-
function
|
|
422
|
+
function Video() {
|
|
310
423
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
311
424
|
|
|
312
425
|
_this.state = {};
|
|
@@ -370,87 +483,93 @@ function (_super) {
|
|
|
370
483
|
modelWrap.appendChild(shadowWrap);
|
|
371
484
|
modelWrap.appendChild(contentWrap);
|
|
372
485
|
(document.querySelector('[magic_design]') || document.body).appendChild(modelWrap);
|
|
373
|
-
|
|
486
|
+
var type = getVideoType(_this.props.opts);
|
|
487
|
+
createVideo(type, '-modal-' + videoId, __assign(__assign({}, _this.props.opts), {
|
|
374
488
|
autoplay: true
|
|
375
489
|
}));
|
|
376
490
|
};
|
|
377
491
|
|
|
378
492
|
_this.getInit = function () {
|
|
379
493
|
return __awaiter(_this, void 0, void 0, function () {
|
|
380
|
-
var
|
|
494
|
+
var videoType, _a, _b;
|
|
381
495
|
|
|
382
496
|
var _this = this;
|
|
383
497
|
|
|
384
|
-
return __generator(this, function (
|
|
385
|
-
switch (
|
|
498
|
+
return __generator(this, function (_c) {
|
|
499
|
+
switch (_c.label) {
|
|
386
500
|
case 0:
|
|
387
|
-
if (
|
|
501
|
+
if (!this.props.opts.source) return [3
|
|
502
|
+
/*break*/
|
|
503
|
+
, 8];
|
|
504
|
+
videoType = getVideoType(this.props.opts);
|
|
505
|
+
if (!(videoType == 'youtu')) return [3
|
|
506
|
+
/*break*/
|
|
507
|
+
, 4];
|
|
508
|
+
if (!!window.YT) return [3
|
|
388
509
|
/*break*/
|
|
389
510
|
, 2];
|
|
390
511
|
return [4
|
|
391
512
|
/*yield*/
|
|
392
|
-
, Promise.all([(0, _commonUtil.importAsync)('https://
|
|
513
|
+
, Promise.all([(0, _commonUtil.importAsync)('https://www.youtube.com/iframe_api', 'js')])];
|
|
393
514
|
|
|
394
515
|
case 1:
|
|
395
|
-
|
|
516
|
+
_c.sent();
|
|
396
517
|
|
|
397
|
-
|
|
518
|
+
_c.label = 2;
|
|
398
519
|
|
|
399
520
|
case 2:
|
|
400
|
-
|
|
401
|
-
/*break*/
|
|
402
|
-
, 4];
|
|
521
|
+
_a = this;
|
|
403
522
|
return [4
|
|
404
523
|
/*yield*/
|
|
405
|
-
,
|
|
524
|
+
, createVideo('youtu', this.props.videoId, this.props.opts)];
|
|
406
525
|
|
|
407
526
|
case 3:
|
|
408
|
-
|
|
527
|
+
_a.ytPlayer = _c.sent();
|
|
528
|
+
this.ytPlayer.addEventListener('onStateChange', function (event) {
|
|
529
|
+
if (!_this.props.opts.loop) {
|
|
530
|
+
if (event.data == YT.PlayerState.ENDED) {
|
|
531
|
+
console.log('youtu end');
|
|
409
532
|
|
|
410
|
-
|
|
533
|
+
_this.props.onEnd();
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
_c.label = 4;
|
|
411
538
|
|
|
412
539
|
case 4:
|
|
413
|
-
if (!
|
|
540
|
+
if (!(videoType == 'ali')) return [3
|
|
414
541
|
/*break*/
|
|
415
|
-
,
|
|
416
|
-
if (
|
|
417
|
-
/*break*/
|
|
418
|
-
, 5];
|
|
419
|
-
videoId_1 = this.props.opts.source.split('youtu.be/')[1];
|
|
420
|
-
(0, _commonUtil.nextTick)(function () {
|
|
421
|
-
_this.ytPlayer = new YT.Player('video' + _this.props.videoId, {
|
|
422
|
-
height: '100%',
|
|
423
|
-
width: '100%',
|
|
424
|
-
videoId: videoId_1,
|
|
425
|
-
events: {
|
|
426
|
-
onReady: function onReady() {
|
|
427
|
-
console.log('onReady');
|
|
428
|
-
},
|
|
429
|
-
onStateChange: function onStateChange() {
|
|
430
|
-
console.log('onStateChange');
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
}, 500, 10);
|
|
435
|
-
return [3
|
|
542
|
+
, 8];
|
|
543
|
+
if (!!window.Aliplayer) return [3
|
|
436
544
|
/*break*/
|
|
437
|
-
,
|
|
545
|
+
, 6];
|
|
546
|
+
return [4
|
|
547
|
+
/*yield*/
|
|
548
|
+
, Promise.all([(0, _commonUtil.importAsync)('https://g.alicdn.com/de/prismplayer/2.13.2/aliplayer-min.js'), (0, _commonUtil.importAsync)('https://g.alicdn.com/de/prismplayer/2.13.2/skins/default/aliplayer-min.css')])];
|
|
438
549
|
|
|
439
550
|
case 5:
|
|
440
|
-
|
|
551
|
+
_c.sent();
|
|
552
|
+
|
|
553
|
+
_c.label = 6;
|
|
554
|
+
|
|
555
|
+
case 6:
|
|
556
|
+
_b = this;
|
|
441
557
|
return [4
|
|
442
558
|
/*yield*/
|
|
443
|
-
, createVideo(this.props.videoId, this.props.opts)];
|
|
559
|
+
, createVideo('ali', this.props.videoId, this.props.opts)];
|
|
444
560
|
|
|
445
|
-
case
|
|
446
|
-
|
|
561
|
+
case 7:
|
|
562
|
+
_b.aliPlayer = _c.sent();
|
|
447
563
|
this.aliPlayer.on('ended', function () {
|
|
448
|
-
if (!_this.props.opts.loop) {
|
|
564
|
+
if (!_this.props.opts.loop) {
|
|
565
|
+
console.log('ali end');
|
|
566
|
+
|
|
567
|
+
_this.props.onEnd();
|
|
449
568
|
}
|
|
450
569
|
});
|
|
451
|
-
|
|
570
|
+
_c.label = 8;
|
|
452
571
|
|
|
453
|
-
case
|
|
572
|
+
case 8:
|
|
454
573
|
return [2
|
|
455
574
|
/*return*/
|
|
456
575
|
];
|
|
@@ -466,11 +585,11 @@ function (_super) {
|
|
|
466
585
|
return _this;
|
|
467
586
|
}
|
|
468
587
|
|
|
469
|
-
|
|
588
|
+
Video.prototype.componentDidMount = function () {
|
|
470
589
|
this.getInit();
|
|
471
590
|
};
|
|
472
591
|
|
|
473
|
-
|
|
592
|
+
Video.prototype.render = function () {
|
|
474
593
|
var _a = this.props,
|
|
475
594
|
videoId = _a.videoId,
|
|
476
595
|
opts = _a.opts,
|
|
@@ -485,11 +604,9 @@ function (_super) {
|
|
|
485
604
|
}));
|
|
486
605
|
};
|
|
487
606
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
};
|
|
491
|
-
return AComponent;
|
|
607
|
+
Video.defaultProps = {};
|
|
608
|
+
return Video;
|
|
492
609
|
}(_react["default"].Component);
|
|
493
610
|
|
|
494
|
-
var _default =
|
|
611
|
+
var _default = Video;
|
|
495
612
|
exports["default"] = _default;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.pc-video-modal-wrap {
|
|
26
|
-
position:
|
|
26
|
+
position: fixed;
|
|
27
27
|
top: 0;
|
|
28
28
|
left: 0;
|
|
29
29
|
right: 0;
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
justify-content: center;
|
|
34
|
+
z-index: 999;
|
|
34
35
|
|
|
35
36
|
.video-shadow-wrap {
|
|
36
37
|
position: fixed;
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
background: rgb(255 255 255);
|
|
52
53
|
border-radius: 5px;
|
|
53
54
|
z-index: 1001;
|
|
54
|
-
position:
|
|
55
|
+
position: relative;
|
|
55
56
|
|
|
56
57
|
.close-img-wrap {
|
|
57
58
|
position: absolute;
|
|
@@ -18,8 +18,8 @@ var imagesGroupSourceJSON = function imagesGroupSourceJSON(compId) {
|
|
|
18
18
|
open: true,
|
|
19
19
|
type: 'IMAGE',
|
|
20
20
|
content: {
|
|
21
|
-
h5Name: '
|
|
22
|
-
pcName: '
|
|
21
|
+
h5Name: 'Image Name',
|
|
22
|
+
pcName: 'Image Name',
|
|
23
23
|
h5ImgSrc: '',
|
|
24
24
|
pcImgSrc: '',
|
|
25
25
|
clickUrl: ''
|
|
@@ -208,12 +208,13 @@ function (_super) {
|
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
+
var dotsSpace = Math.max(data.setting.dots.size, data.setting.dots.hoverSize) + 12 + "px";
|
|
211
212
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
212
213
|
className: "m-carousel-mobile"
|
|
213
214
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
214
215
|
className: "content",
|
|
215
216
|
style: {
|
|
216
|
-
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ?
|
|
217
|
+
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? dotsSpace : '0'
|
|
217
218
|
}
|
|
218
219
|
}, /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({
|
|
219
220
|
ref: function ref(slider) {
|
|
@@ -85,11 +85,16 @@
|
|
|
85
85
|
border-radius: 50%;
|
|
86
86
|
background: #FFF;
|
|
87
87
|
cursor: inherit;
|
|
88
|
-
margin-right:
|
|
88
|
+
margin-right: 10px;
|
|
89
89
|
transition: all .5s;
|
|
90
90
|
|
|
91
|
+
&:last-child {
|
|
92
|
+
margin-right: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
91
95
|
&.active {
|
|
92
96
|
width: 2em;
|
|
97
|
+
height: 1em;
|
|
93
98
|
border-radius: 100px;
|
|
94
99
|
opacity: 1;
|
|
95
100
|
}
|
|
@@ -205,12 +205,14 @@ function (_super) {
|
|
|
205
205
|
fontSize: data.setting.navigation.size,
|
|
206
206
|
color: data.setting.navigation.color
|
|
207
207
|
};
|
|
208
|
+
var dotsSpace = Math.max(data.setting.dots.size, data.setting.dots.hoverSize) * 1.25 + 20 + "px";
|
|
209
|
+
var sliderWidth = "calc(100% - " + (data.setting.navigation.size + 20) * 2 + "px)";
|
|
208
210
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
209
211
|
className: "m-carousel-pc"
|
|
210
212
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
211
213
|
className: "content",
|
|
212
214
|
style: {
|
|
213
|
-
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ?
|
|
215
|
+
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? dotsSpace : '0'
|
|
214
216
|
}
|
|
215
217
|
}, data.setting.navigation.open && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
216
218
|
className: "carousel-icon-left",
|
|
@@ -225,7 +227,11 @@ function (_super) {
|
|
|
225
227
|
ref: function ref(slider) {
|
|
226
228
|
return _this.sliderRef = slider;
|
|
227
229
|
}
|
|
228
|
-
}, settings
|
|
230
|
+
}, settings, {
|
|
231
|
+
style: {
|
|
232
|
+
width: sliderWidth
|
|
233
|
+
}
|
|
234
|
+
}), data.groupSource.map(function (item) {
|
|
229
235
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
236
|
key: item.id,
|
|
231
237
|
className: "img-wrap"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.slider-wrap {
|
|
21
|
-
width: calc(100% - 72px);
|
|
21
|
+
// width: calc(100% - 72px);
|
|
22
22
|
margin: 0 auto;
|
|
23
23
|
line-height: 1;
|
|
24
24
|
|
|
@@ -101,11 +101,16 @@
|
|
|
101
101
|
border-radius: 50%;
|
|
102
102
|
background: #FFF;
|
|
103
103
|
cursor: inherit;
|
|
104
|
-
margin-right:
|
|
104
|
+
margin-right: 10px;
|
|
105
105
|
transition: all .5s;
|
|
106
106
|
|
|
107
|
+
&:last-child {
|
|
108
|
+
margin-right: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
107
111
|
&.active {
|
|
108
112
|
width: 2.5em;
|
|
113
|
+
height: 1.25em;
|
|
109
114
|
border-radius: 100px;
|
|
110
115
|
opacity: 1;
|
|
111
116
|
}
|
|
@@ -59,11 +59,6 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
|
|
|
59
59
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
// import './index.less';
|
|
63
|
-
// less to css 在线地址 https://tool.oschina.net/less
|
|
64
|
-
// css 压缩地址 https://www.runoob.com/csspack
|
|
65
|
-
var style = '.m-text{display: flex;flex-direction: column;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title-text{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:10px 20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
|
|
66
|
-
|
|
67
62
|
var Text =
|
|
68
63
|
/** @class */
|
|
69
64
|
function (_super) {
|
|
@@ -80,6 +75,8 @@ function (_super) {
|
|
|
80
75
|
nodeData = _b.nodeData,
|
|
81
76
|
mode = _b.mode,
|
|
82
77
|
outputType = _b.outputType;
|
|
78
|
+
var groupWrapContainerStyle = window.magicDesign.device === 'pc' ? 'padding: 16px 20px;' : 'padding: 12px 20px;';
|
|
79
|
+
var style = ".m-text{display: flex;flex-direction: column;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title-text{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{" + groupWrapContainerStyle + "}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}";
|
|
83
80
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
81
|
className: "m-text",
|
|
85
82
|
onClick: this.onComponentClick
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.m-text {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
.title-wrap {
|
|
6
6
|
font-weight: 500;
|
|
7
7
|
font-size: 20px;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
|
|
19
19
|
.group-wrap-container {
|
|
20
|
-
padding:
|
|
20
|
+
padding: 16px 20px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.group-wrap {
|
|
Binary file
|
|
@@ -136,6 +136,11 @@ function (_super) {
|
|
|
136
136
|
_this.setState({});
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
+
onEnd: function onEnd() {
|
|
140
|
+
_this.videoRefMap[group.id].playing = false;
|
|
141
|
+
|
|
142
|
+
_this.setState({});
|
|
143
|
+
},
|
|
139
144
|
opts: __assign(__assign({}, group.video), {
|
|
140
145
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
141
146
|
source: group.video.sourceUrl
|
|
@@ -133,6 +133,11 @@ function (_super) {
|
|
|
133
133
|
_this.setState({});
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
+
onEnd: function onEnd() {
|
|
137
|
+
_this.videoRefMap[group.id].playing = false;
|
|
138
|
+
|
|
139
|
+
_this.setState({});
|
|
140
|
+
},
|
|
136
141
|
opts: __assign(__assign({}, group.video), {
|
|
137
142
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
138
143
|
source: group.video.sourceUrl
|
|
@@ -135,6 +135,11 @@ function (_super) {
|
|
|
135
135
|
_this.setState({});
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
+
onEnd: function onEnd() {
|
|
139
|
+
_this.videoRefMap[firstGroup.id].playing = false;
|
|
140
|
+
|
|
141
|
+
_this.setState({});
|
|
142
|
+
},
|
|
138
143
|
opts: __assign(__assign({}, firstGroup.video), {
|
|
139
144
|
cover: (0, _coreUtil.isPc)() ? firstGroup.overilay.content.pcImgSrc : firstGroup.overilay.content.h5ImgSrc,
|
|
140
145
|
source: firstGroup.video.sourceUrl
|
|
@@ -179,6 +184,11 @@ function (_super) {
|
|
|
179
184
|
_this.setState({});
|
|
180
185
|
}
|
|
181
186
|
},
|
|
187
|
+
onEnd: function onEnd() {
|
|
188
|
+
_this.videoRefMap[group.id].playing = false;
|
|
189
|
+
|
|
190
|
+
_this.setState({});
|
|
191
|
+
},
|
|
182
192
|
opts: __assign(__assign({}, group.video), {
|
|
183
193
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
184
194
|
source: group.video.sourceUrl
|
|
@@ -142,6 +142,11 @@ function (_super) {
|
|
|
142
142
|
_this.setState({});
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
+
onEnd: function onEnd() {
|
|
146
|
+
_this.videoRefMap[group.id].playing = false;
|
|
147
|
+
|
|
148
|
+
_this.setState({});
|
|
149
|
+
},
|
|
145
150
|
opts: __assign(__assign({}, group.video), {
|
|
146
151
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
147
152
|
source: group.video.sourceUrl
|
|
@@ -136,6 +136,11 @@ function (_super) {
|
|
|
136
136
|
_this.setState({});
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
+
onEnd: function onEnd() {
|
|
140
|
+
_this.videoRefMap[group.id].playing = false;
|
|
141
|
+
|
|
142
|
+
_this.setState({});
|
|
143
|
+
},
|
|
139
144
|
opts: __assign(__assign({}, group.video), {
|
|
140
145
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
141
146
|
source: group.video.sourceUrl
|
|
@@ -136,6 +136,11 @@ function (_super) {
|
|
|
136
136
|
_this.setState({});
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
+
onEnd: function onEnd() {
|
|
140
|
+
_this.videoRefMap[group.id].playing = false;
|
|
141
|
+
|
|
142
|
+
_this.setState({});
|
|
143
|
+
},
|
|
139
144
|
opts: __assign(__assign({}, group.video), {
|
|
140
145
|
cover: (0, _coreUtil.getVideoCover)(group),
|
|
141
146
|
source: group.video.sourceUrl
|
package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js
CHANGED
|
@@ -112,7 +112,7 @@ function (_super) {
|
|
|
112
112
|
src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
|
|
113
113
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
114
|
className: "name"
|
|
115
|
-
}, (0, _coreUtil.isPc)() ? src.image.content.
|
|
115
|
+
}, (0, _coreUtil.isPc)() ? src.image.content.pcName : src.image.content.h5Name));
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
return /*#__PURE__*/_react["default"].createElement("div", {
|