jufubao-base 1.0.77-beta10 → 1.0.77-beta14

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.77-beta10",
3
+ "version": "1.0.77-beta14",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -76,7 +76,6 @@
76
76
  </template>
77
77
  </xd-swiper>
78
78
  </xd-swiper-dot>
79
-
80
79
  <view v-if="isPreview" class="carousel-mask"></view>
81
80
  </view>
82
81
  </template>
@@ -87,9 +86,11 @@
87
86
  :content="info"
88
87
  ></more-screen>
89
88
  </view>
89
+ <!--解决图片缓冲预加载问题-->
90
90
  <view v-for="(item,index) in info" :key="index" style="position: absolute; top: -19999px; left: -100000px">
91
- <image :src="item.image_background_url" ></image>
92
- </view>
91
+ <image :src="item.image_background_url" ></image>
92
+ </view>
93
+ <!--解决图片缓冲预加载问题-->
93
94
  </view>
94
95
  </template>
95
96
 
@@ -120,6 +121,7 @@
120
121
  data() {
121
122
  return {
122
123
  selfMask: false,
124
+ pageShow:false,
123
125
  params: {},
124
126
 
125
127
  //Swiper 配置
@@ -319,14 +321,32 @@
319
321
  return temp
320
322
  },
321
323
  handleAnimationfinish(e) {
322
- this.currentImage = this.info[e.detail.current]['image_background_url']
323
- if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2 && this.$root.$isShow === true) {
324
+ //不支持背景不处理
325
+ if(this.isSupport==='N') return;
326
+
327
+ //当前组件已被隐藏或者轮播图记录为0条处理
328
+ if(this.$root.$isShow === false
329
+ || this.info.length === 0
330
+ || !(this.rows===1 && this.isCarousel===2) //可用模式
331
+ ) {
332
+ this.currentImage = null;
333
+ this.current = 0;
334
+ this.$xdRoot.$emit("setLayoutPageBg", null);
335
+ console.warn(`handleAnimationfinish.disabel.poster`)
336
+ return
337
+ }
338
+
339
+ //开启背景图模式并且为轮播图模式
340
+ if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
341
+ console.warn(`handleAnimationfinish.start.poster`)
342
+ this.currentImage = this.info[e.detail.current]['image_background_url']
324
343
  let bg = null;
325
- if(this.info[e.detail.current]['image_background_url']) bg = this.info[e.detail.current]['image_background_url'];
344
+ if(this.currentImage) bg = this.currentImage;
326
345
  this.$xdRoot.$emit("setLayoutPageBg", bg);
346
+ this.current = e.detail.current;
327
347
  }
328
- this.current = e.detail.current;
329
348
  },
349
+
330
350
  handleClick(item) {
331
351
  //内部链接跳转地址
332
352
  if (item.redirect_type === 'INN') {
@@ -387,6 +407,9 @@
387
407
  },
388
408
  handleOne(list){
389
409
  this.info = this.handleImage(list);
410
+
411
+ //轮播图记录为0条处理
412
+ if( this.info.length === 0) return
390
413
  let current = this.current || 0;
391
414
  this.currentImage = this.info[current]['image_background_url']
392
415
  if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
@@ -460,6 +483,15 @@
460
483
  },
461
484
 
462
485
  onJfbShow(){
486
+ //不支持背景不处理
487
+ if(this.isSupport==='N') return;
488
+
489
+ //隐藏模式或者数据为0不处理
490
+ if(this.$root.$isShow === false || this.info.length === 0) {
491
+ this.$xdRoot.$emit("setLayoutPageBg", null);
492
+ return;
493
+ }
494
+
463
495
  if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
464
496
  this.$xdRoot.$emit("setLayoutPageBg", this.currentImage);
465
497
  }
@@ -217,7 +217,7 @@
217
217
  this.address_url = getContainerPropsValue(container, 'content.address_url', {value: ''});
218
218
  this.color = getContainerPropsValue(container, 'content.textColor', '#333');
219
219
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', 'rgba(0,0,0,0)');
220
- this.textType = "N";//getContainerPropsValue(container, 'content.text_type', 'N');
220
+ this.textType = getContainerPropsValue(container, 'content.text_type', 'N');
221
221
 
222
222
  this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
223
223
  this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');