jufubao-mall 2.0.20-beta2 → 2.0.20-beta3

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-mall",
3
- "version": "2.0.20-beta2",
3
+ "version": "2.0.20-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -22,12 +22,13 @@
22
22
  <scroll-view
23
23
  :scroll-x="layout==='v1'"
24
24
  :scroll-y="layout==='v2'"
25
- :style="{height:layout==='v2'?tabStyleComp.height:'auto'}"
25
+ :style="{height:layout==='v2'? tabStyleComp.height:'auto'}"
26
26
  :class="{'tab-linex':layout==='v1' && hStyle ==='v3'}"
27
27
  >
28
28
  <view
29
29
  class="tab_list"
30
30
  :class="{hStyle: layout === 'v1'}"
31
+ :style="[tabListComp]"
31
32
  v-if="loaded"
32
33
  >
33
34
  <view
@@ -46,7 +47,7 @@
46
47
  || (layout === 'v1' && ['v2','v3'].includes(hStyle))"
47
48
  class="lineCom"
48
49
  :class="{lineSmall: ['v3'].includes(hStyle)}"
49
- :style="{backgroundColor: i === tabIndex?tabActItemStyleComp.color:'rgba(0,0,0,0)'}"
50
+ :style="{backgroundColor: i === tabIndex?tabActItemNameStyle.color:'rgba(0,0,0,0)'}"
50
51
  ></view>
51
52
  <view :style="[i === tabIndex?tabActItemNameStyle:tabItemNameStyle]">{{tab.input}}</view>
52
53
  </view>
@@ -199,14 +200,15 @@
199
200
 
200
201
  //选项卡信息
201
202
  titleBgc: '',
202
- tabPadding:{},
203
+ tabPadding:{},//选项卡填充
203
204
  titleStyle:{},
204
205
  titleRadius:0,
205
206
  titleShadow:'',
206
207
  titleBorder:0,
207
208
  titleBorderWidth:0,
208
209
  titleBgcActColor:'',
209
- titlePadding: 0,
210
+ titlePadding: 0, //内容与选项卡填充
211
+ titleSp: 0, //选项卡间距
210
212
 
211
213
 
212
214
  //内容
@@ -245,7 +247,7 @@
245
247
  skeletonStyle(){
246
248
  let margin = 0;
247
249
  if(this.layout === 'v1') {
248
- margin = '24rpx 24rpx 24rpx 0';
250
+ margin = '0rpx 24rpx 0rpx 0';
249
251
  }
250
252
  if(this.layout === 'v2') {
251
253
  margin = '12rpx'
@@ -263,7 +265,10 @@
263
265
  }
264
266
  },
265
267
  showTabs(){
266
- let tabs = this.$xdUniHelper.cloneDeep(this.newLabel).filter(item=>item.check);
268
+ let tabs = this.$xdUniHelper.cloneDeep(this.newLabel).filter(item=>{
269
+ return item.check === true
270
+ });
271
+
267
272
  //线下签是否展示通过后台控制
268
273
  if(this.has_sell) return tabs;
269
274
  else return tabs.filter(item => item.value !== 'sell');
@@ -351,9 +356,6 @@
351
356
  if(['v1', 'v2'].includes(this.vStyle)) {
352
357
  style['height'] = `${this.layoutInfo.bodyMinHeightPx - outHeight}px`;
353
358
  }
354
- // if(['v2', 'v4'].includes(this.vStyle)) {
355
- // style['max-height'] = `${this.layoutInfo.bodyMinHeightPx - outHeight}px`;
356
- // }
357
359
  style['overflowY'] = 'auto';
358
360
  style['overflowX'] = 'hidden';
359
361
  }
@@ -366,7 +368,7 @@
366
368
  let style = {}
367
369
  //上下结构
