jufubao-base 1.0.64-beta300 → 1.0.64-beta302
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/package.json
CHANGED
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
:current="current"
|
|
65
65
|
:width=" width + 'rpx'"
|
|
66
66
|
:height="height + 'rpx'"
|
|
67
|
+
:interval="carouselTime"
|
|
67
68
|
@onClickItem="handleClick"
|
|
68
69
|
@animationfinish="handleAnimationfinish"
|
|
69
70
|
>
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
import XdSwiper from "@/components/XdSwiper/XdSwiper";
|
|
103
104
|
import MoreScreen from "./MoreScreen";
|
|
104
105
|
import XdSwiperDot from "./XdSwiperDot";
|
|
105
|
-
|
|
106
|
+
|
|
106
107
|
export default {
|
|
107
108
|
name: "JfbBasePoster",
|
|
108
109
|
components: {
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
return {
|
|
118
119
|
selfMask: true,
|
|
119
120
|
params: {},
|
|
120
|
-
|
|
121
|
+
|
|
121
122
|
//Swiper 配置
|
|
122
123
|
mode:'round', //default 、round 、nav 、dot, indexes
|
|
123
124
|
current: 0,
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
},
|
|
146
147
|
isPreview: false,
|
|
147
148
|
noData:false,
|
|
148
|
-
|
|
149
|
+
|
|
149
150
|
test: {
|
|
150
151
|
"content_id": "KpBbUKdj4aBejwe7Fh1ki",
|
|
151
152
|
"position_id": "QCk3PmoyQmOWRP1SxnYR3",
|
|
@@ -205,7 +206,7 @@
|
|
|
205
206
|
dotStyleData(){
|
|
206
207
|
let alpha = 1;
|
|
207
208
|
if(this.posterType === '1') alpha = 0.6;
|
|
208
|
-
|
|
209
|
+
|
|
209
210
|
let selectedColor = `rgba(${color(this.mainColor).alpha(alpha).array().join(',')})`;
|
|
210
211
|
console.log('selectedColor',selectedColor, this.mode, this.posterType);
|
|
211
212
|
let style = {
|
|
@@ -308,11 +309,11 @@
|
|
|
308
309
|
}
|
|
309
310
|
return temp
|
|
310
311
|
},
|
|
311
|
-
handleAnimationfinish(e) {
|
|
312
|
+
handleAnimationfinish(e) {
|
|
312
313
|
this.currentImage = this.info[e.detail.current]['image_background_url']
|
|
313
314
|
if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
|
|
314
315
|
this.$xdRoot.$emit("setLayoutPageBg", this.info[e.detail.current]['image_background_url']);
|
|
315
|
-
}
|
|
316
|
+
}
|
|
316
317
|
this.current = e.detail.current;
|
|
317
318
|
},
|
|
318
319
|
handleClick(item) {
|
|
@@ -376,18 +377,18 @@
|
|
|
376
377
|
handleOne(list){
|
|
377
378
|
this.info = this.handleImage(list);
|
|
378
379
|
let current = this.current || 0;
|
|
379
|
-
this.currentImage = this.info[current]['image_background_url']
|
|
380
|
+
this.currentImage = this.info[current]['image_background_url']
|
|
380
381
|
if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
|
|
381
382
|
this.$xdRoot.$emit("setLayoutPageBg", this.currentImage);
|
|
382
383
|
}
|
|
383
384
|
},
|
|
384
|
-
|
|
385
|
+
|
|
385
386
|
getDefualtValue(key){
|
|
386
387
|
if (key === 'margin') {
|
|
387
388
|
return {top: 0, bottom: 0, left: 0, right: 0}
|
|
388
389
|
}
|
|
389
390
|
},
|
|
390
|
-
|
|
391
|
+
|
|
391
392
|
/**
|
|
392
393
|
* @description 监听事件变化
|
|
393
394
|
* @param container {object} 业务组件对象自己
|
|
@@ -397,7 +398,7 @@
|
|
|
397
398
|
if (this.poster.type) {
|
|
398
399
|
this.posterType = this.poster.type
|
|
399
400
|
}
|
|
400
|
-
if(this.poster.position) {
|
|
401
|
+
if(this.poster.position) {
|
|
401
402
|
this.posterPosition = this.poster.position
|
|
402
403
|
}
|
|
403
404
|
this.radius = getContainerPropsValue(container, 'content.radius', 0);
|
|
@@ -405,13 +406,13 @@
|
|
|
405
406
|
this.rows = getContainerPropsValue(container, 'content.rows', 1);
|
|
406
407
|
this.isSupport = getContainerPropsValue(container, 'content.isSupport', 'Y');
|
|
407
408
|
this.mS = getContainerPropsValue(container, 'content.margin', this.getDefualtValue('margin'));
|
|
408
|
-
|
|
409
|
+
|
|
409
410
|
//content
|
|
410
411
|
this.mode = getContainerPropsValue(container, 'content.dot_type', 'dot');
|
|
411
412
|
this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1);
|
|
412
413
|
this.carouselTime = Number(getContainerPropsValue(container, 'content.carouselTime', 5)) * 1000;
|
|
413
414
|
this.useNumber = getContainerPropsValue(container, 'content.number', 1);
|
|
414
|
-
|
|
415
|
+
|
|
415
416
|
if(this.poster.size) {
|
|
416
417
|
this.width = this.poster.size.width;
|
|
417
418
|
this.height = this.poster.size.height;
|
|
@@ -429,11 +430,11 @@
|
|
|
429
430
|
},
|
|
430
431
|
})
|
|
431
432
|
.then(res => {
|
|
432
|
-
|
|
433
|
+
|
|
433
434
|
if(res.list.length === 0 && this.isPreview) {
|
|
434
435
|
res.list = this.getTestData();
|
|
435
436
|
}
|
|
436
|
-
|
|
437
|
+
|
|
437
438
|
if (this.posterType === '1') this.handleOne(res.list);
|
|
438
439
|
if (this.posterType === '2') this.handleOne(res.list);
|
|
439
440
|
if (this.posterType === '3') this.handleOne(res.list);
|
|
@@ -445,12 +446,12 @@
|
|
|
445
446
|
console.error(error)
|
|
446
447
|
})
|
|
447
448
|
},
|
|
448
|
-
|
|
449
|
+
|
|
449
450
|
onJfbUpdate(data) {
|
|
450
451
|
this.onJfbLoad(this.params);
|
|
451
452
|
}
|
|
452
|
-
|
|
453
|
-
|
|
453
|
+
|
|
454
|
+
|
|
454
455
|
}
|
|
455
456
|
}
|
|
456
457
|
|
|
@@ -474,19 +475,19 @@
|
|
|
474
475
|
justify-content: center;
|
|
475
476
|
align-items: center;
|
|
476
477
|
overflow: hidden;
|
|
477
|
-
|
|
478
|
-
|
|
478
|
+
|
|
479
|
+
|
|
479
480
|
& > view {
|
|
480
481
|
width: 100%;
|
|
481
482
|
height: 100%;
|
|
482
483
|
box-sizing: border-box;
|
|
483
|
-
|
|
484
|
+
|
|
484
485
|
& > image {
|
|
485
|
-
|
|
486
|
+
|
|
486
487
|
}
|
|
487
488
|
}
|
|
488
489
|
}
|
|
489
|
-
|
|
490
|
+
|
|
490
491
|
&__one.carousel {
|
|
491
492
|
position: relative;
|
|
492
493
|
box-sizing: border-box;
|
|
@@ -494,7 +495,7 @@
|
|
|
494
495
|
justify-content: center;
|
|
495
496
|
align-items: center;
|
|
496
497
|
overflow: hidden;
|
|
497
|
-
|
|
498
|
+
|
|
498
499
|
& .carousel-mask {
|
|
499
500
|
position: absolute;
|
|
500
501
|
left: 0;
|
|
@@ -504,6 +505,6 @@
|
|
|
504
505
|
background: rgba(0,0,0,0);
|
|
505
506
|
}
|
|
506
507
|
}
|
|
507
|
-
|
|
508
|
+
|
|
508
509
|
}
|
|
509
510
|
</style>
|