jufubao-base 1.0.311-beta1 → 1.0.311-beta101

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.
Files changed (25) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseBlock/Attr.js +167 -34
  3. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +12 -9
  4. package/src/components/JfbBaseCardDetail/Attr.js +0 -12
  5. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +1 -162
  6. package/src/components/JfbBaseCardDetailEntry/Attr.js +0 -12
  7. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +2 -163
  8. package/src/components/JfbBaseEntry/Attr.js +5 -72
  9. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +183 -47
  10. package/src/components/JfbBaseEntry/cusAttr/content.js +77 -0
  11. package/src/components/JfbBaseEntry/cusAttr/style.js +288 -0
  12. package/src/components/JfbBaseImageBlock/Attr.js +150 -23
  13. package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +29 -27
  14. package/src/components/JfbBaseNotice/Attr.js +5 -512
  15. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +188 -181
  16. package/src/components/JfbBaseNotice/cusAttr/content.js +308 -0
  17. package/src/components/JfbBaseNotice/cusAttr/cssOne.js +395 -0
  18. package/src/components/JfbBaseNotice/cusAttr/cssThree.js +101 -0
  19. package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +208 -0
  20. package/src/components/JfbBaseNotice/cusAttr/style.js +31 -0
  21. package/src/components/JfbBaseVideo/Attr.js +5 -297
  22. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +36 -62
  23. package/src/components/JfbBaseVideo/cusAttr/content.js +236 -0
  24. package/src/components/JfbBaseVideo/cusAttr/image.js +213 -0
  25. package/src/components/JfbBaseVideo/cusAttr/style.js +172 -0
