jufubao-base 1.0.197-beta3 → 1.0.197-beta4
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 +1 -1
- package/src/components/JfbBaseAddress/JfbBaseAddress.vue +4 -13
- package/src/components/JfbBaseCardEntry/Attr.js +472 -443
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +121 -98
- package/src/components/JfbBaseCardEntry/XdCardNew.vue +107 -0
- package/src/components/JfbBaseHeader/Attr.js +114 -0
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +84 -8
- package/src/components/JfbBaseHeaderElephant/Api.js +22 -0
- package/src/components/JfbBaseHeaderElephant/Attr.js +488 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +434 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantLess.less +79 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantMixin.js +30 -0
- package/src/components/JfbBaseHeaderElephant/Mock.js +5 -0
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +1 -1
- package/src/components/JfbBaseUserInfo/Attr.js +139 -2
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +107 -17
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
import ICONS from "@/ICONS.js"
|
|
2
3
|
/**
|
|
3
4
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
4
5
|
*/
|
|
@@ -26,6 +27,16 @@ export default {
|
|
|
26
27
|
{label: '垂直', value: 'Y'},
|
|
27
28
|
]
|
|
28
29
|
},
|
|
30
|
+
{
|
|
31
|
+
label: "头像右侧内容:",
|
|
32
|
+
ele: "xd-radio-self",
|
|
33
|
+
valueKey: "rightContent",
|
|
34
|
+
value: data.rightContent,
|
|
35
|
+
groupKey: "content",
|
|
36
|
+
setting: {
|
|
37
|
+
icons: ICONS
|
|
38
|
+
}
|
|
39
|
+
},
|
|
29
40
|
{
|
|
30
41
|
label: '内容文字颜色:',
|
|
31
42
|
ele: 'xd-color',
|
|
@@ -35,6 +46,29 @@ export default {
|
|
|
35
46
|
placeholder: '请选择内容文字颜色',
|
|
36
47
|
classNmae: 'input80',
|
|
37
48
|
},
|
|
49
|
+
{
|
|
50
|
+
label: '内容背景图片:', //label
|
|
51
|
+
ele: 'xd-upload', //package 名称
|
|
52
|
+
valueKey: 'bgImage', //form[valueKey]
|
|
53
|
+
value: data.bgImage || null, //v-model
|
|
54
|
+
defaultValue: data.bgImage || null, //默认图片对象
|
|
55
|
+
groupKey: "style",
|
|
56
|
+
slot: true, //按钮是否使用slot
|
|
57
|
+
oneWidth: 200, //单个图片显示宽度
|
|
58
|
+
oneHeight: 100, //单个图片显示高度
|
|
59
|
+
elinputClassName: 'input40',
|
|
60
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
|
|
61
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
62
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
63
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
64
|
+
size: 5, //5M
|
|
65
|
+
action: 'aliyun',
|
|
66
|
+
sort: true, //当上传图片列表时候,是否启用排序
|
|
67
|
+
maxlen: 100, //当上传图片列表时候,最大数量数量
|
|
68
|
+
rules: [
|
|
69
|
+
{ required: true, message: '请上传图片', trigger: ['blur', 'change'] },
|
|
70
|
+
]
|
|
71
|
+
},
|
|
38
72
|
{
|
|
39
73
|
label: '内容背景颜色:',
|
|
40
74
|
ele: 'xd-color',
|
|
@@ -97,6 +131,7 @@ export default {
|
|
|
97
131
|
label: '投影设置',
|
|
98
132
|
size: 'small',
|
|
99
133
|
groupKey:'style',
|
|
134
|
+
hidden: true,
|
|
100
135
|
},
|
|
101
136
|
{
|
|
102
137
|
label: '是否有投影:',
|
|
@@ -110,7 +145,8 @@ export default {
|
|
|
110
145
|
list: [
|
|
111
146
|
{label: '是', value: 'Y'},
|
|
112
147
|
{label: '否', value: 'N'},
|
|
113
|
-
]
|
|
148
|
+
],
|
|
149
|
+
hidden: true,
|
|
114
150
|
},
|
|
115
151
|
data['is_shadow'] === 'Y' && {
|
|
116
152
|
label: '投影颜色:',
|
|
@@ -120,6 +156,7 @@ export default {
|
|
|
120
156
|
value: data['is_shadow_bg'] || '',
|
|
121
157
|
placeholder: '请选择投影颜色',
|
|
122
158
|
classNmae: 'input80',
|
|
159
|
+
hidden: true,
|
|
123
160
|
},
|
|
124
161
|
data['is_shadow'] === 'Y' && {
|
|
125
162
|
label: '投影范围:',
|
|
@@ -142,12 +179,41 @@ export default {
|
|
|
142
179
|
console.error(error);
|
|
143
180
|
});
|
|
144
181
|
},
|
|
182
|
+
hidden: true,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
label: "边框阴影设置:",
|
|
186
|
+
ele: "xd-shadow",
|
|
187
|
+
valueKey: "boxShadow",
|
|
188
|
+
value: data['boxShadow'] || null,
|
|
189
|
+
groupKey:'style',
|
|
190
|
+
handleCustom({action, data}) {
|
|
191
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
|
|
192
|
+
.then(res => {
|
|
193
|
+
data.cb(res.list)
|
|
194
|
+
})
|
|
195
|
+
.catch(error => {
|
|
196
|
+
console.error(error);
|
|
197
|
+
data.cb([])
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
label: "边框设置:",
|
|
203
|
+
ele: "xd-border",
|
|
204
|
+
valueKey: "boxBorder",
|
|
205
|
+
value: data['boxBorder'] || null,
|
|
206
|
+
groupKey:'style',
|
|
207
|
+
setting: {
|
|
208
|
+
selected:'N'
|
|
209
|
+
},
|
|
145
210
|
},
|
|
146
211
|
{
|
|
147
212
|
ele: 'title',
|
|
148
213
|
label: '边框设置',
|
|
149
214
|
size: 'small',
|
|
150
215
|
groupKey:'style',
|
|
216
|
+
hidden: true,
|
|
151
217
|
},
|
|
152
218
|
{
|
|
153
219
|
label: '是否有边框:',
|
|
@@ -161,7 +227,8 @@ export default {
|
|
|
161
227
|
list: [
|
|
162
228
|
{label: '是', value: 'Y'},
|
|
163
229
|
{label: '否', value: 'N'},
|
|
164
|
-
]
|
|
230
|
+
],
|
|
231
|
+
hidden: true,
|
|
165
232
|
},
|
|
166
233
|
data['is_border'] === 'Y' && {
|
|
167
234
|
label: '边框颜色:',
|
|
@@ -171,6 +238,7 @@ export default {
|
|
|
171
238
|
value: data['is_border_c'] || '',
|
|
172
239
|
placeholder: '请选择边框颜色',
|
|
173
240
|
classNmae: 'input80',
|
|
241
|
+
hidden: true,
|
|
174
242
|
},
|
|
175
243
|
data['is_border'] === 'Y' && {
|
|
176
244
|
label: '边框大小:',
|
|
@@ -181,6 +249,75 @@ export default {
|
|
|
181
249
|
value: data['is_border_w'] || '',
|
|
182
250
|
placeholder: '请输入边框颜色',
|
|
183
251
|
className: 'input80',
|
|
252
|
+
hidden: true,
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: "头像右侧内容配置",
|
|
256
|
+
ele: "title",
|
|
257
|
+
size: "small",
|
|
258
|
+
groupKey: "style"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
label: "头像右侧内容背景颜色:",
|
|
262
|
+
ele: "xd-color",
|
|
263
|
+
valueKey: "rightContentBgColor",
|
|
264
|
+
value: data.rightContentBgColor || '',
|
|
265
|
+
placeholder: '请选择头像右侧内容背景颜色',
|
|
266
|
+
groupKey: "style",
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
label: "头像右侧内容文字颜色:",
|
|
270
|
+
ele: "xd-color",
|
|
271
|
+
valueKey: "rightContentTextColor",
|
|
272
|
+
value: data.rightContentTextColor || '',
|
|
273
|
+
placeholder: '请选择头像右侧内容文字颜色',
|
|
274
|
+
groupKey: "style",
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
label: "头像右侧内容内边距配置:",
|
|
278
|
+
ele: 'xd-margin-padding',
|
|
279
|
+
valueKey: 'rightContentPadding',
|
|
280
|
+
groupKey: "style",
|
|
281
|
+
value: data.rightContentPadding || {},
|
|
282
|
+
setting: {
|
|
283
|
+
type: 'padding',
|
|
284
|
+
},
|
|
285
|
+
inline: false,
|
|
286
|
+
notice: '设置外填充,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
label: "头像右侧内容圆角:",
|
|
290
|
+
ele: 'xd-site-select-list',
|
|
291
|
+
valueKey: 'rightContentRadius',
|
|
292
|
+
value: data['rightContentRadius'] || '',
|
|
293
|
+
groupKey:'style',
|
|
294
|
+
placeholder: '请选择内容圆角设置',
|
|
295
|
+
multiple: false,
|
|
296
|
+
className: 'input80',
|
|
297
|
+
handleCustom({ action, data }) {
|
|
298
|
+
XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
|
|
299
|
+
.then(res => {
|
|
300
|
+
data.cb(res.list)
|
|
301
|
+
})
|
|
302
|
+
.catch(error => {
|
|
303
|
+
console.error(error);
|
|
304
|
+
});
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
label: '编辑地址路径:',
|
|
309
|
+
ele: 'xd-select-pages-path',
|
|
310
|
+
valueKey: 'addressUrl',
|
|
311
|
+
groupKey:'advanced',
|
|
312
|
+
placeholder: '请选择编辑地址路径',
|
|
313
|
+
value: data['addressUrl'] || null,
|
|
314
|
+
setting: {
|
|
315
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
316
|
+
},
|
|
317
|
+
rules: [
|
|
318
|
+
{required: true, message: '请选择编辑地址路径', trigger: 'change'},
|
|
319
|
+
],
|
|
320
|
+
inline: false,
|
|
184
321
|
},
|
|
185
322
|
{
|
|
186
323
|
label: '',
|
|
@@ -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="[userWrapBoxStyle]"
|
|
29
21
|
v-if="userInfo !== null"
|
|
30
22
|
>
|
|
31
23
|
<view
|
|
@@ -41,19 +33,42 @@
|
|
|
41
33
|
<view v-else class="no-image" :style="{borderColor: color}">
|
|
42
34
|
<xd-font-icon :color="color" 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>
|
|
47
|
-
<view
|
|
48
|
-
|
|
36
|
+
<view v-if="logined && textType ==='N'"class="user_name" :style="{color:color}">{{userInfo|getName}}</view>
|
|
37
|
+
<view class="vertical-user" v-if="logined && textType ==='Y'" :style="{color:color}" style="flex-direction: column;">
|
|
38
|
+
<view class="user_name">{{userInfo|getName}}</view>
|
|
39
|
+
<view v-if="rightContent && rightContent.type !== 'hidden'"
|
|
40
|
+
class="logout" style="margin-top: 16rpx;"
|
|
41
|
+
:style="[logoutBtnStyle]"
|
|
42
|
+
>
|
|
43
|
+
<view v-if="rightContent && rightContent.type === 'logout'"
|
|
44
|
+
class="right_cont_i"
|
|
45
|
+
@click="handleLogout()"
|
|
46
|
+
>
|
|
47
|
+
<xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
48
|
+
{{rightContent.name || '退出登录'}}
|
|
49
|
+
</view>
|
|
50
|
+
<view v-if="rightContent && rightContent.type === 'addr'"
|
|
51
|
+
class="right_cont_i"
|
|
52
|
+
@click="handleAddress()"
|
|
53
|
+
>
|
|
54
|
+
<xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
55
|
+
{{ rightContent.name || '地址' }}
|
|
56
|
+
</view>
|
|
49
57
|
</view>
|
|
50
58
|
<view @click="handleToLink()" v-if="0">
|
|
51
59
|
<xd-font-icon :color="color" size="40" icon="iconshezhi_mian"></xd-font-icon>
|
|
52
60
|
</view>
|
|
53
61
|
</view>
|
|
54
62
|
</view>
|
|
55
|
-
<view @click="handleLogout()" v-if="logined && textType ==='N'" class="logout">
|
|
56
|
-
<view
|
|
63
|
+
<view @click="handleLogout()" v-if="logined && textType ==='N'" class="logout" :style="[logoutBtnStyle]">
|
|
64
|
+
<view v-if="rightContent && rightContent.type === 'logout'" class="right_cont_i" @click="handleLogout()">
|
|
65
|
+
<xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
66
|
+
{{rightContent.name || '退出登录'}}
|
|
67
|
+
</view>
|
|
68
|
+
<view v-if="rightContent && rightContent.type === 'addr'" class="right_cont_i" @click="handleAddress()">
|
|
69
|
+
<xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
70
|
+
{{ rightContent.name || '地址' }}
|
|
71
|
+
</view>
|
|
57
72
|
</view>
|
|
58
73
|
</view>
|
|
59
74
|
</view>
|
|
@@ -70,6 +85,7 @@
|
|
|
70
85
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
71
86
|
import {mapState} from 'vuex';
|
|
72
87
|
import store from "@/store";
|
|
88
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
73
89
|
export default {
|
|
74
90
|
name: "JfbBaseUserInfo",
|
|
75
91
|
components: {
|
|
@@ -100,6 +116,41 @@
|
|
|
100
116
|
borderBox(){
|
|
101
117
|
if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
|
|
102
118
|
else return '0';
|
|
119
|
+
},
|
|
120
|
+
userWrapBoxStyle(){
|
|
121
|
+
|
|
122
|
+
let border = this.getBorderCompatibleOldStyle(this.boxBorder, {
|
|
123
|
+
type: this.is_border,
|
|
124
|
+
width: this.is_border_w,
|
|
125
|
+
color: this.is_border_c
|
|
126
|
+
})
|
|
127
|
+
let boxShadow = this.getShadowCompatibleOldStyle(this.boxShadow, {
|
|
128
|
+
type: this.is_shadow,
|
|
129
|
+
width: this.is_shadow_w,
|
|
130
|
+
color: this.is_shadow_bg
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
margin: this.outMargin,
|
|
135
|
+
backgroundColor: this.backgroundColor,
|
|
136
|
+
backgroundImage: `url(${this.bgImage})`,
|
|
137
|
+
color: this.color,
|
|
138
|
+
padding: this.outPadding,
|
|
139
|
+
boxShadow: boxShadow,
|
|
140
|
+
border: border
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
logoutBtnStyle(){
|
|
144
|
+
let padding = `${this.checkValue(this.rightContentPadding.top, 20)}rpx`;
|
|
145
|
+
padding = `${padding} ${this.checkValue(this.rightContentPadding.right, 20)}rpx`;
|
|
146
|
+
padding = `${padding} ${this.checkValue(this.rightContentPadding.bottom, 20)}rpx`;
|
|
147
|
+
padding = `${padding} ${this.checkValue(this.rightContentPadding.left, 20)}rpx`;
|
|
148
|
+
return {
|
|
149
|
+
backgroundColor: this.rightContentBgColor,
|
|
150
|
+
color: this.rightContentTextColor || this.color,
|
|
151
|
+
padding: padding,
|
|
152
|
+
borderRadius: this.rightContentRadius + 'rpx'
|
|
153
|
+
}
|
|
103
154
|
}
|
|
104
155
|
},
|
|
105
156
|
filters:{
|
|
@@ -143,7 +194,15 @@
|
|
|
143
194
|
right: 0,
|
|
144
195
|
bottom: 0
|
|
145
196
|
},
|
|
146
|
-
|
|
197
|
+
rightContent: null,
|
|
198
|
+
addressUrl: "",
|
|
199
|
+
bgImage: "",
|
|
200
|
+
boxBorder: "",
|
|
201
|
+
boxShadow: "",
|
|
202
|
+
rightContentBgColor: "",
|
|
203
|
+
rightContentTextColor: "",
|
|
204
|
+
rightContentPadding: "",
|
|
205
|
+
rightContentRadius: 0
|
|
147
206
|
}
|
|
148
207
|
},
|
|
149
208
|
watch: {
|
|
@@ -231,7 +290,22 @@
|
|
|
231
290
|
this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
|
|
232
291
|
this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', 0);
|
|
233
292
|
this.radius = getContainerPropsValue(container, 'content.radius', '10');
|
|
293
|
+
this.rightContent = getContainerPropsValue(container, 'content.rightContent', {});
|
|
294
|
+
this.addressUrl = getContainerPropsValue(container, 'content.addressUrl', {value: ""}).value;
|
|
295
|
+
this.bgImage = getServiceUrl(getContainerPropsValue(container, 'content.bgImage', '').url);
|
|
296
|
+
this.boxBorder = getContainerPropsValue(container, 'content.boxBorder', '');
|
|
297
|
+
this.boxShadow = getContainerPropsValue(container, 'content.boxShadow', '');
|
|
298
|
+
this.rightContentBgColor = getContainerPropsValue(container, 'content.rightContentBgColor', 'transparent');
|
|
299
|
+
this.rightContentTextColor = getContainerPropsValue(container, 'content.rightContentTextColor', '');
|
|
300
|
+
this.rightContentPadding = getContainerPropsValue(container, 'content.rightContentPadding', {});
|
|
301
|
+
this.rightContentRadius = getContainerPropsValue(container, 'content.rightContentRadius', 0);
|
|
302
|
+
console.log("this.rightContentRadius", this.rightContentRadius);
|
|
234
303
|
},
|
|
304
|
+
handleAddress(){
|
|
305
|
+
this.$xdUniHelper.navigateTo({
|
|
306
|
+
url: this.addressUrl
|
|
307
|
+
})
|
|
308
|
+
}
|
|
235
309
|
}
|
|
236
310
|
}
|
|
237
311
|
|
|
@@ -251,10 +325,16 @@
|
|
|
251
325
|
|
|
252
326
|
.jfb-base-user-info {
|
|
253
327
|
&__body{
|
|
328
|
+
.user_name{
|
|
329
|
+
font-size: 40rpx;
|
|
330
|
+
font-weight: 500;
|
|
331
|
+
}
|
|
254
332
|
&-header {
|
|
255
333
|
display: flex;
|
|
256
334
|
align-items: center;
|
|
257
335
|
justify-content: flex-start;
|
|
336
|
+
background-size: cover;
|
|
337
|
+
background-repeat: no-repeat;
|
|
258
338
|
|
|
259
339
|
|
|
260
340
|
&-left {
|
|
@@ -308,6 +388,16 @@
|
|
|
308
388
|
|
|
309
389
|
.logout {
|
|
310
390
|
font-size: unit(24, rpx);
|
|
391
|
+
.right_cont_i{
|
|
392
|
+
display: flex;
|
|
393
|
+
align-items: center;
|
|
394
|
+
font-size: 28rpx;
|
|
395
|
+
color: inherit;
|
|
396
|
+
font-weight: 400;
|
|
397
|
+
.xd-font-icon{
|
|
398
|
+
margin-right:8rpx;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
311
401
|
& > view {
|
|
312
402
|
cursor: pointer;
|
|
313
403
|
}
|