368
370
  if(this.layout === 'v1') {
369
- style['padding'] = this.getMarginAndPadding(this.tabPadding, 0);
371
+
370
372
  if(!this.isPreview) {
371
373
  style['position'] = 'fixed';
372
374
  style['zIndex'] = '10';
@@ -380,23 +382,36 @@
380
382
  style['width'] = '172rpx';
381
383
  style['flexShrink'] = 0;
382
384
  style['overflow'] = 'hidden';
383
- style['padding'] = this.getMarginAndPadding(this.tabPadding, 0);
385
+ style['padding'] = 0;
384
386
 
385
387
  if(['v1', 'v2'].includes(this.vStyle)) {
386
388
  let tb = this.getPMValue(this.bodyPadding, 'TB', 0) * this.$rpxNum + this.titleBorderWidth * 2 *this.$rpxNum;
387
- tb += this.getPMValue(this.tabPadding, 'TB', 0) * this.$rpxNum
388
389
  style['height'] = `calc(${ this.layoutInfo.bodyMinHeightPx}px - ${tb}px)`;
389
390
  style['borderRadius'] = `0 ${this.titleRadius}rpx ${this.titleRadius}rpx 0`;
390
391
  }
391
392
  }
392
393
  return style;
393
394
  },
395
+ tabListComp(){
396
+ let temp = {};
397
+ if(this.layout === 'v1') {
398
+ temp['paddingLeft'] = (this.tabPadding.left || 0) + 'rpx';
399
+ temp['paddingRight'] = (this.tabPadding.right || 0) + 'rpx';
400
+ temp['paddingBottom'] = (this.tabPadding.bottom || 0) + 'rpx';
401
+ temp['paddingTop'] = (this.tabPadding.top || 0) + 'rpx';
402
+ }
403
+ return temp
404
+ },
394
405
  tabStyleComp(){
406
+ let border = {};
407
+ if(this.layout === 'v2') border = {border: this.titleBorder}
408
+ else border = {borderBottom: this.titleBorder}
395
409
  return {
396
410
  boxShadow: this.titleShadow,
397
- borderBottom: this.titleBorder,
411
+ ...border,
398
412
  backgroundColor: this.titleBgc,
399
- marginBottom: this.titlePadding + 'rpx',
413
+ //在模版二不使用内容与选项卡直接间距
414
+ marginBottom: this.layout === 'v2'?0:this.titlePadding + 'rpx',
400
415
  ...this.getTabHeight,
401
416
  };
402
417
  },
@@ -421,9 +436,10 @@
421
436
  getTabItemHeight(){
422
437
  if(this.layout === 'v1'){
423
438
  return {
424
- height:['v1'].includes(this.hStyle) ?'60rpx' : '108rpx',
425
- lineHeight: ['v1'].includes(this.hStyle) ?'60rpx' : '108rpx',
439
+ height: '60rpx',
440
+ lineHeight:'60rpx',
426
441
  marginRight: this.titleSp + 'rpx',
442
+ minWidth: '80rpx'
427
443
  }
428
444
  }
429
445
 
@@ -433,7 +449,7 @@
433
449
  lineHeight: '100rpx',
434
450
  borderRadius:'0',
435
451
  fontSize:'24rpx',
436
- marginBottom: this.titlePadding + 'rpx'
452
+ marginBottom: this.titleSp + 'rpx'
437
453
  }
438
454
  }
439
455
 
@@ -475,10 +491,35 @@
475
491
  }
476
492
  },
