jufubao-base 1.0.311-beta101 → 1.0.311-beta3
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/JfbBaseBlock/Attr.js +34 -167
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +9 -12
- package/src/components/JfbBaseCardDetail/Attr.js +12 -0
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +162 -1
- package/src/components/JfbBaseCardDetailEntry/Attr.js +12 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +163 -2
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +2 -2
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +3 -3
- package/src/components/JfbBaseEntry/Attr.js +72 -5
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +47 -183
- package/src/components/JfbBaseImageBlock/Attr.js +23 -150
- package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +27 -29
- package/src/components/JfbBaseNotice/Attr.js +512 -5
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +181 -188
- package/src/components/JfbBaseVideo/Attr.js +297 -5
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +62 -36
- package/src/components/JfbBaseEntry/cusAttr/content.js +0 -77
- package/src/components/JfbBaseEntry/cusAttr/style.js +0 -288
- package/src/components/JfbBaseNotice/cusAttr/content.js +0 -308
- package/src/components/JfbBaseNotice/cusAttr/cssOne.js +0 -395
- package/src/components/JfbBaseNotice/cusAttr/cssThree.js +0 -101
- package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +0 -208
- package/src/components/JfbBaseNotice/cusAttr/style.js +0 -31
- package/src/components/JfbBaseVideo/cusAttr/content.js +0 -236
- package/src/components/JfbBaseVideo/cusAttr/image.js +0 -213
- package/src/components/JfbBaseVideo/cusAttr/style.js +0 -172
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import {dataVal, statusDataVal, statusShow,getAttrData} from "@/utils/AttrTools";
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
7
5
|
*/
|
|
8
6
|
export default {
|
|
9
7
|
style: [],
|
|
10
|
-
content: (data
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if(data.height !== undefined) height = Number(data.height) || defHeight;
|
|
15
|
-
if(data.width !== undefined) width = Number(data.width) || defWidth;
|
|
16
|
-
|
|
17
|
-
let defOldWidthAndHeight = {width:750,height:562};
|
|
18
|
-
if(data['widthAndHeight'] === undefined && height && width) defOldWidthAndHeight = {height,width};
|
|
19
|
-
|
|
20
|
-
//高宽的
|
|
21
|
-
let widthAndHeight = getAttrData(data,'widthAndHeight', [{width:750,height:562},defOldWidthAndHeight],{
|
|
22
|
-
sKey: 'widthAndHeightStatus',
|
|
23
|
-
fields:['widthAndHeight'],
|
|
24
|
-
isData: true,
|
|
25
|
-
gValue
|
|
26
|
-
});
|
|
8
|
+
content: (data) => {
|
|
9
|
+
let width = 750,height = 562.5;
|
|
10
|
+
if(data.height) height = Number(data.height);
|
|
11
|
+
if(data.width) width = Number(data.width);
|
|
27
12
|
|
|
28
13
|
return [
|
|
29
14
|
{
|
|
@@ -33,110 +18,19 @@ export default {
|
|
|
33
18
|
groupKey:'advanced',
|
|
34
19
|
},
|
|
35
20
|
{
|
|
36
|
-
|
|
37
|
-
label: '基础',
|
|
38
|
-
size: 'small',
|
|
39
|
-
groupKey:'content',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: '外边距',
|
|
43
|
-
ele: 'xd-radio',
|
|
44
|
-
groupKey: 'content',
|
|
45
|
-
valueKey: 'marginStatus',
|
|
46
|
-
value: statusDataVal({data, key:'marginStatus', fields:['margin'],gValue}),
|
|
47
|
-
labelInline:true,
|
|
48
|
-
list: [
|
|
49
|
-
{label: '默认', value: 'D'},
|
|
50
|
-
{label: '自定义', value: 'C'},
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
{ele: 'group_start'},
|
|
54
|
-
{
|
|
55
|
-
label: '',
|
|
21
|
+
label: '边距设置:',
|
|
56
22
|
ele: 'xd-margin-padding',
|
|
57
|
-
groupKey:'content',
|
|
58
23
|
valueKey: 'margin',
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
key:'margin',
|
|
62
|
-
dValue:0,
|
|
63
|
-
gValue,
|
|
64
|
-
isPM: true,
|
|
65
|
-
}),
|
|
66
|
-
hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
|
|
24
|
+
groupKey:'content',
|
|
25
|
+
value: data.margin || null,
|
|
67
26
|
setting: {
|
|
68
27
|
type: 'margin',
|
|
69
28
|
},
|
|
29
|
+
placeholder: '请设置边距设置',
|
|
30
|
+
inline: false,
|
|
31
|
+
notice: '设置边距充,<span style="color: red">单位:像素(px)</span>。默认值:<span style="color: red">0</span>像素',
|
|
32
|
+
|
|
70
33
|
},
|
|
71
|
-
{ele: 'group_end'},
|
|
72
|
-
{
|
|
73
|
-
label: '圆角',
|
|
74
|
-
ele: 'xd-radio',
|
|
75
|
-
groupKey: 'content',
|
|
76
|
-
valueKey: 'radiusStatus',
|
|
77
|
-
value: statusDataVal({data, key:'radiusStatus',cValue: 'N', fields:['radius'],gValue}),
|
|
78
|
-
labelInline:true,
|
|
79
|
-
list: [
|
|
80
|
-
{label: '默认', value: 'D'},
|
|
81
|
-
{label: '无圆角', value: 'N'},
|
|
82
|
-
{label: '自定义', value: 'C'},
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{ele: 'group_start'},
|
|
86
|
-
{
|
|
87
|
-
label: '',
|
|
88
|
-
ele: 'xd-site-select-list',
|
|
89
|
-
labelInline: true,
|
|
90
|
-
valueKey: 'radius',
|
|
91
|
-
value: dataVal({data, key:'radius', dValue:'10', gValue}),
|
|
92
|
-
hidden: !statusShow({data, key: 'radiusStatus', fields:['radius'], gValue}),
|
|
93
|
-
placeholder: '请选择圆角',
|
|
94
|
-
multiple: false,
|
|
95
|
-
className: 'input80',
|
|
96
|
-
groupKey:'content',
|
|
97
|
-
handleCustom({action, data}) {
|
|
98
|
-
XdBus.getParentApi('getOptionsSettingList')({
|
|
99
|
-
setting_id: 'edtix_style_radius',
|
|
100
|
-
key: Date.now()
|
|
101
|
-
})
|
|
102
|
-
.then(res => {
|
|
103
|
-
res.list = res.list.filter(item=>{
|
|
104
|
-
return item.label !== '无';
|
|
105
|
-
});
|
|
106
|
-
data.cb(res.list)
|
|
107
|
-
})
|
|
108
|
-
.catch(error => {
|
|
109
|
-
console.error(error);
|
|
110
|
-
});
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
{ele: 'group_end'},
|
|
114
|
-
{
|
|
115
|
-
label: '比例/尺寸',
|
|
116
|
-
ele: 'xd-radio',
|
|
117
|
-
groupKey: 'content',
|
|
118
|
-
valueKey: 'widthAndHeightStatus',
|
|
119
|
-
value: statusDataVal({data, key:'widthAndHeightStatus', fields:['widthAndHeight'],gValue}),
|
|
120
|
-
labelInline:true,
|
|
121
|
-
list: [
|
|
122
|
-
{label: '默认(750x562像素)', value: 'D'},
|
|
123
|
-
{label: '自定义', value: 'C'},
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
{ele: 'group_start'},
|
|
127
|
-
{
|
|
128
|
-
label: '',
|
|
129
|
-
ele: 'xd-width-and-height',
|
|
130
|
-
groupKey:'content',
|
|
131
|
-
valueKey: 'widthAndHeight',
|
|
132
|
-
value: dataVal({data, key:'widthAndHeight', dValue:gValue.isAdd && gValue.isFirst ?{width:750,height:562}:defOldWidthAndHeight, gValue}),
|
|
133
|
-
hidden: !statusShow({data, key: 'widthAndHeightStatus', fields:['widthAndHeight'], gValue}),
|
|
134
|
-
setting: {
|
|
135
|
-
disabledWidth: true,
|
|
136
|
-
disabledHeight: false,
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{ele: 'group_end'},
|
|
140
34
|
{
|
|
141
35
|
label: '图片真实宽度:',
|
|
142
36
|
groupKey:'content',
|
|
@@ -145,7 +39,6 @@ export default {
|
|
|
145
39
|
valueKey: 'width',
|
|
146
40
|
value: data.width || '',
|
|
147
41
|
className: 'input60',
|
|
148
|
-
hidden: true,
|
|
149
42
|
inline:false,
|
|
150
43
|
notice:'图片真实宽度设置,单位像素,默认:<span style="color:red">750</span>px',
|
|
151
44
|
},
|
|
@@ -157,55 +50,35 @@ export default {
|
|
|
157
50
|
valueKey: 'height',
|
|
158
51
|
value: data.height||'',
|
|
159
52
|
className: 'input60',
|
|
160
|
-
hidden: true,
|
|
161
53
|
inline:false,
|
|
162
54
|
notice:'图片真实高度设置,单位像素,默认:<span style="color:red">562.5</span>px',
|
|
163
55
|
},
|
|
164
56
|
{
|
|
165
|
-
label: '
|
|
57
|
+
label: '占位背景图片:',
|
|
166
58
|
ele: 'xd-upload',
|
|
167
59
|
valueKey: 'backgroundImage',
|
|
168
|
-
|
|
169
|
-
value:
|
|
170
|
-
|
|
60
|
+
groupKey:'content',
|
|
61
|
+
value: data.backgroundImage || {},
|
|
62
|
+
defaultValue: data.backgroundImage || null,
|
|
171
63
|
slot: true,
|
|
172
|
-
|
|
64
|
+
oneWidth: 300,
|
|
65
|
+
oneHeight: 300 * height / width,
|
|
66
|
+
elinputClassName: 'input40',
|
|
67
|
+
tipsformet: `上传文件格式:@imageType@,不超过@size@MB,图片尺寸:<span style="color:red"> ${width}*${height}</span>像素`,
|
|
173
68
|
type: ['jpg', 'png', 'jpeg'],
|
|
174
69
|
styleType: 'one',
|
|
175
70
|
uploadType: 'aliyun',
|
|
176
|
-
size:
|
|
177
|
-
action: '
|
|
178
|
-
|
|
179
|
-
oneHeight: 350 * (widthAndHeight.height)/ widthAndHeight.width,
|
|
180
|
-
groupKey: 'content',
|
|
71
|
+
size: 1,
|
|
72
|
+
action: 'action',
|
|
73
|
+
sort: true,
|
|
181
74
|
maxlen: 1,
|
|
182
|
-
extendClass:['itemBackgroundColor']
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
label: '版本号:',
|
|
186
|
-
ele: 'el-input',
|
|
187
|
-
type: 'text',
|
|
188
|
-
groupKey: 'content',
|
|
189
|
-
valueKey: 'version',
|
|
190
|
-
value: 'v2.0',
|
|
191
|
-
hidden: true,
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
label: '过滤引用模版字段:',
|
|
195
|
-
ele: 'el-input',
|
|
196
|
-
type: 'text',
|
|
197
|
-
groupKey: 'content',
|
|
198
|
-
valueKey: 'refFilterKey',
|
|
199
|
-
value: '[]',
|
|
200
|
-
hidden: true,
|
|
201
75
|
},
|
|
202
76
|
{
|
|
203
77
|
label: '',
|
|
204
78
|
ele: 'slot',
|
|
205
79
|
slot: 'is_reference',
|
|
206
|
-
groupKey:'
|
|
80
|
+
groupKey:'advanced',
|
|
207
81
|
},
|
|
208
|
-
|
|
209
82
|
].filter(i=>i)
|
|
210
83
|
},
|
|
211
84
|
advanced: [],
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
16
|
<view class="jfb-base-image-block__body">
|
|
17
|
-
<view class="image" :style="[
|
|
18
|
-
<image
|
|
17
|
+
<view class="image" :style="[bodyStyle]">
|
|
18
|
+
<image :src="backgroundImageComp" alt="bgImage"></image>
|
|
19
19
|
</view>
|
|
20
20
|
</view>
|
|
21
21
|
</view>
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
25
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
26
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
26
27
|
import JfbBaseImageBlockMixin from "./JfbBaseImageBlockMixin";
|
|
27
|
-
import {
|
|
28
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
28
29
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
29
30
|
import extsMixins from "@/mixins/extsMixins";
|
|
30
31
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
@@ -37,6 +38,14 @@
|
|
|
37
38
|
componentsMixins, extsMixins, JfbBaseImageBlockMixin
|
|
38
39
|
],
|
|
39
40
|
computed:{
|
|
41
|
+
marginComp(){
|
|
42
|
+
let str = `${this.checkValue(this.margin.top, 0)}rpx`;
|
|
43
|
+
str = `${str} ${this.checkValue(this.margin.right, 0)}rpx`;
|
|
44
|
+
str = `${str} ${this.checkValue(this.margin.bottom, 0)}rpx`;
|
|
45
|
+
str = `${str} ${this.checkValue(this.margin.left,0)}rpx`;
|
|
46
|
+
return str;
|
|
47
|
+
},
|
|
48
|
+
|
|
40
49
|
backgroundImageComp(){
|
|
41
50
|
if(this.$xdUniHelper.checkVarType(this.backgroundImage) === 'object') {
|
|
42
51
|
if(this.backgroundImage.url) return getServiceUrl(this.backgroundImage.url,'size8')
|
|
@@ -45,32 +54,26 @@
|
|
|
45
54
|
return '';
|
|
46
55
|
},
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
let
|
|
57
|
+
bodyStyle(){
|
|
58
|
+
let outWidth = uni.getSystemInfoSync().safeArea.width * this.$pxNum;
|
|
59
|
+
let outMarginRL = this.checkValue(this.margin.right, 0) + this.checkValue(this.margin.left, 0);
|
|
51
60
|
let bgColor = 'rgba(0,0,0,0)';
|
|
52
61
|
if(this.backgroundImageComp === '') bgColor = '#f8f8f8'
|
|
53
62
|
return {
|
|
54
|
-
margin: this.
|
|
55
|
-
width: outWidth +'rpx',
|
|
56
|
-
height:
|
|
57
|
-
backgroundColor: bgColor
|
|
58
|
-
borderRadius: this.radius + 'rpx',
|
|
59
|
-
overflow:'hidden'
|
|
63
|
+
margin: this.marginComp,
|
|
64
|
+
width: (outWidth - outMarginRL) +'rpx',
|
|
65
|
+
height: this.height * (outWidth - outMarginRL)/this.width + 'rpx',
|
|
66
|
+
backgroundColor: bgColor
|
|
60
67
|
}
|
|
61
68
|
}
|
|
62
69
|
},
|
|
63
70
|
data() {
|
|
64
71
|
return {
|
|
65
72
|
closeMask: true,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
widthAndHeight:{
|
|
71
|
-
width: 750,
|
|
72
|
-
height: 562
|
|
73
|
-
},
|
|
73
|
+
height: 562.5,
|
|
74
|
+
width: 750,
|
|
75
|
+
margin:{},
|
|
76
|
+
backgroundImage:{},
|
|
74
77
|
}
|
|
75
78
|
},
|
|
76
79
|
watch: {
|
|
@@ -84,21 +87,16 @@
|
|
|
84
87
|
},
|
|
85
88
|
methods: {
|
|
86
89
|
onJfbLoad(options) {
|
|
87
|
-
|
|
88
90
|
},
|
|
89
|
-
|
|
90
91
|
/**
|
|
91
92
|
* @description 监听事件变化
|
|
92
93
|
* @param container {object} 业务组件对象自己
|
|
93
94
|
*/
|
|
94
95
|
init(container) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.margin =
|
|
98
|
-
this.
|
|
99
|
-
this.backgroundImage = gCPVal(container, 'backgroundImage', {});
|
|
100
|
-
this.radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
|
|
101
|
-
|
|
96
|
+
this.height = Number(getContainerPropsValue(container, 'content.height', 562.5));
|
|
97
|
+
this.width = Number(getContainerPropsValue(container, 'content.width', 750));
|
|
98
|
+
this.margin = getContainerPropsValue(container, 'content.margin', {});
|
|
99
|
+
this.backgroundImage = getContainerPropsValue(container, 'content.backgroundImage', {})
|
|
102
100
|
},
|
|
103
101
|
}
|
|
104
102
|
}
|