jufubao-base 1.0.184-beta2 → 1.0.185

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.184-beta2",
3
+ "version": "1.0.185",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
  import StyleForm from "@/utils/StyleForm";
3
- import IConList from "@/ICONS"
4
3
  let styleForm = new StyleForm(
5
4
  {border: null, shadow: null, spacing: '', bgColor:'', margin: null},
6
5
  null,
@@ -12,35 +11,6 @@ export default {
12
11
  advanced: [],
13
12
  content: (data)=>{
14
13
  return [
15
- {
16
- label: "布局样式配置",
17
- ele: "xd-radio",
18
- valueKey: "layout_style",
19
- value: data.layout_style || 'old',
20
- list: [
21
- {label: '布局1', value: 'old'},
22
- {label: '布局2', value: 'tfk'},
23
- ],
24
- groupKey: "style",
25
- },
26
- {
27
- label: "编辑图标",
28
- ele: "xd-select-list",
29
- valueKey: "edit_icon",
30
- value: data.edit_icon || 'iconbianji-01',
31
- list: IConList,
32
- className: 'input80',
33
- groupKey: "content",
34
- },
35
- {
36
- label: "删除图标",
37
- ele: "xd-select-list",
38
- valueKey: "delete_icon",
39
- value: data.delete_icon || 'iconshanchu-01',
40
- list: IConList,
41
- className: 'input80',
42
- groupKey: "content",
43
- },
44
14
  {
45
15
  label: '选取地区路径:',
46
16
  ele: 'xd-select-pages-path',
@@ -53,26 +23,7 @@ export default {
53
23
  },
54
24
  inline: false,
55
25
  },
56
- ...styleForm.getForm(data, '内容列表样式配置'),
57
- {
58
- label: "圆角设置",
59
- ele: 'xd-site-select-list',
60
- valueKey: 'cardRadius',
61
- value: data['cardRadius'] || '',
62
- groupKey:'style',
63
- placeholder: '请选择内容圆角设置',
64
- multiple: false,
65
- className: 'input80',
66
- handleCustom({ action, data }) {
67
- XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
68
- .then(res => {
69
- data.cb(res.list)
70
- })
71
- .catch(error => {
72
- console.error(error);
73
- });
74
- },
75
- }
26
+ ...styleForm.getForm(data, '内容列表样式配置')
76
27
  ].filter(i=>i)
77
28
  },
78
29
  }
@@ -26,108 +26,81 @@
26
26
  class="jfb-base-address__body-address"
27
27
  v-if="addressList && addressList.length > 0"
28
28
  >
29
- <template v-if="layout_style === 'old'">
30
- <view
31
- :style="{
32
- marginBottom: jfbListSpacing + 'rpx',
33
- boxShadow: jfbListShadowComputed,
34
- border: jfbListBorderComputed,
35
- backgroundColor: jfbListBgColor,
36
- borderRadius: cardRadius + 'rpx'
37
- }"
38
- class="jfb-base-address__body-address-item"
39
- v-for="(item, index) in addressList"
40
- @click="handleSelectAddress(item)"
41
- :key="index"
42
- >
43
- <view class="jfb-base-address__body-address-item-top">
44
- <view
45
- v-if="item.is_default === 'Y'"
46
- :style="{
47
- backgroundColor: mainColor,
48
- color: '#fff',
49
- fontSize: '24rpx',
50
- padding: '4rpx 10rpx',
51
- borderRadius: '4rpx',
52
- marginRight: '20rpx',
53
- }"
54
- >默认</view
55
- >
56
- <view
57
- :style="{
58
- color: '#999999',
59
- flex: 1,
60
- paddingRight: item.is_valid === 'N' ? '40rpx' : '',
61
- }"
62
- >
63
- <view>
64
- {{ item | getCodeName }}
65
- </view>
66
- </view>
67
- <view
68
- style="position: absolute; right: 40rpx; width: 50rpx"
69
- v-if="item.is_valid === 'N'"
70
- >
71
- <xd-font-icon
72
- size="32"
73
- :color="dangerColor"
74
- icon="iconmingchengtubiao"
75
- ></xd-font-icon>
76
- </view>
77
- </view>
78
- <view class="jfb-base-address__body-address-item-middle">
79
- {{ item.address_detail }} {{ item.house_number }}
80
- </view>
29
+ <view
30
+ :style="{
31
+ marginBottom: jfbListSpacing + 'rpx',
32
+ boxShadow: jfbListShadowComputed,
33
+ border: jfbListBorderComputed,
34
+ backgroundColor: jfbListBgColor,
35
+ }"
36
+ class="jfb-base-address__body-address-item"
37
+ v-for="(item, index) in addressList"
38
+ @click="handleSelectAddress(item)"
39
+ :key="index"
40
+ >
41
+ <view class="jfb-base-address__body-address-item-top">
81
42
  <view
