jufubao-food 1.0.15-beta1 → 1.0.15-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.
@@ -15,6 +15,8 @@ import productStyle from "@/utils/Attr/productStyle";
15
15
  const Color = require('color');
16
16
 
17
17
  export default function (data={},gValue={},gColor={},oldData) {
18
+ let defContBorder = cRaBorShadow( data, 'contBorder', {dValue:'D'},gValue);
19
+ let defContShadow = cRaBorShadow( data, 'contShadow', {dValue:'D'},gValue);
18
20
  //导航投影设置
19
21
  let titleTabShadowExt = {dValue:'N'};
20
22
  if(gValue.isAdd === true && gValue.isFirst) titleTabShadowExt = {dValue:'D'};
@@ -59,7 +61,296 @@ export default function (data={},gValue={},gColor={},oldData) {
59
61
  },
60
62
  },
61
63
  {ele: 'group_end'},
62
- ...productStyle(data, gValue, gColor, oldData),
64
+
65
+ {
66
+ ele: 'title',
67
+ label: '商品样式',
68
+ size: 'small',
69
+ groupKey:'style',
70
+ },
71
+ {
72
+ label: '商品名称',
73
+ ele: 'xd-radio',
74
+ groupKey: 'style',
75
+ valueKey: 'contStyleStatus',
76
+ value: statusDataVal({data, key:'contStyleStatus', fields:['contStyle','itemSpacing'],gValue}),
77
+ labelInline:true,
78
+ list: [
79
+ {label: '默认', value: 'D'},
80
+ {label: '自定义', value: 'C'},
81
+ ]
82
+ },
83
+ {ele: 'group_start'},
84
+ {
85
+ label: '',
86
+ ele: 'xd-text-and-bgc',
87
+ groupKey:'style',
88
+ valueKey: 'contStyle',
89
+ value: dataVal({data, key:'contStyle', dValue:{}, gValue}),
90
+ hidden: !statusShow({data, key: 'contStyleStatus', fields:['itemSpacing','contStyle'], gValue}),
91
+ setting: {
92
+ fontSize: true,
93
+ weight:true,
94
+ bgColor:false,
95
+ selected:false,
96
+ default: {
97
+ fontSize: '28',
98
+ color: '#000',
99
+ fontWeight: 'normal'
100
+ },
101
+ isBorder: false,
102
+ },
103
+ handleCustom({action, data}) {
104
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
105
+ .then(res => {
106
+ data.cb(res.list)
107
+ })
108
+ .catch(error => {
109
+ console.error(error);
110
+ data.cb([])
111
+ });
112
+ },
113
+ },
114
+ {
115
+ label: "间距",
116
+ groupKey: 'style',
117
+ ele: 'xd-slider',
118
+ valueKey: "itemSpacing",
119
+ value: dataVal({data, key:'itemSpacing', dValue:gValue.isAdd && gValue.isFirst?16:20, gValue}),
120
+ hidden: !statusShow({data, key: 'contStyleStatus', fields:['itemSpacing','contStyle'], gValue}),
121
+ className: "input100",
122
+ labelInline: true,
123
+ setting:{
124
+ min: 0,
125
+ max: 100,
126
+ step:1,
127
+ showStops:false,
128
+ showInput:false,
129
+ }
130
+ },
131
+ {ele: 'group_end'},
132
+ {
133
+ label: '商品背景',
134
+ ele: 'xd-radio',
135
+ groupKey: 'style',
136
+ valueKey: 'itemBgcColorStatus',
137
+ value: statusDataVal({
138
+ data,
139
+ key:'itemBgcColorStatus',
140
+ fields:['itemBgcColor'],
141
+ gValue,
142
+ cusField:['productStyle']
143
+ }),
144
+ labelInline:true,
145
+ list: [
146
+ {label: '默认', value: 'D'},
147
+ {label: '自定义', value: 'C'},
148
+ ]
149
+ },
150
+ {ele: 'group_start'},
151
+ {
152
+ label: '',
153
+ ele: 'xd-color',
154
+ valueKey: 'itemBgcColor',
155
+ labelInline: true,
156
+ value: dataVal({
157
+ data,
158
+ key:'itemBgcColor',
159
+ dValue:['#fff'],
160
+ gValue,
161
+ }),
162
+ hidden: !statusShow({data, key: 'itemBgcColorStatus', fields:['itemBgcColor'], gValue}),
163
+ placeholder: '请选择背景颜色',
164
+ className: 'input80',
165
+ groupKey:'style',
166
+ setting: {
167
+ showAlpha: true
168
+ },
169
+ },
170
+ {ele: 'group_end'},
171
+ {
172
+ label: '商品描边',
173
+ ele: 'xd-border',
174
+ labelInline: true,
175
+ groupKey:'style',
176
+ valueKey: 'contBorder',
177
+ value: defContBorder,
178
+ setting: {
179
+ selected:defContBorder.type,
180
+ isRadio: true,//启用editx默认
181
+ isDef: true, //启动默认选项
182
+ //==设置默认值==
183
+ color: '#e5e5e5',
184
+ width: '2',
185
+ style: 'solid'
186
+ //==设置默认值==
187
+ },
188
+ },
189
+
190
+ {
191
+ label: '商品圆角',
192
+ ele: 'xd-radio',
193
+ groupKey: 'style',
194
+ valueKey: 'radiusStatus',
195
+ value: statusDataVal({data, key:'radiusStatus', cValue:'D',}),
196
+ labelInline:true,
197
+ list: [
198
+ {label: '默认', value: 'D'},
199
+ {label: '无圆角', value: 'N'},
200
+ {label: '自定义', value: 'C'},
201
+ ]
202
+ },
203
+ {ele: 'group_start'},
204
+ {
205
+ label: '',
206
+ ele: 'xd-site-select-list',
207
+ labelInline: true,
208
+ valueKey: 'radius',
209
+ value: dataVal({data, key:'radius', dValue: '0', gValue}),
210
+ hidden: !statusShow({data, key: 'radiusStatus', fields:['radius'], gValue}),
211
+ placeholder: '请选择商品是否设置圆角',
212
+ multiple: false,
213
+ className: 'input80',
214
+ groupKey:'style',
215
+ handleCustom({action, data}) {
216
+ XdBus.getParentApi('getOptionsSettingList')({
217
+ setting_id: 'edtix_style_radius',
218
+ key: Date.now()
219
+ })
220
+ .then(res => {
221
+ res.list = res.list.filter(item=>{
222
+ return item.label !== '无';
223
+ });
224
+ data.cb(res.list)
225
+ })
226
+ .catch(error => {
227
+ console.error(error);
228
+ });
229
+ },
230
+ },
231
+ {ele: 'group_end'},
232
+ {
233
+ label: '图片圆角',
234
+ ele: 'xd-radio',
235
+ groupKey: 'style',
236
+ valueKey: 'imageRadiusStatus',
237
+ value: statusDataVal({data, key:'imageRadiusStatus', cValue:'D'}),
238
+ labelInline:true,
239
+ list: [
240
+ {label: '默认', value: 'D'},
241
+ {label: '无圆角', value: 'N'},
242
+ {label: '自定义', value: 'C'},
243
+ ]
244
+ },
245
+ {ele: 'group_start'},
246
+ {
247
+ label: '',
248
+ ele: 'xd-site-select-list',
249
+ valueKey: 'imageRadius',
250
+ labelInline: true,
251
+ groupKey:'style',
252
+ placeholder: '请选择商品图圆角是否设置圆角',
253
+ multiple: false,
254
+ className: 'input80',
255
+ value: dataVal({data, key:'imageRadius', dValue: '0', gValue}),
256
+ hidden: !statusShow({data, key: 'imageRadiusStatus', fields:['imageRadius'], gValue}),
257
+ handleCustom({action, data}) {
258
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
259
+ .then(res => {
260
+ res.list = res.list.filter(item=>{
261
+ return item.label !== '无';
262
+ });
263
+ data.cb(res.list)
264
+ })
265
+ .catch(error => {
266
+ console.error(error);
267
+ });
268
+ },
269
+ },
270
+ {ele: 'group_end'},
271
+ {
272
+ label: '商品投影',
273
+ ele: 'xd-shadow',
274
+ labelInline: true,
275
+ groupKey:'style',
276
+ valueKey: 'contShadow',
277
+ value: defContShadow,
278
+ className: 'input100',
279
+ setting: {
280
+ selected: defContShadow.type,
281
+ isRadio:true,
282
+ isDef: true,
283
+ default: {
284
+ color: 'rgba(0,0,0,.05)',
285
+ width: '10',
286
+ }
287
+ },
288
+ handleCustom({action, data}) {
289
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
290
+ .then(res => {
291
+ res.list = res.list.filter(item=>{
292
+ return item.label !== '无';
293
+ });
294
+ data.cb(res.list)
295
+ })
296
+ .catch(error => {
297
+ console.error(error);
298
+ data.cb([])
299
+ });
300
+ },
301
+ },
302
+ {
303
+ label: '商品间距',
304
+ ele: 'xd-radio',
305
+ groupKey: 'style',
306
+ valueKey: 'columnRowStatus',
307
+ value: statusDataVal({data, key:'columnRowStatus', fields:['columnSpacing'],gValue}),
308
+ labelInline:true,
309
+ list: [
310
+ {label: '默认', value: 'D'},
311
+ {label: '自定义', value: 'C'},
312
+ ]
313
+ },
314
+ {ele: 'group_start'},
315
+ {
316
+ label: '',
317
+ ele: 'el-input',
318
+ type: 'number',
319
+ labelInline: true,
320
+ groupKey:'style',
321
+ valueKey: 'columnSpacing',
322
+ value: dataVal({data, key:'columnSpacing', dValue: 16, gValue}),
323
+ hidden: !statusShow({data, key: 'columnRowStatus', fields:['columnSpacing'], gValue}),
324
+ inline: false,
325
+ append:'px',
326
+ className: 'input60',
327
+ },
328
+ {ele: 'group_end'},
329
+ {
330
+ label: '商品留白',
331
+ ele: 'xd-radio',
332
+ groupKey: 'style',
333
+ valueKey: 'itemPaddingStatus',
334
+ value: statusDataVal({data, key:'itemPaddingStatus', fields:['itemPadding'],gValue}),
335
+ labelInline:true,
336
+ list: [
337
+ {label: '默认', value: 'D'},
338
+ {label: '自定义', value: 'C'},
339
+ ]
340
+ },
341
+ {ele: 'group_start'},
342
+ {
343
+ label: '',
344
+ ele: 'xd-margin-padding',
345
+ groupKey:'style',
346
+ valueKey: 'itemPadding',
347
+ value: dataVal({data, key:'itemPadding', dValue: 16, gValue,isPM:true}),
348
+ hidden: !statusShow({data, key: 'itemPaddingStatus', fields:['itemPadding'], gValue}),
349
+ setting: {
350
+ type: 'padding',
351
+ },
352
+ },
353
+ {ele: 'group_end'},
63
354
 
