jufubao-mall 1.0.174 → 2.0.0

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 (38) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbMallCart/Attr.js +11 -489
  3. package/src/components/JfbMallCart/JfbMallCart.vue +253 -107
  4. package/src/components/JfbMallCart/Mock.js +14 -1
  5. package/src/components/JfbMallCart/cusAttr/advanced.js +71 -0
  6. package/src/components/JfbMallCart/cusAttr/content.js +178 -0
  7. package/src/components/JfbMallCart/cusAttr/style.js +1076 -0
  8. package/src/components/JfbMallHomeProductList/Attr.js +8 -804
  9. package/src/components/JfbMallHomeProductList/JfbMallHomeProductList.vue +304 -349
  10. package/src/components/JfbMallHomeProductList/Mock.js +114 -60
  11. package/src/components/JfbMallHomeProductList/cusAttr/advanced.js +61 -0
  12. package/src/components/JfbMallHomeProductList/cusAttr/content.js +407 -0
  13. package/src/components/JfbMallHomeProductList/cusAttr/style.js +453 -0
  14. package/src/components/JfbMallProductInfo/Attr.js +8 -791
  15. package/src/components/JfbMallProductInfo/JfbMallProductInfo.vue +596 -272
  16. package/src/components/JfbMallProductInfo/Mock.js +240 -13
  17. package/src/components/JfbMallProductInfo/XdSku.vue +536 -285
  18. package/src/components/JfbMallProductInfo/XdSkuJd.vue +318 -81
  19. package/src/components/JfbMallProductInfo/cusAttr/advanced.js +121 -0
  20. package/src/components/JfbMallProductInfo/cusAttr/content.js +493 -0
  21. package/src/components/JfbMallProductInfo/cusAttr/style.js +948 -0
  22. package/src/components/JfbMallProductList/JfbMallProductList.vue +4 -3
  23. package/src/components/JfbMallProductList/advanced.js +52 -0
  24. package/src/components/JfbMallProductList/style.js +126 -0
  25. package/src/components/JfbMallRecommendProduct/JfbMallRecommendProduct.vue +6 -5
  26. package/src/components/JfbMallShopList/JfbMallShopList.vue +6 -1
  27. package/src/components/JfbMallTestNormal/Attr.js +620 -0
  28. package/src/components/JfbMallTestNormal/JfbMallTestNormal.vue +169 -0
  29. package/src/components/JfbMallTestNormal/JfbMallTestNormalLess.less +80 -0
  30. package/src/components/JfbMallTestNormal/JfbMallTestNormalMixin.js +30 -0
  31. package/src/components/JfbMallTestRelation/Attr.js +450 -0
  32. package/src/components/JfbMallTestRelation/JfbMallTestRelation.vue +124 -0
  33. package/src/components/JfbMallTestRelation/JfbMallTestRelationLess.less +80 -0
  34. package/src/components/JfbMallTestRelation/JfbMallTestRelationMixin.js +30 -0
  35. package/src/mixins/componentsMixins.js +420 -48
  36. package/src/mixins/productCompMixins.js +252 -0
  37. package/src/components/JfbMallHomeProductList/PosterAttr.js +0 -327
  38. package/src/components/JfbMallHomeProductList/ProductAttr.js +0 -79
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-mall",
3
- "version": "1.0.174",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -1,496 +1,18 @@
1
1
  'use strict';
2
2
 
