jufubao-base 1.0.232 → 1.0.233-beta2

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.
@@ -103,10 +103,14 @@
103
103
  color:textColor,
104
104
  borderRadius: contRadius,
105
105
  padding: paddingUi,
106
- lineHeight: '50rpx'
106
+ lineHeight: '50rpx',
107
107
  }"
108
108
  v-if="content"
109
109
  >
110
+ <image v-if="show_tip_icon==='Y' && staticTipIcon" :src="staticTipIcon"
111
+ :style="{height: tipIconHeight+'rpx'}"
112
+ style="width: auto;margin-right: 12rpx;" mode="heightFix"
113
+ ></image>
110
114
  <xd-content-xss
111
115
  :key="contentKey"
112
116
  :html="content"
@@ -162,6 +166,7 @@
162
166
  import extsMixins from "@/mixins/extsMixins"
163
167
  import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer.vue";
164
168
  import { getContainerPropsValue } from "@/utils/xd.base";
169
+ import getServiceUrl from "@/common/getServiceUrl";
165
170
  import storage from "@/common/storage";
166
171
  import Color from "color";
167
172
  const color = require('color');
@@ -219,6 +224,9 @@
219
224
 
220
225
  backgroundColor: '',
221
226
  is_hide_dailog:'N',
227
+ show_tip_icon: "",
228
+ staticTipIcon: "",
229
+ tipIconHeight: 50,
222
230
 
223
231
  isMp:false,
224
232
 
@@ -337,12 +345,16 @@
337
345
  this.btnConfirmWidth = getContainerPropsValue(container, 'content.btnConfirmWidth', '');
338
346
  this.btnConfirmBgColor = getContainerPropsValue(container, 'content.btnConfirmBgColor', '');
339
347
  this.btnConfirmTextColor = getContainerPropsValue(container, 'content.btnConfirmTextColor', '');
348
+ this.show_tip_icon = getContainerPropsValue(container, 'content.show_tip_icon', '');
349
+ let staticTipIcon = getContainerPropsValue(container, 'content.staticTipIcon', '');
350
+ this.staticTipIcon = staticTipIcon ? getServiceUrl(staticTipIcon.url) : '';
351
+ this.tipIconHeight = getContainerPropsValue(container, 'content.tipIconHeight', 50);
340
352
  if (this.fontSize === 20) this.titleFontSize = 28;
341
353
  if (this.fontSize === 26) this.titleFontSize = 36;
342
354
  if (this.fontSize === 36) this.titleFontSize = 44;
343
355
  this.isTitle = getContainerPropsValue(container, 'content.isTitle', false);
344
356
 
345
- console.log("this.btnConfirmTextColor", this.btnConfirmTextColor);
357
+ console.log("this.staticTipIcon", this.staticTipIcon);
346
358
 
347
359
  if(this.style === '2') {
348
360
  this.num = getContainerPropsValue(container, 'content.num', 1);
@@ -520,6 +532,8 @@
520
532
 
521
533
  &-content {
522
534
  padding: unit(8, rpx) unit(10, rpx);
535
+ display: flex;
536
+ align-items: center;
523
537
  }
524
538
  }
525
539
 