477
493
  tabActItemNameStyle(){
478
- if(this.layout === 'v2') return {}
479
494
  let bgColor = '';
480
495
  let bgImage = 'none';
496
+ let color = this.mainColor;
497
+ if(this.layout === 'v2') {
498
+ if(['v2'].includes(this.vStyle)) {
499
+ //选项卡标签文字颜色
500
+ if(this.titleStyle.actColor) color = this.titleStyle.actColor;
501
+ else color = '#fff';
502
+
503
+ //选项卡标签背景颜色
504
+ if(this.titleStyle.actBgColor) bgColor = this.titleStyle.actBgColor;
505
+ else {
506
+ if(this.mainGradient && this.mainGradient.indexOf('gradient') !== -1) bgImage = this.mainGradient;
507
+ else bgColor = this.mainColor;
508
+ }
509
+ }
510
+
511
+ return {
512
+ backgroundColor: bgColor,
513
+ color: color,
514
+ }
515
+ }
516
+
481
517
  if(['v1'].includes(this.hStyle)) {
518
+ //选项卡标签文字颜色
519
+ if(this.titleStyle.actColor) color = this.titleStyle.actColor;
520
+ else color = '#fff';
521
+
522
+ //选项卡标签背景颜色
482
523
  if(this.titleStyle.actBgColor) bgColor = this.titleStyle.actBgColor;
483
524
  else {
484
525
  if(this.mainGradient && this.mainGradient.indexOf('gradient') !== -1) bgImage = this.mainGradient;
@@ -490,7 +531,7 @@
490
531
  backgroundColor: bgColor,
491
532
  backgroundImage: bgImage,
492
533
  padding: '0 32rpx',
493
- color: this.titleStyle.actColor,
534
+ color: color,
494
535
  fontSize: this.titleStyle.actFontSize + 'rpx',
495
536
  fontWeight: this.titleStyle.actFontWeight,
496
537
  }
@@ -514,9 +555,6 @@
514
555
  this.$nextTick()
515
556
  },
516
557
  methods: {
517
- tr() {
518
- return tr
519
- },
520
558
  onJfbLoad(options) {
521
559
  //设置业务请求代码
522
560
  this.setNameSpace(options);
@@ -562,7 +600,8 @@
562
600
  ]
563
601
  let newLabel = this.$xdUniHelper.cloneDeep(gCPVal(container, 'newLabel', []))
564
602
  .filter(item=>{
565
- return item['isShow'] !== undefined
603
+ //更古老数据,相对新数据
604
+ return item['isShow'] === undefined || item['isShow'] === true
566
605
  })
567
606
  .sort((a,b)=>Number(a.sort)-Number(b.sort))
568
607
  .map(item=>{
@@ -572,6 +611,7 @@
572
611
  item['check'] = item['isShow'];
573
612
  delete item['isShow'];
574
613
  }
614
+ else item['check'] = true;
575
615
  if(item['newLabel'] !== undefined || item['label'] !== undefined) {
576
616
  item['input'] = item['newLabel'] || item['label'];
577
617
  delete item['newLabel'];
@@ -579,8 +619,20 @@
579
619
  }
580
620
  return item
581
621
  });
582
- this.newLabel = gCPVal(container, 'tabContent', [newLabel.length > 0 ? newLabel: defNewLabel]);
622
+ let defValues = {
623
+ all: '全部',
624
+ sell:'线下',
625
+ code:'电子码',
626
+ stod:'线上',
627
+ 'stod-samecity':'同城配送',
628
+ "stod-logistics":'快递配送',
629
+ 'stod-takeout':'门店自提'
630
+ }
583
631
 
632
+ this.newLabel = gCPVal(container, 'tabContent', newLabel.length > 0 ? newLabel: defNewLabel).map(item=>{
633
+ if(item.input === '') item.input = defValues[item.value];
634
+ return item
635
+ });
584
636
 
585
637
  //常规
586
638
  let defBodyPadding= 0;
@@ -616,12 +668,10 @@
616
668
  else defListPadding = {top:40,left:40, right:40, bottom:40};
617
669
  }
618
670
 
671
+ let defListMargin = 0;
672
+ if(this.layout === 'v2' && this.vStyle === 'v2') defListMargin = 24;
673
+
619
674
  this.listPadding = gCPVal(container, 'listPadding', [defListPadding,24], {sKey: 'listPaddingStatus', fields: ['listPadding'], isPMR: true});
