jufubao-base 1.0.235 → 1.0.236-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 +1 -1
- package/src/components/JfbBaseCard/Attr.js +11 -0
- package/src/components/JfbBaseCard/JfbBaseCard.vue +77 -20
- package/src/components/JfbBaseCardGive/Api.js +13 -0
- package/src/components/JfbBaseCardGive/Attr.js +24 -1
- package/src/components/JfbBaseCardGive/JfbBaseCardGive.vue +85 -5
- package/src/components/JfbBaseCardV2/Attr.js +11 -0
- package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +58 -20
- package/src/components/JfbBaseCardV3/Attr.js +11 -0
- package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +54 -14
- package/src/components/JfbBaseHeader/Mock.js +1 -1
- package/src/components/JfbBaseHeaderColumn/Api.js +32 -0
- package/src/components/JfbBaseHeaderColumn/Attr.js +453 -0
- package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumn.vue +516 -0
- package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumnLess.less +79 -0
- package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumnMixin.js +30 -0
- package/src/components/JfbBaseHeaderColumn/Mock.js +17 -0
- package/src/components/JfbBaseNotice/Attr.js +36 -0
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +16 -2
- package/src/components/JfbBasePosterType/Attr.js +46 -0
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +4 -0
|
@@ -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.
|
|
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
|
}
|