@@ -0,0 +1,77 @@
1
+ 'use strict';
2
+
3
+ import {dataVal} from "@/utils/AttrTools";
4
+
5
+ export default (data, gValue, gColor, oldData)=>{
6
+ let entryType = 'default'
7
+ if(data['entryType'] !== undefined) entryType = data['entryType']
8
+
9
+ let rowNum = 1;
10
+ if(data['rowNum'] !== undefined) rowNum = data['rowNum'];
11
+
12
+ return[
13
+ {
14
+ ele: 'title',
15
+ label: '基础',
16
+ size: 'small',
17
+ groupKey:'content',
18
+ },
19
+ {
20
+ label: '入口分组',
21
+ ele: 'xd-site-select-list',
22
+ valueKey: 'entryType',
23
+ value: entryType,
24
+ placeholder: '请选择综合入口分组',
25
+ multiple: false,
26
+ groupKey:'content',
27
+ className: 'input100',
28
+ labelInline:true,
29
+ rules: [
30
+ {required: true, message: '请选择综合入口分组', trigger: ['blur', 'change']}
31
+ ],
32
+ handleCustom({action, data}) {
33
+ XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
34
+ .then(res => {
35
+ debugger
36
+ data.cb(res.list)
37
+ })
38
+ .catch(error => {
39
+ console.error(error);
40
+ });
41
+ },
42
+ },
43
+ {
44
+ ele: 'title',
45
+ label: '组件样式',
46
+ size: 'small',
47
+ groupKey:'content',
48
+ },
49
+
50
+ {
51
+ label: "组件样式",
52
+ ele: "xd-style-image",
53
+ groupKey: 'content',
54
+ valueKey: "rowNum",
55
+ value: rowNum,
56
+ labelInline:true,
57
+ className: 'input100',
58
+ handleCustom(cusRes) {
59
+ XdBus.getParentApi('getCompStylesOptions')({
60
+ layout_ids: 'gXd7Z5uu31nJpfZzlFgYz',
61
+ key: Date.now()
62
+ })
63
+ .then(res => {
64
+ res.list = res.list.map(item => {
65
+ item.value = Number(item.value)
66
+ return item;
67
+ })
68
+ cusRes.data.cb(res)
69
+ })
70
+ .catch(error => {
71
+ console.error(error);
72
+ });
73
+ },
74
+ },
75
+
76
+ ].filter(i=>i)
77
+ }
@@ -0,0 +1,288 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal ,
4
+ statusShow,
5
+ statusDataVal,
6
+ customVal,
7
+ cusDisabled ,
8
+ getCustomAttr,
9
+ } from "@/utils/AttrTools";
10
+
11
+ export default function (data, gValue, gColor, oldData) {
12
+ const width = 750, height = 1334;
13
+ return [
14
+ {
15
+ ele: 'title',
16
+ label: '常规',
17
+ size: 'small',
18
+ groupKey:'style',
19
+ },
20
+
21
+ {
22
+ label: '外边距',
23
+ ele: 'xd-radio',
24
+ groupKey: 'style',
25
+ valueKey: 'marginStatus',
26
+ value: statusDataVal({data, key:'marginStatus', fields:['margin'],gValue}),
27
+ labelInline:true,
28
+ list: [
29
+ {label: '默认', value: 'D'},
30
+ {label: '自定义', value: 'C'},
31
+ ]
32
+ },
33
+ {ele: 'group_start'},
34
+ {
35
+ label: '',
36
+ ele: 'xd-margin-padding',
37
+ groupKey:'style',
38
+ valueKey: 'margin',
39
+ value: dataVal({
40
+ data,
41
+ key:'margin',
42
+ dValue:0,
43
+ gValue,
44
+ isPM: true,
45
+ }),
46
+ hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
47
+ setting: {
48
+ type: 'margin',
49
+ },
50
+ },
51
+ {ele: 'group_end'},
52
+
53
+ {
54
+ label: '圆角',
55
+ ele: 'xd-radio',
56
+ groupKey: 'style',
57
+ valueKey: 'radiusStatus',
58
+ value: statusDataVal({data, key:'radiusStatus', fields:['radius'],gValue}),
59
+ labelInline:true,
60
+ list: [
61
+ {label: '默认', value: 'D'},
62
+ {label: '无圆角', value: 'N'},
63
+ {label: '自定义', value: 'C'},
64
+ ]
65
+ },
66
+ {ele: 'group_start'},
67
+ {
68
+ label: '',
69
+ ele: 'xd-site-select-list',
70
+ labelInline: true,
71
+ valueKey: 'radius',
72
+ value: dataVal({data, key:'radius', dValue:'10', gValue}),
73
+ hidden: !statusShow({data, key: 'radiusStatus', fields:['radius'], gValue}),
74
+ placeholder: '请选择图标圆角',
75
+ multiple: false,
76
+ className: 'input80',
77
+ groupKey:'style',
78
+ handleCustom({action, data}) {
79
+ XdBus.getParentApi('getOptionsSettingList')({
80
+ setting_id: 'edtix_style_radius',
81
+ key: Date.now()
82
+ })
83
+ .then(res => {
84
+ let list = (res.list || [])
85
+ .filter(item=>{
86
+ return item.label !== '无'
87
+ });
88
+ data.cb(list)
89
+ })
90
+ .catch(error => {
91
+ console.error(error);
92
+ });
93
+ },
94
+ },
95
+ {ele: 'group_end'},
96
+
97
+ {
98
+ ele: 'title',
99
+ label: '內容区',
100
+ size: 'small',
101
+ groupKey:'style',
102
+ },
103
+ {
104
+ label: '内容区背景',
105
+ ele: 'xd-radio',
106
+ groupKey: 'style',
107
+ valueKey: 'bgStatus',
108
+ value: statusDataVal({data, key:'bgStatus', fields:['bgcolor','bgImage'],gValue}),
109
+ labelInline:true,
110
+ list: [
111
+ {label: '默认', value: 'D'},
112
+ {label: '自定义', value: 'C'},
113
+ ]
114
+ },
115
+ {ele: 'group_start'},
116
+ {
117
+ label: '背景色',
118
+ ele: 'xd-color',
119
+ valueKey: 'bgcolor',
120
+ labelInline:true,
121
+ value: dataVal({data, key:'bgcolor', dValue:'rgba(0,0,0,0)', gValue}),
122
+ hidden: !statusShow({data, key: 'bgStatus', fields:['bgcolor','bgImage'], gValue}),
123
+ groupKey: 'style',
124
+ placeholder: '请输入背景颜色',
125
+ classNmae: 'input80',
126
+ },
127
+ {
128
+ label: '背景图',
129
+ ele: 'xd-upload',
130
+ labelInline: true,
131
+ valueKey: 'bgImage',
132
+ value: dataVal({
133
+ data,
134
+ key: 'bgImage',
135
+ dValue: {},
136
+ gValue,
137
+ }),
138
+ defaultValue: dataVal({
139
+ data,
140
+ key: 'bgImage',
141
+ dValue: {},
142
+ gValue,
143
+ }),
144
+ slot: true,
145
+ tipsformet: `<span style="font-size: 12px; color: #999">上传文件格式:@imageType@,不超过@size@MB.,建议宽度为:<span style="color:red">${width}*${height}</span></span>`,
146
+ type: ['jpg', 'png', 'jpeg'],
147
+ styleType: 'one',
148
+ uploadType: 'aliyun',
149
+ hidden: !statusShow({ data, key: 'bgStatus', fields: ['bgcolor', 'bgImage'], gValue }),
150
+ oneWidth: 200,
151
+ oneHeight: 200*height/width,
152
+ size: 5,
153
+ action: 'aliyun',
154
+ groupKey: 'style',
155
+ },
156
+ {ele: 'group_end'},
157
+
158
+ {
159
+ label: '内容区边距',
160
+ ele: 'xd-radio',
161
+ groupKey: 'style',
162
+ valueKey: 'paddingStatus',
163
+ value: statusDataVal({data, key:'paddingStatus', fields:['padding'],gValue}),
164
+ labelInline:true,
165
+ list: [
166
+ {label: '默认', value: 'D'},
167
+ {label: '自定义', value: 'C'},
168
+ ]
169
+ },
170
+ {ele: 'group_start'},
171
+ {
172
+ label: '',
173
+ ele: 'xd-margin-padding',
174
+ groupKey:'style',
175
+ valueKey: 'padding',
176
+ value: dataVal({
177
+ data,
178
+ key:'padding',
179
+ dValue:0,
180
+ gValue,
181
+ isPM: true,
182
+ }),
183
+ hidden: !statusShow({data, key: 'paddingStatus', fields:['padding'], gValue}),
184
+ setting: {
185
+ type: 'margin',
186
+ },
187
+ },
188
+ {ele: 'group_end'},
189
+
190
+ {
191
+ label: '内容间距',
192
+ ele: 'xd-radio',
193
+ groupKey: 'style',
194
+ valueKey: 'paddingInputStatus',
195
+ value: statusDataVal({data, key:'paddingInputStatus', fields:['paddingInput'],gValue}),
196
+ labelInline:true,
197
+ list: [
198
+ {label: '默认', value: 'D'},
199
+ {label: '自定义', value: 'C'},
200
+ ]
201
+ },
202
+ {ele: 'group_start'},
203
+ {
204
+ label: "",
205
+ groupKey: 'style',
206
+ ele: 'xd-slider',
207
+ valueKey: "paddingInput",
208
+ value: dataVal({data, key:'paddingInput', dValue:gValue.isFirst && gValue.isAdd ? 16: 20, gValue}),
209
+ hidden: !statusShow({data, key: 'paddingInputStatus', fields:['paddingInput'], gValue}),
210
+ className: "input80",
211
+ labelInline: true,
212
+ setting:{
213
+ min: 0,
214
+ max: 60,
215
+ step:1,
216
+ showStops:false,
217
+ showInput:false,
218
+ }
219
+ },
220
+ {ele: 'group_end'},
221
+
222
+ {
223
+ label: '内容圆角',
224
+ ele: 'xd-radio',
225
+ groupKey: 'style',
226
+ valueKey: 'contRadiusStatus',
227
+ value: statusDataVal({data, key:'contRadiusStatus', fields:['contRadius'],gValue}),
228
+ labelInline:true,
229
+ list: [
230
+ {label: '默认', value: 'D'},
231
+ {label: '无圆角', value: 'N'},
232
+ {label: '自定义', value: 'C'},
233
+ ]
234
+ },
235
+ {ele: 'group_start'},
236
+ {
237
+ label: '',
238
+ ele: 'xd-site-select-list',
239
+ labelInline: true,
240
+ valueKey: 'contRadius',
241
+ value: dataVal({data, key:'contRadius', dValue:'10', gValue}),
242
+ hidden: !statusShow({data, key: 'contRadiusStatus', fields:['contRadius'], gValue}),
243
+ placeholder: '请选择图标圆角',
244
+ multiple: false,
245
+ className: 'input80',
246
+ groupKey:'style',
247
+ handleCustom({action, data}) {
248
+ XdBus.getParentApi('getOptionsSettingList')({
249
+ setting_id: 'edtix_style_radius',
250
+ key: Date.now()
251
+ })
252
+ .then(res => {
253
+ let list = (res.list || [])
254
+ .filter(item=>{
255
+ return item.label !== '无'
256
+ });
257
+ data.cb(list)
258
+ })
259
+ .catch(error => {
260
+ console.error(error);
261
+ });
262
+ },
263
+ },
264
+ {ele: 'group_end'},
265
+
266
+
267
+
268
+ {
269
+ label: '版本号:',
270
+ ele: 'el-input',
271
+ type: 'text',
272
+ groupKey: 'content',
273
+ valueKey: 'version',
274
+ value: 'v2.0',
275
+ hidden: true,
276
+ },
277
+ {
278
+ label: '过滤引用模版字段:',
279
+ ele: 'el-input',
280
+ type: 'text',
281
+ groupKey: 'content',
282
+ valueKey: 'refFilterKey',
283
+ value: '[]',
284
+ hidden: true,
285
+ },
286
+ ].filter(i=>i);
287
+ }
288
+
@@ -1,14 +1,29 @@
1
1
  'use strict';
