jufubao-base 1.0.237-beta18 → 1.0.237-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.
Files changed (131) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseBlock/Attr.js +479 -34
  3. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +52 -9
  4. package/src/components/JfbBaseFastLink/Attr.js +1 -12
  5. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +0 -66
  6. package/src/components/JfbBaseHeader/Attr.js +0 -82
  7. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +1 -47
  8. package/src/components/JfbBaseHeaderColumn/Attr.js +0 -82
  9. package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumn.vue +2 -48
  10. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +0 -11
  11. package/src/components/JfbBaseNoticeDialog/Api.js +1 -1
  12. package/src/components/JfbBaseNoticeDialog/Attr.js +0 -26
  13. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +8 -27
  14. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +18 -179
  15. package/src/components/JfbBasePay/Attr.js +0 -52
  16. package/src/components/JfbBasePay/JfbBasePay.vue +4 -14
  17. package/src/components/JfbBasePay/Mock.js +9 -0
  18. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +1 -11
  19. package/src/components/JfbBasePoster/Attr.js +1 -1
  20. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +2 -2
  21. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +2 -12
  22. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +22 -12
  23. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +1 -12
  24. package/src/components/JfbBaseTfkSearch/Mock.js +3 -51
  25. package/src/components/JfbBaseTfkSearch/listMixins.js +1 -2
  26. package/src/components/JfbBaseUserInfo/Attr.js +11 -175
  27. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +115 -337
  28. package/src/components/JfbBaseUserOrder/Attr.js +0 -16
  29. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +2 -11
  30. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +0 -10
  31. package/src/mixins/componentsMixins.js +117 -28
  32. package/src/components/JfbBaseBalance/Api.js +0 -46
  33. package/src/components/JfbBaseBalance/Attr.js +0 -316
  34. package/src/components/JfbBaseBalance/JfbBaseBalance.vue +0 -334
  35. package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +0 -79
  36. package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +0 -30
  37. package/src/components/JfbBaseBalance/Mock.js +0 -9
  38. package/src/components/JfbBaseCodeOpenVip/Api.js +0 -35
  39. package/src/components/JfbBaseCodeOpenVip/Attr.js +0 -281
  40. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +0 -251
  41. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipLess.less +0 -79
  42. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipMixin.js +0 -30
  43. package/src/components/JfbBaseCodeOpenVip/Mock.js +0 -13
  44. package/src/components/JfbBaseConsumpCode/Api.js +0 -133
  45. package/src/components/JfbBaseConsumpCode/Attr.js +0 -61
  46. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +0 -1017
  47. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeLess.less +0 -79
  48. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeMixin.js +0 -30
  49. package/src/components/JfbBaseConsumpCode/Mock.js +0 -22
  50. package/src/components/JfbBaseNoticeGroup/Api.js +0 -23
  51. package/src/components/JfbBaseNoticeGroup/Attr.js +0 -237
  52. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroup.vue +0 -174
  53. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupLess.less +0 -79
  54. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupMixin.js +0 -30
  55. package/src/components/JfbBaseNoticeGroup/Mock.js +0 -13
  56. package/src/components/JfbBaseOpenVip/Api.js +0 -39
  57. package/src/components/JfbBaseOpenVip/Attr.js +0 -331
  58. package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +0 -457
  59. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipLess.less +0 -79
  60. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipMixin.js +0 -30
  61. package/src/components/JfbBaseOpenVip/Mock.js +0 -7
  62. package/src/components/JfbBaseOpenVip/XdVipList.vue +0 -131
  63. package/src/components/JfbBaseOpenVipCard/Api.js +0 -58
  64. package/src/components/JfbBaseOpenVipCard/Attr.js +0 -48
  65. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCard.vue +0 -111
  66. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardLess.less +0 -79
  67. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardMixin.js +0 -30
  68. package/src/components/JfbBaseOpenVipCard/Mock.js +0 -13
  69. package/src/components/JfbBaseOpenVipDetail/Api.js +0 -35
  70. package/src/components/JfbBaseOpenVipDetail/Attr.js +0 -37
  71. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +0 -234
  72. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailLess.less +0 -79
  73. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailMixin.js +0 -30
  74. package/src/components/JfbBaseOpenVipDetail/Mock.js +0 -15
  75. package/src/components/JfbBasePersonalData/Api.js +0 -26
  76. package/src/components/JfbBasePersonalData/Attr.js +0 -13
  77. package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +0 -200
  78. package/src/components/JfbBasePersonalData/JfbBasePersonalDataLess.less +0 -79
  79. package/src/components/JfbBasePersonalData/JfbBasePersonalDataMixin.js +0 -30
  80. package/src/components/JfbBasePersonalData/Mock.js +0 -13
  81. package/src/components/JfbBasePointsCard/Api.js +0 -18
  82. package/src/components/JfbBasePointsCard/Attr.js +0 -187
  83. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +0 -212
  84. package/src/components/JfbBasePointsCard/JfbBasePointsCardLess.less +0 -79
  85. package/src/components/JfbBasePointsCard/JfbBasePointsCardMixin.js +0 -30
  86. package/src/components/JfbBasePointsCard/Mock.js +0 -5
  87. package/src/components/JfbBasePointsDetail/Api.js +0 -48
  88. package/src/components/JfbBasePointsDetail/Attr.js +0 -305
  89. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +0 -267
  90. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailLess.less +0 -79
  91. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailMixin.js +0 -30
  92. package/src/components/JfbBasePointsDetail/Mock.js +0 -6
  93. package/src/components/JfbBasePosterGroup/Api.js +0 -22
  94. package/src/components/JfbBasePosterGroup/Attr.js +0 -156
  95. package/src/components/JfbBasePosterGroup/JfbBasePosterGroup.vue +0 -268
  96. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupLess.less +0 -79
  97. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupMixin.js +0 -30
  98. package/src/components/JfbBasePosterGroup/Mock.js +0 -13
  99. package/src/components/JfbBaseSavingDetail/Api.js +0 -41
  100. package/src/components/JfbBaseSavingDetail/Attr.js +0 -70
  101. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +0 -710
  102. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailLess.less +0 -79
  103. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailMixin.js +0 -30
  104. package/src/components/JfbBaseSavingDetail/Mock.js +0 -10
  105. package/src/components/JfbBaseSavingDetail/components/echarts.min.js +0 -26
  106. package/src/components/JfbBaseSavingDetail/components/echarts.vue +0 -254
  107. package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +0 -105
  108. package/src/components/JfbBaseShare/Api.js +0 -20
  109. package/src/components/JfbBaseShare/Attr.js +0 -14
  110. package/src/components/JfbBaseShare/JfbBaseShare.vue +0 -273
  111. package/src/components/JfbBaseShare/JfbBaseShareLess.less +0 -79
  112. package/src/components/JfbBaseShare/JfbBaseShareMixin.js +0 -30
  113. package/src/components/JfbBaseShare/Mock.js +0 -16
  114. package/src/components/JfbBaseWithDrawAgain/Api.js +0 -41
  115. package/src/components/JfbBaseWithDrawAgain/Attr.js +0 -92
  116. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +0 -354
  117. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +0 -79
  118. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +0 -30
  119. package/src/components/JfbBaseWithDrawAgain/Mock.js +0 -10
  120. package/src/components/JfbBaseWithDrawRecord/Api.js +0 -19
  121. package/src/components/JfbBaseWithDrawRecord/Attr.js +0 -79
  122. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +0 -233
  123. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +0 -79
  124. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +0 -30
  125. package/src/components/JfbBaseWithDrawRecord/Mock.js +0 -7
  126. package/src/components/JfbBaseWithdraw/Api.js +0 -48
  127. package/src/components/JfbBaseWithdraw/Attr.js +0 -328
  128. package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +0 -272
  129. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawLess.less +0 -79
  130. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawMixin.js +0 -30
  131. package/src/components/JfbBaseWithdraw/Mock.js +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.237-beta18",