3
- /**
4
- * @description 当表单组件中有联动操作时候,使用方法进行返回
5
- */
3
+ import style from "./cusAttr/style";
4
+ import advanced from "./cusAttr/advanced";
5
+ import content from "./cusAttr/content";
6
+
6
7
  export default {
7
8
  style: [],
8
- content: (data) => {
9
- return [
10
- {
11
- label: "选择业务线",
12
- ele: "xd-choose-namespace",
13
- valueKey: "xnamespace",
14
- value: data.xnamespace || "",
15
- groupKey:'advanced',
16
- className: 'input60',
17
- handleCustom: (cb) => {
18
- XdBus.getParentApi('getOptionsNamespaces')()
19
- .then(res => {
20
- cb(res.list)
21
- })
22
- .catch();
23
- }
24
- },
25
- {
26
- label: '订单确认页跳转路径:',
27
- ele: 'xd-select-pages-path',
28
- valueKey: 'orderConfirmPath',
29
- placeholder: '请选择路径',
30
- groupKey:'advanced',
31
- className: 'input80',
32
- value: data.orderConfirmPath || null,
33
- setting: {
34
- router: XdBus.getParentApi('getPagesTree'),
35
- },
36
- inline: false,
37
- },
38
- {
39
- label: '商品详情跳转路径:',
40
- ele: 'xd-select-pages-path',
41
- valueKey: 'productInfoPath',
42
- placeholder: '请选择详情路径',
43
- className: 'input80',
44
- value: data.productInfoPath || null,
45
- groupKey:'advanced',
46
- setting: {
47
- router: XdBus.getParentApi('getPagesTree'),
48
- },
49
- inline: false,
50
- },
51
- {
52
- label: '随便逛逛跳转路径:',
53
- ele: 'xd-select-pages-path',
54
- valueKey: 'viewPath',
55
- placeholder: '请选择路径',
56
- groupKey:'advanced',
57
- className: 'input80',
58
- value: data.viewPath || null,
59
- setting: {
60
- router: XdBus.getParentApi('getPagesTree'),
61
- },
62
- inline: false,
63
- },
64
-
65
-
66
- {
67
- label: "是否展示立即购买按钮",
68
- ele: 'xd-radio',
69
- valueKey: 'showBuyNow',
70
- value: data.showBuyNow || "Y",
71
- groupKey:'content',
72
- list: [
73
- {"label": "显示", "value": "Y"},
74
- {"label": "隐藏", "value": "N"},
75
- ]
76
- },
77
- {
78
- label: '是否标明活动价:',
79
- ele: 'xd-radio',
80
- valueKey: 'showActivityPrice',
81
- value: data['showActivityPrice'] || 'N',
82
- placeholder: '请选择是否标明活动价',
83
- groupKey:'content',
84
- multiple: false,
85
- className: 'input80',
86
- list: [
87
- {label: '是', value: 'Y'},
88
- {label: '否', value: 'N'},
89
- ]
90
- },
91
- {
92
- label: '购物车状态(只是预览模式生效)',
93
- ele: "xd-radio",
94
- valueKey: "cartListStatus",
95
- value: data.cartListStatus || "Y",
96
- groupKey:'content',
97
- list: [
98
- {label: '有商品列表', value: "Y"},
99
- {label: '空购物车', value: "N"},
100
- ],
101
- },
102
- {
103
- label: "无商品时是否展示随便逛逛入口:",
104
- ele: "xd-radio",
105
- valueKey: "isShowView",
106
- value: data.isShowView || "N",
107
- list: [
108
- { label: "展示", value: "Y" },
109
- { label: "隐藏", value: "N" }
110
- ],
111
- groupKey: "content",
112
- },
113
- {
114
- label: '随便逛逛文案:',
115
- ele: 'el-input',
116
- type: 'text',
117
- valueKey: 'view_name',
118
- groupKey:'content',
119
- value: data.view_name || '',
120
- placeholder: '请输入随便逛逛文案',
121
- className: 'input80',
122
- inline: false,
123
- notice: '当未设置文案时,页面默认展示为"<span style="color:red">随便逛逛</span>",建议不超过<span style="color:red">4</span>个汉字'
124
- },
125
- {
126
- label: '品牌文字颜色:',
127
- ele: 'xd-color',
128
- valueKey: 'brandTextColor',
129
- groupKey:'style',
130
- value: data['brandTextColor'] || null,
131
- placeholder: '请选择品牌文字颜色',
132
- classNmae: 'input80',
133
- },
134
- {
135
- label: "活动价提示文案颜色:",
136
- ele: "xd-color",
137
- valueKey: "activityPriceTextColor",
138
- groupKey:'style',
139
- value: data['activityPriceTextColor'] || null,
140
- placeholder: '请选择活动价提示文案颜色',
141
- className: 'input80',
142
- },
143
- {
144
- label: "列表样式配置",
145
- ele: "title",
146
- size: "small",
147
- groupKey: "style"
148
- },
149
- {
150
- label: "列表容器背景色:",
151
- ele: "xd-color",
152
- valueKey: "listContainerBgColor",
153
- value: data['listContainerBgColor'] || null,
154
- className: 'input80',
155
- groupKey: "style"
156
- },
157
- {
158
- label: "列表容器外边距:",
159
- ele: "xd-margin-padding",
160
- valueKey: 'listMargin',
161
- value: data['listMargin'] || null,
162
- groupKey:'style',
163
- setting: {
164
- type: 'padding',
165
- },
166
- placeholder: '请设置边距',
167
- inline: false,
168
- notice: '填充内边距,<span style="color: red">单位:像素</span>。默认值:0像素',
169
- },
170
- {
171
- label: "列表单项背景色:",
172
- ele: "xd-color",
173
- valueKey: "listItemBgColor",
174
- value: data['listItemBgColor'] || null,
175
- className: 'input80',
176
- groupKey: "style",
177
- },
178
- {
179
- label: "列表单项边框:",
180
- ele: "xd-border",
181
- valueKey: "listItemBorder",
182
- value: data['listItemBorder'] || null,
183
- groupKey:'style',
184
- },
185
- {
186
- label: "列表单项阴影:",
187
- ele: "xd-shadow",
188
- valueKey: "listItemShadow",
189
- value: data.listItemShadow || {},
190
- groupKey:'style',
191
- handleCustom({action, data}) {
192
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
193
- .then(res => {
194
- data.cb(res.list)
195
- })
196
- .catch(error => {
197
- console.error(error);
198
- data.cb([])
199
- });
200
- },
201
- },
202
- {
203
- label: '列表单项圆角:',
204
- ele: 'xd-site-select-list',
205
- valueKey: 'listItemRadius',
206
- groupKey:'style',
207
- value: data['listItemRadius'] || 0,
208
- placeholder: '请选择内容圆角设置',
209
- multiple: false,
210
- className: 'input80',
211
- handleCustom({action, data}) {
212
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
213
- .then(res => {
214
- data.cb(res.list)
215
- })
216
- .catch(error => {
217
- console.error(error);
218
- });
219
- },
220
- },
221
- {
222
- label: "列表单项间距:",
223
- ele: "el-input",
224
- type: 'number',
225
- groupKey:'style',
226
- valueKey: 'listItemSpacing',
227
- value: data['listItemSpacing'] || '',
228
- placeholder: '请输入列表单项间距',
229
- className: 'input50',
230
- },
231
- {
232
- label: "计数器配置",
233
- ele: "title",
234
- size: "small",
235
- groupKey: "style"
236
- },
237
- {
238
- label: "计数器容器边框:",
239
- ele: "xd-border",
240
- valueKey: "counterBorder",
241
- value: data['counterBorder'] || null,
242
- groupKey:'style',
243
- },
244
- {
245
- label: "计数器容器圆角:",
246
- ele: "xd-site-select-list",
247
- valueKey: 'counterRadius',
248
- groupKey:'style',
249
- value: data['counterRadius'] || 0,
250
- placeholder: '请选择内容圆角设置',
251
- multiple: false,
252
- className: 'input80',
253
- handleCustom({action, data}) {
254
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
255
- .then(res => {
256
- data.cb(res.list)
257
- })
258
- .catch(
259
- error => {
260
- console.error(error);
261
- });
262
- },
263
- hidden: data.counterBorder && data.counterBorder.type !== 'Y'
264
- },
265
- {
266
- label: "计数器数字颜色:",
267
- ele: "xd-color",
268
- valueKey: "counterTextColor",
269
- groupKey:'style',
270
- value: data['counterTextColor'] || '#000000',
271
- },
272
- {
273
- label: "+-按钮背景色:",
274
- ele: "xd-color",
275
- valueKey: "counterBtnBgColor",
276
- groupKey:'style',
277
- value: data['counterBtnBgColor'] || '#f8f8f8',
278
- className: 'input80',
279
- },
280
- {
281
- label: "+-按钮禁用背景色(disabled):",
282
- ele: "xd-color",
283
- valueKey: "counterBtnDisabledBgColor",
284
- groupKey:'style',
285
- value: data['counterBtnDisabledBgColor'] || '#f8f8f8',
286
- className: 'input80',
287
- setting: {
288
- showAlpha: true,
289
- // isAlpha: true,
290
- }
291
- },
292
- {
293
- label: "+-按钮文字颜色:",
294
- ele: "xd-color",
295
- valueKey: "counterBtnTextColor",
296
- groupKey:'style',
297
- value: data['counterBtnTextColor'] || '#333',
298
- className: 'input80',
299
- },
300
- {
301
- label: "+-按钮禁用文字颜色(disabled):",
302
- ele: "xd-color",
303
- valueKey: "counterBtnDisabledTextColor",
304
- groupKey:'style',
305
- value: data['counterBtnDisabledTextColor'] || '#999',
306
- className: 'input80',
307
- setting: {
308
- showAlpha: true,
309
- // isAlpha: true,
310
- }
311
- },
312
- {
313
- label: "标题配置",
314
- ele: "title",
315
- size: "small",
316
- groupKey: "style"
317
- },
318
- {
319
- label: '标题背景颜色:',
320
- ele: 'xd-color',
321
- groupKey:'style',
322
- valueKey: 'backgroundColor',
323
- value: data['backgroundColor'] || null,
324
- placeholder: '请选择标题背景颜色',
325
- classNmae: 'input80',
326
- },
327
- {
328
- label: '标题颜色:',
329
- ele: 'xd-color',
330
- groupKey:'style',
331
- valueKey: 'titleColor',
332
- value: data['titleColor'] || null,
333
- placeholder: '请选择标题颜色',
334
- classNmae: 'input80',
335
- },
336
- {
337
- label: "编辑字体颜色:",
338
- ele: "xd-color",
339
- valueKey: "editColor",
340
- groupKey:'style',
341
- value: data['editColor'] || null,
342
- placeholder: '请选择编辑字体颜色',
343
- },
344
- {
345
- label: '编辑选中颜色:',
346
- ele: 'xd-color',
347
- groupKey:'style',
348
- valueKey: 'titleActColor',
349
- value: data['titleActColor'] || null,
350
- placeholder: '请选择标题选中颜色',
351
- classNmae: 'input80',
352
- },
353
- {
354
- label: '标题与列表之间间距:',
355
- ele: 'el-input',
356
- type: 'number',
357
- groupKey:'style',
358
- valueKey: 'padding',
359
- value: data.padding || '',
360
- placeholder: '请输入标题与列表之间间距',
361
- className: 'input50',
362
- },
363
- {
364
- label: '标题是否有投影:',
365
- ele: 'xd-radio',
366
- groupKey:'style',
367
- valueKey: 'is_shadow',
368
- value: data['is_shadow'] || 'N',
369
- placeholder: '请选择是否投影',
370
- multiple: false,
371
- className: 'input80',
372
- list: [
373
- {label: '是', value: 'Y'},
374
- {label: '否', value: 'N'},
375
- ]
376
- },
377
- data['is_shadow'] === 'Y' && {
378
- label: '标题投影颜色:',
379
- ele: 'xd-color',
380
- groupKey:'style',
381
- valueKey: 'is_shadow_bg',
382
- value: data['is_shadow_bg'] || '',
383
- placeholder: '请选择投影颜色',
384
- classNmae: 'input80',
385
- },
386
- data['is_shadow'] === 'Y' && {
387
- label: '标题投影范围:',
388
- groupKey:'style',
389
- ele: 'xd-site-select-list',
390
- valueKey: 'is_shadow_w',
391
- value: data['is_shadow_w'] || '10',
392
- placeholder: '请选择投影范围',
393
- multiple: false,
394
- className: 'input80',
395
- handleCustom({action, data}) {
396
- XdBus.getParentApi('getOptionsSettingList')({
397
- setting_id: 'edtix_style_radius',
398
- key: Date.now()
399
- })
400
- .then(res => {
401
- data.cb(res.list)
402
- })
403
- .catch(error => {
404
- console.error(error);
405
- });
406
- },
407
- },
408
- {
409
- label: '标题是否有下边框:',
410
- ele: 'xd-radio',
411
- valueKey: 'is_border',
412
- groupKey:'style',
413
- value: data['is_border'] || 'N',
414
- placeholder: '请选择是否有下边框',
415
- multiple: false,
416
- className: 'input80',
417
- list: [
418
- {label: '是', value: 'Y'},
419
- {label: '否', value: 'N'},
420
- ]
421
- },
422
- data['is_border'] === 'Y' && {
423
- label: '标题边框颜色:',
424
- ele: 'xd-color',
425
- valueKey: 'is_border_c',
426
- groupKey:'style',
427
- value: data['is_border_c'] || '',
428
- placeholder: '请选择标题边框颜色',
429
- classNmae: 'input80',
430
- },
431
- data['is_border'] === 'Y' && {
432
- label: '标题边框大小:',
433
- ele: 'el-input',
434
- type: 'number',
435
- groupKey:'style',
436
- valueKey: 'is_border_w',
437
- value: data['is_border_w'] || '',
438
- placeholder: '请输入标题边框大小',
439
- className: 'input80',
440
- },
441
- {
442
- label: "底部操作区域样式配置",
443
- ele: "title",
444
- size: 'small',
445
- groupKey: 'style',
446
- },
447
- {
448
- label: "容器内边距:",
449
- ele: "xd-margin-padding",
450
- valueKey: 'bottomPadding',
451
- value: data['bottomPadding'] || null,
452
- groupKey:'style',
453
- setting: {
454
- type: 'padding',
455
- },
456
- placeholder: '请设置边距',
457
- inline: false,
458
- notice: '填充内边距,<span style="color: red">单位:像素</span>。默认值:20像素',
459
- },
460
- {
461
- label: "操作按钮圆角: ",
462
- ele: 'xd-site-select-list',
463
- valueKey: 'bottomBtnRadius',
464
- groupKey:'style',
465
- value: data['bottomBtnRadius'] || 30,
466
- placeholder: '请选择内容圆角设置',
467
- multiple: false,
468
- className: 'input80',
469
- handleCustom({action, data}) {
470
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
471
- .then(res => {
472
- data.cb(res.list)
473
- })
474
- .catch(error => {
475
- console.error(error);
476
- });
477
- },
478
- },
479
- {
480
- label: "操作按钮高度: ",
481
- ele: 'el-input',
482
- type: 'number',
483
- valueKey: 'bottomBtnHeight',
484
- groupKey:'style',
485
- value: data['bottomBtnHeight'] || 60,
486
- placeholder: '请输入操作按钮高度',
487
- className: 'input80',
488
- },
9
+ advanced: [],
10
+ content: (data, gValue, gColor, oldData={})=>{
489
11
 
12
+ return [
13
+ ...content(data, gValue,gColor,oldData),
14
+ ...style(data, gValue,gColor,oldData),
15
+ ...advanced(data),
490
16
  ].filter(i=>i)
491
17
  },
492
- advanced: [
493
-
494
- ],
495
- };
496
-
18
+ }