2
2
 
3
+ import {dataVal, statusDataVal, statusShow,getAttrData} from "@/utils/AttrTools";
4
+
3
5
  /**
4
6
  * @description 当表单组件中有联动操作时候,使用方法进行返回
5
7
  */
6
8
  export default {
7
9
  style: [],
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);
10
+ content: (data, gValue,gColor,oldData) => {
11
+ debugger
12
+ const defWidth = 750,defHeight = 562;
13
+ let height = defHeight, width = defWidth;
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
+ });
12
27
 
13
28
  return [
14
29
  {
@@ -18,19 +33,110 @@ export default {
18
33
  groupKey:'advanced',
19
34
  },
20
35
  {
21
- label: '边距设置:',
36
+ ele: 'title',
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: '',
22
56
  ele: 'xd-margin-padding',
23
- valueKey: 'margin',
24
57
  groupKey:'content',
25
- value: data.margin || null,
58
+ valueKey: 'margin',
59
+ value: dataVal({
60
+ data,
61
+ key:'margin',
62
+ dValue:0,
63
+ gValue,
64
+ isPM: true,
65
+ }),
66
+ hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
26
67
  setting: {
27
68
  type: 'margin',
28
69
  },
29
- placeholder: '请设置边距设置',
30
- inline: false,
31
- notice: '设置边距充,<span style="color: red">单位:像素(px)</span>。默认值:<span style="color: red">0</span>像素',
32
-
33
70
  },
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'},
34
140
  {
35
141
  label: '图片真实宽度:',
36
142
  groupKey:'content',
@@ -39,6 +145,7 @@ export default {
39
145
  valueKey: 'width',
40
146
  value: data.width || '',
41
147
  className: 'input60',
148
+ hidden: true,
42
149
  inline:false,
43
150
  notice:'图片真实宽度设置,单位像素,默认:<span style="color:red">750</span>px',
44
151
  },
@@ -50,35 +157,55 @@ export default {
50
157
  valueKey: 'height',
51
158
  value: data.height||'',
52
159
  className: 'input60',
160
+ hidden: true,
53
161
  inline:false,
54
162
  notice:'图片真实高度设置,单位像素,默认:<span style="color:red">562.5</span>px',
55
163
  },
56
164
  {
57
- label: '占位背景图片:',
165
+ label: '图片路径',
58
166
  ele: 'xd-upload',
59
167
  valueKey: 'backgroundImage',
60
- groupKey:'content',
61
- value: data.backgroundImage || {},
62
- defaultValue: data.backgroundImage || null,
168
+ defaultValue: dataVal({data, key:'backgroundImage', dValue: {}, gValue}),
169
+ value: dataVal({data, key:'backgroundImage', dValue:{}, gValue}),
170
+ labelInline:true,
63
171
  slot: true,
64
- oneWidth: 300,
65
- oneHeight: 300 * height / width,
66
- elinputClassName: 'input40',
67
- tipsformet: `上传文件格式:@imageType@,不超过@size@MB,图片尺寸:<span style="color:red"> ${width}*${height}</span>像素`,
172
+ tipsformet: `<span style="font-size: 12px; color: #999;line-height: 16px">上传文件格式:@imageType@,不超过@size@MB.,建议尺寸为:<span style="color:red">${widthAndHeight.width}*${widthAndHeight.height}</span>像素。</span>`,
68
173
  type: ['jpg', 'png', 'jpeg'],
69
174
  styleType: 'one',
70
175
  uploadType: 'aliyun',
71
- size: 1,
72
- action: 'action',
73
- sort: true,
176
+ size: 2,
177
+ action: 'aliyun',
178
+ oneWidth: 350,
179
+ oneHeight: 350 * (widthAndHeight.height)/ widthAndHeight.width,
180
+ groupKey: 'content',
74
181
  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,
75
201
  },
76
202
  {
77
203
  label: '',
78
204
  ele: 'slot',
79
205
  slot: 'is_reference',
80
- groupKey:'advanced',
206
+ groupKey:'content',
81
207
  },
208
+
82
209
  ].filter(i=>i)
83
210
  },
84
211
  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="[bodyStyle]">
18
- <image :src="backgroundImageComp" alt="bgImage"></image>
17
+ <view class="image" :style="[bodyStyleComp]">
18
+ <image v-if="backgroundImageComp" :src="backgroundImageComp" alt="bgImage"></image>
19
19
  </view>
20
20
  </view>
21
21
  </view>
@@ -23,9 +23,8 @@
23
23
 
24
24
  <script>
25
25
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
26
- import { jfbRootExec } from "@/utils/xd.event";
27
26
  import JfbBaseImageBlockMixin from "./JfbBaseImageBlockMixin";
28
- import { getContainerPropsValue } from "@/utils/xd.base";
27
+ import { gCPVal } from "@/utils/xd.base";
29
28
  import componentsMixins from "@/mixins/componentsMixins";
30
29
  import extsMixins from "@/mixins/extsMixins";
31
30
  import getServiceUrl from "@/common/getServiceUrl";
@@ -38,14 +37,6 @@
38
37
  componentsMixins, extsMixins, JfbBaseImageBlockMixin
39
38
  ],
