jufubao-mall 2.0.29-beta1 → 2.0.31

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.
@@ -0,0 +1,1002 @@
1
+ import {
2
+ dataVal,
3
+ statusDataVal,
4
+ statusShow,
5
+ cRaBorShadow,
6
+ cusDisabled,
7
+ getCustomAttr,
8
+ TestCssInfo
9
+ } from "@/utils/AttrTools";
10
+ export default (data, gValue, gColor, oldData = {}) => {
11
+ const Color = require('color');
12
+ //标题描边
13
+ let titleBorder = cRaBorShadow(data, 'titleBorder', { old: ['is_title_border', 'is_title_border_w', 'is_title_border_c', 'solid'] }, gValue)
14
+ //标题投影设置
15
+ let titleShadowExt = { dValue: 'N' };
16
+ if (gValue.isAdd === true && gValue.isFirst) titleShadowExt = { dValue: 'D' };
17
+ let titleShadow = cRaBorShadow(data, 'titleShadow', titleShadowExt, gValue);
18
+ //更多描边
19
+ let moreBorder = cRaBorShadow(data, 'moreBorder', { old: ['is_more_border', 'is_more_border_w', 'is_more_border_c', 'solid'] }, gValue)
20
+ //更多投影设置
21
+ let moreShadowExt = { dValue: 'N' };
22
+ if (gValue.isAdd === true && gValue.isFirst) moreShadowExt = { dValue: 'D' };
23
+ let moreShadow = cRaBorShadow(data, 'moreShadow', moreShadowExt, gValue);
24
+ let moreBackgeound = Color(gColor.mainColor).alpha(0.15).toString();
25
+ //内容边框兼容
26
+ let productDisabled = cusDisabled({
27
+ data,
28
+ key: 'productStyle',
29
+ fields: { 'itemBgColorStatus': ['itemBgColor'], 'itemBorder': ['itemBorder', 'bs'] },
30
+ gValue
31
+ });
32
+ let defItemBorder = cRaBorShadow(data, 'itemBorder', { disabled: productDisabled, old: ['is_border', 'is_border_w', 'is_border_c', 'solid'] }, gValue);
33
+ let defItemShadow = cRaBorShadow(data, 'itemShadow', { old: ['is_shadow', 'is_shadow_w', 'is_shadow_bg'] }, gValue);
34
+ return [
35
+ {
36
+ ele: 'title',
37
+ label: '常规',
38
+ size: 'small',
39
+ groupKey: 'style',
40
+ },
41
+ {
42
+ label: '背景',
43
+ ele: 'xd-radio',
44
+ groupKey: 'style',
45
+ valueKey: 'mainBgStatus',
46
+ value: statusDataVal({ data, key: 'mainBgStatus', fields: ['mainBgColor', 'mainBackground'], gValue }),
47
+ labelInline: true,
48
+ list: [
49
+ { label: '默认', value: 'D' },
50
+ { label: '自定义', value: 'C' },
51
+ ]
52
+ },
53
+ { ele: 'group_start' },
54
+ {
55
+ label: '',
56
+ ele: 'xd-color',
57
+ groupKey: 'style',
58
+ valueKey: 'mainBgColor',
59
+ value: dataVal({ data, key: 'mainBgColor', dValue: null, gValue }),
60
+ hidden: !statusShow({ data, key: 'mainBgStatus', fields: ['mainBgColor', 'mainBackground'], gValue }),
61
+ placeholder: '请选择背景颜色',
62
+ labelInline: true,
63
+ classNmae: 'input80',
64
+ },
65
+ { ele: 'group_end' },
66
+ {
67
+ label: '外边距',
68
+ ele: 'xd-radio',
69
+ groupKey: 'style',
70
+ valueKey: 'outMarginStatus',
71
+ value: statusDataVal({ data, key: 'outMarginStatus', fields: ['outMargin'], gValue }),
72
+ labelInline: true,
73
+ list: [
74
+ { label: '默认', value: 'D' },
75
+ { label: '自定义', value: 'C' },
76
+ ]
77
+ },
78
+ { ele: 'group_start' },
79
+ {
80
+ label: '',
81
+ ele: 'xd-margin-padding',
82
+ groupKey: 'style',
83
+ valueKey: 'outMargin',
84
+ value: dataVal({
85
+ data,
86
+ key: 'outMargin',
87
+ dValue: [16],
88
+ gValue,
89
+ isPM: true,
90
+ isCPM: false,
91
+ }
92
+ ),
93
+ setting: {
94
+ type: 'margin',
95
+ },
96
+ hidden: !statusShow({ data, key: 'outMarginStatus', fields: ['outMargin'], gValue }),
97
+ inline: false,
98
+ },
99
+ { ele: 'group_end' },
100
+ {
101
+ label: '专题行间距',
102
+ ele: 'xd-radio',
103
+ groupKey: 'style',
104
+ valueKey: 'mainEventSpacingStatus',
105
+ value: statusDataVal({ data, key: 'mainEventSpacingStatus', fields: ['mainEventSpacing'], gValue }),
106
+ labelInline: true,
107
+ list: [
108
+ { label: '默认', value: 'D' },
109
+ { label: '自定义', value: 'C' },
110
+ ]
111
+ },
112
+ { ele: 'group_start' },
113
+ {
114
+ label: "",
115
+ groupKey: 'style',
116
+ ele: 'xd-slider',
117
+ valueKey: "mainEventSpacing",
118
+ value: dataVal({ data, key: 'mainEventSpacing', dValue: 16, gValue }),
119
+ className: "input80",
120
+ labelInline: true,
121
+ hidden: !statusShow({ data, key: 'mainEventSpacingStatus', fields: ['mainEventSpacing'], gValue }),
122
+ setting: {
123
+ min: 0,//最小值
124
+ max: 60, //最小值
125
+ step: 1, //步长
126
+ showStops: false,//显示间断点
127
+ showInput: false,//显示输入框
128
+ }
129
+ },
130
+ { ele: 'group_end' },
131
+ {
132
+ ele: 'title',
133
+ label: '内容区',
134
+ size: 'small',
135
+ groupKey: 'style',
136
+ },
137
+ {
138
+ label: '内容区背景',
139
+ ele: 'xd-radio',
140
+ groupKey: 'style',
141
+ valueKey: 'listBgColorStatus',
142
+ value: statusDataVal({ data, key: 'listBgColorStatus', fields: ['listBgColor'], gValue }),
143
+ labelInline: true,
144
+ list: [
145
+ { label: '默认', value: 'D' },
146
+ { label: '自定义', value: 'C' },
147
+ ]
148
+ },
149
+ { ele: 'group_start' },
150
+ {
151
+ label: '',
152
+ ele: 'xd-color',
153
+ groupKey: 'style',
154
+ valueKey: 'listBgColor',
155
+ value: dataVal({ data, key: 'listBgColor', dValue: null, gValue }),
156
+ hidden: !statusShow({ data, key: 'listBgColorStatus', fields: ['listBgColor'], gValue }),
157
+ placeholder: '请选择背景颜色',
158
+ labelInline: true,
159
+ classNmae: 'input80',
160
+ },
161
+ { ele: 'group_end' },
162
+ {
163
+ label: '内容区边距',
164
+ ele: 'xd-radio',
165
+ groupKey: 'style',
166
+ valueKey: 'itemMarginStatus',
167
+ value: statusDataVal({ data, key: 'itemMarginStatus', fields: ['itemMargin'], gValue }),
168
+ labelInline: true,
169
+ list: [
170
+ { label: '默认', value: 'D' },
171
+ { label: '自定义', value: 'C' },
172
+ ]
173
+ },
174
+ { ele: 'group_start' },
175
+ {
176
+ label: '',
177
+ ele: 'xd-margin-padding',
178
+ groupKey: 'style',
179
+ valueKey: 'itemMargin',
180
+ value: dataVal({
181
+ data,
182
+ key: 'itemMargin',
183
+ dValue: { top: 16, right: 0, bottom: 0, left: 0 },
184
+ gValue,
185
+ isPM: true,
186
+ isCPM: false,
187
+ }
188
+ ),
189
+ setting: {
190
+ type: 'margin',
191
+ },
192
+ hidden: !statusShow({ data, key: 'itemMarginStatus', fields: ['itemMargin'], gValue }),
193
+ inline: false,
194
+ notice: '边距设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">0</span> 像素',
195
+ },
196
+ { ele: 'group_end' },
197
+ {
198
+ label: '内容区圆角',
199
+ ele: 'xd-radio',
200
+ groupKey: 'style',
201
+ valueKey: 'listRadiusStatus',
202
+ value: statusDataVal({ data, key: 'listRadiusStatus', fields: ['listRadius'], gValue }),
203
+ labelInline: true,
204
+ list: [
205
+ { label: '默认', value: 'D' },
206
+ { label: '无圆角', value: 'N' },
207
+ { label: '自定义', value: 'C' },
208
+ ]
209
+ },
210
+ { ele: 'group_start' },
211
+ {
212
+ label: "",
213
+ ele: 'xd-site-select-list',
214
+ valueKey: 'listRadius',
215
+ groupKey: 'style',
216
+ value: dataVal({
217
+ data,
218
+ key: 'listRadius',
219
+ dValue: 16,
220
+ gValue,
221
+ }),
222
+ labelInline: true,
223
+ placeholder: '请选择内容圆角设置',
224
+ multiple: false,
225
+ hidden: !statusShow({ data, key: 'listRadiusStatus', fields: ['listRadius'], gValue }),
226
+ className: 'input80',
227
+ handleCustom({ action, data }) {
228
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
229
+ .then(res => {
230
+ res.list = res.list.filter(item => {
231
+ return item.label !== '无';
232
+ })
233
+ data.cb(res.list)
234
+ })
235
+ .catch(error => {
236
+ console.error(error);
237
+ });
238
+ },
239
+ },
240
+ { ele: 'group_end' },
241
+ {
242
+ ele: 'title',
243
+ label: '标题栏',
244
+ size: 'small',
245
+ groupKey: 'style',
246
+ hidden: data['is_title']==='N',
247
+ },
248
+ {
249
+ label: '标题文字',
250
+ ele: 'xd-radio',
251
+ groupKey: 'style',
252
+ valueKey: 'titleStyleStatus',
253
+ value: statusDataVal({ data, key: 'titleStyleStatus', fields: ['titleStyle'], gValue }),
254
+ labelInline: true,
255
+ hidden: data['is_title'] === 'N',
256
+ list: [
257
+ { label: '默认', value: 'D' },
258
+ { label: '自定义', value: 'C' },
259
+ ]
260
+ },
261
+ { ele: 'group_start' },
262
+ {
263
+ label: '',
264
+ ele: 'xd-text-and-bgc',
265
+ groupKey: 'style',
266
+ valueKey: 'titleStyle',
267
+ value: dataVal({ data, key: 'titleStyle', dValue: {}, gValue }),
268
+ hidden: data['is_title'] === 'N'||!statusShow({ data, key: 'titleStyleStatus', fields: ['titleStyle'], gValue }),
269
+ setting: {
270
+ fontSize: true,
271
+ weight: true,
272
+ bgColor: true,
273
+ selected: false,
274
+ default: {
275
+ color: '#333',
276
+ fontSize: '28rpx',
277
+ fontWeight: '500',
278
+ bgColor: 'rgba(255, 255, 255, 0)'
279
+ },
280
+ isBorder: false,
281
+ },
282
+ handleCustom({ action, data }) {
283
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_font_size' })
284
+ .then(res => {
285
+ data.cb(res.list)
286
+ })
287
+ .catch(error => {
288
+ console.error(error);
289
+ data.cb([])
290
+ });
291
+ },
292
+ },
293
+ {
294
+ label: '背景图',
295
+ ele: 'xd-upload',
296
+ labelInline: true,
297
+ valueKey: 'titleBg',
298
+ value: dataVal({
299
+ data,
300
+ key: 'titleBg',
301
+ dValue: null,
302
+ gValue,
303
+ }),
304
+ defaultValue: dataVal({
305
+ data,
306
+ key: 'titleBg',
307
+ dValue: null,
308
+ gValue,
309
+ }),
310
+ slot: true,
311
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议宽度为:<span style="color:red">750</span>像素',
312
+ type: ['jpg', 'png', 'jpeg'],
313
+ styleType: 'one',
314
+ uploadType: 'aliyun',
315
+ hidden: data['is_title'] === 'N'||!statusShow({ data, key: 'titleStyleStatus', fields: ['titleBg'], gValue }),
316
+ oneWidth: 120,
317
+ oneHeight: 120,
318
+ size: 5,
319
+ action: 'aliyun',
320
+ groupKey: 'style',
321
+ },
322
+ { ele: 'group_end' },
323
+ {
324
+ label: '标题边距',
325
+ ele: 'xd-radio',
326
+ groupKey: 'style',
327
+ valueKey: 'titlePaddingStatus',
328
+ value: statusDataVal({ data, key: 'titlePaddingStatus', fields: ['titlePadding'], gValue }),
329
+ labelInline: true,
330
+ hidden: data['is_title'] === 'N',
331
+ list: [
332
+ { label: '默认', value: 'D' },
333
+ { label: '自定义', value: 'C' },
334
+ ]
335
+ },
336
+ { ele: 'group_start' },
337
+ {
338
+ label: '',
339
+ ele: 'xd-margin-padding',
340
+ groupKey: 'style',
341
+ valueKey: 'titlePadding',
342
+ value: dataVal({ data, key: 'titlePadding', dValue: 32, gValue, isPM: true }),
343
+ hidden: data['is_title'] === 'N'||!statusShow({ data, key: 'titlePaddingStatus', fields: ['titlePadding'], gValue }),
344
+ setting: {
345
+ type: 'padding',
346
+ },
347
+ },
348
+ { ele: 'group_end' },
349
+ {
350
+ label: '标题描边',
351
+ ele: 'xd-border',
352
+ groupKey: 'style',
353
+ valueKey: 'titleBorder',
354
+ labelInline: true,
355
+ className: 'input100',
356
+ value: titleBorder,
357
+ hidden: data['is_title'] === 'N',
358
+ setting: {
359
+ selected: titleBorder.type,
360
+ isRadio: true,//启用editx默认
361
+ isDef: true, //启动默认选项
362
+ },
363
+ },
364
+ {
365
+ label: '标题投影',
366
+ ele: 'xd-shadow',
367
+ labelInline: true,
368
+ groupKey: 'style',
369
+ valueKey: 'titleShadow',
370
+ value: titleShadow,
371
+ className: 'input100',
372
+ hidden: data['is_title'] === 'N',
373
+ setting: {
374
+ selected: titleShadow.type,//设置默认选中项
375
+ isRadio: true,//启用editx默认
376
+ isDef: true,//启动默认选项
377
+ //设置默认值
378
+ default: {
379
+ color: 'rgba(0,0,0,.05)',
380
+ width: '10',
381
+ }
382
+ },
383
+ handleCustom({ action, data }) {
384
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
385
+ .then(res => {
386
+ res.list = res.list.filter(item => {
387
+ return item.label !== '无';
388
+ });
389
+ data.cb(res.list)
390
+ })
391
+ .catch(error => {
392
+ console.error(error);
393
+ data.cb([])
394
+ });
395
+ },
396
+ },
397
+ {
398
+ label: '标题圆角',
399
+ ele: 'xd-radio',
400
+ groupKey: 'style',
401
+ valueKey: 'titleRradiusStatus',
402
+ hidden: data['is_title'] === 'N',
403
+ value: statusDataVal({ data, key: 'titleRradiusStatus', fields: ['titleRradius'], gValue }),
404
+ labelInline: true,
405
+ list: [
406
+ { label: '默认', value: 'D' },
407
+ { label: '无圆角', value: 'N' },
408
+ { label: '自定义', value: 'C' },
409
+ ]
410
+ },
411
+ { ele: 'group_start' },
412
+ {
413
+ label: "",
414
+ ele: 'xd-site-select-list',
415
+ valueKey: 'titleRradius',
416
+ groupKey: 'style',
417
+ value: dataVal({
418
+ data,
419
+ key: 'titleRradius',
420
+ dValue: '16',
421
+ gValue,
422
+ }),
423
+ labelInline: true,
424
+ placeholder: '请选择标题圆角设置',
425
+ multiple: false,
426
+ hidden: data['is_title'] === 'N'||!statusShow({ data, key: 'titleRradiusStatus', fields: ['titleRradius'], gValue }),
427
+ className: 'input80',
428
+ handleCustom({ action, data }) {
429
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
430
+ .then(res => {
431
+ res.list = res.list.filter(item => {
432
+ return item.label !== '无';
433
+ })
434
+ data.cb(res.list)
435
+ })
436
+ .catch(error => {
437
+ console.error(error);
438
+ });
439
+ },
440
+ },
441
+ { ele: 'group_end' },
442
+ {
443
+ ele: 'title',
444
+ label: '查看更多',
445
+ size: 'small',
446
+ groupKey: 'style',
447
+ hidden: data['is_title'] === 'N',
448
+ },
449
+ {
450
+ label: '更多文字',
451
+ ele: 'xd-radio',
452
+ groupKey: 'style',
453
+ valueKey: 'moreStyleStatus',
454
+ value: statusDataVal({ data, key: 'moreStyleStatus', fields: ['moreStyle'], gValue }),
455
+ labelInline: true,
456
+ hidden: data['is_title'] === 'N',
457
+ list: [
458
+ { label: '默认', value: 'D' },
459
+ { label: '自定义', value: 'C' },
460
+ ]
461
+ },
462
+ { ele: 'group_start' },
463
+ {
464
+ label: '',
465
+ ele: 'xd-text-and-bgc',
466
+ groupKey: 'style',
467
+ valueKey: 'moreStyle',
468
+ value: dataVal({ data, key: 'moreStyle', dValue: {}, gValue }),
469
+ hidden: data['is_title'] === 'N'||!statusShow({ data, key: 'moreStyleStatus', fields: ['moreStyle'], gValue }),
470
+ setting: {
471
+ fontSize: true,
472
+ weight: true,
473
+ bgColor: true,
474
+ selected: false,
475
+ default: {
476
+ color: gColor.mainColor,
477
+ fontSize: '24rpx',
478
+ fontWeight: '400',
479
+ bgColor: moreBackgeound
480
+ },
481
+ isBorder: false,
482
+ },
483
+ handleCustom({ action, data }) {
484
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_font_size' })
485
+ .then(res => {
486
+ data.cb(res.list)
487
+ })
488
+ .catch(error => {
489
+ console.error(error);
490
+ data.cb([])
491
+ });
492
+ },
493
+ },
494
+ { ele: 'group_end' },
495
+ {
496
+ label: '更多描边',
497
+ ele: 'xd-border',
498
+ groupKey: 'style',
499
+ valueKey: 'moreBorder',
500
+ labelInline: true,
501
+ className: 'input100',
502
+ value: moreBorder,
503
+ hidden: data['is_title'] === 'N',
504
+ setting: {
505
+ selected: moreBorder.type,
506
+ isRadio: true,//启用editx默认
507
+ isDef: true, //启动默认选项
508
+ },
509
+ },
510
+ {
511
+ label: '更多投影',
512
+ ele: 'xd-shadow',
513
+ labelInline: true,
514
+ groupKey: 'style',
515
+ valueKey: 'moreShadow',
516
+ value: moreShadow,
517
+ className: 'input100',
518
+ hidden: data['is_title'] === 'N',
519
+ setting: {
520
+ selected: moreShadow.type,//设置默认选中项
521
+ isRadio: true,//启用editx默认
522
+ isDef: true,//启动默认选项
523
+ //设置默认值
524
+ default: {
525
+ color: 'rgba(0,0,0,.05)',
526
+ width: '10',
527
+ }
528
+ },
529
+ handleCustom({ action, data }) {
530
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
531
+ .then(res => {
532
+ res.list = res.list.filter(item => {
533
+ return item.label !== '无';
534
+ });
535
+ data.cb(res.list)
536
+ })
537
+ .catch(error => {
538
+ console.error(error);
539
+ data.cb([])
540
+ });
541
+ },
542
+ },
543
+ {
544
+ label: '更多圆角',
545
+ ele: 'xd-radio',
546
+ groupKey: 'style',
547
+ valueKey: 'moreRradiusStatus',
548
+ value: statusDataVal({ data, key: 'moreRradiusStatus', fields: ['moreRradius'], gValue }),
549
+ labelInline: true,
550
+ hidden: data['is_title'] === 'N',
551
+ list: [
552
+ { label: '默认', value: 'D' },
553
+ { label: '无圆角', value: 'N' },
554
+ { label: '自定义', value: 'C' },
555
+ ]
556
+ },
557
+ { ele: 'group_start' },
558
+ {
559
+ label: "",
560
+ ele: 'xd-site-select-list',
561
+ valueKey: 'moreRradius',
562
+ groupKey: 'style',
563
+ value: dataVal({
564
+ data,
565
+ key: 'moreRradius',
566
+ dValue: '40',
567
+ gValue,
568
+ }),
569
+ labelInline: true,
570
+ placeholder: '请选择更多圆角设置',
571
+ multiple: false,
572
+ hidden: data['is_title'] === 'N'||!statusShow({ data, key: 'moreRradiusStatus', fields: ['moreRradius'], gValue }),
573
+ className: 'input80',
574
+ handleCustom({ action, data }) {
575
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
576
+ .then(res => {
577
+ res.list = res.list.filter(item => {
578
+ return item.label !== '无';
579
+ })
580
+ data.cb(res.list)
581
+ })
582
+ .catch(error => {
583
+ console.error(error);
584
+ });
585
+ },
586
+ },
587
+ { ele: 'group_end' },
588
+ {
589
+ ele: 'title',
590
+ label: '专题Banner设置',
591
+ size: 'small',
592
+ groupKey: 'style',
593
+ },
594
+ {
595
+ label: 'Banner圆角',
596
+ ele: 'xd-radio',
597
+ groupKey: 'style',
598
+ valueKey: 'bannerRradiusStatus',
599
+ value: statusDataVal({ data, key: 'bannerRradiusStatus', fields: ['bannerRradius'], gValue }),
600
+ labelInline: true,
601
+ list: [
602
+ { label: '默认', value: 'D' },
603
+ { label: '无圆角', value: 'N' },
604
+ { label: '自定义', value: 'C' },
605
+ ]
606
+ },
607
+ { ele: 'group_start' },
608
+ {
609
+ label: "",
610
+ ele: 'xd-site-select-list',
611
+ valueKey: 'bannerRradius',
612
+ groupKey: 'style',
613
+ value: dataVal({
614
+ data,
615
+ key: 'bannerRradius',
616
+ dValue: '16',
617
+ gValue,
618
+ }),
619
+ labelInline: true,
620
+ placeholder: '请选择Banner圆角设置',
621
+ multiple: false,
622
+ hidden: !statusShow({ data, key: 'bannerRradiusStatus', fields: ['bannerRradius'], gValue }),
623
+ className: 'input80',
624
+ handleCustom({ action, data }) {
625
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
626
+ .then(res => {
627
+ res.list = res.list.filter(item => {
628
+ return item.label !== '无';
629
+ })
630
+ data.cb(res.list)
631
+ })
632
+ .catch(error => {
633
+ console.error(error);
634
+ });
635
+ },
636
+ },
637
+ { ele: 'group_end' },
638
+ {
639
+ label: 'Banner边距',
640
+ ele: 'xd-radio',
641
+ groupKey: 'style',
642
+ valueKey: 'bannerPaddingStatus',
643
+ value: statusDataVal({ data, key: 'bannerPaddingStatus', fields: ['bannerPadding'], gValue }),
644
+ labelInline: true,
645
+ list: [
646
+ { label: '默认', value: 'D' },
647
+ { label: '自定义', value: 'C' },
648
+ ]
649
+ },
650
+ { ele: 'group_start' },
651
+ {
652
+ label: '',
653
+ ele: 'xd-margin-padding',
654
+ groupKey: 'style',
655
+ valueKey: 'bannerPadding',
656
+ value: dataVal({ data, key: 'bannerPadding', dValue: {top:16,right:0,bottom:0,left:0}, gValue, isPM: true }),
657
+ hidden: !statusShow({ data, key: 'bannerPaddingStatus', fields: ['bannerPadding'], gValue }),
658
+ setting: {
659
+ type: 'padding',
660
+ },
661
+ },
662
+ { ele: 'group_end' },
663
+ {
664
+ ele: 'title',
665
+ label: '商品样式',
666
+ size: 'small',
667
+ groupKey: 'style',
668
+ },
669
+ {
670
+ label: '商品名称',
671
+ ele: 'xd-radio',
672
+ groupKey: 'style',
673
+ valueKey: 'itemStyleStatus',
674
+ value: statusDataVal({ data, key: 'itemStyleStatus', fields: ['itemStyle', 'itemSpacing'], gValue }),
675
+ labelInline: true,
676
+ list: [
677
+ { label: '默认', value: 'D' },
678
+ { label: '自定义', value: 'C' },
679
+ ]
680
+ },
681
+ { ele: 'group_start' },
682
+ {
683
+ label: '',
684
+ ele: 'xd-text-and-bgc',
685
+ groupKey: 'style',
686
+ valueKey: 'itemStyle',
687
+ value: dataVal({ data, key: 'itemStyle', dValue: {}, gValue }),
688
+ hidden: !statusShow({ data, key: 'itemStyleStatus', fields: ['itemSpacing', 'itemStyle'], gValue }),
689
+ setting: {
690
+ fontSize: false,
691
+ weight: true,
692
+ bgColor: false,
693
+ selected: false,
694
+ default: {
695
+ color: '#333',
696
+ fontWeight: 'normal',
697
+ },
698
+ isBorder: false,
699
+ },
700
+ handleCustom({ action, data }) {
701
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_font_size' })
702
+ .then(res => {
703
+ data.cb(res.list)
704
+ })
705
+ .catch(error => {
706
+ console.error(error);
707
+ data.cb([])
708
+ });
709
+ },
710
+ },
711
+ {
712
+ label: '间距',
713
+ ele: 'el-input',
714
+ type: 'number',
715
+ labelInline: true,
716
+ groupKey: 'style',
717
+ valueKey: 'itemSpacing',
718
+ value: dataVal({ data, key: 'itemSpacing', dValue: 16, gValue }),
719
+ hidden: !statusShow({ data, key: 'itemStyleStatus', fields: ['itemSpacing', 'itemStyle'], gValue }),
720
+ inline: false,
721
+ append: 'px',
722
+ className: 'input60',
723
+ },
724
+ { ele: 'group_end' },
725
+ {
726
+ label: '品牌样式',
727
+ ele: 'xd-radio',
728
+ groupKey: 'style',
729
+ valueKey: 'itemBrandStatus',
730
+ value: statusDataVal({ data, key: 'itemBrandStatus', fields: ['itemBrandColor', 'itemBrandBgColor'], gValue }),
731
+ labelInline: true,
732
+ list: [
733
+ { label: '默认', value: 'D' },
734
+ { label: '自定义', value: 'C' },
735
+ ]
736
+ },
737
+ { ele: 'group_start' },
738
+ {
739
+ label: '',
740
+ ele: 'xd-color',
741
+ labelInline: true,
742
+ valueKey: 'itemBrandColor',
743
+ value: dataVal({ data, key: 'itemBrandColor', dValue: '#999', gValue }),
744
+ hidden: !statusShow({ data, key: 'itemBrandStatus', fields: ['itemBrandColor', 'itemBrandBgColor'], gValue }),
745
+ placeholder: '请选择文字颜色',
746
+ className: 'input80',
747
+ groupKey: 'style',
748
+ setting: {
749
+ showAlpha: true
750
+ },
751
+ },
752
+ { ele: 'group_end' },
753
+ {
754
+ label: '商品背景',
755
+ ele: 'xd-radio',
756
+ groupKey: 'style',
757
+ valueKey: 'itemBgColorStatus',
758
+ value: statusDataVal({
759
+ data,
760
+ key: 'itemBgColorStatus',
761
+ fields: ['itemBgColor'],
762
+ gValue,
763
+ cusField: ['productStyle']
764
+ }),
765
+ disabled: productDisabled,
766
+ isRefresh: productDisabled,
767
+ labelInline: true,
768
+ list: [
769
+ { label: '默认', value: 'D' },
770
+ { label: '自定义', value: 'C' },
771
+ ]
772
+ },
773
+ { ele: 'group_start' },
774
+ {
775
+ label: '',
776
+ ele: 'xd-color',
777
+ valueKey: 'itemBgColor',
778
+ labelInline: true,
779
+ value: dataVal({
780
+ data,
781
+ key: 'itemBgColor',
782
+ dValue: [getCustomAttr(data['productStyle'], 'backgroundColor'), '#fff'],
783
+ gValue,
784
+ }),
785
+ hidden: !statusShow({ data, key: 'itemBgColorStatus', fields: ['itemBgColor'], gValue }),
786
+ disabled: productDisabled,
787
+ isRefresh: productDisabled,
788
+ placeholder: '请选择背景颜色',
789
+ className: 'input80',
790
+ groupKey: 'style',
791
+ setting: {
792
+ showAlpha: true
793
+ },
794
+ },
795
+ { ele: 'group_end' },
796
+ {
797
+ label: '商品描边',
798
+ ele: 'xd-border',
799
+ labelInline: true,
800
+ groupKey: 'style',
801
+ valueKey: 'itemBorder',
802
+ value: defItemBorder,
803
+ disabled: productDisabled,
804
+ isRefresh: productDisabled,
805
+ setting: {
806
+ selected: defItemBorder.type,
807
+ isRadio: true,//启用editx默认
808
+ isDef: true, //启动默认选项
809
+ //==设置默认值==
810
+ color: '#e5e5e5',
811
+ width: '0',
812
+ style: 'solid'
813
+ //==设置默认值==
814
+ },
815
+ },
816
+ {
817
+ label: '商品圆角',
818
+ ele: 'xd-radio',
819
+ groupKey: 'style',
820
+ valueKey: 'itemRadiusStatus',
821
+ value: statusDataVal({ data, key: 'itemRadiusStatus', cValue: 'N', fields: ['itemRadius'], gValue }),
822
+ labelInline: true,
823
+ list: [
824
+ { label: '默认', value: 'D' },
825
+ { label: '无圆角', value: 'N' },
826
+ { label: '自定义', value: 'C' },
827
+ ]
828
+ },
829
+ { ele: 'group_start' },
830
+ {
831
+ label: '',
832
+ ele: 'xd-site-select-list',
833
+ labelInline: true,
834
+ valueKey: 'itemRadius',
835
+ value: dataVal({ data, key: 'itemRadius', dValue: 16, gValue }),
836
+ hidden: !statusShow({ data, key: 'itemRadiusStatus', fields: ['itemRadius'], gValue }),
837
+ placeholder: '请选择商品是否设置圆角',
838
+ multiple: false,
839
+ className: 'input80',
840
+ groupKey: 'style',
841
+ handleCustom({ action, data }) {
842
+ XdBus.getParentApi('getOptionsSettingList')({
843
+ setting_id: 'edtix_style_radius',
844
+ key: Date.now()
845
+ })
846
+ .then(res => {
847
+ res.list = res.list.filter(item => {
848
+ return item.label !== '无';
849
+ });
850
+ data.cb(res.list)
851
+ })
852
+ .catch(error => {
853
+ console.error(error);
854
+ });
855
+ },
856
+ },
857
+ { ele: 'group_end' },
858
+ {
859
+ label: '商品图圆角',
860
+ ele: 'xd-radio',
861
+ groupKey: 'style',
862
+ valueKey: 'itemImageRadiusStatus',
863
+ value: statusDataVal({ data, key: 'itemImageRadiusStatus', fields: ['itemImageRadius'], gValue }),
864
+ labelInline: true,
865
+ list: [
866
+ { label: '默认', value: 'D' },
867
+ { label: '无圆角', value: 'N' },
868
+ { label: '自定义', value: 'C' },
869
+ ]
870
+ },
871
+ { ele: 'group_start' },
872
+ {
873
+ label: '',
874
+ ele: 'xd-site-select-list',
875
+ valueKey: 'itemImageRadius',
876
+ labelInline: true,
877
+ groupKey: 'style',
878
+ placeholder: '请选择商品图圆角是否设置圆角',
879
+ multiple: false,
880
+ className: 'input80',
881
+ value: dataVal({ data, key: 'itemImageRadius', dValue: '8', gValue }),
882
+ hidden: !statusShow({ data, key: 'itemImageRadiusStatus', fields: ['itemImageRadius'], gValue }),
883
+ handleCustom({ action, data }) {
884
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
885
+ .then(res => {
886
+ res.list = res.list.filter(item => {
887
+ return item.label !== '无';
888
+ });
889
+ data.cb(res.list)
890
+ })
891
+ .catch(error => {
892
+ console.error(error);
893
+ });
894
+ },
895
+ },
896
+ { ele: 'group_end' },
897
+ {
898
+ label: '商品投影',
899
+ ele: 'xd-shadow',
900
+ labelInline: true,
901
+ groupKey: 'style',
902
+ valueKey: 'itemShadow',
903
+ value: defItemShadow,
904
+ className: 'input100',
905
+ setting: {
906
+ selected: defItemShadow.type,
907
+ isRadio: true,
908
+ isDef: true,
909
+ default: {
910
+ color: 'rgba(0,0,0,.05)',
911
+ width: '10',
912
+ }
913
+ },
914
+ handleCustom({ action, data }) {
915
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
916
+ .then(res => {
917
+ res.list = res.list.filter(item => {
918
+ return item.label !== '无';
919
+ });
920
+ data.cb(res.list)
921
+ })
922
+ .catch(error => {
923
+ console.error(error);
924
+ data.cb([])
925
+ });
926
+ },
927
+ },
928
+ {
929
+ label: '商品间距',
930
+ ele: 'xd-radio',
931
+ groupKey: 'style',
932
+ valueKey: 'columnRowStatus',
933
+ value: statusDataVal({ data, key: 'columnRowStatus', fields: ['columnMainSpacing', 'rowMainSpacing'], gValue }),
934
+ labelInline: true,
935
+ list: [
936
+ { label: '默认', value: 'D' },
937
+ { label: '自定义', value: 'C' },
938
+ ]
939
+ },
940
+ { ele: 'group_start' },
941
+ {
942
+ label: "列间距",
943
+ groupKey: 'style',
944
+ ele: 'xd-slider',
945
+ valueKey: "columnMainSpacing",
946
+ value: dataVal({ data, key: 'columnMainSpacing', dValue: 16, gValue }),
947
+ className: "input100",
948
+ labelInline: true,
949
+ hidden: !statusShow({ data, key: 'columnRowStatus', fields: ['columnMainSpacing', 'rowMainSpacing'], gValue }),
950
+ setting: {
951
+ min: 0,//最小值
952
+ max: 60, //最小值
953
+ step: 1, //步长
954
+ showStops: false,//显示间断点
955
+ showInput: false,//显示输入框
956
+ }
957
+ },
958
+ {
959
+ label: "行间距",
960
+ groupKey: 'style',
961
+ ele: 'xd-slider',
962
+ valueKey: "rowMainSpacing",
963
+ value: dataVal({ data, key: 'rowMainSpacing', dValue: 16, gValue }),
964
+ className: "input100",
965
+ labelInline: true,
966
+ hidden: !statusShow({ data, key: 'columnRowStatus', fields: ['columnMainSpacing', 'rowMainSpacing'], gValue }),
967
+ setting: {
968
+ min: 0,//最小值
969
+ max: 60, //最小值
970
+ step: 1, //步长
971
+ showStops: false,//显示间断点
972
+ showInput: false,//显示输入框
973
+ }
974
+ },
975
+ { ele: 'group_end' },
976
+ {
977
+ label: '商品留白',
978
+ ele: 'xd-radio',
979
+ groupKey: 'style',
980
+ valueKey: 'itemPaddingStatus',
981
+ value: statusDataVal({ data, key: 'itemPaddingStatus', fields: ['itemPadding'], gValue }),
982
+ labelInline: true,
983
+ list: [
984
+ { label: '默认', value: 'D' },
985
+ { label: '自定义', value: 'C' },
986
+ ]
987
+ },
988
+ { ele: 'group_start' },
989
+ {
990
+ label: '',
991
+ ele: 'xd-margin-padding',
992
+ groupKey: 'style',
993
+ valueKey: 'itemPadding',
994
+ value: dataVal({ data, key: 'itemPadding', dValue: 16, gValue, isPM: true }),
995
+ hidden: !statusShow({ data, key: 'itemPaddingStatus', fields: ['itemPadding'], gValue }),
996
+ setting: {
997
+ type: 'padding',
998
+ },
999
+ },
1000
+ { ele: 'group_end' },
1001
+ ].filter(i => i);
1002
+ }