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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-mall",
3
- "version": "2.0.29-beta1",
3
+ "version": "2.0.31",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -528,6 +528,9 @@ export default function (data, gValue, gColor, oldData) {
528
528
  handleCustom({ action, data }) {
529
529
  XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
530
530
  .then(res => {
531
+ res.list = res.list.filter(item => {
532
+ return item.label !== '无';
533
+ })
531
534
  data.cb(res.list)
532
535
  })
533
536
  .catch(error => {
@@ -1,594 +1,18 @@
1
1
  'use strict';
2
- import {getRemoteOptions} from "@/utils/AttrTools";
3
-
4
-
5
-
2
+ import Content from './cusAttr/content'
3
+ import Style from './cusAttr/style'
4
+ import Advanced from './cusAttr/advanced'
6
5
  /**
7
6
  * @description 当表单组件中有联动操作时候,使用方法进行返回
8
7
  */
9
8
  export default {
10
9
  style: [],
11
- content: (data) => {
12
- let options = getRemoteOptions('productList', data);
10
+ content: (data, gValue, gColor, oldData = {}) => {
13
11
  return [
14
- //商品配置
15
- {
16
- label: "列表展示列数",
17
- groupKey: 'content',
18
- ele: 'xd-radio',
19
- valueKey: "column_num",
20
- value: data['column_num'] || 2,
21
- isKey: true,
22
- list: [
23
- {label: "一列", value: 1},
24
- {label: "两列", value: 2},
25
- {label: "三列", value: 3}
26
- ]
27
- },
28
- {
29
- label: '专题分类切换是否显示底线:',
30
- ele: 'xd-radio',
31
- valueKey: 'isFooterLine',
32
- value: data['isFooterLine'] || 'N',
33
- groupKey:'content',
34
- multiple: false,
35
- className: 'input80',
36
- list: [
37
- {label: '是', value: 'Y'},
38
- {label: '否', value: 'N'},
39
- ]
40
- },
41
- {
42
- label: '否展示品牌:',
43
- ele: 'xd-radio',
44
- valueKey: 'is_show_brand',
45
- value: data['is_show_brand'] || 'N',
46
- placeholder: '请选择是否展示品牌',
47
- multiple: false,
48
- className: 'input80',
49
- groupKey: 'content',
50
- list: [
51
- { label: '展示', value: 'Y' },
52
- { label: '隐藏', value: 'N' },
53
- ]
54
- },
55
- ...options,
56
- {
57
- label: "是否展示购物车设置",
58
- ele: "xd-radio",
59
- valueKey: "isAddCart",
60
- value: data['isAddCart'] || 'Y',
61
- groupKey: 'content',
62
- list: [
63
- { label: "展示", value: 'Y' },
64
- { label: "隐藏", value: 'N' }
65
- ]
66
- },
67
- {
68
- label: '是否展示示价格:',
69
- ele: 'xd-radio',
70
- groupKey: 'content',
71
- valueKey: 'isPrice',
72
- value: data['isPrice'] || 'Y',
73
- placeholder: '请选择是否显示价格',
74
- multiple: false,
75
- className: 'input80',
76
- list: [
77
- { label: '展示', value: 'Y' },
78
- { label: '隐藏', value: 'N' },
79
- ]
80
- },
81
- data.isPrice === 'Y' && {
82
- label: '是否展示划线价:',
83
- groupKey: 'content',
84
- ele: 'xd-radio',
85
- valueKey: 'isShowDiscount',
86
- value: data.isShowDiscount || "Y",
87
- rules: [
88
- { required: true, message: '请选择', trigger: ['blur', 'change'] }
89
- ],
90
- list: [
91
- { "label": "展示", "value": "Y" },
92
- { "label": "隐藏", "value": "N" },
93
- ]
94
- },
95
- data.isShowDiscount === 'Y' && {
96
- groupKey: 'content',
97
- label: '划线价取市场价,市场价-售价差值大于等于设置值时展示:',
98
- ele: 'el-input',
99
- type: 'number',
100
- valueKey: 'differ',
101
- value: data['differ'] || '',
102
- placeholder: '价差,默认值:1',
103
- className: 'input60',
104
- },
105
-
106
- //style
107
- {
108
- label: '列间距设置:',
109
- ele: 'el-input',
110
- type: 'number',
111
- groupKey:'style',
112
- valueKey: 'mainSpacing',
113
- value: data['mainSpacing'] || '',
114
- className: 'input50',
115
- inline: false,
116
- notice:'列间距设置,单位像素,默认:<span style="color:red">30</span>px'
117
- },
118
- {
119
- label: '行间距设置:',
120
- ele: 'el-input',
121
- type: 'number',
122
- groupKey:'style',
123
- valueKey: 'rowMainSpacing',
124
- value: data['rowMainSpacing'] || '',
125
- className: 'input50',
126
- inline: false,
127
- notice:'行间距设置,单位像素,默认:<span style="color:red">30</span>px'
128
- },
129
-
130
- {
131
- ele: 'title',
132
- label: '导航设置',
133
- size: 'small',
134
- groupKey:'style',
135
- },
136
- {
137
- label: '背景颜色:',
138
- ele: 'xd-color',
139
- groupKey:'style',
140
- valueKey: 'tabBackgroundColor',
141
- value: data['tabBackgroundColor'] || null,
142
- placeholder: '请选择导航背景颜色',
143
- classNmae: 'input80',
144
- },
145
- {
146
- label: '文字样式:',
147
- ele: 'xd-text-and-bgc',
148
- groupKey:'style',
149
- valueKey: 'titleStyle',
150
- value: data['titleStyle'] || null,
151
- setting: {
152
- fontSize: true,
153
- weight:true,
154
- bgColor:false
155
- },
156
- handleCustom({action, data}) {
157
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
158
- .then(res => {
159
- data.cb(res.list)
160
- })
161
- .catch(error => {
162
- console.error(error);
163
- data.cb([])
164
- });
165
- },
166
- },
167
-
168
- {
169
- ele: 'title',
170
- label: '广告位设置',
171
- size: 'small',
172
- groupKey:'style',
173
- },
174
- {
175
- label: '边距设置:',
176
- ele: 'xd-margin-padding',
177
- groupKey:'style',
178
- valueKey: 'posterPadding',
179
- value: data['posterPadding'] || null,
180
- setting: {
181
- type: 'margin',
182
- },
183
- inline: false,
184
- notice: '边距设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">0</span> 像素',
185
- },
186
- {
187
- label: '圆角设置:',
188
- ele: 'xd-site-select-list',
189
- valueKey: 'posterRradius',
190
- value: data['posterRradius'] || '0',
191
- groupKey:'style',
192
- placeholder: '请选择圆角设置',
193
- multiple: false,
194
- className: 'input80',
195
- handleCustom({action, data}) {
196
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
197
- .then(res => {
198
- data.cb(res.list)
199
- })
200
- .catch(error => {
201
- console.error(error);
202
- });
203
- },
204
- },
205
-
206
- {
207
- ele: 'title',
208
- label: '列表样式设置',
209
- size: 'small',
210
- groupKey:'style',
211
- },
212
- {
213
- label: '边距设置:',
214
- ele: 'xd-margin-padding',
215
- groupKey:'style',
216
- valueKey: 'contMargin',
217
- value: data['contMargin'] || null,
218
- setting: {
219
- type: 'margin',
220
- },
221
- inline: false,
222
- notice: '边距设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">0</span> 像素',
223
- },
224
- {
225
- label: '填充设置:',
226
- ele: 'xd-margin-padding',
227
- groupKey:'style',
228
- valueKey: 'contPadding',
229
- value: data['contPadding'] || null,
230
- setting: {
231
- type: 'padding',
232
- },
233
- inline: false,
234
- notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
235
- },
236
- {
237
- label: '列间距设置:',
238
- ele: 'el-input',
239
- type: 'number',
240
- groupKey:'style',
241
- valueKey: 'contSpacing',
242
- value: data['contSpacing'] || '',
243
- className: 'input50',
244
- inline: false,
245
- notice:'列间距设置,单位像素,默认:<span style="color:red">20</span>px,此配置仅在<span style="color:red">一列</span>显示生效'
246
- },
247
- {
248
- label: '背景颜色:',
249
- ele: 'xd-color',
250
- valueKey: 'contBgColor',
251
- value: data['contBgColor'] || '',
252
- placeholder: '请选择背景颜色',
253
- classNmae: 'input80',
254
- groupKey:'style',
255
- inline: false,
256
- notice: '背景色建议使用浅色色值,切勿使用深色色值'
257
- },
258
- {
259
- label: '商品名称样式设置:',
260
- ele: 'xd-text-and-bgc',
261
- groupKey:'style',
262
- valueKey: 'contStyle',
263
- value: data['contStyle'] || null,
264
- setting: {
265
- fontSize: true,
266
- weight:true,
267
- bgColor:false,
268
- selected:false,
269
- },
270
- handleCustom({action, data}) {
271
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
272
- .then(res => {
273
- data.cb(res.list)
274
- })
275
- .catch(error => {
276
- console.error(error);
277
- data.cb([])
278
- });
279
- },
280
- },
281
- {
282
- label: '品牌名称颜色:',
283
- ele: 'xd-color',
284
- valueKey: 'contBrandColor',
285
- value: data['contBrandColor'] || '',
286
- placeholder: '请选择品牌名称颜色',
287
- classNmae: 'input80',
288
- groupKey:'style',
289
- },
290
- {
291
- label: '当前投影设置:',
292
- ele: 'xd-shadow',
293
- groupKey:'style',
294
- valueKey: 'contShadow',
295
- value: data['contShadow'] || '',
296
- setting: {
297
- selected: 'N',
298
- },
299
- handleCustom({action, data}) {
300
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
301
- .then(res => {
302
- data.cb(res.list)
303
- })
304
- .catch(error => {
305
- console.error(error);
306
- data.cb([])
307
- });
308
- },
309
- },
310
- {
311
- label: '当前边框设置:',
312
- ele: 'xd-border',
313
- groupKey:'style',
314
- valueKey: 'contBorder',
315
- value: data['contBorder'] || '',
316
- setting: {
317
- selected:'N'
318
- },
319
- },
320
- {
321
- label: '圆角设置:',
322
- ele: 'xd-site-select-list',
323
- valueKey: 'contRadius',
324
- value: data['contRadius'] || '10',
325
- groupKey:'style',
326
- placeholder: '请选择圆角设置',
327
- multiple: false,
328
- className: 'input80',
329
- handleCustom({action, data}) {
330
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
331
- .then(res => {
332
- data.cb(res.list)
333
- })
334
- .catch(error => {
335
- console.error(error);
336
- });
337
- },
338
- },
339
- {
340
- label: '商品图圆角设置:',
341
- ele: 'xd-site-select-list',
342
- valueKey: 'imageRadius',
343
- value: data['imageRadius'] || '10',
344
- groupKey:'style',
345
- placeholder: '请选择商品图圆角设置',
346
- multiple: false,
347
- className: 'input80',
348
- handleCustom({action, data}) {
349
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
350
- .then(res => {
351
- data.cb(res.list)
352
- })
353
- .catch(error => {
354
- console.error(error);
355
- });
356
- },
357
- },
358
-
359
- {
360
- ele: 'title',
361
- label: '更多按钮样式',
362
- size: 'small',
363
- groupKey:'style',
364
- },
365
- {
366
- label: '自定义更多按钮名称:',
367
- ele: 'el-input',
368
- type: 'text',
369
- groupKey:'content',
370
- valueKey: 'moreName',
371
- value: data['moreName'] || '',
372
- notice: '自定义更多按钮名称,默认值:<span style="color:red">查看更多</span>',
373
- inline: false,
374
- className: 'input60',
375
- },
376
- {
377
- label: '文字样式:',
378
- ele: 'xd-text-and-bgc',
379
- groupKey:'style',
380
- valueKey: 'moreStyle',
381
- value: data['moreStyle'] || null,
382
- setting: {
383
- fontSize: true,
384
- weight:true,
385
- selected: false
386
- },
387
- handleCustom({action, data}) {
388
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
389
- .then(res => {
390
- data.cb(res.list)
391
- })
392
- .catch(error => {
393
- console.error(error);
394
- data.cb([])
395
- });
396
- },
397
- },
398
- {
399
- label: '当前投影设置:',
400
- ele: 'xd-shadow',
401
- groupKey:'style',
402
- valueKey: 'moreShadow',
403
- value: data['moreShadow'] || '',
404
- setting: {
405
- selected: 'N',
406
- },
407
- handleCustom({action, data}) {
408
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
409
- .then(res => {
410
- data.cb(res.list)
411
- })
412
- .catch(error => {
413
- console.error(error);
414
- data.cb([])
415
- });
416
- },
417
- },
418
- {
419
- label: '当前边框设置:',
420
- ele: 'xd-border',
421
- groupKey:'style',
422
- valueKey: 'moreBorder',
423
- value: data['moreBorder'] || '',
424
- setting: {
425
- selected:'N'
426
- },
427
- },
428
- {
429
- label: '圆角设置:',
430
- ele: 'xd-site-select-list',
431
- valueKey: 'moreRradius',
432
- value: data['moreRradius'] || '10',
433
- groupKey:'style',
434
- placeholder: '请选择内容圆角设置',
435
- multiple: false,
436
- className: 'input80',
437
- handleCustom({action, data}) {
438
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
439
- .then(res => {
440
- data.cb(res.list)
441
- })
442
- .catch(error => {
443
- console.error(error);
444
- });
445
- },
446
- },
447
-
448
- {
449
- ele: 'title',
450
- label: '专题说明按钮样式',
451
- size: 'small',
452
- groupKey:'style',
453
- },
454
- {
455
- label: '内容边距设置:',
456
- ele: 'xd-margin-padding',
457
- groupKey:'style',
458
- valueKey: 'descMargin',
459
- value: data['descMargin'] || null,
460
- setting: {
461
- type: 'margin',
462
- },
463
- inline: false,
464
- notice: '内容边距设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">0</span> 像素',
465
- },
466
- {
467
- label: '自定义专题说明名称:',
468
- ele: 'el-input',
469
- type: 'text',
470
- groupKey:'content',
471
- valueKey: 'descName',
472
- value: data['descName'] || '',
473
- notice: '自定义专题说明名称,默认值:<span style="color:red">专题说明</span>',
474
- inline: false,
475
- className: 'input60',
476
- },
477
- {
478
- label: '文字样式:',
479
- ele: 'xd-text-and-bgc',
480
- groupKey:'style',
481
- valueKey: 'descStyle',
482
- value: data['descStyle'] || null,
483
- setting: {
484
- fontSize: true,
485
- weight:true,
486
- selected: false
487
- },
488
- handleCustom({action, data}) {
489
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
490
- .then(res => {
491
- data.cb(res.list)
492
- })
493
- .catch(error => {
494
- console.error(error);
495
- data.cb([])
496
- });
497
- },
498
- },
499
- {
500
- label: '当前投影设置:',
501
- ele: 'xd-shadow',
502
- groupKey:'style',
503
- valueKey: 'descShadow',
504
- value: data['descShadow'] || '',
505
- setting: {
506
- selected: 'N',
507
- },
508
- handleCustom({action, data}) {
509
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
510
- .then(res => {
511
- data.cb(res.list)
512
- })
513
- .catch(error => {
514
- console.error(error);
515
- data.cb([])
516
- });
517
- },
518
- },
519
- {
520
- label: '当前边框设置:',
521
- ele: 'xd-border',
522
- groupKey:'style',
523
- valueKey: 'descBorder',
524
- value: data['descBorder'] || '',
525
- setting: {
526
- selected:'N'
527
- },
528
- },
529
- {
530
- label: '圆角设置:',
531
- ele: 'xd-site-select-list',
532
- valueKey: 'descRradius',
533
- value: data['descRradius'] || '0',
534
- groupKey:'style',
535
- placeholder: '请选择内容圆角设置',
536
- multiple: false,
537
- className: 'input80',
538
- handleCustom({action, data}) {
539
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
540
- .then(res => {
541
- data.cb(res.list)
542
- })
543
- .catch(error => {
544
- console.error(error);
545
- });
546
- },
547
- },
548
-
549
-
550
- {
551
- label: "选择业务线",
552
- ele: "xd-choose-namespace",
553
- valueKey: "xnamespace",
554
- groupKey:'advanced',
555
- className: 'input60',
556
- value: data.xnamespace || "",
557
- handleCustom: (cb) => {
558
- XdBus.getParentApi('getOptionsNamespaces')()
559
- .then(res => {
560
- cb(res.list)
561
- })
562
- .catch();
563
- }
564
- },
565
- {
566
- label: '专题详情跳转路径:',
567
- ele: 'xd-select-pages-path',
568
- valueKey: 'specialInfoPath',
569
- placeholder: '请选择专题详情跳转路径',
570
- value: data.specialInfoPath || null,
571
- groupKey:'advanced',
572
- className: 'input100',
573
- setting: {
574
- router: XdBus.getParentApi('getPagesTree'),
575
- },
576
- inline: false,
577
- },
578
- {
579
- label: '商品详情跳转路径:',
580
- ele: 'xd-select-pages-path',
581
- valueKey: 'productInfoPath',
582
- placeholder: '请选择商品详情跳转路径',
583
- value: data.productInfoPath || null,
584
- groupKey:'advanced',
585
- className: 'input100',
586
- setting: {
587
- router: XdBus.getParentApi('getPagesTree'),
588
- },
589
- inline: false,
590
- },
591
- ].filter(i=>i)
12
+ ...Content(data, gValue, gColor, oldData),
13
+ ...Style(data, gValue, gColor, oldData),
14
+ ...Advanced(data, gValue, gColor, oldData),
15
+ ].filter(i => i)
592
16
  },
593
17
  advanced: [
594
18