43
+ v-if="item.is_default === 'Y'"
82
44
  :style="{
83
- backgroundColor: item.is_select === 'Y' ? mainColor : '#CCC',
45
+ backgroundColor: mainColor,
46
+ color: '#fff',
47
+ fontSize: '24rpx',
48
+ padding: '4rpx 10rpx',
49
+ borderRadius: '4rpx',
50
+ marginRight: '20rpx',
51
+ }"
52
+ >默认</view
53
+ >
54
+ <view
55
+ :style="{
56
+ color: '#999999',
57
+ flex: 1,
58
+ paddingRight: item.is_valid === 'N' ? '40rpx' : '',
84
59
  }"
85
- class="jfb-base-address__body-address-item-bottom"
86
60
  >
87
61
  <view>
88
- <view style="margin-right: 40rpx">{{ item.name }}</view>
89
- <view>{{ item.phone }}</view>
90
- </view>
91
- <view>
92
- <xd-font-icon
93
- @click.native.stop="handleEdit(item)"
94
- style="margin-right: 40rpx"
95
- icon="iconbianji-01"
96
- size="32"
97
- ></xd-font-icon>
98
- <xd-font-icon
99
- @click.native.stop="handleDel(item)"
100
- icon="iconshanchu-01"
101
- size="32"
102
- ></xd-font-icon>
62
+ {{ item | getCodeName }}
103
63
  </view>
104
64
  </view>
65
+ <view
66
+ style="position: absolute; right: 40rpx; width: 50rpx"
67
+ v-if="item.is_valid === 'N'"
68
+ >
69
+ <xd-font-icon
70
+ size="32"
71
+ :color="dangerColor"
72
+ icon="iconmingchengtubiao"
73
+ ></xd-font-icon>
74
+ </view>
75
+ </view>
76
+ <view class="jfb-base-address__body-address-item-middle">
77
+ {{ item.address_detail }} {{ item.house_number }}
105
78
  </view>
106
- </template>
107
- <template v-else>
108
79
  <view
109
80
  :style="{
110
- marginBottom: jfbListSpacing + 'rpx',
111
- boxShadow: jfbListShadowComputed,
112
- border: jfbListBorderComputed,
113
- backgroundColor: jfbListBgColor,
114
- borderRadius: cardRadius + 'rpx'
81
+ backgroundColor: item.is_select === 'Y' ? mainColor : '#CCC',
115
82
  }"
116
- v-for="(item, index) in addressList"
117
- @click="handleSelectAddress(item)"
118
- :key="index"
83
+ class="jfb-base-address__body-address-item-bottom"
119
84
  >
120
- <xd-tfk-item
121
- :edit_icon="edit_icon"
122
- :delete_icon="delete_icon"
123
- :item="item"
124
- :dangerColor="dangerColor"
125
- @editAddress="handleEdit(item)"
126
- @delAddress="handleDel(item)"
127
- @setDefault="handleSetDefault(item)"
128
- ></xd-tfk-item>
85
+ <view>
86
+ <view style="margin-right: 40rpx">{{ item.name }}</view>
87
+ <view>{{ item.phone }}</view>
88
+ </view>
89
+ <view>
90
+ <xd-font-icon
91
+ @click.native.stop="handleEdit(item)"
92
+ style="margin-right: 40rpx"
93
+ icon="iconbianji-01"
94
+ size="32"
95
+ ></xd-font-icon>
96
+ <xd-font-icon
97
+ @click.native.stop="handleDel(item)"
98
+ icon="iconshanchu-01"
99
+ size="32"
100
+ ></xd-font-icon>
101
+ </view>
129
102
  </view>
130
- </template>
103
+ </view>
131
104
  </view>
132
105
  <view class="jfb-base-address__body-empty" v-else>
