jufubao-base 1.0.199 → 1.0.200-beta1

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.199",
3
+ "version": "1.0.200-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -19,10 +19,10 @@
19
19
  class="jfb-base-poster-big-small__body-wrap"
20
20
  :style="{
21
21
  margin: margin,
22
- flexDirection: position === 1 ? 'row' : 'row-reverse',
23
22
  }"
24
23
  v-if="isShowAd"
25
24
  >
25
+ <!--大图-->
26
26
  <view
27
27
  v-if="isCarousel === 1"
28
28
  :style="{
@@ -98,6 +98,8 @@
98
98
  </xd-swiper-dot>
99
99
  <view v-if="isPreview" class="carousel-mask"></view>
100
100
  </view>
101
+ <!--大图-->
102
+ <!--小图-->
101
103
  <view
102
104
  :style="{
103
105
  width: bigWidth + 'rpx',
@@ -268,6 +270,7 @@
268
270
  </view>
269
271
  </view>
270
272
  </view>
273
+ <!--小图-->
271
274
  </view>
272
275
  </view>
273
276
  </view>
@@ -297,12 +300,7 @@ export default {
297
300
  return {
298
301
  params:{},
299
302
  height: 0, //组件高度
300
- mS: {
301
- top: 0,
302
- bottom: 0,
303
- left: 0,
304
- right: 0,
305
- }, //间距
303
+ mS: {}, //间距
306
304
  isPreview: false, //是否预览
307
305
  test: {
308
306
  content_id: "KpBbUKdj4aBejwe7Fh1ki",
@@ -364,9 +362,7 @@ export default {
364
362
  },
365
363
  computed: {
366
364
  margin() {
367
- return `${this.mS.top || 0}rpx ${this.mS.right || 0}rpx ${
368
- this.mS.bottom || 0
369
- }rpx ${this.mS.left || 0}rpx`;
365
+ return this.getMarginAndPadding(this.mS, 0);
370
366
  },
371
367
  msMarginComputed() {
372
368
  if (this.position === 1) {
@@ -793,10 +789,11 @@ export default {
793
789
  // 获取大小图之间间距,如果没有则设置默认值
794
790
  this.msMargin = getContainerPropsValue(container, "content.msMargin", 10);
795
791
  // 获取安全区域宽度,减去margin的值,再除以2,获取大图宽度
796
- this.bigWidth = getWidthHeight(this.height,this.mS,this.msMargin).bigWidth;
797
- this.bigHeight = getWidthHeight(this.height,this.mS,this.msMargin).bigHeight;
792
+ this.bigWidth = getWidthHeight(this.height,this.mS,this.msMargin , this).bigWidth;
793
+ this.bigHeight = getWidthHeight(this.height,this.mS,this.msMargin, this).bigHeight;
798
794
  // 获取容器高度,减去margin的值,再除以2,获取小图高度
799
- this.smallHeight = getWidthHeight(this.height,this.mS,this.msMargin).smallHeight;
795
+ this.smallHeight = getWidthHeight(this.height, this.mS, this.msMargin, this).smallHeight;
796
+
800
797
  // 获取大图数据
801
798
  this.isCarousel = getContainerPropsValue(
802
799
  container,
@@ -882,6 +879,10 @@ export default {
882
879
  &__body {
883
880
  &-wrap {
884
881
  display: flex;
882
+ justify-content: space-between;
883
+ align-items: flex-start;
884
+ border:1px solid red;
885
+ overflow: hidden;
885
886
  }
886
887
  }
887
888
  }
@@ -1,12 +1,10 @@
1
- function getWidthHeight(height, mS= {}, msMargin={}) {
2
- let bigWidth =
3
- uni.getSystemInfoSync().safeArea.width -
4
- (mS.left + mS.right + Number(msMargin)) / 2;
5
- let bigHeight = height - (mS.top + mS.bottom);
1
+ function getWidthHeight(height, mS= {}, msMargin={}, $vm) {
2
+ let marginRL = $vm.checkValue(mS.left, 0) + $vm.checkValue(mS.right, 0);
3
+ let marginTB = $vm.checkValue(mS.top, 0) + $vm.checkValue(mS.bottom, 0);
4
+ let bigWidth = (750 - (marginRL + Number(msMargin)))/2;
5
+ let bigHeight = height - marginTB;
6
6
  // 获取容器高度,减去margin的值,再除以2,获取小图高度
7
- let smallHeight =
8
- (height - (mS.top + mS.bottom + Number(msMargin))) /
9
- 2;
7
+ let smallHeight = (height - (marginTB + Number(msMargin)))/2;
10
8
  return { bigWidth, bigHeight, smallHeight };
11
9
  }
12
10
  export default getWidthHeight;