40
39
  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
-
49
40
  backgroundImageComp(){
50
41
  if(this.$xdUniHelper.checkVarType(this.backgroundImage) === 'object') {
51
42
  if(this.backgroundImage.url) return getServiceUrl(this.backgroundImage.url,'size8')
@@ -54,26 +45,32 @@
54
45
  return '';
55
46
  },
56
47
 
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);
48
+ bodyStyleComp(){
49
+ let {width,height} = this.widthAndHeight;
50
+ let outWidth = 750 - this.getPMValue(this.margin,'RL',0);
60
51
  let bgColor = 'rgba(0,0,0,0)';
61
52
  if(this.backgroundImageComp === '') bgColor = '#f8f8f8'
62
53
  return {
63
- margin: this.marginComp,
64
- width: (outWidth - outMarginRL) +'rpx',
65
- height: this.height * (outWidth - outMarginRL)/this.width + 'rpx',
66
- backgroundColor: bgColor
54
+ margin: this.getMarginAndPadding(this.margin,0),
55
+ width: outWidth +'rpx',
56
+ height: (Number(height) * (outWidth)/Number(width)) + 'rpx',
57
+ backgroundColor: bgColor,
58
+ borderRadius: this.radius + 'rpx',
59
+ overflow:'hidden'
67
60
  }
68
61
  }
