jufubao-mall 2.0.21 → 2.0.23-beta1

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 (60) hide show
  1. package/package.json +1 -1
  2. package/src/components/CusProduct/CusProduct.vue +1 -1
  3. package/src/components/JfbMallBrandWall/Attr.js +10 -449
  4. package/src/components/JfbMallBrandWall/JfbMallBrandWall.vue +783 -308
  5. package/src/components/JfbMallBrandWall/cusAttr/advanced.js +61 -0
  6. package/src/components/JfbMallBrandWall/cusAttr/brand.js +341 -0
  7. package/src/components/JfbMallBrandWall/cusAttr/content.js +251 -0
  8. package/src/components/JfbMallBrandWall/cusAttr/style.js +252 -0
  9. package/src/components/JfbMallBrandWall/cusAttr/tab.js +471 -0
  10. package/src/components/JfbMallHomeProductList/JfbMallHomeProductList.vue +3 -1
  11. package/src/components/JfbMallHomeProductList/cusAttr/content.js +1 -2
  12. package/src/components/JfbMallNetworkMedia/Api.js +58 -0
  13. package/src/components/JfbMallNetworkMedia/Attr.js +20 -0
  14. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMedia.vue +84 -0
  15. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaLess.less +80 -0
  16. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaMixin.js +30 -0
  17. package/src/components/JfbMallNetworkMedia/Mock.js +13 -0
  18. package/src/components/JfbMallNetworkMedia/cusAttr/advanced.js +60 -0
  19. package/src/components/JfbMallNetworkMedia/cusAttr/content.js +125 -0
  20. package/src/components/JfbMallNetworkMedia/cusAttr/filter.js +333 -0
  21. package/src/components/JfbMallNetworkMedia/cusAttr/font.js +114 -0
  22. package/src/components/JfbMallNetworkMedia/cusAttr/icon.js +298 -0
  23. package/src/components/{JfbMallProductList → JfbMallNetworkMedia/cusAttr}/style.js +15 -50
  24. package/src/components/JfbMallProductInfo/JfbMallProductInfo.vue +27 -23
  25. package/src/components/JfbMallProductInfo/cusAttr/content.js +1 -1
  26. package/src/components/JfbMallProductInfoV2/Api.js +1 -1
  27. package/src/components/JfbMallProductInfoV2/Attr.js +134 -41
  28. package/src/components/JfbMallProductInfoV2/JfbMallProductInfoV2.vue +136 -127
  29. package/src/components/JfbMallProductInfoV2/Mock.js +38 -10
  30. package/src/components/JfbMallProductList/Api.js +7 -7
  31. package/src/components/JfbMallProductList/Attr.js +7 -762
  32. package/src/components/JfbMallProductList/ComFilterQuery.vue +950 -0
  33. package/src/components/JfbMallProductList/JfbMallProductList.vue +807 -792
  34. package/src/components/JfbMallProductList/Mock.js +168 -255
  35. package/src/components/JfbMallProductList/XdCateV1.vue +335 -122
  36. package/src/components/JfbMallProductList/XdCateV2.vue +144 -76
  37. package/src/components/JfbMallProductList/XdQueryCommon.vue +189 -0
  38. package/src/components/JfbMallProductList/XdQueryFilter.vue +94 -76
  39. package/src/components/JfbMallProductList/XdQuerySort.vue +100 -109
  40. package/src/components/JfbMallProductList/cateMixins.js +103 -0
  41. package/src/components/JfbMallProductList/{advanced.js → cusAttr/advanced.js} +12 -4
  42. package/src/components/JfbMallProductList/cusAttr/content.js +465 -0
  43. package/src/components/JfbMallProductList/cusAttr/filter.js +333 -0
  44. package/src/components/JfbMallProductList/cusAttr/font.js +114 -0
  45. package/src/components/JfbMallProductList/cusAttr/icon.js +298 -0
  46. package/src/components/JfbMallProductList/cusAttr/style.js +91 -0
  47. package/src/components/JfbMallRecommendProduct/Attr.js +8 -366
  48. package/src/components/JfbMallRecommendProduct/JfbMallRecommendProduct.vue +218 -187
  49. package/src/components/JfbMallRecommendProduct/Mock.js +236 -693
  50. package/src/components/JfbMallRecommendProduct/cusAttr/advanced.js +79 -0
  51. package/src/components/JfbMallRecommendProduct/cusAttr/content.js +202 -0
  52. package/src/components/JfbMallRecommendProduct/cusAttr/style.js +594 -0
  53. package/src/components/JfbMallResourceShopList/Mock.js +4 -6
  54. package/src/components/JfbMallTestNormal/JfbMallTestNormal.vue +23 -2
  55. package/src/components/JfbMallTestNormal/data.js +152 -0
  56. package/src/mixins/componentsMixins.js +1 -0
  57. package/src/mixins/productCompMixins.js +29 -19
  58. package/src/components/JfbMallProductList/PosterAttr.js +0 -327
  59. package/src/components/JfbMallProductList/ProductAttr.js +0 -164
  60. package/src/components/JfbMallProductList/XdQueryBrand.vue +0 -150