@@ -34,6 +34,35 @@ export default {
34
34
  if(params['textColor']) fontColor = params['textColor']
35
35
  if(params.titleStyle && params.titleStyle.color) fontColor = params.titleStyle.color;
36
36
 
37
+ //图片高度= 上下内边距 + 单个内容高度*行数 + 指示器高度
38
+ //图片宽度= 750 - 左右外边距
39
+ let outWidth = 750;
40
+ if(!params.margin) params.margin = {};
41
+ if(!params.contentPadding) params.contentPadding = {};
42
+ let marginLeft = params.margin.left || 0;
43
+ let marginRight = params.margin.right || 0;
44
+ let paddingLeft = params.contentPadding.left || 0;
45
+ let paddingRight = params.contentPadding.right || 0;
46
+ let paddingTop = params.contentPadding.top || 0;
47
+ let paddingBottom = params.contentPadding.bottom || 0;
48
+ let columnSpacing = params.columnSpacing || 0;
49
+ let columnSpacings = columnSpacing * (params.cells-1);
50
+ let textHeight = 40;
51
+ if(params.titleStyle && params.titleStyle.lineHeight) textHeight = parseInt(params.titleStyle.lineHeight);
52
+
53
+ let itemWidth = (outWidth - (marginLeft + marginRight + paddingLeft + paddingRight + columnSpacings))/ params.cells;
54
+ let itemHeight = textHeight + itemWidth;
55
+ let indicatorHeight = 0;
56
+
57
+ if(params.dot_type){
58
+ if(['indexes', 'nav'].includes(params['dot_type'])) indicatorHeight = 60;
59
+ else indicatorHeight = params.dot_type === 'normal'?0:48;
60
+ }
61
+ let bgImgHeight = params.jdRows * itemHeight + paddingTop + paddingBottom + indicatorHeight;
62
+ let bgImgWidth = 750 - (marginLeft + marginRight);
63
+ // console.log("itemHeight", bgImgHeight, bgImgWidth, params['dot_type'])
64
+
65
+
37
66
  return [
38
67
  {
39
68
  label: '导航配置:',
@@ -512,6 +541,23 @@ export default {
512
541
  showAlpha: true
513
542
  },
514
543
  },
544
+ {
545
+ label: "背景图片:",
546
+ ele: 'xd-upload',
547
+ valueKey: 'bgImage',
548
+ groupKey: 'style',
549
+ value: params.bgImage || null,
550
+ defaultValue: params.bgImage || null,
551
+ slot: true,
552
+ tipsformet: `上传文件格式:@imageType@,不超过@size@MB.,建议尺寸:${bgImgWidth}*${bgImgHeight}像素`,
553
+ type: ['jpg', 'png', 'jpeg'],
554
+ styleType: 'one',
555
+ oneWidth: bgImgWidth/2,
556
+ oneHeight: bgImgHeight/2,
557
+ uploadType: 'aliyun',
558
+ size: 5, //5M
559
+ action: 'aliyun',
560
+ },
515
561
  {
516
562
  label: "圆角设置:",
517
563
  groupKey: 'style',
@@ -82,6 +82,7 @@
82
82
  contentPadding:{},
83
83
  bgColor:'rgba(0,0,0,0)',
84
84
  bgRadius: 0,
85
+ bgImage: "",
85
86
  }
86
87
  },
87
88
  computed: {
@@ -192,6 +193,7 @@
192
193
  margin: this.getMarginAndPadding(this.margin, 0),
193
194
  padding:this.getMarginAndPadding(this.contentPadding, 0),
194
195
  backgroundColor: this.bgColor,
196
+ backgroundImage: this.bgImage ? `url(${getServiceUrl(this.bgImage)})` : '',
195
197
  borderRadius: this.bgRadius + 'rpx'
196
198
  }
197
199
  }
@@ -273,6 +275,7 @@
273
275
 
274
276
  //样式设置
275
277
  this.bgColor = getContainerPropsValue(container, 'content.bgColor','rgba(0,0,0,0)');
278
+ this.bgImage = getServiceUrl(getContainerPropsValue(container, 'content.bgImage', {url: ""}).url)
276
279
  this.bgRadius = getContainerPropsValue(container, 'content.bgRadius', '0');
277
280
  this.contentPadding = getContainerPropsValue(container, 'content.contentPadding', {});
278
281
  this.margin = getContainerPropsValue(container, 'content.margin', {});
@@ -327,6 +330,7 @@
327
330
  justify-content: center;
328
331
  align-items: center;
329
332
  display: flex;
333
+ background-size: cover;
330
334
  }
331
335
 
332
336
  }