133
106
  <xd-font-icon icon="iconbianzu-01" size="120"></xd-font-icon>
@@ -177,7 +150,6 @@ import componentsMixins from "@/mixins/componentsMixins";
177
150
  import extsMixins from "@/mixins/extsMixins";
178
151
  import StyleForm from "@/utils/StyleForm";
179
152
  import { getContainerPropsValue } from "@/utils/xd.base";
180
- import XdTfkItem from "./XdTfkItem"
181
153
  let styleForm = new StyleForm(
182
154
  {
183
155
  border: null,
@@ -202,7 +174,6 @@ export default {
202
174
  XdButton,
203
175
  XdDownDrawer,
204
176
  XdAddress,
205
- XdTfkItem,
206
177
  },
207
178
  mixins: [componentsMixins, extsMixins, JfbBaseAddressMixin],
208
179
  data() {
@@ -213,12 +184,7 @@ export default {
213
184
  location_url: "",
214
185
  addressList: null,
215
186
  ...styleForm.getDataItem(),
216
- version: '',
217
-
218
- layout_style: "old",
219
- edit_icon: "",
220
- delete_icon: "",
221
- cardRadius: 16,
187
+ version: ''
222
188
  };
223
189
  },
224
190
  filters: {
@@ -270,11 +236,6 @@ export default {
270
236
  { value: "" }
271
237
  ).value;
272
238
  styleForm.getInitItem(this, value);
273
- this.layout_style = getContainerPropsValue(value, "content.layout_style", "old");
274
- this.edit_icon = getContainerPropsValue(value, "content.edit_icon", "iconbianji-01");
275
- this.delete_icon = getContainerPropsValue(value, "content.delete_icon", "iconshanchu-01");
276
- this.cardRadius = getContainerPropsValue(value, "content.cardRadius", 16);
277
- console.log("edit_icon", this.edit_icon)
278
239
  },
279
240
  getList(callback) {
280
241
  this.$xdShowLoading({});
@@ -529,8 +490,7 @@ export default {
529
490
  })
530
491
  .catch(this.$xdLog.catch);
531
492
  },
532
- //接口数据接口映射到组件数据接口
533
- apiDataMapCompData(item){
493
+ handleEdit(item) {
534
494
  let city_name = [
535
495
  item["province_name"],
536
496
  item["city_name"],
@@ -543,15 +503,13 @@ export default {
543
503
  item["area_code"],
544
504
  item["street_code"],
545
505
  ];
546
- return {
506
+ this.defaultValue = {
547
507
  receipt_username: item["name"],
548
508
  receipt_address: item["address_detail"],
549
509
  receipt_phone: item["phone"],
550
510
  receipt_default: item["is_default"] === "Y" ? true : false,
551
511
  city_name: city_name,
552
512
  city_code: city_code,
553
- receipt_city_code: city_code,
554
- receipt_city_name: city_name,
555
513
  receipt_region_name: city_name.join(" "),
556
514
  city_selected_data: city_name.map((item, index) => {
557
515
  return { label: item, value: city_code[index] };
@@ -560,20 +518,11 @@ export default {
560
518
  latitude: item["latitude"] || null,
561
519
  longitude: item["longitude"] || null,
562
520
  house_number: item["house_number"],
563
- }
564
- },
565
- handleEdit(item) {
566
- this.defaultValue = this.apiDataMapCompData(item);
521
+ };
567
522
 
568
523
  console.log("handleEdit", item, this.defaultValue);
569
524
  this.showAddress = true;
570
525
  },
571
- handleSetDefault(item){
572
- let is_default = item.is_default === "Y" ? "N" : "Y";
573
- this.$set(item, 'is_default', is_default);
574
- let saveData = this.apiDataMapCompData({...item, is_default});
575
- this.handleSave(saveData);
576
- },
577
526
  handleDel(item) {
578
527
  console.log("handleDel", item);
579
528
  this.$xdConfirm({
@@ -721,10 +670,9 @@ export default {
721
670
 
722
671
  &-address {
723
672
  &-item {
724
- // border-radius: unit(16, rpx);
673
+ border-radius: unit(16, rpx);
725
674
  margin-bottom: unit(20, rpx);
726
675
  box-shadow: 0px 0px unit(20, rpx) 0px rgba(0, 0, 0, 0.1);
727
- overflow: hidden;
728
676
 
729
677
  &-top {
730
678
  display: flex;
@@ -747,7 +695,7 @@ export default {
747
695
  padding: unit(20, rpx) unit(40, rpx);
748
696
  font-size: unit(28, rpx);
749
697
  color: #fff;
750
- // border-radius: 0px 0px unit(16, rpx) unit(16, rpx);
698
+ border-radius: 0px 0px unit(16, rpx) unit(16, rpx);
751
699
 
752
700
  & > view {
753
701
  display: flex;
@@ -27,9 +27,22 @@ export default {
27
27
  {label: '悬浮', value: 'fixed'},
28
28
  ],
29
29
  inline: false,
30
- notice: `使用悬浮布局时,快速链接数量不可超过<span style="color:red"> 3 </span>个,并且把该组件移动到最后`
30
+ notice: `使用悬浮布局时,链接数量不可超过<span style="color:red"> 3 </span>个,超出部分不显示, 并且把该组件移动到最后`
31
31
  },
32
- data['is_layout'] ==='fixed' && {
32
+ {
33
+ label: '默认是否收起:',
34
+ ele: 'xd-radio',
35
+ valueKey: 'isNotExpand',
36
+ groupKey:'content',
37
+ value: data['isNotExpand'] || 'Y',
38
+ className: 'input80',
39
+ list: [
40
+ {label: '是', value: 'Y'},
41
+ {label: '否', value: 'N'},
42
+ ],
43
+ hidden: data['is_layout'] !=='fixed'
44
+ },
45
+ data['is_layout'] ==='fixed' && 0 && {
33
46
  label: '自定义名称:',
34
47
  ele: 'el-input',
35
48
  type: 'text',
@@ -68,16 +81,16 @@ export default {
68
81
  },
69
82
  },
70
83
  {
71
- label: '间距:',
84
+ label: '行间距:',
72
85
  ele: 'el-input',
73
86
  groupKey:'style',
74
87
  type: 'number',
75
88
  valueKey: 'padding',
76
89
  value: data.padding===undefined? data.padding: '',
77
- placeholder: '请输入间距',
90
+ placeholder: '请输入行间距',
78
91
  className: 'input60',
79
92
  inline: false,
80
- notice: '设置间距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
93
+ notice: '设置行间距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
81
94
  },
82
95
  {
83
96
  label: '外边距设置:',
@@ -50,6 +50,7 @@
50
50
  >弹窗模式方便编辑(占位),在线上此模块不显</view>
51
51
  </template>
52
52
  <xd-fast-nav
53
+ :is-not-expand="isNotExpand === 'Y'"
53
54
  :list="listNave"
54
55
  :color="mainColor"
55
56
  :is-preview="isPreview"
@@ -86,6 +87,7 @@
86
87
  list: [],
87
88
  backgroundColor: '',
88
89
  isPreview:false,
90
+ isNotExpand: 'Y',
89
91
 
90
92
  //基础信息
91
93
  background: '#fff',
@@ -104,12 +106,7 @@
104
106
  is_border_c: '',
105
107
 
106
108
  //其他
107
- margin: {
108
- top: 0,
109
- left: 0,
110
- right: 0,
111
- bottom: 0
112
- },
109
+ margin: {},
113
110
  padding: 20, //间距
114
111
  }
115
112
  },
@@ -157,7 +154,7 @@
157
154
  handleClick(item){
158
155
  if(item.path && item.path.value) {
159
156
  this.$xdUniHelper.navigateTo({
160
- url : `${item.path.value}`
157
+ url : `${item.path.value}`
161
158
  })
162
159
  }
163
160
  },
@@ -173,7 +170,7 @@
173
170
  this.iconColor = getContainerPropsValue(container, 'content.iconColor', '#999');
174
171
  this.padding = getContainerPropsValue(container, 'content.padding', 20);
175
172
  this.is_layout = getContainerPropsValue(container, 'content.is_layout', 'noraml');
176
- this.fastName = getContainerPropsValue(container, 'content.fastName', '快速导航');
173
+ //this.fastName = getContainerPropsValue(container, 'content.fastName', '快速导航');
177
174
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
178
175
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
179
176
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', 2);
@@ -187,6 +184,7 @@
187
184
  this.margin = getContainerPropsValue(container, 'content.margin', {top: 0, left: 0, right: 0, bottom: 0});
188
185
  this.subColor = getContainerPropsValue(container, 'content.textSubColor', '#000');
189
186
  this.fontSubSize = getContainerPropsValue(container, 'content.fontSubSize', 24);
187
+ this.isNotExpand = getContainerPropsValue(container, 'content.isNotExpand', 'Y');
190
188
  if(this.is_layout === 'fixed') {
191
189
  this.listNave = this.list.map(item=>{
192
190
  let {appValue,path} = item.path
@@ -212,6 +210,8 @@
212
210
  jumpUrl = `${jumpUrl}${bus}`;
213
211
  return { name: item.name, path: jumpUrl, icon: item.icon, size: item.size }
214
212
  }
213
+ }).filter((item,index)=>{
214
+ return index < 3
215
215
  });
216
216
  }
217
217
 
@@ -75,7 +75,12 @@
75
75
  return {}
76
76
  }
77
77
  },
78
+ isNotExpand:{
79
+ type:Boolean,
80
+ default: true
81
+ },
78
82
  },
83
+
79
84
  data(){
80
85
  return {
81
86
  uizIndex: 100,
@@ -83,6 +88,11 @@
83
88
  lineColor: '#fff'
84
89
  }
85
90
  },
91
+ watch:{
92
+ isNotExpand(value){
93
+ this.close = value;
94
+ }
95
+ },
86
96
 
87
97
  computed:{
88
98
  uiTop(){
@@ -92,6 +102,8 @@
92
102
 
93
103
  created() {
94
104
  this.lineColor = Color(this.color).alpha(0.2).toString();
105
+ this.close = this.isNotExpand;
106
+
95
107
  },
96
108
 
97
109
  methods: {
@@ -332,39 +332,95 @@ 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',
343
+ groupKey:'style',
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
+ ]
353
+ },
354
+ data['is_shadow'] === 'Y' && {
355
+ label: '投影颜色:',
356
+ ele: 'xd-color',
357
+ groupKey:'style',
358
+ valueKey: 'is_shadow_bg',
359
+ value: data['is_shadow_bg'] || '',
360
+ placeholder: '请选择投影颜色',
361
+ classNmae: 'input80',
362
+ },
363
+ data['is_shadow'] === 'Y' && {
364
+ label: '投影范围:',
365
+ ele: 'xd-site-select-list',
366
+ valueKey: 'is_shadow_w',
349
367
  groupKey:'style',
350
- handleCustom({action, data}) {
351
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
368
+ value: data['is_shadow_w'] || '10',
369
+ placeholder: '请选择投影范围',
370
+ multiple: false,
371
+ className: 'input80',
372
+ handleCustom({ action, data }) {
373
+ XdBus.getParentApi('getOptionsSettingList')({
374
+ setting_id: 'edtix_style_radius',
375
+ key: Date.now()
376
+ })
352
377
  .then(res => {
353
378
  data.cb(res.list)
354
379
  })
355
380
  .catch(error => {
356
381
  console.error(error);
357
- data.cb([])
358
382
  });
359
383
  },
360
384
  },
361
385
  {
362
- label: "边框设置:",
363
- ele: "xd-border",
364
- valueKey: "sectionBorder",
365
- value: data.sectionBorder || {},
386
+ ele: 'title',
387
+ label: '边框设置',
388
+ size: 'small',
366
389
  groupKey:'style',
367
390
  },
391
+ {
392
+ label: '是否有边框:',
393
+ ele: 'xd-radio',
394
+ valueKey: 'is_border',
395
+ value: data['is_border'] || 'N',
396
+ groupKey:'style',
397
+ placeholder: '请选择是否有边框',
398
+ multiple: false,
399
+ className: 'input80',
400
+ list: [
401
+ { label: '是', value: 'Y' },
402
+ { label: '否', value: 'N' },
403
+ ]
404
+ },
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',
413
+ },
414
+ data['is_border'] === 'Y' && {
415
+ label: '边框大小:',
416
+ groupKey:'style',
417
+ ele: 'el-input',
418
+ type: 'number',
419
+ valueKey: 'is_border_w',
420
+ value: data['is_border_w'] || '',
421
+ placeholder: '请输入边框颜色',
422
+ className: 'input80',
423
+ },
368
424
  {
369
425
  label: '内容圆角设置:',
370
426
  ele: 'xd-site-select-list',