jufubao-base 1.0.235 → 1.0.236-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,15 +103,21 @@
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
- <xd-content-xss
111
- :key="contentKey"
112
- :html="content"
113
- :font-sizes="fontSize"
114
- ></xd-content-xss>
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>
114
+ <view style="flex: 1;">
115
+ <xd-content-xss
116
+ :key="contentKey"
117
+ :html="content"
118
+ :font-sizes="fontSize"
119
+ ></xd-content-xss>
120
+ </view>
115
121
  </view>
116
122
  </view>
117
123
  </template>
@@ -162,6 +168,7 @@
162
168
  import extsMixins from "@/mixins/extsMixins"
163
169
  import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer.vue";
164
170
  import { getContainerPropsValue } from "@/utils/xd.base";
171
+ import getServiceUrl from "@/common/getServiceUrl";
165
172
  import storage from "@/common/storage";
166
173
  import Color from "color";
167
174
  const color = require('color');
@@ -219,6 +226,9 @@
219
226
 
220
227
  backgroundColor: '',
221
228
  is_hide_dailog:'N',
229
+ show_tip_icon: "",
230
+ staticTipIcon: "",
231
+ tipIconHeight: 50,
222
232
 
223
233
  isMp:false,
224
234
 
@@ -337,12 +347,16 @@
337
347
  this.btnConfirmWidth = getContainerPropsValue(container, 'content.btnConfirmWidth', '');
338
348
  this.btnConfirmBgColor = getContainerPropsValue(container, 'content.btnConfirmBgColor', '');
339
349
  this.btnConfirmTextColor = getContainerPropsValue(container, 'content.btnConfirmTextColor', '');
350
+ this.show_tip_icon = getContainerPropsValue(container, 'content.show_tip_icon', '');
351
+ let staticTipIcon = getContainerPropsValue(container, 'content.staticTipIcon', '');
352
+ this.staticTipIcon = staticTipIcon ? getServiceUrl(staticTipIcon.url) : '';
353
+ this.tipIconHeight = getContainerPropsValue(container, 'content.tipIconHeight', 50);
340
354
  if (this.fontSize === 20) this.titleFontSize = 28;
341
355
  if (this.fontSize === 26) this.titleFontSize = 36;
342
356
  if (this.fontSize === 36) this.titleFontSize = 44;
343
357
  this.isTitle = getContainerPropsValue(container, 'content.isTitle', false);
344
358
 
345
- console.log("this.btnConfirmTextColor", this.btnConfirmTextColor);
359
+ console.log("this.staticTipIcon", this.staticTipIcon);
346
360
 
347
361
  if(this.style === '2') {
348
362
  this.num = getContainerPropsValue(container, 'content.num', 1);
@@ -520,6 +534,8 @@
520
534
 
521
535
  &-content {
522
536
  padding: unit(8, rpx) unit(10, rpx);
537
+ display: flex;
538
+ align-items: center;
523
539
  }
524
540
  }
525
541
 
@@ -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',
@@ -536,6 +582,7 @@ export default {
536
582
  value: params['textColor'] || '',
537
583
  placeholder: '请选择文字颜色',
538
584
  classNmae: 'input80',
585
+ hidden: true,
539
586
  },
540
587
  {
541
588
  label: '外边距设置:',
@@ -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
  }