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 +1 -1
- package/src/components/JfbMallProductInfo/cusAttr/style.js +3 -0
- package/src/components/JfbMallSpecialHome/Attr.js +8 -584
- package/src/components/JfbMallSpecialHome/JfbMallSpecialHome.vue +230 -160
- package/src/components/JfbMallSpecialHome/Mock.js +90 -698
- package/src/components/JfbMallSpecialHome/cusAttr/advanced.js +38 -0
- package/src/components/JfbMallSpecialHome/cusAttr/content.js +319 -0
- package/src/components/JfbMallSpecialHome/cusAttr/style.js +983 -0
- package/src/components/JfbMallSpecialInfo/Attr.js +12 -383
- package/src/components/JfbMallSpecialInfo/JfbMallSpecialInfo.vue +107 -68
- package/src/components/JfbMallSpecialInfo/Mock.js +0 -177
- package/src/components/JfbMallSpecialInfo/cusAttr/advanced.js +24 -0
- package/src/components/JfbMallSpecialInfo/cusAttr/content.js +281 -0
- package/src/components/JfbMallSpecialInfo/cusAttr/style.js +459 -0
- package/src/components/JfbMallSpecialProduct/Attr.js +529 -714
- package/src/components/JfbMallSpecialProduct/JfbMallSpecialProduct.vue +255 -169
- package/src/components/JfbMallSpecialProduct/Mock.js +399 -0
- package/src/components/JfbMallSpecialProduct/components/title.vue +174 -0
- package/src/components/JfbMallSpecialProduct/cusAttr/advanced.js +21 -0
- package/src/components/JfbMallSpecialProduct/cusAttr/content.js +393 -0
- package/src/components/JfbMallSpecialProduct/cusAttr/style.js +1002 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import {getRemoteOptions} from "@/utils/AttrTools";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { getRemoteOptions } from "@/utils/AttrTools";
|
|
3
|
+
import Content from './cusAttr/content'
|
|
4
|
+
import Style from './cusAttr/style'
|
|
5
|
+
import Advanced from './cusAttr/advanced'
|
|
6
|
+
function checkValue(value, dValue = 0) {
|
|
7
|
+
if (value === undefined || value === '' || value === null) return dValue;
|
|
6
8
|
return Number(value || 0);
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -11,387 +13,14 @@ function checkValue(value, dValue = 0){
|
|
|
11
13
|
*/
|
|
12
14
|
export default {
|
|
13
15
|
|
|
14
|
-
style: [],
|
|
15
|
-
content: (data) => {
|
|
16
|
-
let options = getRemoteOptions('productList', data);
|
|
17
|
-
let mainSpacing = 30;
|
|
18
|
-
if(data['mainSpacing']) mainSpacing = Number(data['mainSpacing']);
|
|
19
|
-
let width = 750 - mainSpacing * 2;
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
style: [],
|
|
17
|
+
content: (data, gValue, gColor, oldData = {}) => {
|
|
22
18
|
return [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
valueKey: 'isCategoryImage',
|
|
27
|
-
value: data['isCategoryImage'] || 'Y',
|
|
28
|
-
placeholder: '请选择是否显示分类图片',
|
|
29
|
-
multiple: false,
|
|
30
|
-
className: 'input80',
|
|
31
|
-
groupKey: 'content',
|
|
32
|
-
list: [
|
|
33
|
-
{ label: '展示', value: 'Y' },
|
|
34
|
-
{ label: '隐藏', value: 'N' },
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
ele: 'title',
|
|
39
|
-
label: '商品内容配置',
|
|
40
|
-
size: 'small',
|
|
41
|
-
groupKey:'content',
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: "列表展示列数",
|
|
45
|
-
groupKey: 'content',
|
|
46
|
-
ele: 'xd-radio',
|
|
47
|
-
valueKey: "column_num",
|
|
48
|
-
value: data['column_num'] || 2,
|
|
49
|
-
isKey: true,
|
|
50
|
-
list: [
|
|
51
|
-
{label: "一列", value: 1},
|
|
52
|
-
{label: "两列", value: 2},
|
|
53
|
-
{label: "三列", value: 3}
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: '否展示品牌:',
|
|
58
|
-
ele: 'xd-radio',
|
|
59
|
-
valueKey: 'is_show_brand',
|
|
60
|
-
value: data['is_show_brand'] || 'N',
|
|
61
|
-
placeholder: '请选择是否展示品牌',
|
|
62
|
-
multiple: false,
|
|
63
|
-
className: 'input80',
|
|
64
|
-
groupKey: 'content',
|
|
65
|
-
list: [
|
|
66
|
-
{ label: '展示', value: 'Y' },
|
|
67
|
-
{ label: '隐藏', value: 'N' },
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: '是否显示价格:',
|
|
72
|
-
ele: 'xd-radio',
|
|
73
|
-
groupKey: 'content',
|
|
74
|
-
valueKey: 'isPrice',
|
|
75
|
-
value: data['isPrice'] || 'Y',
|
|
76
|
-
placeholder: '请选择是否显示价格',
|
|
77
|
-
multiple: false,
|
|
78
|
-
className: 'input80',
|
|
79
|
-
list: [
|
|
80
|
-
{ label: '是', value: 'Y' },
|
|
81
|
-
{ label: '否', value: 'N' },
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
data.isPrice === 'Y' && {
|
|
85
|
-
label: '是否展示原价:',
|
|
86
|
-
groupKey: 'content',
|
|
87
|
-
ele: 'xd-radio',
|
|
88
|
-
valueKey: 'isShowDiscount',
|
|
89
|
-
value: data.isShowDiscount || "Y",
|
|
90
|
-
rules: [
|
|
91
|
-
{ required: true, message: '请选择', trigger: ['blur', 'change'] }
|
|
92
|
-
],
|
|
93
|
-
list: [
|
|
94
|
-
{ "label": "显示", "value": "Y" },
|
|
95
|
-
{ "label": "隐藏", "value": "N" },
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
data.isShowDiscount === 'Y' && {
|
|
99
|
-
groupKey: 'content',
|
|
100
|
-
label: '市场价减去售价大于多少展示:',
|
|
101
|
-
ele: 'el-input',
|
|
102
|
-
type: 'number',
|
|
103
|
-
valueKey: 'differ',
|
|
104
|
-
value: data['differ'] || '',
|
|
105
|
-
placeholder: '价差,默认值:1',
|
|
106
|
-
className: 'input60',
|
|
107
|
-
},
|
|
108
|
-
...options,
|
|
109
|
-
{
|
|
110
|
-
label: "购物车设置",
|
|
111
|
-
ele: "xd-radio",
|
|
112
|
-
valueKey: "isAddCart",
|
|
113
|
-
value: data['isAddCart'] || 'Y',
|
|
114
|
-
groupKey: 'content',
|
|
115
|
-
list: [
|
|
116
|
-
{ label: "是", value: 'Y' },
|
|
117
|
-
{ label: "否", value: 'N' }
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
0&&{
|
|
121
|
-
ele: 'title',
|
|
122
|
-
label: '列表图片设置(<span style="color:red"> 仅三张图片同时设置生效 </span>)',
|
|
123
|
-
size: 'small',
|
|
124
|
-
groupKey:'content',
|
|
125
|
-
},
|
|
126
|
-
0&&{
|
|
127
|
-
label: '列表Top背景图:',
|
|
128
|
-
ele: 'xd-upload',
|
|
129
|
-
valueKey: 'itemTop',
|
|
130
|
-
value: data['itemTop'] || {},
|
|
131
|
-
defaultValue: data['itemTop'],
|
|
132
|
-
groupKey: 'content',
|
|
133
|
-
slot: true,
|
|
134
|
-
elinputClassName: 'input40',
|
|
135
|
-
tipsformet: `上传文件格式:@imageType@,不超过@size@MB。建议尺寸:<span style="color:red">${width}*70</span>像素`,
|
|
136
|
-
type: ['jpg', 'png', 'jpeg'],
|
|
137
|
-
styleType: 'one',
|
|
138
|
-
uploadType: 'aliyun',
|
|
139
|
-
oneWidth: 300,
|
|
140
|
-
oneHeight: 300 * 70 / width,
|
|
141
|
-
size: 5,
|
|
142
|
-
action: 'aliyun',
|
|
143
|
-
rules: [
|
|
144
|
-
{ required: true, message: '请上传图片', trigger: ['blur', 'change'] },
|
|
145
|
-
]
|
|
146
|
-
},
|
|
147
|
-
0&&{
|
|
148
|
-
label: '列表Middle背景图:',
|
|
149
|
-
ele: 'xd-upload',
|
|
150
|
-
valueKey: 'itemMiddle',
|
|
151
|
-
value: data['itemMiddle'] || {},
|
|
152
|
-
defaultValue: data['itemMiddle'],
|
|
153
|
-
groupKey: 'content',
|
|
154
|
-
slot: true,
|
|
155
|
-
elinputClassName: 'input40',
|
|
156
|
-
tipsformet: `上传文件格式:@imageType@,不超过@size@MB。建议尺寸:<span style="color:red">${width}*50</span>像素,此背景是可重复背景`,
|
|
157
|
-
type: ['jpg', 'png', 'jpeg'],
|
|
158
|
-
styleType: 'one',
|
|
159
|
-
uploadType: 'aliyun',
|
|
160
|
-
oneWidth: 300,
|
|
161
|
-
oneHeight: 300 * 50 / width,
|
|
162
|
-
size: 5,
|
|
163
|
-
action: 'aliyun',
|
|
164
|
-
rules: [
|
|
165
|
-
{ required: true, message: '请上传图片', trigger: ['blur', 'change'] },
|
|
166
|
-
]
|
|
167
|
-
},
|
|
168
|
-
0&&{
|
|
169
|
-
label: '列表Bottom背景图:',
|
|
170
|
-
ele: 'xd-upload',
|
|
171
|
-
valueKey: 'itemBottom',
|
|
172
|
-
value: data['itemBottom'] || {},
|
|
173
|
-
defaultValue: data['itemBottom'],
|
|
174
|
-
groupKey: 'content',
|
|
175
|
-
slot: true,
|
|
176
|
-
elinputClassName: 'input40',
|
|
177
|
-
tipsformet: `上传文件格式:@imageType@,不超过@size@MB。建议尺寸:<span style="color:red">${width}*50</span>像素`,
|
|
178
|
-
type: ['jpg', 'png', 'jpeg'],
|
|
179
|
-
styleType: 'one',
|
|
180
|
-
uploadType: 'aliyun',
|
|
181
|
-
oneWidth: 300,
|
|
182
|
-
oneHeight: 300 * 50 / width,
|
|
183
|
-
size: 5,
|
|
184
|
-
action: 'aliyun',
|
|
185
|
-
rules: [
|
|
186
|
-
{ required: true, message: '请上传图片', trigger: ['blur', 'change'] },
|
|
187
|
-
]
|
|
188
|
-
},
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
label: '列间距设置:',
|
|
192
|
-
ele: 'el-input',
|
|
193
|
-
type: 'number',
|
|
194
|
-
groupKey:'style',
|
|
195
|
-
valueKey: 'mainSpacing',
|
|
196
|
-
value: data['mainSpacing'] || '',
|
|
197
|
-
className: 'input50',
|
|
198
|
-
inline: false,
|
|
199
|
-
notice:'列间距设置,单位像素,默认:<span style="color:red">30</span>px'
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
label: '行间距设置:',
|
|
203
|
-
ele: 'el-input',
|
|
204
|
-
type: 'number',
|
|
205
|
-
groupKey:'style',
|
|
206
|
-
valueKey: 'rowMainSpacing',
|
|
207
|
-
value: data['rowMainSpacing'] || '',
|
|
208
|
-
className: 'input50',
|
|
209
|
-
inline: false,
|
|
210
|
-
notice:'行间距设置,单位像素,默认:<span style="color:red">30</span>px'
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
ele: 'title',
|
|
214
|
-
label: '列表样式设置',
|
|
215
|
-
size: 'small',
|
|
216
|
-
groupKey:'style',
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
label: '列间距设置:',
|
|
220
|
-
ele: 'el-input',
|
|
221
|
-
type: 'number',
|
|
222
|
-
groupKey:'style',
|
|
223
|
-
valueKey: 'contSpacing',
|
|
224
|
-
value: data['contSpacing'] || '',
|
|
225
|
-
className: 'input50',
|
|
226
|
-
inline: false,
|
|
227
|
-
notice:'列间距设置,单位像素,默认:<span style="color:red">20</span>px,此配置仅在<span style="color:red">一列</span>显示生效'
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
label: '边距设置:',
|
|
231
|
-
ele: 'xd-margin-padding',
|
|
232
|
-
groupKey:'style',
|
|
233
|
-
valueKey: 'contMargin',
|
|
234
|
-
value: data['contMargin'] || null,
|
|
235
|
-
setting: {
|
|
236
|
-
type: 'margin',
|
|
237
|
-
},
|
|
238
|
-
inline: false,
|
|
239
|
-
notice: '边距设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">0</span> 像素',
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
label: '填充设置:',
|
|
243
|
-
ele: 'xd-margin-padding',
|
|
244
|
-
groupKey:'style',
|
|
245
|
-
valueKey: 'contPadding',
|
|
246
|
-
value: data['contPadding'] || null,
|
|
247
|
-
setting: {
|
|
248
|
-
type: 'padding',
|
|
249
|
-
},
|
|
250
|
-
inline: false,
|
|
251
|
-
notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
label: '背景颜色:',
|
|
255
|
-
ele: 'xd-color',
|
|
256
|
-
valueKey: 'contBgColor',
|
|
257
|
-
value: data['contBgColor'] || '',
|
|
258
|
-
placeholder: '请选择背景颜色',
|
|
259
|
-
classNmae: 'input80',
|
|
260
|
-
groupKey:'style',
|
|
261
|
-
inline: false,
|
|
262
|
-
notice: '背景色建议使用浅色色值,切勿使用深色色值'
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
label: '商品名称样式设置:',
|
|
266
|
-
ele: 'xd-text-and-bgc',
|
|
267
|
-
groupKey:'style',
|
|
268
|
-
valueKey: 'contStyle',
|
|
269
|
-
value: data['contStyle'] || null,
|
|
270
|
-
setting: {
|
|
271
|
-
fontSize: true,
|
|
272
|
-
weight:true,
|
|
273
|
-
bgColor:false,
|
|
274
|
-
selected:false,
|
|
275
|
-
},
|
|
276
|
-
handleCustom({action, data}) {
|
|
277
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
|
|
278
|
-
.then(res => {
|
|
279
|
-
data.cb(res.list)
|
|
280
|
-
})
|
|
281
|
-
.catch(error => {
|
|
282
|
-
console.error(error);
|
|
283
|
-
data.cb([])
|
|
284
|
-
});
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
label: '品牌名称颜色:',
|
|
289
|
-
ele: 'xd-color',
|
|
290
|
-
valueKey: 'contBrandColor',
|
|
291
|
-
value: data['contBrandColor'] || '',
|
|
292
|
-
placeholder: '请选择品牌名称颜色',
|
|
293
|
-
classNmae: 'input80',
|
|
294
|
-
groupKey:'style',
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
label: '当前投影设置:',
|
|
298
|
-
ele: 'xd-shadow',
|
|
299
|
-
groupKey:'style',
|
|
300
|
-
valueKey: 'contShadow',
|
|
301
|
-
value: data['contShadow'] || '',
|
|
302
|
-
setting: {
|
|
303
|
-
selected: 'N',
|
|
304
|
-
},
|
|
305
|
-
handleCustom({action, data}) {
|
|
306
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
|
|
307
|
-
.then(res => {
|
|
308
|
-
data.cb(res.list)
|
|
309
|
-
})
|
|
310
|
-
.catch(error => {
|
|
311
|
-
console.error(error);
|
|
312
|
-
data.cb([])
|
|
313
|
-
});
|
|
314
|
-
},
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
label: '当前边框设置:',
|
|
318
|
-
ele: 'xd-border',
|
|
319
|
-
groupKey:'style',
|
|
320
|
-
valueKey: 'contBorder',
|
|
321
|
-
value: data['contBorder'] || '',
|
|
322
|
-
setting: {
|
|
323
|
-
selected:'N'
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
label: '圆角设置:',
|
|
328
|
-
ele: 'xd-site-select-list',
|
|
329
|
-
valueKey: 'contRadius',
|
|
330
|
-
value: data['contRadius'] || '10',
|
|
331
|
-
groupKey:'style',
|
|
332
|
-
placeholder: '请选择圆角设置',
|
|
333
|
-
multiple: false,
|
|
334
|
-
className: 'input80',
|
|
335
|
-
handleCustom({action, data}) {
|
|
336
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
|
|
337
|
-
.then(res => {
|
|
338
|
-
data.cb(res.list)
|
|
339
|
-
})
|
|
340
|
-
.catch(error => {
|
|
341
|
-
console.error(error);
|
|
342
|
-
});
|
|
343
|
-
},
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
label: '商品图圆角设置:',
|
|
347
|
-
ele: 'xd-site-select-list',
|
|
348
|
-
valueKey: 'imageRadius',
|
|
349
|
-
value: data['imageRadius'] || '10',
|
|
350
|
-
groupKey:'style',
|
|
351
|
-
placeholder: '请选择商品图圆角设置',
|
|
352
|
-
multiple: false,
|
|
353
|
-
className: 'input80',
|
|
354
|
-
handleCustom({action, data}) {
|
|
355
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
|
|
356
|
-
.then(res => {
|
|
357
|
-
data.cb(res.list)
|
|
358
|
-
})
|
|
359
|
-
.catch(error => {
|
|
360
|
-
console.error(error);
|
|
361
|
-
});
|
|
362
|
-
},
|
|
363
|
-
},
|
|
364
|
-
|
|
19
|
+
...Content(data, gValue, gColor, oldData),
|
|
20
|
+
...Style(data, gValue, gColor, oldData),
|
|
21
|
+
...Advanced(data, gValue, gColor, oldData),
|
|
365
22
|
|
|
366
|
-
|
|
367
|
-
label: "选择业务线",
|
|
368
|
-
ele: "xd-choose-namespace",
|
|
369
|
-
valueKey: "xnamespace",
|
|
370
|
-
groupKey:'advanced',
|
|
371
|
-
value: data.xnamespace || "",
|
|
372
|
-
className: 'input60',
|
|
373
|
-
handleCustom: (cb) => {
|
|
374
|
-
XdBus.getParentApi('getOptionsNamespaces')()
|
|
375
|
-
.then(res => {
|
|
376
|
-
cb(res.list)
|
|
377
|
-
})
|
|
378
|
-
.catch();
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
label: '商品详情跳转路径:',
|
|
383
|
-
ele: 'xd-select-pages-path',
|
|
384
|
-
groupKey:'advanced',
|
|
385
|
-
className:'input100',
|
|
386
|
-
valueKey: 'productInfoPath',
|
|
387
|
-
placeholder: '请选择商品详情跳转路径',
|
|
388
|
-
value: data.productInfoPath || null,
|
|
389
|
-
setting: {
|
|
390
|
-
router: XdBus.getParentApi('getPagesTree'),
|
|
391
|
-
},
|
|
392
|
-
inline: false,
|
|
393
|
-
},
|
|
394
|
-
].filter(i=>i)
|
|
23
|
+
].filter(i => i)
|
|
395
24
|
},
|
|
396
25
|
advanced: [
|
|
397
26
|
],
|