jufubao-base 1.0.187-beta2 → 1.0.187

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,152 +1,86 @@
1
1
  'use strict';
2
- import ICONS from '@/ICONS'
3
-
4
2
  export default {
5
3
  style: [],
6
4
  advanced: [],
7
- content:(data)=>{
8
- let footerSettingImage = [];
9
- let footerSetting = [];
10
- if(data['footerSettingImage'] && data['footerSettingImage'].length > 0 ) {
11
- footerSettingImage = data['footerSettingImage'];
12
- }
13
- if(data['footer-setting'] && data['footer-setting'].length > 0){
14
- footerSetting = data['footer-setting'];
15
- footerSetting.map((item,index)=>{
16
- if(!footerSettingImage[index]) footerSettingImage[index] = {};
17
- footerSettingImage[index] = Object.assign({},JSON.parse(JSON.stringify(item)),footerSettingImage[index])
18
- })
19
- }
20
- return [
21
- {
22
- label: '',
23
- ele: 'slot',
24
- slot: 'is_reference_title',
25
- groupKey: 'advanced',
26
- },
27
- {
28
- label: '背景图设置:',
29
- ele: 'xd-upload',
30
- valueKey: 'backgroundImage',
31
- groupKey:'content',
32
- value: data.backgroundImage || {},
33
- defaultValue: data.backgroundImage || null,
34
- slot: true,
35
- oneWidth: 375,
36
- oneHeight: 55,
37
- elinputClassName: 'input40',
38
- tipsformet: '上传文件格式:@imageType@,不超过@size@MB。建议尺寸:<span style="color:red">750*110</span>像素',
39
- type: ['jpg', 'png', 'jpeg'],
40
- styleType: 'one',
41
- uploadType: 'aliyun',
42
- size: .5,
43
- action: 'action',
44
- sort: true,
45
- maxlen: 1,
46
- },
47
- {
48
- label: '背景颜色:',
49
- ele: 'xd-color',
50
- valueKey: 'bgColor',
51
- groupKey:'content',
52
- value: data['bgColor'] || '',
53
- placeholder: '请选择背景颜色',
54
- setting: {
55
- isAlpha: false
56
- },
57
- classNmae: 'input80',
5
+ content: [
6
+ {
7
+ label: '',
8
+ ele: 'slot',
9
+ slot: 'is_reference_title',
10
+ groupKey: 'advanced',
11
+ },
12
+ {
13
+ label: '背景颜色:',
14
+ ele: 'xd-color',
15
+ valueKey: 'bgColor',
16
+ groupKey:'style',
17
+ value: '',
18
+ placeholder: '请选择背景颜色',
19
+ setting: {
20
+ isAlpha: false
58
21
  },
59
- {
60
- label: '菜单文字颜色:',
61
- ele: 'xd-color',
62
- valueKey: 'color',
63
- groupKey:'content',
64
- value: data['color'] || '',
65
- setting: {
66
- isAlpha: false
67
- },
68
- placeholder: '请选择菜单文字颜色',
69
- classNmae: 'input80',
22
+ classNmae: 'input80',
23
+ },
24
+ {
25
+ label: '菜单文字颜色:',
26
+ ele: 'xd-color',
27
+ valueKey: 'color',
28
+ groupKey:'style',
29
+ value: '',
30
+ setting: {
31
+ isAlpha: false
70
32
  },
71
- {
72
- label: '菜单文字选中颜色:',
73
- ele: 'xd-color',
74
- valueKey: 'selectedColor',
75
- groupKey:'content',
76
- setting: {
77
- isAlpha: false
78
- },
79
- value:data['selectedColor'] || '',
80
- placeholder: '请选择菜单文字选中颜色',
81
- classNmae: 'input80',
33
+ placeholder: '请选择菜单文字颜色',
34
+ classNmae: 'input80',
35
+ },
36
+ {
37
+ label: '菜单文字选中颜色:',
38
+ ele: 'xd-color',
39
+ valueKey: 'selectedColor',
40
+ groupKey:'style',
41
+ setting: {
42
+ isAlpha: false
82
43
  },
83
- footerSetting.length > 0 && {
84
- label: '菜单图片配置:',
85
- ele: 'xd-footer-setting',
86
- valueKey: 'footerSettingImage',
87
- groupKey:'content',
88
- value: footerSettingImage,
89
- setting: {
90
- router: XdBus.getParentApi('getPagesTree'),
91
- hideAdd: true,
92
- showField: {
93
- path: false,
94
- icon: false,
95
- notice: false,
96
- image: true,
97
- actImage: true
98
- }
99
- },
100
- handleCustom({action,data}){
101
- if(action === 'number') {
102
- XdBus.getParentApi('getOptionsNoticeNumber')()
103
- .then(res => {
104
- data.cb(res.list)
105
- })
106
- .catch();
107
- }
108
- },
109
- },
110
-
111
- {
112
- label: '菜单配置:',
113
- ele: 'xd-footer-setting',
114
- valueKey: 'footer-setting',
115
- groupKey:'advanced',
116
- value: footerSetting,
117
- setting: {
118
- router: XdBus.getParentApi('getPagesTree'),
119
- icons:ICONS,
120
-
121
- showField: {
122
- path: true,
123
- icon: true,
124
- notice: true,
125
- }
126
- },
127
- handleCustom({action,data}){
128
- console.log(`handleCustom.${action}`, data);
129
- if(action === 'number') {
130
- XdBus.getParentApi('getOptionsNoticeNumber')()
131
- .then(res => {
132
- data.cb(res.list)
133
- })
134
- .catch();
135
- }
136
- },
137
- inline: false,
138
- notice: '设置底部菜单的链接地址1、标题(最多<sapn style="color: red">五个汉字</sapn>)、ICON图标(<a href="https://www.iconfont.cn/manage/index?spm=a313x.7781069.1998910419.db775f1f3&manage_type=myprojects&projectId=3378319&keyword=&project_type=&page=" style="color: blue" target="_blank">ICONFONT库</a>)、ICON大小(单位:<sapn style="color: red">像素</sapn>)和是否有消息数量显示(无数量显示可以不填写)',
139
- rules: [
140
- {required: true, message: '请添加内容', trigger: 'change'},
141
- ],
44
+ value: '',
45
+ placeholder: '请选择菜单文字选中颜色',
46
+ classNmae: 'input80',
47
+ },
48
+ {
49
+ label: '菜单配置:',
50
+ ele: 'xd-footer-setting',
51
+ valueKey: 'footer-setting',
52
+ groupKey:'advanced',
53
+ value: [],
54
+ setting: {
55
+ router: XdBus.getParentApi('getPagesTree'),
56
+ showField: {
57
+ path: true,
58
+ icon: true,
59
+ notice: true
60
+ }
142
61
  },
143
- {
144
- label: '',
145
- ele: 'slot',
146
- slot: 'is_reference',
147
- groupKey: 'advanced',
62
+ handleCustom({action,data}){
63
+ console.log(`handleCustom.${action}`, data);
64
+ if(action === 'number') {
65
+ XdBus.getParentApi('getOptionsNoticeNumber')()
66
+ .then(res => {
67
+ data.cb(res.list)
68
+ })
69
+ .catch();
70
+ }
148
71
  },
149
- ].filter(i=>i);
150
- },
72
+ inline: false,
73
+ notice: '设置底部菜单的链接地址1、标题(最多<sapn style="color: red">五个汉字</sapn>)、ICON图标(<a href="https://www.iconfont.cn/manage/index?spm=a313x.7781069.1998910419.db775f1f3&manage_type=myprojects&projectId=3378319&keyword=&project_type=&page=" style="color: blue" target="_blank">ICONFONT库</a>)、ICON大小(单位:<sapn style="color: red">像素</sapn>)和是否有消息数量显示(无数量显示可以不填写)',
74
+ rules: [
75
+ {required: true, message: '请添加内容', trigger: 'change'},
76
+ ],
77
+ },
78
+ {
79
+ label: '',
80
+ ele: 'slot',
81
+ slot: 'is_reference',
82
+ groupKey: 'advanced',
83
+ },
84
+ ],
151
85
  };
152
86
 
@@ -16,19 +16,16 @@
16
16
  <view class="jfb-base-footer__edit-icon" @click="delEdit">删除</view>
17
17
  </view>
18
18
  <!-- #endif -->
19
- <view class="jfb-base-footer__body">
20
- <view :style="[bodyStyle]">
21
- <xd-footer-bar
22
- style="height:100%"
23
- v-if="list !== null"
24
- :height="height"
25
- :tabbar="list"
26
- :view="view"
27
- :styles="styles"
28
- :key="footerBarKey"
29
- :base-url="baseUrl"
30
- ></xd-footer-bar>
31
- </view>
19
+ <view class="jfb-base-footer__body" :style="{height:height + 'rpx'}">
20
+ <xd-footer-bar
21
+ v-if="list !== null"
22
+ :height="height"
23
+ :tabbar="list"
24
+ :view="view"
25
+ :styles="styles"
26
+ :key="footerBarKey"
27
+ :base-url="baseUrl"
28
+ ></xd-footer-bar>
32
29
  </view>
33
30
  </view>
34
31
  </template>
@@ -45,7 +42,6 @@
45
42
  getContainerPropsValue,
46
43
  getComponentAttr
47
44
  } from "@/utils/xd.base";
48
- import getServiceUrl from "@/common/getServiceUrl";
49
45
 
50
46
  export default {
51
47
  name: "JfbBaseFooter",
@@ -54,21 +50,6 @@
54
50
  XdFooterBar
55
51
  },
56
52
  mixins: [componentsMixins,extsMixins,JfbBaseFooterMixin],
57
- computed:{
58
- bodyStyle(){
59
- let background = 'url(none)';
60
- if(this.backgroundImage && this.backgroundImage.url) {
61
- background = `url(${getServiceUrl(this.backgroundImage.url)})`;
62
- }
63
- return {
64
- height: this.height + 'rpx',
65
- backgroundImage: background,
66
- backgroundSize: '100% 100%',
67
- backgroundRepeat: 'no-repeat',
68
- backgroundPosition: 'top center',
69
- }
70
- }
71
- },
72
53
  data() {
73
54
  return {
74
55
  height: 0,
@@ -77,7 +58,6 @@
77
58
  numObj: {},
78
59
  footerBarKey: 'footerBarKey', //刷新
79
60
  baseUrl: '',
80
- backgroundImage: '',
81
61
  }
82
62
  },
83
63
  watch: {
@@ -102,14 +82,12 @@
102
82
 
103
83
  //设置高度
104
84
  if(this.$configProject.isPreview) {
105
- this.height = getComponentAttr(this.componentAttr, 'height');
85
+ this.height = getComponentAttr(this.componentAttr, 'height') - 4;
106
86
  }
107
87
  else {
108
88
  this.height = getComponentAttr(this.componentAttr, 'height');
109
89
  }
110
90
 
111
- this.height = Number(this.height);
112
-
113
91
  this.init(this.container);
114
92
  //监听重试消息数量
115
93
  this.$xdRoot.$on('restFooterNumber', this.handle)
@@ -181,13 +159,6 @@
181
159
  this.footerBarKey = this.$xdUniHelper.randomChar(20);
182
160
  },
183
161
 
184
- getImage(list=[],index,key){
185
- if(!list[index]) return '';
186
- if(list[index] && !list[index][key]) return '';
187
- let item = list[index][key];
188
- return getServiceUrl(item.url, 'size1');
189
- },
190
-
191
162
  /**
192
163
  * @description 监听事件变化
193
164
  * @param value {object} 业务组件对象自己
@@ -195,11 +166,8 @@
195
166
  init(value) {
196
167
  //设置底部菜单
197
168
  let bar = getContainerPropsValue(value, 'content.footer-setting', []);
198
- let imageIcons = getContainerPropsValue(value, 'content.footerSettingImage', []);
199
- this.backgroundImage = getContainerPropsValue(value, 'content.backgroundImage', '');
200
169
  this.list = {
201
170
  bgColor: getContainerPropsValue(value, 'content.bgColor', '#fff'),
202
- bodyStyle: this.bodyStyle,
203
171
  selectedColor: getContainerPropsValue(value, 'content.selectedColor', this.mainColor),
204
172
  color: getContainerPropsValue(value, 'content.color', '#333'),
205
173
  list: bar.map((item,index)=>{
@@ -209,8 +177,6 @@
209
177
  path: item.path.value,
210
178
  size: item.size,
211
179
  num: this.numObj[index] ? this.numObj[index]: 0 ,
212
- image: this.getImage(imageIcons,index,'image') || this.getImage(imageIcons,index,'actImage'),
213
- actImage: this.getImage(imageIcons,index,'actImage') || this.getImage(imageIcons,index,'image'),
214
180
  }
215
181
  }),
216
182
  };
@@ -224,7 +190,6 @@
224
190
  @import "./JfbBaseFooterLess.less";
225
191
 
226
192
  .jfb-base-footer {
227
-
228
193
  &__body{
229
194
  box-sizing: border-box;
230
195
  }
@@ -332,50 +332,48 @@ export default {
332
332
  notice: '间距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
333
333
  },
334
334
  {
335
- label: "主体信息行间距:",
336
- ele: 'el-input',
337
- type: 'number',
338
- valueKey: 'lineHeight',
335
+ ele: 'title',
336
+ label: '投影设置',
337
+ size: 'small',
339
338
  groupKey:'style',
340
- value: data['lineHeight'] || 20,
341
- placeholder: '请输入主体信息行间距',
342
- className: 'input80',
343
339
  },
344
340
  {
345
- label: '投影设置:',
346
- ele: "xd-shadow",
347
- valueKey: "sectionShadow",
348
- value: data.sectionShadow || {},
341
+ label: '是否有投影:',
342
+ ele: 'xd-radio',
349
343
  groupKey:'style',
350
- handleCustom({action, data}) {
351
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
352
- .then(res => {
353
- data.cb(res.list)
354
- })
355
- .catch(error => {
356
- console.error(error);
357
- data.cb([])
358
- });
359
- },
344
+ valueKey: 'is_shadow',
345
+ value: data['is_shadow'] || 'N',
346
+ placeholder: '请选择是否投影',
347
+ multiple: false,
348
+ className: 'input80',
349
+ list: [
350
+ { label: '是', value: 'Y' },
351
+ { label: '否', value: 'N' },
352
+ ]
360
353
  },
361
- {
362
- label: "边框设置:",
363
- ele: "xd-border",
364
- valueKey: "sectionBorder",
365
- value: data.sectionBorder || {},
354
+ data['is_shadow'] === 'Y' && {
355
+ label: '投影颜色:',
356
+ ele: 'xd-color',
366
357
  groupKey:'style',
358
+ valueKey: 'is_shadow_bg',
359
+ value: data['is_shadow_bg'] || '',
360
+ placeholder: '请选择投影颜色',
361
+ classNmae: 'input80',
367
362
  },
368
- {
369
- label: '内容圆角设置:',
363
+ data['is_shadow'] === 'Y' && {
364
+ label: '投影范围:',
370
365
  ele: 'xd-site-select-list',
371
- valueKey: 'radius',
366
+ valueKey: 'is_shadow_w',
372
367
  groupKey:'style',
373
- value: data['radius'] || '',
374
- placeholder: '请选择内容圆角设置',
368
+ value: data['is_shadow_w'] || '10',
369
+ placeholder: '请选择投影范围',
375
370
  multiple: false,
376
371
  className: 'input80',
377
372
  handleCustom({ action, data }) {
378
- XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
373
+ XdBus.getParentApi('getOptionsSettingList')({
374
+ setting_id: 'edtix_style_radius',
375
+ key: Date.now()
376
+ })
379
377
  .then(res => {
380
378
  data.cb(res.list)
381
379
  })
@@ -385,45 +383,50 @@ export default {
385
383
  },
386
384
  },
387
385
  {
388
- label: "底部按钮配置",
389
- ele: "title",
390
- groupKey: "style",
391
- size: "small"
386
+ ele: 'title',
387
+ label: '边框设置',
388
+ size: 'small',
389
+ groupKey:'style',
392
390
  },
393
391
  {
394
- label: "容器内边距:",
395
- ele: 'xd-margin-padding',
396
- valueKey: 'bottomPadding',
397
- value: data['bottomPadding'] || null,
392
+ label: '是否有边框:',
393
+ ele: 'xd-radio',
394
+ valueKey: 'is_border',
395
+ value: data['is_border'] || 'N',
398
396
  groupKey:'style',
399
- setting: {
400
- type: 'padding',
401
- },
402
- placeholder: '请设置容器内边距',
397
+ placeholder: '请选择是否有边框',
398
+ multiple: false,
399
+ className: 'input80',
400
+ list: [
401
+ { label: '是', value: 'Y' },
402
+ { label: '否', value: 'N' },
403
+ ]
403
404
  },
404
- {
405
- label: "容器背景颜色:",
406
- ele: "xd-color",
407
- valueKey: "bottomBgColor",
408
- value: data.bottomBgColor || null,
409
- groupKey: "style",
405
+ data['is_border'] === 'Y' && {
406
+ label: '边框颜色:',
407
+ ele: 'xd-color',
408
+ groupKey:'style',
409
+ valueKey: 'is_border_c',
410
+ value: data['is_border_c'] || '',
411
+ placeholder: '请选择边框颜色',
412
+ classNmae: 'input80',
410
413
  },
411
- {
412
- label: "按钮高度:",
413
- ele: "el-input",
414
- type: 'number',
415
- valueKey: "bottomBtnHeight",
414
+ data['is_border'] === 'Y' && {
415
+ label: '边框大小:',
416
416
  groupKey:'style',
417
- value: data['bottomBtnHeight'] || 60,
418
- placeholder: '请输入按钮高度',
417
+ ele: 'el-input',
418
+ type: 'number',
419
+ valueKey: 'is_border_w',
420
+ value: data['is_border_w'] || '',
421
+ placeholder: '请输入边框颜色',
419
422
  className: 'input80',
420
423
  },
421
424
  {
422
- label: '按钮圆角:',
423
- ele: "xd-site-select-list",
424
- valueKey: "bottomBtnRadius",
425
- value: data['bottomBtnRadius'] || '',
425
+ label: '内容圆角设置:',
426
+ ele: 'xd-site-select-list',
427
+ valueKey: 'radius',
426
428
  groupKey:'style',
429
+ value: data['radius'] || '',
427
430
  placeholder: '请选择内容圆角设置',
428
431
  multiple: false,
429
432
  className: 'input80',
@@ -437,6 +440,7 @@ export default {
437
440
  });
438
441
  },
439
442
  },
443
+
440
444
  {
441
445
  label: '查看品牌路径:',
442
446
  ele: 'xd-select-pages-path',