620
- let defListMargin= 0;
621
- if(this.layout === 'v2'){
622
- //if(['v3', 'v4'].includes(this.vStyle)) defListMargin = {top:0,left:24, right:0, bottom:0}
623
- if(['v2'].includes(this.vStyle)) defListMargin = {top:24,left:24, right:24, bottom:24}
624
- }
625
675
  this.listMargin = gCPVal(container, 'listMargin', [defListMargin,0], {sKey: 'listMarginStatus', fields: ['listMargin'], isPMR: true});
626
676
  this.contRadius = gCPVal(container, 'contRadius', [this.gStyleValue.radius,0],{sKey: 'contRadiusStatus', fields: ['contRadius']})||0;
627
677
 
@@ -631,18 +681,11 @@
631
681
  let defTabPadding = 0;
632
682
  let oldTabPadding = 0;
633
683
  if(this.layout === 'v2') {
634
- if(['v2', 'v1'].includes(this.vStyle)) defTabPadding = {top:0,left:0, right:0, bottom:0};
635
684
  if(['v1'].includes(this.vStyle)) defTitleBgc = '#f8f8f8';
636
685
  }
637
686
  if(this.layout === 'v1') {
638
- defTabPadding = {top:0,left:32, right:0, bottom:0};
639
- oldTabPadding = {top:0,left:32, right:0, bottom:0};
640
-
641
- if(['v1'].includes(this.hStyle)) {
642
- defTabPadding = {top:24,left:32, right:0, bottom:24};
643
- oldTabPadding = {top:24,left:32, right:0, bottom:24};
644
- }
645
-
687
+ defTabPadding = {top:24,left:32, right:32, bottom:24};
688
+ oldTabPadding = {top:40,left:40, right:40, bottom:40};
646
689
  }
647
690
  this.tabPadding = gCPVal(container, 'tabPadding', [defTabPadding,oldTabPadding], {sKey: 'tabPaddingStatus', fields: ['tabPadding'], isPMR: true});
648
691
  this.titleBgc = gCPVal(container, 'titleBgc', [defTitleBgc,'#fff'],{sKey: 'titleBgcStatus', fields: ['titleBgc']});
@@ -653,7 +696,7 @@
653
696
  let titleStyleStatus = gCPVal(container, 'titleStyleStatus', '');
654
697
  if(titleStyleStatus === 'D') titleActColor = '';
655
698
  let mainColor = titleActColor || this.mainColor;
656
- if(this.layout === 'v1' && this.hStyle === 'v1') mainColor = '#fff';
699
+ //if(this.layout === 'v1' && this.hStyle === 'v1') mainColor = '#fff';
657
700
  if(this.layout === 'v2' && this.vStyle === 'v2') mainColor = '#fff';
658
701
  this.titleStyle = gCPVal(
659
702
  container,
@@ -663,10 +706,10 @@
663
706
  bgColor: titleBgcColor || '#fff' ,
664
707
  fontSize: '32',
665
708
  fontWeight: '400',
666
- actColor: mainColor,
709
+ actColor: titleActColor || '',
667
710
  actFontWeight: '400',
668
711
  actFontSize: '32',
669
- actBgColor: "",
712
+ actBgColor:this.titleBgcActColor || '',
670
713
  }],
671
714
  {sKey:'titleStyleStatus',fields:['titleStyle'],isMerge: true},
672
715
  );
@@ -679,16 +722,16 @@
679
722
  if(['v1','v2'].includes(this.vStyle)) defTitleRadius = '0';
680
723
  }
681
724
  this.titleRadius = gCPVal(container, 'titleRadius', [defTitleRadius,this.gStyleValue.radius,'0'],{sKey: 'titleRadiusStatus', fields: ['titleRadius']})||0;
682
- this.titlePadding = gCPVal(container, 'titlePadding', '0',{sKey: 'titlePaddingStatus', fields: ['titlePadding']});
683
- this.titleSp = gCPVal(container, 'titleSp', [48, 0],{sKey: 'titleSpStatus', fields: ['titleSp']});
725
+ this.titlePadding = gCPVal(container, 'titlePadding', 0,{sKey: 'titlePaddingStatus', fields: ['titlePadding']});
726
+ this.titleSp = gCPVal(container, 'titleSp', [(this.layout === 'v2'?0:48), 0],{sKey: 'titleSpStatus', fields: ['titleSp']});
684
727
 