3
+ "version": "1.0.237-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -1,43 +1,488 @@
1
1
  'use strict';
2
2
 
3
+ import {
4
+ dataVal ,
5
+ statusShow,
6
+ statusDataVal,
7
+ customVal,
8
+ cusDisabled ,
9
+ getCustomAttr,
10
+ oldTonNewBorAndSha,
11
+ compatibleRelationBorShadow
12
+ } from "@/utils/AttrTools";
13
+
3
14
  /**
4
15
  * @description 当表单组件中有联动操作时候,使用方法进行返回
5
16
  */
6
17
  export default {
7
18
  style: [],
8
- content: [
9
- {
10
- label: '',
11
- ele: 'slot',
12
- slot: 'is_reference_title',
13
- groupKey:'advanced',
14
- },
15
- {
16
- label: '背景颜色:',
17
- ele: 'xd-color',
18
- valueKey: 'bgcolor',
19
- value: '',
20
- groupKey:'style',
21
- placeholder: '请输入占位框背景颜色',
22
- classNmae: 'input80',
23
- },
24
- {
25
- label: '高度:',
26
- ele: 'el-input',
27
- type: 'number',
28
- valueKey: 'height',
29
- groupKey:'style',
30
- value: null,
31
- classNmae: 'input60',
32
- inline: false,
33
- notice:'占位框高度,单位像素,默认:<span style="color:red">20</span>像素'
34
- },
35
- {
36
- label: '',
37
- ele: 'slot',
38
- slot: 'is_reference',
39
- groupKey:'advanced',
40
- },
41
- ],
19
+ content:(data, gValue={} ,gColor ,oldData={})=>{
20
+ let isRefresh=false;
21
+ if(oldData.cusMargin && oldData.cusMargin === 'none' && oldData.cusMargin !== data.cusMargin) {
22
+ isRefresh = true;
23
+ }
24
+
25
+ let checkFieldsBg = { bgColorStatus:['bgColor'], bgHeightStatus:['bgHeight'], cusPaddingStatus:['cusPadding'],wColorStatus:['bgWColor','bgWidth'],titleBorder:['titleBorder','bs'] }
26
+ let isDisabled = cusDisabled({
27
+ data,
28
+ key: 'testStyle',
29
+ fields: checkFieldsBg,
30
+ gValue
31
+ });
32
+
33
+ let defTitleBorder = compatibleRelationBorShadow( data, 'titleBorder', {disabled: isDisabled, old:[]},gValue);
34
+
35
+ return [
36
+ {
37
+ label: '',
38
+ ele: 'slot',
39
+ slot: 'is_reference_title',
40
+ groupKey:'advanced',
41
+ },
42
+ // {
43
+ // ele: 'title',
44
+ // label: '边距布局',
45
+ // size: 'small',
46
+ // groupKey:'content',
47
+ // },
48
+ // {
49
+ // label: "边距布局",
50
+ // ele: "xd-style-image",
51
+ // groupKey: 'content',
52
+ // valueKey: "cusMargin",
53
+ // value: customVal({
54
+ // data,
55
+ // key: 'cusMargin',
56
+ // fields: { 'marginContStatus':['marginCont']},
57
+ // gValue
58
+ // }),
59
+ // labelInline:true,
60
+ // className: 'input100',
61
+ // handleCustom(cusRes) {
62
+ // XdBus.getParentApi('getCompStylesOptions')({
63
+ // //多条记录使用逗号隔开
64
+ // layout_ids: 'NVfJK3O9p4DEww5TH7bUk',
65
+ // key: Date.now()
66
+ // })
67
+ // ////Array[String]|String 单条记录使用res,多条记录使用res.items[layout_id]
68
+ // .then(res => {
69
+ // cusRes.data.cb(res)
70
+ // })
71
+ // .catch(error => {
72
+ // console.error(error);
73
+ // });
74
+ // },
75
+ // },
76
+ // {
77
+ // label: '内边距:',
78
+ // ele: 'xd-radio',
79
+ // groupKey: 'content',
80
+ // valueKey: 'marginContStatus',
81
+ // isRefresh : isRefresh,
82
+ // value: statusDataVal({
83
+ // data,
84
+ // key:'marginContStatus',
85
+ // fields:['marginCont'],
86
+ // gValue,
87
+ // cusField:['cusMargin']
88
+ // }),
89
+ // labelInline:true,
90
+ // disabled: cusDisabled({
91
+ // data,
92
+ // key: 'cusMargin',
93
+ // fields: {'marginStatus':['margin']},
94
+ // gValue
95
+ // }),
96
+ // list: [
97
+ // {label: '默认', value: 'D'},
98
+ // {label: '自定义', value: 'C'},
99
+ // ]
100
+ // },
101
+ {ele: 'group_start'},
102
+ {
103
+ label: '',
104
+ groupKey: 'content',
105
+ ele: 'xd-margin-padding',
106
+ valueKey: 'marginCont',
107
+ value: dataVal({
108
+ data,
109
+ key:'marginCont',
110
+ dValue:[getCustomAttr(data['cusMargin'],'marginCont'), 20],
111
+ gValue,
112
+ isPM: true
113
+ }),
114
+ disabled: cusDisabled({
115
+ data,
116
+ key: 'cusMargin',
117
+ fields: { 'marginContStatus':['marginCont']},
118
+ gValue
119
+ }),
120
+ setting: {
121
+ type: 'margin',
122
+ },
123
+ placeholder: '请填充设置',
124
+ hidden: !statusShow({data, key: 'marginContStatus', fields:['marginCont'], gValue}),
125
+ inline: false,
126
+ },
127
+ {ele: 'group_end'},
128
+
129
+ {
130
+ ele: 'title',
131
+ label: '内容区域',
132
+ size: 'small',
133
+ groupKey:'content',
134
+ },
135
+ {
136
+ label: "样式布局",
137
+ ele: "xd-style-image",
138
+ groupKey: 'content',
139
+ valueKey: "testStyle",
140
+ value: customVal({
141
+ data,
142
+ key: 'testStyle',
143
+ fields: checkFieldsBg,
144
+ gValue,
145
+ sValue: '{\"border\":\"1px solid red\",\"bgColor\":\"#f90\",\"height\": 10,\"padding\":{\"top\":20,\"left\":20,\"right\":20,\"bottom\":20},\"shadow\":\"0 4rpx 10rpx rgba(0,0,0,0.5)\",\"width\":0,\"color\":\"red\"}',
146
+ }),
147
+ labelInline:true,
148
+ className: 'input100',
149
+ handleCustom(cusRes) {
150
+ XdBus.getParentApi('getCompStylesOptions')({
151
+ //多条记录使用逗号隔开
152
+ layout_ids: 'k4BAuvfbAFI5dpBLmVJ27',
153
+ key: Date.now()
154
+ })
155
+ ////Array[String]|String 单条记录使用res,多条记录使用res.items[layout_id]
156
+ .then(res => {
157
+ cusRes.data.cb(res)
158
+ })
159
+ .catch(error => {
160
+ console.error(error);
161
+ });
162
+ },
163
+ },
164
+
165
+ {
166
+ label: '背景颜色:',
167
+ ele: 'xd-radio',
168
+ groupKey: 'content',
169
+ valueKey: 'bgColorStatus',
170
+ value: statusDataVal({
171
+ data,
172
+ key:'bgColorStatus',
173
+ fields:['bgColor'],
174
+ gValue,
175
+ cusField:['testStyle']
176
+ }),
177
+ disabled: isDisabled,
178
+ isRefresh:true,
179
+ labelInline:true,
180
+ list: [
181
+ {label: '默认', value: 'D'},
182
+ {label: '自定义', value: 'C'},
183
+ ]
184
+ },
185
+ {ele: 'group_start'},
186
+ {
187
+ label: '',
188
+ ele: 'xd-color',
189
+ valueKey: 'bgColor',
190
+ value: dataVal({
191
+ data,
192
+ key:'bgColor',
193
+ dValue:[getCustomAttr(data['testStyle'],'bgColor'), '#f90'],
194
+ gValue,
195
+ }),
196
+ groupKey:'content',
197
+ placeholder: '请输入占位框背景颜色',
198
+ disabled:isDisabled,
199
+ hidden: !statusShow({data, key: 'bgColorStatus', fields:['bgColor'], gValue}),
200
+ classNmae: 'input80',
201
+ setting:{
202
+ showAlpha: true
203
+ }
204
+ },
205
+ {ele: 'group_end'},
206
+ {
207
+ label: '高度:',
208
+ ele: 'xd-radio',
209
+ groupKey: 'content',
210
+ valueKey: 'bgHeightStatus',
211
+ value: statusDataVal({
212
+ data,
213
+ key:'bgHeightStatus',
214
+ fields:['bgHeight'],
215
+ gValue,
216
+ cusField:['testStyle']
217
+ }),
218
+ disabled: isDisabled,
219
+ isRefresh:true,
220
+ labelInline:true,
221
+ list: [
222
+ {label: '默认', value: 'D'},
223
+ {label: '自定义', value: 'C'},
224
+ ]
225
+ },
226
+ {ele: 'group_start'},
227
+ {
228
+ label: '',
229
+ ele: 'el-input',
230
+ type: 'number',
231
+ valueKey: 'bgHeight',
232
+ groupKey:'content',
233
+ value: dataVal({
234
+ data,
235
+ key:'bgHeight',
236
+ dValue:[getCustomAttr(data['testStyle'],'height'), 0],
237
+ gValue,
238
+ }),
239
+ disabled:isDisabled,
240
+ classNmae: 'input60',
241
+ inline: false,
242
+ hidden:!statusShow({data, key: 'bgHeightStatus', fields:['bgHeight'], gValue}),
243
+ },
244
+ {ele: 'group_end'},
245
+ {
246
+ label: '外边距:',
247
+ ele: 'xd-radio',
248
+ groupKey: 'content',
249
+ valueKey: 'cusPaddingStatus',
250
+ value: statusDataVal({
251
+ data,
252
+ key:'cusPaddingStatus',
253
+ fields:['cusPadding'],
254
+ gValue,
255
+ cusField:['testStyle']
256
+ }),
257
+ disabled: isDisabled,
258
+ isRefresh:true,
259
+ labelInline:true,
260
+ list: [
261
+ {label: '默认', value: 'D'},
262
+ {label: '自定义', value: 'C'},
263
+ ]
264
+ },
265
+ {ele: 'group_start'},
266
+ {
267
+ label: '',
268
+ groupKey: 'content',
269
+ ele: 'xd-margin-padding',
270
+ valueKey: 'cusPadding',
271
+ value: dataVal({
272
+ data,
273
+ key:'cusPadding',
274
+ dValue:[getCustomAttr(data['cusPaddingStatus'],'padding'), 20],
275
+ gValue,
276
+ isPM: true
277
+ }),
278
+ disabled: isDisabled,
279
+ setting: {
280
+ type: 'margin',
281
+ },
282
+ placeholder: '请填充设置',
283
+ hidden: !statusShow({data, key: 'cusPaddingStatus', fields:['cusPadding'], gValue}),
284
+ inline: false,
285
+ },
286
+ {ele: 'group_end'},
287
+
288
+ {
289
+ label: '宽度颜色:',
290
+ ele: 'xd-radio',
291
+ groupKey: 'content',
292
+ valueKey: 'wColorStatus',
293
+ value: statusDataVal({
294
+ data,
295
+ key:'wColorStatus',
296
+ fields:['bgWidth'],
297
+ gValue,
298
+ cusField:['testStyle']
299
+ }),
300
+ disabled: isDisabled,
301
+ isRefresh:true,
302
+ labelInline:true,
303
+ list: [
304
+ {label: '默认', value: 'D'},
305
+ {label: '自定义', value: 'C'},
306
+ ]
307
+ },
308
+ {ele: 'group_start'},
309
+ {
310
+ label: '',
311
+ ele: 'xd-color',
312
+ valueKey: 'bgWColor',
313
+ value: dataVal({
314
+ data,
315
+ key:'bgWColor',
316
+ dValue:[getCustomAttr(data['testStyle'],'color'), '#09f'],
317
+ gValue,
318
+ }),
319
+ groupKey:'content',
320
+ placeholder: '请输入占位框背景颜色',
321
+ disabled:isDisabled,
322
+ hidden: !statusShow({data, key: 'wColorStatus', fields:['bgWColor','bgWidth'], gValue}),
323
+ classNmae: 'input80',
324
+ setting:{
325
+ showAlpha: true
326
+ }
327
+ },
328
+ {
329
+ label: '',
330
+ ele: 'el-input',
331
+ type: 'number',
332
+ valueKey: 'bgWidth',
333
+ groupKey:'content',
334
+ value: dataVal({
335
+ data,
336
+ key:'bgWidth',
337
+ dValue:[getCustomAttr(data['testStyle'],'width'), 0],
338
+ gValue,
339
+ }),
340
+ disabled:cusDisabled({
341
+ data,
342
+ key: 'testStyle',
343
+ fields:checkFieldsBg,
344
+ gValue
345
+ }),
346
+ classNmae: 'input60',
347
+ inline: false,
348
+ hidden:!statusShow({data, key: 'wColorStatus', fields:['bgWColor','bgWidth'], gValue}),
349
+ },
350
+ {ele: 'group_end'},
351
+
352
+ {
353
+ label: '导航描边',
354
+ ele: 'xd-border',
355
+ groupKey:'content',
356
+ valueKey: 'titleBorder',
357
+ value: defTitleBorder,
358
+ labelInline: true,
359
+ className: 'input100',
360
+ disabled:isDisabled,
361
+ isRefresh:isDisabled,
362
+ setting: {
363
+ selected: defTitleBorder.type,//设置默认选中项
364
+ isRadio: true,//启用editx默认
365
+ isDef: true, //启动默认选项
366
+ //==设置默认值==
367
+ color: '#e5e5e5',
368
+ width: '2',
369
+ style: 'solid'
370
+ //==设置默认值==
371
+ },
372
+ },
373
+
374
+
375
+
376
+
377
+ // {
378
+ // ele: 'title',
379
+ // label: '常规',
380
+ // size: 'small',
381
+ // groupKey:'style',
382
+ // },
383
+ // {
384
+ // label: '外边距:',
385
+ // ele: 'xd-radio',
386
+ // groupKey: 'style',
387
+ // valueKey: 'marginStatus',
388
+ // value: statusDataVal({data, key:'marginStatus', fields:['margin'],gValue}),
389
+ // labelInline:true,
390
+ // list: [
391
+ // {label: '默认', value: 'D'},
392
+ // {label: '自定义', value: 'C'},
393
+ // ]
394
+ // },
395
+ // {ele: 'group_start'},
396
+ // {
397
+ // label: '',
398
+ // groupKey: 'style',
399
+ // ele: 'xd-margin-padding',
400
+ // valueKey: 'margin',
401
+ // value: dataVal({
402
+ // data,
403
+ // key:'margin',
404
+ // dValue:[20],
405
+ // gValue,
406
+ // isPM: true,
407
+ // isCPM: true,
408
+ // }
409
+ // ),
410
+ // setting: {
411
+ // type: 'margin',
412
+ // },
413
+ // placeholder: '请填充设置',
414
+ // hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
415
+ // inline: false,
416
+ // },
417
+ // {ele: 'group_end'},
418
+
419
+ {
420
+ ele: 'title',
421
+ label: '内容区域',
422
+ size: 'small',
423
+ groupKey:'style',
424
+ },
425
+
426
+
427
+
428
+
429
+ {
430
+ label: '容器设置:',
431
+ ele: 'xd-radio',
432
+ groupKey: 'style',
433
+ valueKey: 'contStatus',
434
+ value: statusDataVal({data, key: 'contStatus', fields:['bgcolor','height'], gValue}),
435
+ labelInline:true,
436
+ list: [
437
+ {label: '默认', value: 'D'},
438
+ {label: '自定义', value: 'C'},
439
+ ]
440
+ },
441
+ {ele: 'group_start'},
442
+ {
443
+ label: '',
444
+ ele: 'xd-color',
445
+ valueKey: 'bgcolor',
446
+ value: dataVal({data, key:'bgcolor', dValue:'', gValue}),
447
+ groupKey:'style',
448
+ placeholder: '请输入占位框背景颜色',
449
+ hidden: !statusShow({data, key: 'contStatus', fields:['bgcolor','height'], gValue}),
450
+ classNmae: 'input80',
451
+ setting:{
452
+
453
+ showAlpha: true
454
+ }
455
+ },
456
+ {
457
+ label: '',
458
+ ele: 'el-input',
459
+ type: 'number',
460
+ valueKey: 'height',
461
+ groupKey:'style',
462
+ value: dataVal({data, key:'height', dValue:20 , gValue}),
463
+ classNmae: 'input60',
464
+ inline: false,
465
+ hidden:!statusShow({data, key: 'contStatus', fields:['bgcolor','height'], gValue}),
466
+ },
467
+ {ele: 'group_end'},
468
+
469
+ {
470
+ label: '',
471
+ ele: 'slot',
472
+ slot: 'is_reference',
473
+ groupKey:'advanced',
474
+ },
475
+ {
476
+ label: '版本号:',
477
+ ele: 'el-input',
478
+ type: 'text',
479
+ groupKey: 'style',
480
+ valueKey: 'version',
481
+ value: 'v2.0',
482
+ hidden: true,
483
+ },
484
+ ].filter(i=>i);
485
+
486
+ } ,
42
487
  advanced: [],
43
488
  };
