jufubao-base 1.0.212-beta101 → 1.0.212

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- import {oldTonNewBorAndSha} from "@/utils/AttrTools";
3
+ import console from "@dcloudio/uni-h5/src/core/helpers/console";
4
4
 
5
5
  /**
6
6
  * @description 当表单组件中有联动操作时候,使用方法进行返回
@@ -14,26 +14,9 @@ export default {
14
14
  if (params['shadow'] === undefined) params['shadow'] = 2;
15
15
  if (!params['cells']) params['cells'] = 4;
16
16
  if (!params['jdRows']) params['jdRows'] = 1;
17
+ if (!params['radius']) params['radius'] = '20';
17
18
  if (!params['carouselTime']) params['carouselTime'] = 5;
18
- if(params['cells'] === 4) defaultPadding = 25;
19
- let iconSetBaseStyle = 'Y';
20
- if(params['iconSetBaseStyle']) iconSetBaseStyle = params['iconSetBaseStyle'];
21
-
22
-
23
- let defContShadow = oldTonNewBorAndSha(
24
- params['iconShadow'],
25
- params.shadow===1?'Y':'N',
26
- '10',
27
- params.shadowColor|| 'rgba(0,0,0,0)',
28
- );
29
- if(defContShadow.type === 'Y' && params.shadow ===1) {
30
- params.shadow = 2
31
- }
32
-
33
- let fontColor = '#333';
34
- if(params['textColor']) fontColor = params['textColor']
35
- if(params.titleStyle && params.titleStyle.color) fontColor = params.titleStyle.color;
36
-
19
+ if(params['cells'] === 4) defaultPadding = 30
37
20
  return [
38
21
  {
39
22
  label: '导航配置:',
@@ -272,68 +255,36 @@ export default {
272
255
  label: '导航显示方式:',
273
256
  ele: 'xd-radio',
274
257
  valueKey: 'isCarousel',
275
- value: params['isCarousel'] || 1,
258
+ value: params['isCarousel'],
276
259
  groupKey:'content',
277
- labelInline: true,
260
+ rules: [
261
+ {required: true, message: '请选择导航显示方式', trigger: ['blur', 'change']}
262
+ ],
278
263
  list: [
279
264
  {"label": "焦点图显示", "value": 1},
280
265
  {"label": "轮播图显示", "value": 2},
281
266
  ]
282
267
  },
283
- params['isCarousel'] === 2 && {
284
- labelInline: true,
285
- label: '轮播速度:',
268
+ {
269
+ label: '导航轮播周期:',
286
270
  ele: 'el-input',
287
271
  type: 'number',
288
272
  isKey: true,
289
273
  groupKey:'content',
290
274
  valueKey: 'carouselTime',
291
275
  value: params.carouselTime,
292
- placeholder: '请输入轮播速度,单位秒',
276
+ placeholder: '请输入导航轮播周期,单位秒',
293
277
  className: 'input60',
294
278
  inline: false,
295
- notice: '轮播速度设置仅在“<span style="color:red">轮播图显示</span>”生效,单位:<span style="color:red">秒</span>',
296
- },
297
- params['isCarousel'] === 2 && {
298
- labelInline: true,
299
- label: '导航数量:',
300
- ele: 'el-input',
301
- type: 'number',
302
- valueKey: 'number',
303
- groupKey:'content',
304
- value: params.number || '20',
305
- placeholder: '请输入导航数量',
306
- className: 'input60',
307
- unit:'条',
308
- },
309
- params['isCarousel'] === 2 && {
310
- label: '广告显示dot类型:',
311
- ele: 'xd-select-list',
312
- valueKey: 'dot_type',
313
- value: params['dot_type'] || 'round',
314
- groupKey:'content',
315
- placeholder: '请选择广告显示dot类型',
316
- multiple: false,
317
- className: 'input80',
318
- list:[
319
- {label: '显示圆点', value: 'dot'},
320
- {label: '显示长方形', value: 'default'},
321
- {label: '显示圆点+长条', value: 'round'},
322
- {label: '显示索引+标题', value: 'nav'},
323
- {label: '显示索引', value: 'indexes'},
324
- {label: '不显示', value: 'normal'},
325
- ],
326
- notice: '在使用非通屏显示类型广告位之外的样式时,<span style="color: red">(显示索引+标题|显示索引)</span>使用"<span style="color: red">显示圆点</span>"',
327
- inline: false,
279
+ notice: '轮播周期时间设置仅在“<span style="color:red">轮播图显示</span>”生效,单位:<span style="color:red">秒</span>',
328
280
  },
329
281
  {
330
- label: '导航显示行数:',
331
- ele: 'xd-radio',
282
+ label: '导航内容显示行数:',
283
+ ele: 'xd-select-list',
332
284
  valueKey: 'jdRows',
333
285
  groupKey:'content',
334
286
  value: params.jdRows,
335
287
  className: 'input60',
336
- labelInline: true,
337
288
  list: [
338
289
  {"label": "一行", "value": 1},
339
290
  {"label": "两行", "value": 2},
@@ -341,140 +292,68 @@ export default {
341
292
  ]
342
293
  },
343
294
  {
344
- label: '导航显示列数:',
345
- ele: 'xd-radio',
295
+ label: '导航内容置使用张数:',
296
+ ele: 'el-input',
297
+ type: 'number',
298
+ valueKey: 'number',
299
+ groupKey:'content',
300
+ value: params.number,
301
+ placeholder: '请输入导航内容置使用张数',
302
+ className: 'input60',
303
+ unit:'张',
304
+ rules: [
305
+ {
306
+ required: true,
307
+ message: '请输入导航内容置使用张数',
308
+ trigger: 'blur'
309
+ },
310
+ ]
311
+ },
312
+ {
313
+ label: '导航内容显示列数:',
314
+ ele: 'xd-select-list',
346
315
  valueKey: 'cells',
347
316
  groupKey:'content',
348
317
  value: params.cells,
349
318
  className: 'input60',
350
- labelInline: true,
351
319
  list: [
352
320
  {"label": "四列", "value": 4},
353
321
  {"label": '五列', "value": 5},
354
322
  ]
355
323
  },
356
324
  {
357
- ele: 'title',
358
- label: '导航ICON设置',
359
- size: 'small',
360
- groupKey:'content',
361
- },
362
- {
363
- label: '基础样式设置:',
364
- ele: 'xd-radio',
365
- valueKey: 'iconSetBaseStyle',
366
- value: iconSetBaseStyle,
367
- groupKey:'content',
368
- labelInline: true,
369
- list: [
370
- {"label": "默认", "value": 'N'},
371
- {"label": "自定义", "value": 'Y'},
372
- ]
373
- },
374
- iconSetBaseStyle === 'Y' && {
375
- label: "ICON大小设置:",
376
- groupKey: 'content',
377
- labelInline: true,
378
- ele: 'xd-slider',
379
- valueKey: "columnSpacing",
380
- value: params['columnSpacing'] === undefined?0:params['columnSpacing'],
381
- className: "input80",
382
- setting:{
383
- min: 0,
384
- max: 60,
385
- step:1,
386
- showStops:false,
387
- }
388
- },
389
- iconSetBaseStyle === 'Y' && {
390
- label: "ICON圆角:",
391
- groupKey: 'content',
392
- labelInline: true,
393
- ele: 'xd-slider',
394
- valueKey: "radius",
395
- value: params['radius'] === undefined?20:params['radius'],
396
- className: "input80",
397
- setting:{
398
- min: 0,
399
- max: 100,
400
- step:1,
401
- showStops:false,
402
- }
403
- },
404
- iconSetBaseStyle === 'Y' && {
405
- label: "ICON边距设置:",
406
- groupKey: 'content',
407
- labelInline: true,
408
- ele: 'xd-slider',
409
- valueKey: "iconMargin",
410
- value: params['iconMargin'] === undefined?defaultPadding:params['iconMargin'],
411
- className: "input80",
412
- setting:{
413
- min: 0,
414
- max: 60,
415
- step:1,
416
- showStops:false,
417
- }
418
- },
419
- iconSetBaseStyle === 'Y' && {
420
- label: '投影设置:',
421
- ele: 'xd-shadow',
325
+ label: 'ICON图标填充设置:',
326
+ ele: 'xd-margin-padding',
327
+ valueKey: 'iconPadding',
422
328
  groupKey:'content',
423
- labelInline: true,
424
- valueKey: 'iconShadow',
425
- value: defContShadow,
329
+ value: params.iconPadding || null,
426
330
  setting: {
427
- selected: defContShadow.type,
428
- },
429
- handleCustom({action, data}) {
430
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
431
- .then(res => {
432
- data.cb(res.list)
433
- })
434
- .catch(error => {
435
- console.error(error);
436
- data.cb([])
437
- });
331
+ type: 'margin',
438
332
  },
333
+ placeholder: '请设置外边距',
334
+ inline: false,
335
+ notice: `ICON图标填充设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">${defaultPadding}</span> 像素,<br/><span style="color: red">注意</span>:上下填充数值相加=左右填充数值相加时,ICON才会时正方形。`,
439
336
  },
440
- iconSetBaseStyle === 'Y' && {
441
- label: "导航文字设置:",
442
- ele: "xd-font",
443
- valueKey: "titleStyle",
444
- value: params.titleStyle || {},
337
+ {
338
+ label: '导航ICON圆角设置:',
339
+ ele: 'xd-site-select-list',
340
+ valueKey: 'radius',
341
+ value: params['radius'],
445
342
  groupKey:'content',
446
- setting: {
447
- color:true,
448
- fontSize: true,
449
- decoration: true,
450
- weight: true,
451
- lineHeight: true,
452
- icon: false,
453
- style:false,
454
- align:false,
455
- isEmpty: true,
456
- default:{
457
- color: fontColor,
458
- fontSize:'24rpx',
459
- lineHeight: '36rpx',
460
- decoration:'none',
461
- weight:'normal'
462
- }
463
- },
343
+ placeholder: '请选择导航ICON圆角设置',
344
+ multiple: false,
345
+ className: 'input60',
464
346
  handleCustom({action, data}) {
465
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
347
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
466
348
  .then(res => {
467
349
  data.cb(res.list)
468
350
  })
469
351
  .catch(error => {
470
- data.cb([])
471
352
  console.error(error);
472
353
  });
473
354
  },
474
-
475
355
  },
476
-
477
- iconSetBaseStyle === 'Y' && {
356
+ {
478
357
  label: '导航ICON是否阴影设置:',
479
358
  ele: 'xd-radio',
480
359
  valueKey: 'shadow',
@@ -482,14 +361,12 @@ export default {
482
361
  value: params['shadow'],
483
362
  placeholder: '请选择导航ICON阴影设置',
484
363
  className: 'input60',
485
- hidden:true,
486
364
  list: [
487
365
  {"label": "是", "value": 1},
488
366
  {"label": "否", "value": 2},
489
367
  ]
490
368
  },
491
- iconSetBaseStyle === 'Y' && {
492
- hidden:true,
369
+ params['shadow'] === 1 && {
493
370
  label: '导航ICON阴影颜色配置:',
494
371
  ele: 'xd-color',
495
372
  valueKey: 'shadowColor',
@@ -499,7 +376,12 @@ export default {
499
376
  classNmae: 'input60',
500
377
  },
501
378
 
502
-
379
+ {
380
+ ele: 'title',
381
+ label: '样式设置',
382
+ size: 'small',
383
+ groupKey:'style',
384
+ },
503
385
  {
504
386
  label: '背景颜色:',
505
387
  ele: 'xd-color',
@@ -508,27 +390,27 @@ export default {
508
390
  value: params['bgColor'] || '',
509
391
  placeholder: '请选择背景颜色',
510
392
  classNmae: 'input60',
511
- setting: {
512
- showAlpha: true
513
- },
514
393
  },
515
394
  {
516
- label: "圆角设置:",
517
- groupKey: 'style',
518
- labelInline: true,
519
- ele: 'xd-slider',
520
- valueKey: "bgRadius",
521
- value: params['bgRadius'] === undefined?'':params['bgRadius'],
522
- className: "input80",
523
- setting:{
524
- isOptions: true,
525
- min: 0,
526
- max: 100,
527
- step:1,
528
- showStops:false,
529
- }
395
+ label: '背景圆角设置:',
396
+ ele: 'xd-site-select-list',
397
+ valueKey: 'bgRadius',
398
+ value: params['bgRadius'],
399
+ groupKey:'style',
400
+ placeholder: '请选择背景圆角设置',
401
+ multiple: false,
402
+ className: 'input60',
403
+ handleCustom({action, data}) {
404
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
405
+ .then(res => {
406
+ data.cb(res.list)
407
+ })
408
+ .catch(error => {
409
+ console.error(error);
410
+ });
411
+ },
530
412
  },
531
- iconSetBaseStyle === 'Y' && {
413
+ {
532
414
  label: '文字颜色:',
533
415
  ele: 'xd-color',
534
416
  valueKey: 'textColor',
@@ -538,7 +420,7 @@ export default {
538
420
  classNmae: 'input80',
539
421
  },
540
422
  {
541
- label: '外边距设置:',
423
+ label: '内容设置外边距:',
542
424
  ele: 'xd-margin-padding',
543
425
  valueKey: 'margin',
544
426
  groupKey:'style',
@@ -548,10 +430,10 @@ export default {
548
430
  },
549
431
  placeholder: '请设置外边距',
550
432
  inline: false,
551
- notice: '外边距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
433
+ notice: '设置外边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
552
434
  },
553
435
  {
554
- label: '填充设置:',
436
+ label: '内容设置填充:',
555
437
  ele: 'xd-margin-padding',
556
438
  valueKey: 'contentPadding',
557
439
  groupKey:'style',
@@ -559,10 +441,10 @@ export default {
559
441
  setting: {
560
442
  type: 'padding',
561
443
  },
444
+ placeholder: '内容设置填充',
562
445
  inline: false,
563
- notice: '设置填充设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
446
+ notice: '设置外填充,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
564
447
  },
565
-
566
448
  ].filter(i=>i)
567
449
  },
568
450
  advanced: [