64
355
  {
65
356
  ele: 'title',
@@ -88,7 +379,7 @@ export default function (data={},gValue={},gColor={},oldData) {
88
379
  value: dataVal({
89
380
  data,
90
381
  key:'titleBgcColor',
91
- dValue:'#fff',
382
+ dValue:'#f8f8f8',
92
383
  gValue
93
384
  }),
94
385
  hidden: !statusShow({data, key: 'titleBgcColorStatus', fields:['titleBgcColor'], gValue}),
@@ -119,22 +410,22 @@ export default function (data={},gValue={},gColor={},oldData) {
119
410
  groupKey:'style',
120
411
  valueKey: 'titleStyle',
121
412
  value: dataVal({data, key:'titleStyle', dValue:null, gValue}),
122
- hidden: !statusShow({data, key: 'titleStyleStatus', fields:['titleStyle','titleColor'], gValue}),
413
+ hidden: !statusShow({data, key: 'titleStyleStatus', fields:['titleStyle'], gValue}),
123
414
  labelInline:true,
124
415
  isRefresh: true,
125
416
  setting: {
126
417
  fontSize: true,
127
418
  weight:true,
128
- bgColor:(dataVal({data, key:'titleFooterStyle', dValue:'', gValue}) === 'desc'),
419
+ bgColor: false,
129
420
  selected:true,
130
421
  default:{
131
- color: data['titleColor'] || '#333',
132
- actColor: gColor.mainColor,
133
- fontSize: '30',
134
- actFontSize: '30', //'', 20 , 26 ,28,30, 36 默认值:''=>24
135
- fontWeight: '500',
422
+ color: '#333333',
423
+ actColor: '#333333',
424
+ fontSize: '24',
425
+ actFontSize: '24', //'', 20 , 26 ,28,30, 36 默认值:''=>24
426
+ fontWeight: '400',
136
427
  actFontWeight: '500',
137
- actBgColor: "",
428
+ actBgColor: "#FFFFFF",
138
429
  bgColor: ""
139
430
  }
140
431
  },
@@ -150,37 +441,37 @@ export default function (data={},gValue={},gColor={},oldData) {
150
441
  },
151
442
  },
152
443
  {ele: 'group_end'},
153
- {
154
- label: '导航投影',
155
- ele: 'xd-shadow',
156
- labelInline: true,
157
- groupKey:'style',
158
- valueKey: 'titleTabShadow',
159
- value: titleTabShadow,
160
- className: 'input100',
161
- setting: {
162
- selected: titleTabShadow.type,//设置默认选中项
163
- isRadio:true,//启用editx默认
164
- isDef: true,//启动默认选项
165
- //设置默认值
166
- default: {
167
- color: 'rgba(0,0,0,.05)',
168
- width: '10',
169
- }
170
- },
171
- handleCustom({action, data}) {
172
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
173
- .then(res => {
174
- res.list = res.list.filter(item=>{
175
- return item.label !== '无';
176
- });
177
- data.cb(res.list)
178
- })
179
- .catch(error => {
180
- console.error(error);
181
- data.cb([])
182
- });
183
- },
184
- },
444
+ // {
445
+ // label: '导航投影',
446
+ // ele: 'xd-shadow',
447
+ // labelInline: true,
448
+ // groupKey:'style',
449
+ // valueKey: 'titleTabShadow',
450
+ // value: titleTabShadow,
451
+ // className: 'input100',
452
+ // setting: {
453
+ // selected: titleTabShadow.type,//设置默认选中项
454
+ // isRadio:true,//启用editx默认
455
+ // isDef: true,//启动默认选项
456
+ // //设置默认值
457
+ // default: {
458
+ // color: 'rgba(0,0,0,.05)',
459
+ // width: '10',
460
+ // }
461
+ // },
462
+ // handleCustom({action, data}) {
463
+ // XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
464
+ // .then(res => {
465
+ // res.list = res.list.filter(item=>{
466
+ // return item.label !== '无';
467
+ // });
468
+ // data.cb(res.list)
469
+ // })
470
+ // .catch(error => {
471
+ // console.error(error);
472
+ // data.cb([])
473
+ // });
474
+ // },
475
+ // },
185
476
  ].filter(i=>i)
186
477
  }