jufubao-base 1.0.213-beta1 → 1.0.214

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.213-beta1",
3
+ "version": "1.0.214",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -68,6 +68,7 @@
68
68
  :current="current"
69
69
  circular
70
70
  @animationfinish="handleAnimationfinish"
71
+ @change="handleChange"
71
72
  >
72
73
  <swiper-item v-for="(item,index) in info" :key="index" @click.stop="handleClick(item,index)">
73
74
  <image :style="{width: getOneWidth + 'rpx', height: getOneHeight + 'rpx'}" :src="item['image_url']" mode="aspectFill"></image>
@@ -83,6 +84,7 @@
83
84
  :height="getOneHeight + 'rpx'"
84
85
  :interval="carouselTime"
85
86
  @onClickItem="handleClick"
87
+ @change="handleChange"
86
88
  @animationfinish="handleAnimationfinish"
87
89
  >
88
90
  <template slot-scope="{ item, index}">
@@ -446,7 +448,14 @@
446
448
  }
447
449
  return temp
448
450
  },
449
- handleAnimationfinish(e) {
451
+
452
+ handleAnimationfinish(e){
453
+
454
+ },
455
+
456
+ handleChange(e) {
457
+ this.current = e.detail.current;
458
+
450
459
  //不支持背景不处理
451
460
  if(this.isSupport==='N') return;
452
461
  console.warn(`handleAnimationfinish.start`)
@@ -469,7 +478,6 @@
469
478
  let bg = null;
470
479
  if(this.currentImage) bg = this.currentImage;
471
480
  this.$xdRoot.$emit("setLayoutPageBg", bg);
472
- this.current = e.detail.current;
473
481
  }
474
482
  },
475
483
 
@@ -544,6 +552,7 @@
544
552
  }
545
553
  })
546
554
  },