685
728
  //内容
686
729
  this.contentBgc = gCPVal(container, 'contentBgc', '#fff',{sKey: 'contentBgcStatus', fields: ['contentBgc']} );
687
730
  let contentPadding = gCPVal(container, 'contentPadding',''), bindSize = 68;
688
731
  if(this.layout === 'v1' && this.contentCell === 3) bindSize = 28;
689
732
  if(this.layout === 'v1' && this.contentCell === 5) bindSize = 60;
690
- if(contentPadding) bindSize = 100 - Number(contentPadding);
691
- this.bindSize = 100 - Number(gCPVal(container, 'bindSize', [bindSize,68],{sKey: 'bindSizeStatus', fields: ['bindSize']}));
733
+ if(contentPadding) bindSize = 112 - Number(contentPadding);
734
+ this.bindSize = 112 - Number(gCPVal(container, 'bindSize', [bindSize,68],{sKey: 'bindSizeStatus', fields: ['bindSize']}));
692
735
  this.radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
693
736
  this.brandShadow = gCPVal(container, 'brandShadow', [this.gStyleValue.shadow,'none'], {isShadow:true, bsOld:['isContShadow','isContShadowBgcW','isContShadowBgc']});
694
737
  this.brandBorder = gCPVal(container, 'brandBorder', [{color: '#f8f8f8', width: '2', style: 'solid'},{color: '#eee', width: '0', style: 'solid'}], {isBorder:true, bsOld:['isContBorder','isContBorderW','isContBorderColor']});
@@ -696,8 +739,8 @@
696
739
  container,
697
740
  "brandStyle",
698
741
  [{
699
- color: gCPVal(container, 'brandNameColor', '') || '#333',
700
- fontSize: '24',
742
+ color: gCPVal(container, 'brandNameColor', '') || '#666',
743
+ fontSize: '28rpx',
701
744
  fontWeight: '400',
702
745
  }],
703
746
  {sKey:'brandStyleStatus',fields:['brandStyle'],isMerge: true},
@@ -856,7 +899,7 @@
856
899
  left: 50%;
857
900
  width: 64rpx;
858
901
  transform: translateX(-50%);
859
- bottom: 16rpx;
902
+ bottom: -16rpx;
860
903
  height: 6rpx;
861
904
  border-radius: 4rpx;
862
905
  }
