jufubao-base 1.0.198-beta1 → 1.0.200-beta1

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.
Files changed (28) hide show
  1. package/commands.js +1 -1
  2. package/package.json +1 -1
  3. package/src/ICONS.js +1128 -0
  4. package/src/components/JfbBaseAddress/Attr.js +109 -1
  5. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +152 -77
  6. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  7. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +13 -41
  8. package/src/components/JfbBaseFastLink/Attr.js +24 -8
  9. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
  10. package/src/components/JfbBaseFooter/Attr.js +141 -75
  11. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  12. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  13. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +96 -46
  14. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  15. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  16. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  17. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  18. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +14 -13
  19. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +6 -8
  20. package/src/components/JfbBaseUserCenter/Attr.js +297 -52
  21. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
  22. package/src/components/JfbBaseUserInfo/Attr.js +212 -37
  23. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +89 -60
  24. package/src/components/JfbBaseUserOrder/Attr.js +332 -30
  25. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
  26. package/src/components/JfbBaseWallet/Attr.js +376 -8
  27. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
  28. package/src/mixins/componentsMixins.js +210 -35
@@ -17,15 +17,7 @@
17
17
  <view class="x-line"></view>
18
18
  <view
19
19
  class="jfb-base-user-info__body-header"
20
- :style="{
21
- margin: outMargin,
22
- background:backgroundColor,
23
- color: color,
24
- padding: outPadding,
25
- boxShadow: shadow,
26
- borderRadius: radius + 'rpx',
27
- border: borderBox
28
- }"
20
+ :style="[boxStyleComp]"
29
21
  v-if="userInfo !== null"
30
22
  >
31
23
  <view
@@ -34,26 +26,26 @@
34
26
  >
35
27
  <template v-if="logined">
36
28
  <image v-if="userInfo['head_url']" :src="userInfo['head_url']"></image>
37
- <view class="no-image" :style="{borderColor: color}" v-else>
38
- <xd-font-icon :color="color" icon="iconwode_mian" size="100"></xd-font-icon>
29
+ <view class="no-image" :style="{borderColor: imageColor, borderRadius:imageRadius}" v-else>
30
+ <xd-font-icon :color="imageColor" icon="iconwode_mian" size="100"></xd-font-icon>
39
31
  </view>
40
32
  </template>
41
- <view v-else class="no-image" :style="{borderColor: color}">
42
- <xd-font-icon :color="color" icon="iconwode_mian" size="90"></xd-font-icon>
33
+ <view v-else class="no-image" :style="{borderColor: imageColor, borderRadius:imageRadius}">
34
+ <xd-font-icon :color="imageColor" icon="iconwode_mian" size="90"></xd-font-icon>
43
35
  </view>
44
- <view v-if="logined && textType ==='N'" :style="{color:color}">{{userInfo|getName}}</view>
45
- <view class="vertical-user" v-if="logined && textType ==='Y'" :style="{color:color}">
46
- <view>{{userInfo|getName}}</view>
36
+ <view v-if="logined && textType ==='N'" :style="[nickNameStyle]">{{userInfo|getName}}</view>
37
+ <view class="vertical-user" v-if="logined && textType ==='Y'">
38
+ <view :style="[nickNameStyle]">{{userInfo|getName}}</view>
47
39
  <view class="logout" @click="handleLogout()">
48
- <view :style="{color:color}">[退出登录]</view>
40
+ <view :style="[logoutStyleComp]">{{logoutName}}</view>
49
41
  </view>
50
- <view @click="handleToLink()" v-if="0">
51
- <xd-font-icon :color="color" size="40" icon="iconshezhi_mian"></xd-font-icon>
42
+ <view @click="handleToLink()" v-if="isSetting === 'Y'">
43
+ <xd-font-icon size="26" icon="iconshezhi_mian"></xd-font-icon>
52
44
  </view>
53
45
  </view>
54
46
  </view>
55
47
  <view @click="handleLogout()" v-if="logined && textType ==='N'" class="logout">
56
- <view :style="{color:color}">[退出登录]</view>
48
+ <view :style="[logoutStyleComp]">{{logoutName}}</view>
57
49
  </view>
58
50
  </view>
59
51
  </view>