@@ -0,0 +1,333 @@
1
+ 'use strict';
2
+
3
+ import {cRaBorShadow, dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
4
+
5
+ export default (data, gValue, gColor, oldData)=>{
6
+ let filterTopBorder = cRaBorShadow(data , 'filterTopBorder',{dValue:'D'}, gValue)
7
+ let filterBgcColor = '#fff';
8
+ if(gValue.isAdd && gValue.isFirst) {
9
+ if(data['category'] === 'v4') filterBgcColor = '#f8f8f8';
10
+ }
11
+ return [
12
+ {
13
+ ele: 'title',
14
+ label: '筛选项样式',
15
+ size: 'small',
16
+ groupKey:'style',
17
+ },
18
+
19
+ {
20
+ ele:'xd-line-title',
21
+ groupKey:'style',
22
+ label: '横向菜单'
23
+ },
24
+ {
25
+ label: '上边框',
26
+ ele: 'xd-border',
27
+ labelInline: true,
28
+ groupKey:'style',
29
+ valueKey: 'filterTopBorder',
30
+ value: filterTopBorder,
31
+ className: 'input100',
32
+ setting: {
33
+ selected: filterTopBorder.type,//设置默认选中项
34
+ isRadio:true,//启用editx默认
35
+ isDef: true,//启动默认选项
36
+ //设置默认值
37
+ default: {
38
+ color: '#f8f8f8',
39
+ width: '2',
40
+ type: 'solid'
41
+ }
42
+ },
43
+ handleCustom({action, data}) {
44
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
45
+ .then(res => {
46
+ res.list = res.list.filter(item=>{
47
+ return item.label !== '无';
48
+ });
49
+ data.cb(res.list)
50
+ })
51
+ .catch(error => {
52
+ console.error(error);
53
+ data.cb([])
54
+ });
55
+ },
56
+ },
57
+
58
+ {
59
+ label: '背景颜色',
60
+ ele: 'xd-radio',
61
+ groupKey: 'style',
62
+ valueKey: 'filterBgcColorStatus',
63
+ value: statusDataVal({data, key:'filterBgcColorStatus', fields:['filterBgcColor'],gValue}),
64
+ labelInline:true,
65
+ list: [
66
+ {label: '默认', value: 'D'},
67
+ {label: '自定义', value: 'C'},
68
+ ]
69
+ },
70
+ {ele: 'group_start'},
71
+ {
72
+ label: '',
73
+ ele: 'xd-color',
74
+ valueKey: 'filterBgcColor',
75
+ groupKey:'style',
76
+ value: dataVal({data, key:'filterBgcColor', dValue:filterBgcColor, gValue}),
77
+ hidden: !statusShow({data, key: 'filterBgcColorStatus', fields:['filterBgcColor'], gValue}),
78
+ classNmae: 'input80',
79
+ setting: {
80
+ showAlpha: true
81
+ },
82
+ },
83
+ {ele: 'group_end'},
84
+
85
+ {
86
+ label: '选项颜色',
87
+ ele: 'xd-radio',
88
+ groupKey: 'style',
89
+ valueKey: 'filterColorStatus',
90
+ value: statusDataVal({data, key:'filterColorStatus', fields:['filterColor'],gValue}),
91
+ labelInline:true,
92
+ list: [
93
+ {label: '默认', value: 'D'},
94
+ {label: '自定义', value: 'C'},
95
+ ]
96
+ },
97
+ {ele: 'group_start'},
98
+ {
99
+ label: '',
100
+ ele: 'xd-color',
101
+ valueKey: 'filterColor',
102
+ groupKey:'style',
103
+ value: dataVal({data, key:'filterColor', dValue:'#333', gValue}),
104
+ hidden: !statusShow({data, key: 'filterColorStatus', fields:['filterColor'], gValue}),
105
+ classNmae: 'input80',
106
+ setting: {
107
+ showAlpha: true
108
+ },
109
+ },
110
+ {ele: 'group_end'},
111
+
112
+ {
113
+ label: '内边距',
114
+ ele: 'xd-radio',
115
+ groupKey: 'style',
116
+ valueKey: 'filterPaddingStatus',
117
+ value: statusDataVal({data, key:'filterPaddingStatus', fields:['filterPadding'],gValue}),
118
+ labelInline:true,
119
+ list: [
120
+ {label: '默认', value: 'D'},
121
+ {label: '自定义', value: 'C'},
122
+ ]
123
+ },
124
+ {ele: 'group_start'},
125
+ {
126
+ label: '',
127
+ ele: 'xd-margin-padding',
128
+ groupKey:'style',
129
+ valueKey: 'filterPadding',
130
+ value: dataVal({
131
+ data,
132
+ key:'filterPadding',
133
+ dValue:16,
134
+ gValue,
135
+ isPM: true,
136
+ }),
137
+ hidden: !statusShow({data, key: 'filterPaddingStatus', fields:['filterPadding'], gValue}),
138
+ setting: {
139
+ type: 'margin',
140
+ },
141
+ },
142
+ {ele: 'group_end'},
143
+
144
+ {
145
+ ele:'xd-line-title',
146
+ groupKey:'style',
147
+ label: '下拉菜单'
148
+ },
149
+
150
+ {
151
+ label: '行间距',
152
+ ele: 'xd-radio',
153
+ groupKey: 'style',
154
+ valueKey: 'filterRowSpacingStatus',
155
+ value: statusDataVal({data, key:'filterRowSpacingStatus', fields:['filterRowSpacing'],gValue}),
156
+ labelInline:true,
157
+ list: [
158
+ {label: '默认', value: 'D'},
159
+ {label: '自定义', value: 'C'},
160
+ ]
161
+ },
162
+ {ele: 'group_start'},
163
+ {
164
+ label: "行间距",
165
+ groupKey: 'style',
166
+ ele: 'xd-slider',
167
+ valueKey: "filterRowSpacing",
168
+ value: dataVal({data, key:'filterRowSpacing', dValue:gValue.isFirst && gValue.isAdd ? 16: 20, gValue}),
169
+ hidden: !statusShow({data, key: 'filterRowSpacingStatus', fields:['filterRowSpacing'], gValue}),
170
+ className: "input80",
171
+ labelInline: true,
172
+ setting:{
173
+ min: 0,
174
+ max: 60,
175
+ step:1,
176
+ showStops:false,
177
+ showInput:false,
178
+ }
179
+ },
180
+ {ele: 'group_end'},
181
+
182
+ {
183
+ label: '背景颜色',
184
+ ele: 'xd-radio',
185
+ groupKey: 'style',
186
+ valueKey: 'filterListColorStatus',
187
+ value: statusDataVal({data, key:'filterListColorStatus', fields:['filterListColor'],gValue}),
188
+ labelInline:true,
189
+ list: [
190
+ {label: '默认', value: 'D'},
191
+ {label: '自定义', value: 'C'},
192
+ ]
193
+ },
194
+ {ele: 'group_start'},
195
+ {
196
+ label: '',
197
+ ele: 'xd-color',
198
+ valueKey: 'filterListColor',
199
+ groupKey:'style',
200
+ value: dataVal({data, key:'filterListColor', dValue:gValue.isAdd && gValue.isFirst ? '#fff':'#f8f8f8', gValue}),
201
+ hidden: !statusShow({data, key: 'filterListColorStatus', fields:['filterListColor'], gValue}),
202
+ classNmae: 'input80',
203
+ setting: {
204
+ showAlpha: true
205
+ },
206
+ },
207
+ {ele: 'group_end'},
208
+
209
+
210
+ {
211
+ label: '圆角',
212
+ ele: 'xd-radio',
213
+ groupKey: 'style',
214
+ valueKey: 'filterListRadiusStatus',
215
+ value: statusDataVal({data, key:'filterListRadiusStatus', fields:['filterListRadius'],gValue}),
216
+ labelInline:true,
217
+ list: [
218
+ {label: '默认', value: 'D'},
219
+ {label: '无圆角', value: 'N'},
220
+ {label: '自定义', value: 'C'},
221
+ ]
222
+ },
223
+ {ele: 'group_start'},
224
+ {
225
+ label: '',
226
+ ele: 'xd-site-select-list',
227
+ labelInline: true,
228
+ valueKey: 'filterListRadius',
229
+ value: dataVal({data, key:'filterListRadius', dValue:gValue.isAdd && gValue.isFirst?'10':'60', gValue}),
230
+ hidden: !statusShow({data, key: 'filterListRadiusStatus', fields:['filterListRadius'], gValue}),
231
+ placeholder: '请选择图标圆角',
232
+ multiple: false,
233
+ className: 'input80',
234
+ groupKey:'style',
235
+ handleCustom({action, data}) {
236
+ XdBus.getParentApi('getOptionsSettingList')({
237
+ setting_id: 'edtix_style_radius',
238
+ key: Date.now()
239
+ })
240
+ .then(res => {
241
+ let list = (res.list || [])
242
+ .filter(item=>{
243
+ return item.label !== '无'
244
+ });
245
+ data.cb(list)
246
+ })
247
+ .catch(error => {
248
+ console.error(error);
249
+ });
250
+ },
251
+ },
252
+ {ele: 'group_end'},
253
+
254
+ {
255
+ label: '内边距',
256
+ ele: 'xd-radio',
257
+ groupKey: 'style',
258
+ valueKey: 'filterListPaddingStatus',
259
+ value: statusDataVal({data, key:'filterListPaddingStatus', fields:['filterListPadding'],gValue}),
260
+ labelInline:true,
261
+ list: [
262
+ {label: '默认', value: 'D'},
263
+ {label: '自定义', value: 'C'},
264
+ ]
265
+ },
266
+ {ele: 'group_start'},
267
+ {
268
+ label: '',
269
+ ele: 'xd-margin-padding',
270
+ groupKey:'style',
271
+ valueKey: 'filterListPadding',
272
+ value: dataVal({
273
+ data,
274
+ key:'filterListPadding',
275
+ dValue:gValue.isAdd && gValue.isFirst ? {top: 32, left: 48, right: 48, bottom: 32}:20,
276
+ gValue,
277
+ isPM: true,
278
+ }),
279
+ hidden: !statusShow({data, key: 'filterListPaddingStatus', fields:['filterListPadding'], gValue}),
280
+ setting: {
281
+ type: 'margin',
282
+ },
283
+ },
284
+ {ele: 'group_end'},
285
+
286
+ {
287
+ label: '文字按钮',
288
+ ele: 'xd-radio',
289
+ groupKey: 'style',
290
+ valueKey: 'filterFontStyleStatus',
291
+ value: statusDataVal({data, key:'filterFontStyleStatus', fields:['filterFontStyle'],gValue}),
292
+ labelInline:true,
293
+ list: [
294
+ {label: '默认', value: 'D'},
295
+ {label: '自定义', value: 'C'},
296
+ ]
297
+ },
298
+ {ele: 'group_start'},
299
+ {
300
+ label: '',
301
+ ele: 'xd-text-and-bgc',
302
+ groupKey:'style',
303
+ valueKey: 'filterFontStyle',
304
+ value: dataVal({data, key:'filterFontStyle', dValue:{}, gValue}),
305
+ hidden: !statusShow({data, key: 'filterFontStyleStatus', fields:['filterFontStyle'], gValue}),
306
+ setting: {
307
+ fontSize: true,
308
+ weight:false,
309
+ bgColor:false,
310
+ selected:true,
311
+ default:{
312
+ color: '#666',
313
+ fontSize:'24rpx',
314
+ actFontSize:'24rpx',
315
+ actColor: gColor.mainColor,
316
+ }
317
+ },
318
+ handleCustom({action, data}) {
319
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
320
+ .then(res => {
321
+ data.cb(res.list)
322
+ })
323
+ .catch(error => {
324
+ console.error(error);
325
+ data.cb([])
326
+ });
327
+ },
328
+ },
329
+ {ele: 'group_end'},
330
+
331
+
332
+ ].filter(i=>i)
333
+ }
@@ -0,0 +1,114 @@
1
+ 'use strict';
2
+
3
+ import {dataVal, isObject, statusDataVal, statusShow} from "@/utils/AttrTools";
4
+ const Color = require('color');
5
+
6
+ export default (data, gValue, gColor, oldData)=>{
7
+
8
+ //兼容
9
+ let titleStyleColor = '#333'
10
+ if(data.titleColor) titleStyleColor = data.titleColor;
11
+ if(isObject(data.titleStyle) && data.titleStyle.color) titleStyleColor = data.titleStyle.color;
12
+ let disabled = !['v1','v2', 'v5'].includes(data['category']);
13
+
14
+ return [
15
+ {
16
+ ele: 'title',
17
+ label: '分类-文字区样式',
18
+ size: 'small',
19
+ groupKey:'style',
20
+ hidden: disabled
21
+ },
22
+ {
23
+ label: '导航背景',
24
+ ele: 'xd-radio',
25
+ groupKey: 'style',
26
+ valueKey: 'titleBgColorStatus',
27
+ value: statusDataVal({data, key:'titleBgColorStatus', fields:['titleBgColor'],gValue}),
28
+ labelInline:true,
29
+ hidden: disabled,
30
+ list: [
31
+ {label: '默认', value: 'D'},
32
+ {label: '自定义', value: 'C'},
33
+ ]
34
+ },
35
+ {ele: 'group_start'},
36
+ {
37
+ label: '',
38
+ ele: 'xd-color',
39
+ valueKey: 'titleBgColor',
40
+ groupKey:'style',
41
+ value: dataVal({data, key:'titleBgColor', dValue:'#fff', gValue}),
42
+ hidden: !statusShow({data, key: 'titleBgColorStatus', fields:['titleBgColor'], gValue}) || disabled,
43
+ classNmae: 'input80',
44
+
45
+ setting: {
46
+ showAlpha: true
47
+ },
48
+ },
49
+ {ele: 'group_end'},
50
+
51
+ {
52
+ label: '名称样式',
53
+ ele: 'xd-radio',
54
+ groupKey: 'style',
55
+ valueKey: 'titleStyleStatus',
56
+ value: statusDataVal({data, key:'titleStyleStatus', fields:['titleStyle','titleColor'],gValue}),
57
+ labelInline:true,
58
+ hidden: disabled,
59
+ list: [
60
+ {label: '默认', value: 'D'},
61
+ {label: '自定义', value: 'C'},
62
+ ]
63
+ },
64
+ {ele: 'group_start'},
65
+ {
66
+ label: '',
67
+ ele: 'xd-text-and-bgc',
68
+ groupKey:'style',
69
+ valueKey: 'titleStyle',
70
+ value: dataVal({data, key:'titleStyle', dValue:{}, gValue}),
71
+ hidden: !statusShow({data, key: 'titleStyleStatus', fields:['titleStyle','titleColor'], gValue}) || disabled,
72
+ setting: {
73
+ fontSize: true,
74
+ weight:true,
75
+ bgColor:true,
76
+ selected:true,
77
+ default:{
78
+ color: titleStyleColor,
79
+ fontSize:gValue.isAdd && gValue.isFirst?'32':'30',
80
+ bgColor:'#f8f8f8',
81
+ fontWeight:gValue.isAdd && gValue.isFirst?'400':'normal',
82
+ actFontSize:gValue.isAdd && gValue.isFirst?'32':'30',
83
+ actColor: gColor.mainColor,
84
+ actFontWeight:gValue.isAdd && gValue.isFirst?'500':'normal',
85
+ actBgColor: Color(gColor.mainColor).alpha(0.15).toString()
86
+ }
87
+ },
88
+ handleCustom({action, data}) {
89
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
90
+ .then(res => {
91
+ data.cb(res.list)
92
+ })
93
+ .catch(error => {
94
+ console.error(error);
95
+ data.cb([])
96
+ });
97
+ },
98
+ },
99
+ {ele: 'group_end'},
100
+
101
+ //废弃不可删除(已做兼容)
102
+ {
103
+ label: '文字颜色:',
104
+ ele: 'xd-color',
105
+ valueKey: 'titleColor',
106
+ groupKey:'style',
107
+ value: data['titleColor'] || '',
108
+ placeholder: '请选择文字颜色',
109
+ classNmae: 'input80',
110
+ hidden:true,
111
+ },
112
+ //废弃不可删除(已做兼容)
113
+ ].filter(i=>i)
114
+ }