@@ -55,13 +55,13 @@ export default (data, gValue, gColor, oldData)=>{
55
55
  groupKey: 'style',
56
56
  ele: 'xd-slider',
57
57
  valueKey: "bindSize",
58
- value: dataVal({data, key:'bindSize', dValue: gValue.isAdd && gValue.isFirst?bindSize: 68, gValue}),
58
+ value: dataVal({data, key:'bindSize', dValue: gValue.isAdd && gValue.isFirst ? bindSize: 68, gValue}),
59
59
  hidden: !statusShow({data, key: 'bindSizeStatus', fields:['bindSize'], gValue}),
60
60
  className: "input100",
61
61
  labelInline: true,
62
62
  setting:{
63
- min: 0,//最小值
64
- max: 100, //最小值
63
+ min: 50,//最小值
64
+ max: 90, //最小值
65
65
  step:1, //步长
66
66
  showStops:false,//显示间断点
67
67
  showInput:false,//显示输入框
@@ -97,7 +97,7 @@ export default (data, gValue, gColor, oldData)=>{
97
97
  selected:false,
98
98
  default:{
99
99
  color: data['brandNameColor'] || '#666',
100
- fontSize:'24',
100
+ fontSize:'28rpx',
101
101
  fontWeight: '400'
102
102
  },
103
103
  },
@@ -10,8 +10,10 @@ export default (data, gValue, gColor, oldData={})=>{
10
10
  //老数据
11
11
  let tabContent = [];
12
12
  if(data['newLabel'] !== undefined) {
13
- let newLabel = clone(data['newLabel']).filter(item=>{
14
- return item['isShow'] !== undefined
13
+ let newLabel = clone(data['newLabel']).map(item=>{
14
+ if(typeof item.isShow === 'boolean') item.check = item.isShow;
15
+ else item.check = true;
16
+ return item
15
17
  });
16
18
  tabContent = newLabel.sort((a,b)=>Number(a.sort)-Number(b.sort)).map(item=>{
17
19
  item['placeholder'] = '自定义名称';
@@ -86,13 +88,13 @@ export default (data, gValue, gColor, oldData={})=>{
86
88
  inline: false,
87
89
  handleCustom({action, data}) {
88
90
  data.cb([
89
- {value:'all', label: '全部',input:'',check: true,placeholder:'自定义名称'},
90
- {value:'sell', label: '线下',input:'',check: true, placeholder:'自定义名称'},
91
- {value:'code', label: '电子码',input:'',check: true,placeholder:'自定义名称'},
92
- {value:'stod', label: '线上',input:'',check: true,placeholder:'自定义名称'},
93
- {value:'stod-samecity', label: '同城配送',input:'',check: false,placeholder:'自定义名称'},
94
- {value:'stod-logistics', label: '快递配送',input:'',check: false,placeholder:'自定义名称'},
95
- {value:'stod-takeout', label: '门店自提',input:'',check: false,placeholder:'自定义名称'},
91
+ {value:'all', label: '全部',input:'', def: '全部', check: true,placeholder:'自定义名称'},
92
+ {value:'sell', label: '线下',input:'', def: '线下',check: true, placeholder:'自定义名称'},
93
+ {value:'code', label: '电子码',input:'', def: '电子码',check: true,placeholder:'自定义名称'},
94
+ {value:'stod', label: '线上',input:'', def: '线上',check: true,placeholder:'自定义名称'},
95
+ {value:'stod-samecity', label: '同城配送',input:'', def: '同城配送',check: false,placeholder:'自定义名称'},
96
+ {value:'stod-logistics', label: '快递配送',input:'', def: '快递配送',check: false,placeholder:'自定义名称'},
97
+ {value:'stod-takeout', label: '门店自提',input:'', def: '门店自提',check: false,placeholder:'自定义名称'},
96
98
  ])
97
99
  },
98
100
  },
@@ -146,7 +148,7 @@ export default (data, gValue, gColor, oldData={})=>{
146
148
  value: dataVal({data, key:'layout', dValue:'v1', gValue}),
147
149
  multiple: false,
148
150
  groupKey: 'content',
149
- className: 'input50',
151
+ className: 'input100',
150
152
  labelInline:true,
151
153
  list: [
152
154
  {label: '上下布局', value: 'v1'},
@@ -211,7 +213,7 @@ export default (data, gValue, gColor, oldData={})=>{
211
213
  placeholder: '请选择显示列',
212
214
  multiple: false,
213
215
  groupKey: 'content',
214
- className: 'input50',
216
+ className: 'input100',
215
217
  labelInline:true,
216
218
  hidden: !(['v1'].includes(dataVal({data, key:'layout', dValue:'v2', gValue}) )),
217
219
  list: [
@@ -27,48 +27,38 @@ export default (datas, gValue, gColor, oldData={})=>{
27
27
  let defTitleShadow = cRaBorShadow( data, 'titleShadow', {old:['isTitleShadow','isTitleShadowBgcW','isTitleShadowBgc']},gValue);
28
28
  let titleStyleFields = ['titleBgcColor','titleBgcActColor','titleColor','titleActColor'];
29
29
 
30
- function handle(isBtn, isChange=false){
31
- if(isBtn) {
32
- if(data['titleStyle'] !== undefined) {
33
- data['titleStyle']['color'] = '#333';
34
- data['titleStyle']['actColor'] = '#fff';
35
- data['titleStyle']['bgColor'] = '#fff';
36
- data['titleStyle']['actBgColor'] = '';
37
- }
38
- if(isChange && statusDataVal({data, key:'tabPaddingStatus', fields:['tabPadding'],gValue}) === 'C') {
39
- data['tabPadding'] = {top:24,left:32, right:32, bottom:24}
40
- }
41
- }
42
- else {
43
- if(data['titleStyle'] !== undefined) {
44
- data['titleStyle']['color'] = '#333';
45
- data['titleStyle']['actColor'] = gColor.mainColor;
46
- data['titleStyle']['bgColor'] = '';
47
- data['titleStyle']['actBgColor'] = '';
48
- if(isChange && statusDataVal({data, key:'tabPaddingStatus', fields:['tabPadding'],gValue}) === 'C') {
49
- data['tabPadding'] = {top:0,left:0, right:0, bottom:0}
50
- }
51
- }
52
- }
53
- }
54
-
55
- //切换左右
56
- if(data['layout'] !== oldData.layout) {
57
- handle(data['layout'] === 'v1'?data.hStyle === 'v1': data.vStyle === 'v2', data['layout'] === 'v1');
58
- }
59
-
60
- //上下结构,切换Tab样式
61
- if(data['layout'] === 'v1' && data.hStyle && oldData.hStyle && data.hStyle !== oldData.hStyle) {
62
- handle(data.hStyle === 'v1', true);
63
- }
64
- //左右结构,切换Tab样式
65
- if(data['layout'] === 'v2' && data.vStyle && oldData.vStyle && data.vStyle !== oldData.vStyle) {
66
- handle(data.vStyle === 'v2');
67
- }
68
- if(statusDataVal({data, key:'tabPaddingStatus', fields:['tabPadding'],gValue}) === 'C') {
69
- if(data['layout'] === 'v2') data['tabPadding'] = {top:20,left:0, right:0, bottom:0};
70
- else data['tabPadding'] = {top:24,left:32, right:0, bottom:24}
71
- }
30
+ // function handle(isBtn, isChange=false){
31
+ // if(isBtn) {
32
+ // if(data['titleStyle'] !== undefined) {
33
+ // data['titleStyle']['color'] = '#333';
34
+ // data['titleStyle']['actColor'] = '#fff';
35
+ // data['titleStyle']['bgColor'] = '#fff';
36
+ // data['titleStyle']['actBgColor'] = '';
37
+ // }
38
+ // }
39
+ // else {
40
+ // if(data['titleStyle'] !== undefined) {
41
+ // data['titleStyle']['color'] = '#333';
42
+ // data['titleStyle']['actColor'] = gColor.mainColor;
43
+ // data['titleStyle']['bgColor'] = '';
44
+ // data['titleStyle']['actBgColor'] = '';
45
+ // }
46
+ // }
47
+ // }
48
+ //
49
+ // //切换左右
50
+ // if(data['layout'] !== oldData.layout) {
51
+ // handle(data['layout'] === 'v1'?data.hStyle === 'v1': data.vStyle === 'v2', data['layout'] === 'v1');
52
+ // }
53
+ //
54
+ // //上下结构,切换Tab样式
55
+ // if(data['layout'] === 'v1' && data.hStyle && oldData.hStyle && data.hStyle !== oldData.hStyle) {
56
+ // handle(data.hStyle === 'v1', true);
57
+ // }
58
+ // //左右结构,切换Tab样式
59
+ // if(data['layout'] === 'v2' && data.vStyle && oldData.vStyle && data.vStyle !== oldData.vStyle) {
60
+ // handle(data.vStyle === 'v2');
61
+ // }
72
62
 
73
63
 
74
64
  return [
@@ -106,7 +96,7 @@ export default (datas, gValue, gColor, oldData={})=>{
106
96
  selected:true,
107
97
  default:{
108
98
  color: data['titleColor'] || '#333',
109
- bgColor:data['titleBgcColor'] || '#fff',
99
+ bgColor: data['titleBgcColor'] || '#fff',
110
100
  fontSize:'32',
111
101
  fontWeight: '400',
112
102
  actFontSize:'32',
@@ -145,7 +135,7 @@ export default (datas, gValue, gColor, oldData={})=>{
145
135
  groupKey: 'style',
146
136
  ele: 'xd-slider',
147
137
  valueKey: "titleSp",
148
- value: dataVal({data, key:'titleSp', dValue:gValue.isAdd && gValue.isFirst ?48: 0, gValue}),
138
+ value: dataVal({data, key:'titleSp', dValue:gValue.isFirst && gValue.isAdd?(data.layout === 'v2'?0:48):0}),
149
139
  hidden: !statusShow({data, key: 'titleSpStatus', fields:['titleSp'], gValue}),
150
140
  className: "input100",
151
141
  labelInline: true,
@@ -166,6 +156,7 @@ export default (datas, gValue, gColor, oldData={})=>{
166
156
  valueKey: 'titlePaddingStatus',
167
157
  value: statusDataVal({data, key: 'titlePaddingStatus', fields:['titlePadding'], gValue}),
168
158
  labelInline:true,
159
+ hidden: data['layout'] ==='v2',
169
160
  list: [
170
161
  {label: '默认', value: 'D'},
171
162
  {label: '自定义', value: 'C'},
@@ -178,7 +169,7 @@ export default (datas, gValue, gColor, oldData={})=>{
178
169
  ele: 'xd-slider',
179
170
  valueKey: "titlePadding",
180
171
  value: dataVal({data, key:'titlePadding', dValue:0, gValue}),
181
- hidden: !statusShow({data, key: 'titlePaddingStatus', fields:['titlePadding'], gValue}),
172
+ hidden: !statusShow({data, key: 'titlePaddingStatus', fields:['titlePadding'], gValue}) || data['layout'] ==='v2',
182
173
  className: "input100",
183
174
  labelInline: true,
184
175
  setting:{
@@ -336,7 +327,7 @@ export default (datas, gValue, gColor, oldData={})=>{
336
327
  value: dataVal({
337
328
  data,
338
329
  key:'tabPadding',
339
- dValue:[gValue.isAdd&&gValue.isFirst ? 0: {top:24,left:32, right:0, bottom:24}],
330
+ dValue:[gValue.isAdd && gValue.isFirst?{top:24,left:32, right:32, bottom:24}: 40],
340
331
  gValue,
341
332
  isPM: true,
342
333
  }),
@@ -357,7 +348,7 @@ export default (datas, gValue, gColor, oldData={})=>{
357
348
  groupKey: 'style',
358
349
  placeholder: '请选择未选中文字颜色',
359
350
  classNmae: 'input80',
360
- hidden: true
351
+ hidden: false
361
352
  },
362
353
  {
363
354
  label: '选中标签背景颜色:',
@@ -367,7 +358,7 @@ export default (datas, gValue, gColor, oldData={})=>{
367
358
  groupKey: 'style',
368
359
  placeholder: '请选择选中标签背景颜色',
369
360
  classNmae: 'input80',
370
- hidden: true
361
+ hidden: false
371
362
  },
372
363
  {
373
364
  label: '未选中文字颜色:',
@@ -377,7 +368,7 @@ export default (datas, gValue, gColor, oldData={})=>{
377
368
  groupKey: 'style',
378
369
  placeholder: '请选择未选中文字颜色',
379
370
  classNmae: 'input80',
380
- hidden: true
371
+ hidden: false
381
372
  },
382
373
  {
383
374
  label: '选中文字颜色:',
@@ -387,7 +378,7 @@ export default (datas, gValue, gColor, oldData={})=>{
387
378
  groupKey: 'style',
388
379
  placeholder: '请选择选中文字颜色',
389
380
  classNmae: 'input80',
390
- hidden: true
381
+ hidden: false
391
382
  },
392
383
 
393
384
  {