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,298 @@
1
+ 'use strict';
2
+
3
+ import {cRaBorShadow, dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
4
+
5
+ export default (data, gValue, gColor, oldData)=>{
6
+ let level2NameStatus = statusDataVal({data, key:'level2NameStatus', fields:['level2Name','level2Color'],gValue});
7
+ let level2Name = {
8
+ fontSize: '24',
9
+ actFontSize: '24',
10
+ color: '#333',
11
+ actColor: gColor.mainColor,
12
+ bgColor:'',
13
+ actBgColor:'',
14
+ fontWeight: 'normal',
15
+ actFontWeight: 'normal',
16
+ borderStyle:'solid',
17
+ borderColor: 'rgba(0,0,0,0)',
18
+ borderWidth: 0,
19
+ borderActStyle:'solid',
20
+ borderActColor: 'rgba(0,0,0,0)',
21
+ borderActWidth: 0,
22
+ }
23
+ // if(data['subTitleIconBorder'] !== undefined && data['subTitleIconBorder']['type'] === 'Y') {
24
+ // const value = data['subTitleIconBorder'].value;
25
+ // if(value.style) level2Name['borderStyle'] = value.style
26
+ // if(value.color) level2Name['borderColor'] = value.color
27
+ // if(value.width !== undefined) level2Name['borderWidth'] = value.width
28
+ // if(value.style) level2Name['borderActStyle'] = value.style
29
+ // if(value.color) level2Name['borderActColor'] = value.color
30
+ // if(value.width !== undefined) level2Name['borderActWidth'] = value.width
31
+ // data['subTitleIconBorder']['type'] = 'N'
32
+ // data['subTitleIconBorder']['value'] = {}
33
+ // }
34
+ let subTitleIconBorder = cRaBorShadow(data , 'subTitleIconBorder',{dValue:'D'}, gValue)
35
+ let disabled = !['v1','v2', 'v3', 'v4'].includes(data['category']);
36
+
37
+ return [
38
+ {
39
+ ele: 'title',
40
+ label: '分类-图标区样式',
41
+ size: 'small',
42
+ groupKey:'style',
43
+ hidden: disabled,
44
+ },
45
+
46
+ {
47
+ label: '导航背景',
48
+ ele: 'xd-radio',
49
+ groupKey: 'style',
50
+ valueKey: 'level2BgcColorStatus',
51
+ value: statusDataVal({data, key:'level2BgcColorStatus', fields:['level2BgcColor'],gValue}),
52
+ labelInline:true,
53
+ hidden: disabled,
54
+ list: [
55
+ {label: '默认', value: 'D'},
56
+ {label: '自定义', value: 'C'},
57
+ ]
58
+ },
59
+ {ele: 'group_start'},
60
+ {
61
+ label: '',
62
+ ele: 'xd-color',
63
+ valueKey: 'level2BgcColor',
64
+ groupKey:'style',
65
+ value: dataVal({data, key:'level2BgcColor', dValue:gValue.isAdd && gValue.isFirst?'#fff':'#f8f8f8', gValue}),
66
+ hidden: !statusShow({data, key: 'level2BgcColorStatus', fields:['level2BgcColor'], gValue}) || disabled,
67
+ classNmae: 'input80',
68
+ setting: {
69
+ showAlpha: true
70
+ },
71
+ },
72
+ {ele: 'group_end'},
73
+ {
74
+ label: '选中图描边',
75
+ ele: 'xd-border',
76
+ groupKey:'style',
77
+ valueKey: 'subTitleIconBorder',
78
+ value: subTitleIconBorder,
79
+ labelInline: true,
80
+ className: 'input100',
81
+ setting: {
82
+ selected: subTitleIconBorder.type,//设置默认选中项
83
+ isRadio: true,//启用editx默认
84
+ isDef: true, //启动默认选项
85
+ //==设置默认值==
86
+ color: gColor.mainColor,
87
+ width: '2',
88
+ style: 'solid'
89
+ //==设置默认值==
90
+ },
91
+ },
92
+ {
93
+ label: '图标圆角',
94
+ ele: 'xd-radio',
95
+ groupKey: 'style',
96
+ valueKey: 'subTitleRadiusStatus',
97
+ value: statusDataVal({data, key:'subTitleRadiusStatus', fields:['subTitleRadius'],gValue}),
98
+ labelInline:true,
99
+ hidden: disabled,
100
+ list: [
101
+ {label: '默认', value: 'D'},
102
+ {label: '无圆角', value: 'N'},
103
+ {label: '自定义', value: 'C'},
104
+ ]
105
+ },
106
+ {ele: 'group_start'},
107
+ {
108
+ label: '',
109
+ ele: 'xd-site-select-list',
110
+ labelInline: true,
111
+ valueKey: 'subTitleRadius',
112
+ value: dataVal({data, key:'subTitleRadius', dValue:'40rpx', gValue}),
113
+ hidden: !statusShow({data, key: 'subTitleRadiusStatus', fields:['subTitleRadius'], gValue}) || disabled,
114
+ placeholder: '请选择图标圆角',
115
+ multiple: false,
116
+ className: 'input80',
117
+ groupKey:'style',
118
+
119
+ handleCustom({action, data}) {
120
+ XdBus.getParentApi('getOptionsSettingList')({
121
+ setting_id: 'edtix_style_radius',
122
+ key: Date.now()
123
+ })
124
+ .then(res => {
125
+ let list = (res.list || [])
126
+ .map(item=>{
127
+ return {
128
+ ...item,
129
+ value: item.value + 'rpx',
130
+ }
131
+ })
132
+ .filter(item=>{
133
+ return item.label !== '无'
134
+ })
135
+ .concat([{label:'圆角',value: '50%'}]);
136
+ data.cb(list)
137
+ })
138
+ .catch(error => {
139
+ console.error(error);
140
+ });
141
+ },
142
+ },
143
+ {ele: 'group_end'},
144
+ {
145
+ label: '图标大小',
146
+ ele: 'xd-radio',
147
+ groupKey: 'style',
148
+ valueKey: 'iconWdithStatus',
149
+ value: statusDataVal({data, key:'iconWdithStatus', fields:['iconWdith'],gValue}),
150
+ labelInline:true,
151
+ list: [
152
+ {label: '默认', value: 'D'},
153
+ {label: '自定义', value: 'C'},
154
+ ]
155
+ },
156
+ {ele: 'group_start'},
157
+ {
158
+ label: "",
159
+ groupKey: 'style',
160
+ ele: 'xd-slider',
161
+ valueKey: "iconWdith",
162
+ value: dataVal({data, key:'iconWdith', dValue:96, gValue}),
163
+ hidden: !statusShow({data, key: 'iconWdithStatus', fields:['iconWdith'], gValue}),
164
+ className: "input80",
165
+ labelInline: true,
166
+ setting:{
167
+ min: 50,//最小值
168
+ max: 96, //最小值
169
+ step:1, //步长
170
+ showStops:false,//显示间断点
171
+ showInput:false,//显示输入框
172
+ },
173
+ },
174
+ {ele: 'group_end'},
175
+ {
176
+ label: '图标间距',
177
+ ele: 'xd-radio',
178
+ groupKey: 'style',
179
+ valueKey: 'iconImageSpStatus',
180
+ value: statusDataVal({data, key:'iconImageSpStatus', fields:['iconImageSp'],gValue}),
181
+ labelInline:true,
182
+ list: [
183
+ {label: '默认', value: 'D'},
184
+ {label: '自定义', value: 'C'},
185
+ ]
186
+ },
187
+ {ele: 'group_start'},
188
+ {
189
+ label: "",
190
+ groupKey: 'style',
191
+ ele: 'xd-slider',
192
+ valueKey: "iconImageSp",
193
+ value: dataVal({data, key:'iconImageSp', dValue:16, gValue}),
194
+ hidden: !statusShow({data, key: 'iconImageSpStatus', fields:['iconImageSp'], gValue}),
195
+ className: "input80",
196
+ labelInline: true,
197
+ setting:{
198
+ min: 1,//最小值
199
+ max: 64, //最小值
200
+ step:1, //步长
201
+ showStops:false,//显示间断点
202
+ showInput:false,//显示输入框
203
+ },
204
+ },
205
+ {ele: 'group_end'},
206
+ {
207
+ label: '图标背景',
208
+ ele: 'xd-radio',
209
+ groupKey: 'style',
210
+ valueKey: 'iconBgColorStatus',
211
+ value: statusDataVal({data, key:'iconBgColorStatus', fields:['iconBgColor'],gValue}),
212
+ labelInline:true,
213
+ list: [
214
+ {label: '默认', value: 'D'},
215
+ {label: '自定义', value: 'C'},
216
+ ]
217
+ },
218
+ {ele: 'group_start'},
219
+ {
220
+ label: '',
221
+ ele: 'xd-color',
222
+ valueKey: 'iconBgColor',
223
+ groupKey:'style',
224
+ value: dataVal({data, key:'iconBgColor', dValue:'#f8f8f8', gValue}),
225
+ hidden: !statusShow({data, key: 'iconBgColorStatus', fields:['iconBgColor'], gValue}),
226
+ classNmae: 'input80',
227
+ setting: {
228
+ showAlpha: true
229
+ },
230
+ },
231
+ {ele: 'group_end'},
232
+
233
+ {
234
+ label: '名称样式',
235
+ ele: 'xd-radio',
236
+ groupKey: 'style',
237
+ valueKey: 'level2NameStatus',
238
+ value: level2NameStatus,
239
+ labelInline:true,
240
+ hidden: disabled,
241
+ list: [
242
+ {label: '默认', value: 'D'},
243
+ {label: '自定义', value: 'C'},
244
+ ]
245
+ },
246
+ {ele: 'group_start'},
247
+ {
248
+ label: '',
249
+ ele: 'xd-text-and-bgc',
250
+ groupKey:'style',
251
+ valueKey: 'level2Name',
252
+ value: dataVal({data, key:'level2Name', dValue:'{}', gValue}),
253
+ hidden: !statusShow({data, key: 'level2NameStatus', fields:['level2Name','level2Color'], gValue}) || disabled,
254
+ setting: {
255
+ fontSize: true,
256
+ weight:false,
257
+ bgColor:true,
258
+ selected:true,
259
+ isBorder:false,
260
+ default: level2Name
261
+ },
262
+ handleCustom({action, data}) {
263
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
264
+ .then(res => {
265
+ data.cb(res.list)
266
+ })
267
+ .catch(error => {
268
+ console.error(error);
269
+ data.cb([])
270
+ });
271
+ },
272
+ },
273
+ {ele: 'group_end'},
274
+
275
+ {
276
+ label: '二级导航文字颜色:',
277
+ ele: 'xd-color',
278
+ valueKey: 'level2Color',
279
+ value: data['level2Color'] || '',
280
+ placeholder: '请选择二级导航文字颜色',
281
+ classNmae: 'input80',
282
+ groupKey:'style',
283
+ hidden: true
284
+ },
285
+
286
+ {
287
+ label: '上边框设置:',
288
+ ele: 'xd-border',
289
+ groupKey:'style',
290
+ valueKey: 'subTitleBorder',
291
+ value: data['subTitleBorder'] || '',
292
+ setting: {
293
+ selected:'N',
294
+ },
295
+ hidden: true
296
+ },
297
+ ].filter(i=>i)
298
+ }
@@ -0,0 +1,91 @@
1
+ 'use strict';
2
+
3
+ import {
4
+ dataVal ,
5
+ statusShow,
6
+ statusDataVal,
7
+ customVal,
8
+ cusDisabled ,
9
+ getCustomAttr,
10
+ } from "@/utils/AttrTools";
11
+
12
+ import font from "./font";
13
+ import icon from "./icon";
14
+ import filter from './filter';
15
+ import productStyle from "@/utils/Attr/productStyle";
16
+
17
+ export default function (data, gValue, gColor, oldData) {
18
+ return [
19
+ {
20
+ ele: 'title',
21
+ label: '内容区',
22
+ size: 'small',
23
+ groupKey:'style',
24
+ },
25
+ {
26
+ label: '内容区背景',
27
+ ele: 'xd-radio',
28
+ groupKey: 'style',
29
+ valueKey: 'contentColorStatus',
30
+ value: statusDataVal({data, key:'contentColorStatus', fields:['contentColor'],gValue}),
31
+ labelInline:true,
32
+ list: [
33
+ {label: '默认', value: 'D'},
34
+ {label: '自定义', value: 'C'},
35
+ ]
36
+ },
37
+ {ele: 'group_start'},
38
+ {
39
+ label: '',
40
+ ele: 'xd-color',
41
+ groupKey:'style',
42
+ valueKey: 'contentColor',
43
+ value: dataVal({data, key:'contentColor', dValue:gValue.isAdd && gValue.isFirst ? '#f8f8f8': '#fafafa', gValue}),
44
+ hidden: !statusShow({data, key: 'contentColorStatus', fields:['contentColor'], gValue}),
45
+ placeholder: '请选择背景颜色',
46
+ classNmae: 'input80',
47
+ setting: {
48
+ showAlpha: true
49
+ },
50
+ },
51
+ {ele: 'group_end'},
52
+
53
+ {
54
+ label: '内容区边距',
55
+ ele: 'xd-radio',
56
+ groupKey: 'style',
57
+ valueKey: 'listPaddingStatus',
58
+ value: statusDataVal({data, key:'listPaddingStatus', fields:['listPadding'],gValue}),
59
+ labelInline:true,
60
+ list: [
61
+ {label: '默认', value: 'D'},
62
+ {label: '自定义', value: 'C'},
63
+ ]
64
+ },
65
+ {ele: 'group_start'},
66
+ {
67
+ label: '',
68
+ ele: 'xd-margin-padding',
69
+ groupKey:'style',
70
+ valueKey: 'listPadding',
71
+ value: dataVal({
72
+ data,
73
+ key:'listPadding',
74
+ dValue:(gValue.isAdd && gValue.isFirst? ({top:16, left:16, right:16,bottom:0}) : 20),
75
+ gValue,
76
+ isPM: true,
77
+ }),
78
+ hidden: !statusShow({data, key: 'listPaddingStatus', fields:['listPadding'], gValue}),
79
+ setting: {
80
+ type: 'margin',
81
+ },
82
+ },
83
+ {ele: 'group_end'},
84
+
85
+ ...font(data, gValue, gColor, oldData),
86
+ ...icon(data, gValue, gColor, oldData),
87
+ ...filter(data, gValue, gColor, oldData),
88
+ ...productStyle(data, gValue, gColor, oldData, 'list')
89
+ ]
90
+ }
91
+