@@ -79,27 +71,52 @@
79
71
  computed: {
80
72
  ...mapState(['jfbAuthorize']),
81
73
 
82
- outMargin() {
83
- let str = `${this.checkValue(this.margin.top, 20)}rpx`;
84
- str = `${str} ${this.checkValue(this.margin.right, 20)}rpx`;
85
- str = `${str} ${this.checkValue(this.margin.bottom, 20)}rpx`;
86
- str = `${str} ${this.checkValue(this.margin.left, 20)}rpx`;
87
- return str
88
- },
89
- outPadding() {
90
- let str = `${this.checkValue(this.padding.top, 20)}rpx`;
91
- str = `${str} ${this.checkValue(this.padding.right, 20)}rpx`;
92
- str = `${str} ${this.checkValue(this.padding.bottom, 20)}rpx`;
93
- str = `${str} ${this.checkValue(this.padding.left, 20)}rpx`;
94
- return str
74
+ boxStyleComp(){
75
+ let border = this.getBorderCompatibleOldStyle(this.contBorder, {
76
+ color: this.is_border_c,
77
+ width: this.is_border_w,
78
+ type: this.is_border,
79
+ style: 'solid'
80
+ })
81
+
82
+ let shadow = this.getShadowCompatibleOldStyle(this.contShadow, {
83
+ color: this.is_shadow_bg,
84
+ width: this.is_shadow_w,
85
+ type: this.is_shadow,
86
+ })
87
+ return {
88
+ margin: this.getMarginAndPadding(this.margin, 20),
89
+ background : this.backgroundColor,
90
+ padding: this.getMarginAndPadding(this.padding, 20),
91
+ boxShadow: shadow,
92
+ borderRadius: this.radius + 'rpx',
93
+ border: border,
94
+
95
+ }
95
96
  },
97
+
96
98
  shadow(){
97
99
  if(this.is_shadow === 'Y') return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
98
100
  else return '0 0 0 rgba(0,0,0,0)';
99
101
  },
100
102
  borderBox(){
101
- if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
103
+ if (this.is_border === 'Y') return `${this.is_border_w}rpx ${this.is_border_s} ${this.is_border_c}`;
102
104
  else return '0';
105
+ },
106
+
107
+ nickNameStyle(){
108
+ return {
109
+ fontSize: this.nickStyle.fontSize || '32rpx',
110
+ color: `${this.nickStyle.color || '#333'}`,
111
+ fontWeight: `${this.nickStyle.fontWeight || 'normal'}`,
112
+ }
113
+ },
114
+ logoutStyleComp(){
115
+ return {
116
+ fontSize: this.logoutStyle.fontSize || '20rpx',
117
+ color: `${this.logoutStyle.color || '#333'}`,
118
+ fontWeight: `${this.logoutStyle.fontWeight || 'normal'}`,
119
+ }
103
120
  }
104
121
  },
105
122
  filters:{
@@ -111,39 +128,33 @@
111
128
  return {
112
129
  logined: false,
113
130
  userInfo: null,
114
- address_url: '',
131
+ isSetting:'N',
132
+ logoutName:'[退出登录]',
133
+ imageRadius:'50%',
115
134
 
116
135
  //基础
117
- color: '#333',
136
+ imageColor: '#333',
118
137
  backgroundColor: 'rgba(0,0,0,0)',
119
138
  textType: 'N', //默认水平
120
139
  radius: 0,
121
140
 
122
141
  //投影
123
- is_shadow: 'Y',
142
+ contShadow:{},
143
+ is_shadow: 'N',
124
144
  is_shadow_bg: 0,
125
145
  is_shadow_w: 0,
126
146
 
127
-
128
147
  //边框
129
- is_border: 'Y',
148
+ contBorder:{},
149
+ is_border: 'N',
130
150
  is_border_w: 0,
131
151
  is_border_c: '',
132
152
 
133
153
  //其他
134
- margin: {
135
- top: 0,
136
- left: 0,
137
- right: 0,
138
- bottom: 0
139
- },
140
- padding: {
141
- top: 0,
142
- left: 0,
143
- right: 0,
144
- bottom: 0
145
- },
146
-
154
+ margin: {},
155
+ padding: {},
156
+ nickStyle:{},
157
+ logoutStyle:{},
147
158
  }
148
159
  },
149
160
  watch: {
@@ -216,21 +227,32 @@
216
227
  * @param container {object} 业务组件对象自己
217
228
  */
218
229
  init(container) {
219
- this.margin = getContainerPropsValue(container, 'content.margin', {top: 20, left: 20, right: 20, bottom: 20});
220
- this.padding = getContainerPropsValue(container, 'content.padding', {top: 20, left: 20, right: 20, bottom: 20});
221
- this.address_url = getContainerPropsValue(container, 'content.address_url', {value: ''});
222
- this.color = getContainerPropsValue(container, 'content.textColor', '#333');
230
+ this.margin = getContainerPropsValue(container, 'content.margin', {});
231
+ this.padding = getContainerPropsValue(container, 'content.padding', {});
223
232
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', '#f8f8f8');
224
233
  this.textType = getContainerPropsValue(container, 'content.text_type', 'N');
234
+ this.radius = getContainerPropsValue(container, 'content.radius', '10');
235
+ this.isSetting = getContainerPropsValue(container, 'content.isSetting', 'N');
236
+ this.logoutName = getContainerPropsValue(container, 'content.logoutName', '[退出登录]');
237
+ this.imageRadius = getContainerPropsValue(container, 'content.imageRadius', '50%');
238
+ this.imageColor = getContainerPropsValue(container, 'content.imageColor', '#333');
225
239
 
240
+ //Shadow
226
241
  this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
227
242
  this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');
228
243
  this.is_shadow_w = getContainerPropsValue(container, 'content.is_shadow_w', '10');
244
+ this.contShadow = getContainerPropsValue(container, 'content.contShadow', {})
229
245
 
246
+ //边框
230
247
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
231
248
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
232
249
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', 0);
233
- this.radius = getContainerPropsValue(container, 'content.radius', '10');
250
+ this.contBorder = getContainerPropsValue(container, 'content.contBorder', {});
251
+
252
+
253
+ this.nickStyle = getContainerPropsValue(container, 'content.nickStyle', {});
254
+ this.logoutStyle = getContainerPropsValue(container, 'content.logoutStyle', {});
255
+
234
256
  },
235
257
  }
236
258
  }
@@ -245,7 +267,15 @@
245
267
  justify-content: center;
246
268
  align-items: center;
247
269
  & > view:nth-child(2) {
248
- margin-left: unit(10, rpx);
270
+ margin-left: unit(15, rpx);
271
+ }
272
+ & > view:nth-child(3) {
273
+ width: 26rpx;
274
+ height: 26rpx;
275
+ margin-left: unit(15, rpx);
276
+ display: flex;
277
+ justify-content: center;
278
+ align-items: center;
249
279
  }
250
280
  }
251
281
 
@@ -281,8 +311,7 @@
281
311
  & > image, .no-image {
282
312
  width: unit(140, rpx);
283
313
  height: unit(140, rpx);
284
- margin-right: unit(30, rpx);
285
- border-radius: 50%;
314
+ margin-right: unit(30, rpx);;
286
315
  display: flex;
287
316
  justify-content: center;
288
317
  align-items: center;