@@ -17,7 +17,10 @@
17
17
  </view>
18
18
  <!-- #endif -->
19
19
  <view class="jfb-base-block__body">
20
- <view :style="{height: height + 'rpx', background: bgcolor}"></view>
20
+ <view :style="{minHeight: height + 'rpx', background: bgColor, margin:compMargin}">
21
+ <view style="height: 1rpx"></view>
22
+ <view :style="{margin:compPadding, background:'#fff', height: '40rpx'}"></view>
23
+ </view>
21
24
  </view>
22
25
  </view>
23
26
  </template>
@@ -28,7 +31,8 @@
28
31
  import JfbBaseBlockMixin from "./JfbBaseBlockMixin";
29
32
  import componentsMixins from "@/mixins/componentsMixins";
30
33
  import extsMixins from "@/mixins/extsMixins"
31
- import {getContainerPropsValue} from "@/utils/xd.base";
34
+ import {getContainerPropsValue,gCPVal} from "@/utils/xd.base";
35
+ import {mapActions} from "vuex";
32
36
 
33
37
  export default {
34
38
  name: "JfbBaseBlock",
@@ -38,8 +42,18 @@
38
42
  mixins: [componentsMixins,extsMixins,JfbBaseBlockMixin],
39
43
  data() {
40
44
  return {
41
- height: 10,
42
- bgcolor: '#fff'
45
+ height: 100,
46
+ bgColor: '',
47
+ margin: {},
48
+ padding: {},
49
+ }
50
+ },
51
+ computed: {
52
+ compMargin(){
53
+ return this.getMarginAndPadding(this.margin,0)
54
+ },
55
+ compPadding(){
56
+ return this.getMarginAndPadding(this.padding,0)
43
57
  }
44
58
  },
45
59
  watch: {
@@ -52,11 +66,40 @@
52
66
  this.init(this.container);
53
67
  },
54
68
  methods: {
55
- init(value) {
56
- let bgcolor = getContainerPropsValue(value, 'content.bgcolor', 'rgba(0,0,0,0)');
57
- let height = getContainerPropsValue(value, 'content.height', 20);
58
- if (bgcolor) this.bgcolor = bgcolor;
59
- if (height) this.height = height;
69
+ ...mapActions(['getCustomList']),
70
+ async init(value) {
71
+ //常规边距与填充属性(单属性组可不不设置fields字段)
72
+ this.margin = gCPVal(value, 'margin', [20], {sKey: 'marginStatus',isPMR:true, isCPM: true, gDefVal: this.gStyleValue.margin});
73
+
74
+ //获取面板样式与自定义样式属性关联场景(单个属性关联)
75
+ let options = await this.getCustomList({layout_ids:'NVfJK3O9p4DEww5TH7bUk'});
76
+ this.padding = gCPVal(value, 'marginCont', [20], {sKey: 'marginContStatus',isPMR:true, cusFields: ['cusMargin','margin',options]});
77
+
78
+
79
+ //获取面板样式与自定义样式属性关联场景(多个属性属性关联)
80
+ let testStyleoptions = await this.getCustomList({layout_ids:'k4BAuvfbAFI5dpBLmVJ27'});
81
+ let sValue = '{\"border\":\"1px solid red\",\"bgColor\":\"#f90\",\"height\": 10,\"padding\":{\"top\":20,\"left\":20,\"right\":20,\"bottom\":20},\"shadow\":\"0 4rpx 10rpx rgba(0,0,0,0.5)\",\"width\":0,\"color\":\"red\"}';
82
+ let bgColor = gCPVal(value, 'bgColor', ['#f90'], {sKey: 'bgColorStatus', cusFields: ['testStyle','bgColor',testStyleoptions,sValue]});
83
+ let bgHeight = gCPVal(value, 'bgHeight', [0], {sKey: 'bgHeightStatus', cusFields: ['testStyle','height',testStyleoptions,sValue]});
84
+ let bgPadding = gCPVal(value, 'cusPadding', [20], {sKey: 'cusPaddingStatus',isPMR:true, cusFields: ['testStyle','padding',testStyleoptions,sValue]});
85
+ let bgWColor = gCPVal(value, 'bgWColor', ['#09f'], {sKey: 'wColorStatus', fields:['bgWColor','bgWidth'], cusFields: ['testStyle','color',testStyleoptions,sValue]});
86
+ let bgWidth = gCPVal(value, 'bgWidth', [0], {sKey: 'wColorStatus', fields:['bgWColor','bgWidth'], cusFields: ['testStyle','width',testStyleoptions,sValue]});
87
+ debugger
88
+
89
+
90
+
91
+ //普通属性
92
+ this.bgColor = gCPVal(value,'bgcolor', '', {sKey:'contStatus',fields:['bgcolor','height']});
93
+ this.height = gCPVal(value,'height', 20, {sKey:'contStatus',fields:['bgcolor','height']});
94
+
95
+
96
+
97
+
98
+ // let bgcolor = getContainerPropsValue(value, 'content.bgcolor', '');
99
+ // let height = getContainerPropsValue(value, 'content.height', 20);
100
+ //
101
+ // if (bgcolor) this.bgcolor = bgcolor;
102
+ // if (height) this.height = height;
60
103
  },
61
104
  }
62
105
  }
@@ -24,8 +24,7 @@ export default {
24
24
  multiple: false,
25
25
  className: 'input80',
26
26
  list: [
27
- {label: '垂直', value: 'noraml'},
28
- {label: '水平', value: 'horizontal'},
27
+ {label: '平铺', value: 'noraml'},
29
28
  {label: '悬浮', value: 'fixed'},
30
29
  ],
31
30
  inline: false,
@@ -54,16 +53,6 @@ export default {
54
53
  placeholder: '请输入自定义名称',
55
54
  className: 'input80',
56
55
  },
57
- {
58
- label: '自定义服务名称:',
59
- ele: 'el-input',
60
- type: 'text',
61
- groupKey:'content',
62
- valueKey: 'customName',
63
- value: data['customName']? data['customName']: '我的服务',
64
- placeholder: '请输入自定义服务名称',
65
- className: 'input80',
66
- },
67
56
  {
68
57
  label: '背景颜色:',
69
58
  ele: 'xd-color',