555
+
547
556
  handleOne(list){
548
557
  this.info = this.handleImage(list);
549
558
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- import console from "@dcloudio/uni-h5/src/core/helpers/console";
3
+ import {oldTonNewBorAndSha} from "@/utils/AttrTools";
4
4
 
5
5
  /**
6
6
  * @description 当表单组件中有联动操作时候,使用方法进行返回
@@ -14,9 +14,26 @@ 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';
18
17
  if (!params['carouselTime']) params['carouselTime'] = 5;
19
- if(params['cells'] === 4) defaultPadding = 30
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
+
20
37
  return [
21
38
  {
22
39
  label: '导航配置:',
@@ -255,36 +272,68 @@ export default {
255
272
  label: '导航显示方式:',
256
273
  ele: 'xd-radio',
257
274
  valueKey: 'isCarousel',
258
- value: params['isCarousel'],
275
+ value: params['isCarousel'] || 1,
259
276
  groupKey:'content',
260
- rules: [
261
- {required: true, message: '请选择导航显示方式', trigger: ['blur', 'change']}
262
- ],
277
+ labelInline: true,
263
278
  list: [
264
279
  {"label": "焦点图显示", "value": 1},
265
280
  {"label": "轮播图显示", "value": 2},
266
281
  ]
267
282
  },
268
- {
269
- label: '导航轮播周期:',
283
+ params['isCarousel'] === 2 && {
284
+ labelInline: true,
285
+ label: '轮播速度:',
270
286
  ele: 'el-input',
271
287
  type: 'number',
272
288
  isKey: true,
273
289
  groupKey:'content',
274
290
  valueKey: 'carouselTime',
275
291
  value: params.carouselTime,
276
- placeholder: '请输入导航轮播周期,单位秒',
292
+ placeholder: '请输入轮播速度,单位秒',
277
293
  className: 'input60',
278
294
  inline: false,
279
- notice: '轮播周期时间设置仅在“<span style="color:red">轮播图显示</span>”生效,单位:<span style="color:red">秒</span>',
295
+ notice: '轮播速度设置仅在“<span style="color:red">轮播图显示</span>”生效,单位:<span style="color:red">秒</span>',
280
296
  },
281
- {
282
- label: '导航内容显示行数:',
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类型:',
283
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,
328
+ },
329
+ {
330
+ label: '导航显示行数:',
331
+ ele: 'xd-radio',
284
332
  valueKey: 'jdRows',
285
333
  groupKey:'content',
286
334
  value: params.jdRows,
287
335
  className: 'input60',
336
+ labelInline: true,
288
337
  list: [
289
338
  {"label": "一行", "value": 1},
290
339
  {"label": "两行", "value": 2},
@@ -292,57 +341,91 @@ export default {
292
341
  ]
293
342
  },
294
343
  {
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',
344
+ label: '导航显示列数:',
345
+ ele: 'xd-radio',
315
346
  valueKey: 'cells',
316
347
  groupKey:'content',
317
348
  value: params.cells,
318
349
  className: 'input60',
350
+ labelInline: true,
319
351
  list: [
320
352
  {"label": "四列", "value": 4},
321
353
  {"label": '五列', "value": 5},
322
354
  ]
323
355
  },
324
356
  {
325
- label: 'ICON图标填充设置:',
326
- ele: 'xd-margin-padding',
327
- valueKey: 'iconPadding',
357
+ ele: 'title',
358
+ label: '导航ICON设置',
359
+ size: 'small',
328
360
  groupKey:'content',
329
- value: params.iconPadding || null,
330
- setting: {
331
- type: 'margin',
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才会时正方形。`,
336
361
  },
337
362
  {
338
- label: '导航ICON圆角设置:',
339
- ele: 'xd-site-select-list',
340
- valueKey: 'radius',
341
- value: params['radius'],
363
+ label: '基础样式设置:',
364
+ ele: 'xd-radio',
365
+ valueKey: 'iconSetBaseStyle',
366
+ value: iconSetBaseStyle,
342
367
  groupKey:'content',
343
- placeholder: '请选择导航ICON圆角设置',
344
- multiple: false,
345
- className: 'input60',
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',
422
+ groupKey:'content',
423
+ labelInline: true,
424
+ valueKey: 'iconShadow',
425
+ value: defContShadow,
426
+ setting: {
427
+ selected: defContShadow.type,
428
+ },
346
429
  handleCustom({action, data}) {
347
430
  XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
348
431
  .then(res => {
@@ -350,10 +433,48 @@ export default {
350
433
  })
351
434
  .catch(error => {
352
435
  console.error(error);
436
+ data.cb([])
353
437
  });
354
438
  },
355
439
  },
356
- {
440
+ iconSetBaseStyle === 'Y' && {
441
+ label: "导航文字设置:",
442
+ ele: "xd-font",
443
+ valueKey: "titleStyle",
444
+ value: params.titleStyle || {},
445
+ 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
+ },
464
+ handleCustom({action, data}) {
465
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
466
+ .then(res => {
467
+ data.cb(res.list)
468
+ })
469
+ .catch(error => {
470
+ data.cb([])
471
+ console.error(error);
472
+ });
473
+ },
474
+
475
+ },
476
+
477
+ iconSetBaseStyle === 'Y' && {
357
478
  label: '导航ICON是否阴影设置:',
358
479
  ele: 'xd-radio',
359
480
  valueKey: 'shadow',
@@ -361,12 +482,14 @@ export default {
361
482
  value: params['shadow'],
362
483
  placeholder: '请选择导航ICON阴影设置',
363
484
  className: 'input60',
485
+ hidden:true,
364
486
  list: [
365
487
  {"label": "是", "value": 1},
366
488
  {"label": "否", "value": 2},
367
489
  ]
368
490
  },
369
- params['shadow'] === 1 && {
491
+ iconSetBaseStyle === 'Y' && {
492
+ hidden:true,
370
493
  label: '导航ICON阴影颜色配置:',
371
494
  ele: 'xd-color',
372
495
  valueKey: 'shadowColor',
@@ -376,12 +499,7 @@ export default {
376
499
  classNmae: 'input60',
377
500
  },
378
501
 
379
- {
380
- ele: 'title',
381
- label: '样式设置',
382
- size: 'small',
383
- groupKey:'style',
384
- },
502
+
385
503
  {
386
504
  label: '背景颜色:',
387
505
  ele: 'xd-color',
@@ -390,27 +508,27 @@ export default {
390
508
  value: params['bgColor'] || '',
391
509
  placeholder: '请选择背景颜色',
392
510
  classNmae: 'input60',
393
- },
394
- {
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
- });
511
+ setting: {
512
+ showAlpha: true
411
513
  },
412
514
  },
413
515
  {
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
+ }
530
+ },
531
+ iconSetBaseStyle === 'Y' && {
414
532
  label: '文字颜色:',
415
533
  ele: 'xd-color',
416
534
  valueKey: 'textColor',
@@ -420,7 +538,7 @@ export default {
420
538
  classNmae: 'input80',
421
539
  },
422
540
  {
423
- label: '内容设置外边距:',
541
+ label: '外边距设置:',
424
542
  ele: 'xd-margin-padding',
425
543
  valueKey: 'margin',
426
544
  groupKey:'style',
@@ -430,10 +548,10 @@ export default {
430
548
  },
431
549
  placeholder: '请设置外边距',
432
550
  inline: false,
433
- notice: '设置外边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
551
+ notice: '外边距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
434
552
  },
435
553
  {
436
- label: '内容设置填充:',
554
+ label: '填充设置:',
437
555
  ele: 'xd-margin-padding',
438
556
  valueKey: 'contentPadding',
439
557
  groupKey:'style',
@@ -441,10 +559,10 @@ export default {
441
559
  setting: {
442
560
  type: 'padding',
443
561
  },
444
- placeholder: '内容设置填充',
445
562
  inline: false,
446
- notice: '设置外填充,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
563
+ notice: '设置填充设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
447
564
  },
565
+
448
566
  ].filter(i=>i)
449
567
  },
450
568
  advanced: [