69
62
  },
70
63
  data() {
71
64
  return {
72
65
  closeMask: true,
73
- height: 562.5,
74
- width: 750,
75
- margin:{},
76
- backgroundImage:{},
66
+ margin:{},//边距
67
+ backgroundImage:{},//图片
68
+ radius:0,//圆角
69
+ //高宽
70
+ widthAndHeight:{
71
+ width: 750,
72
+ height: 562
73
+ },
77
74
  }
78
75
  },
79
76
  watch: {
@@ -87,16 +84,21 @@
87
84
  },
88
85
  methods: {
89
86
  onJfbLoad(options) {
87
+
90
88
  },
89
+
91
90
  /**
92
91
  * @description 监听事件变化
93
92
  * @param container {object} 业务组件对象自己
94
93
  */
95
94
  init(container) {
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', {})
95
+ let height = Number(gCPVal(container, 'height', 562));
96
+ let width = Number(gCPVal(container, 'width', 750));
97
+ this.margin = gCPVal(container, 'margin', 0,{sKey: 'marginStatus', fields: ['margin'], isPMR: true});
98
+ this.widthAndHeight = gCPVal(container, 'widthAndHeight', [{width: 750, height: 562},{width,height}],{sKey: 'widthAndHeightStatus', fields: ['widthAndHeight']});
99
+ this.backgroundImage = gCPVal(container, 'backgroundImage', {});
100
+ this.radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
101
+
100
102
  },
101
103
  }
102
104
  }