jufubao-base 1.0.197-beta3 → 1.0.197-beta5
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 +123 -98
- package/src/components/JfbBaseCardEntry/Mock.js +1 -0
- package/src/components/JfbBaseCardEntry/XdCardNew.vue +124 -0
- package/src/components/JfbBaseHeader/Attr.js +129 -53
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +98 -30
- package/src/components/JfbBaseHeaderElephant/Api.js +22 -0
- package/src/components/JfbBaseHeaderElephant/Attr.js +496 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +453 -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/JfbBaseNotice/Attr.js +26 -0
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +13 -1
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +1 -1
- package/src/components/JfbBaseUserInfo/Attr.js +136 -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,26 @@ 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
|
+
},
|
|
38
69
|
{
|
|
39
70
|
label: '内容背景颜色:',
|
|
40
71
|
ele: 'xd-color',
|
|
@@ -97,6 +128,7 @@ export default {
|
|
|
97
128
|
label: '投影设置',
|
|
98
129
|
size: 'small',
|
|
99
130
|
groupKey:'style',
|
|
131
|
+
hidden: true,
|
|
100
132
|
},
|
|
101
133
|
{
|
|
102
134
|
label: '是否有投影:',
|
|
@@ -110,7 +142,8 @@ export default {
|
|
|
110
142
|
list: [
|
|
111
143
|
{label: '是', value: 'Y'},
|
|
112
144
|
{label: '否', value: 'N'},
|
|
113
|
-
]
|
|
145
|
+
],
|
|
146
|
+
hidden: true,
|
|
114
147
|
},
|
|
115
148
|
data['is_shadow'] === 'Y' && {
|
|
116
149
|
label: '投影颜色:',
|
|
@@ -120,6 +153,7 @@ export default {
|
|
|
120
153
|
value: data['is_shadow_bg'] || '',
|
|
121
154
|
placeholder: '请选择投影颜色',
|
|
122
155
|
classNmae: 'input80',
|
|
156
|
+
hidden: true,
|
|
123
157
|
},
|
|
124
158
|
data['is_shadow'] === 'Y' && {
|
|
125
159
|
label: '投影范围:',
|
|
@@ -142,12 +176,41 @@ export default {
|
|
|
142
176
|
console.error(error);
|
|
143
177
|
});
|
|
144
178
|
},
|
|
179
|
+
hidden: true,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
label: "边框阴影设置:",
|
|
183
|
+
ele: "xd-shadow",
|
|
184
|
+
valueKey: "boxShadow",
|
|
185
|
+
value: data['boxShadow'] || null,
|
|
186
|
+
groupKey:'style',
|
|
187
|
+
handleCustom({action, data}) {
|
|
188
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
|
|
189
|
+
.then(res => {
|
|
190
|
+
data.cb(res.list)
|
|
191
|
+
})
|
|
192
|
+
.catch(error => {
|
|
193
|
+
console.error(error);
|
|
194
|
+
data.cb([])
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
label: "边框设置:",
|
|
200
|
+
ele: "xd-border",
|
|
201
|
+
valueKey: "boxBorder",
|
|
202
|
+
value: data['boxBorder'] || null,
|
|
203
|
+
groupKey:'style',
|
|
204
|
+
setting: {
|
|
205
|
+
selected:'N'
|
|
206
|
+
},
|
|
145
207
|
},
|
|
146
208
|
{
|
|
147
209
|
ele: 'title',
|
|
148
210
|
label: '边框设置',
|
|
149
211
|
size: 'small',
|
|
150
212
|
groupKey:'style',
|
|
213
|
+
hidden: true,
|
|
151
214
|
},
|
|
152
215
|
{
|
|
153
216
|
label: '是否有边框:',
|
|
@@ -161,7 +224,8 @@ export default {
|
|
|
161
224
|
list: [
|
|
162
225
|
{label: '是', value: 'Y'},
|
|
163
226
|
{label: '否', value: 'N'},
|
|
164
|
-
]
|
|
227
|
+
],
|
|
228
|
+
hidden: true,
|
|
165
229
|
},
|
|
166
230
|
data['is_border'] === 'Y' && {
|
|
167
231
|
label: '边框颜色:',
|
|
@@ -171,6 +235,7 @@ export default {
|
|
|
171
235
|
value: data['is_border_c'] || '',
|
|
172
236
|
placeholder: '请选择边框颜色',
|
|
173
237
|
classNmae: 'input80',
|
|
238
|
+
hidden: true,
|
|
174
239
|
},
|
|
175
240
|
data['is_border'] === 'Y' && {
|
|
176
241
|
label: '边框大小:',
|
|
@@ -181,6 +246,75 @@ export default {
|
|
|
181
246
|
value: data['is_border_w'] || '',
|
|
182
247
|
placeholder: '请输入边框颜色',
|
|
183
248
|
className: 'input80',
|
|
249
|
+
hidden: true,
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: "头像右侧内容配置",
|
|
253
|
+
ele: "title",
|
|
254
|
+
size: "small",
|
|
255
|
+
groupKey: "style"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
label: "头像右侧内容背景颜色:",
|
|
259
|
+
ele: "xd-color",
|
|
260
|
+
valueKey: "rightContentBgColor",
|
|
261
|
+
value: data.rightContentBgColor || '',
|
|
262
|
+
placeholder: '请选择头像右侧内容背景颜色',
|
|
263
|
+
groupKey: "style",
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
label: "头像右侧内容文字颜色:",
|
|
267
|
+
ele: "xd-color",
|
|
268
|
+
valueKey: "rightContentTextColor",
|
|
269
|
+
value: data.rightContentTextColor || '',
|
|
270
|
+
placeholder: '请选择头像右侧内容文字颜色',
|
|
271
|
+
groupKey: "style",
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
label: "头像右侧内容内边距配置:",
|
|
275
|
+
ele: 'xd-margin-padding',
|
|
276
|
+
valueKey: 'rightContentPadding',
|
|
277
|
+
groupKey: "style",
|
|
278
|
+
value: data.rightContentPadding || {},
|
|
279
|
+
setting: {
|
|
280
|
+
type: 'padding',
|
|
281
|
+
},
|
|
282
|
+
inline: false,
|
|
283
|
+
notice: '设置外填充,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
label: "头像右侧内容圆角:",
|
|
287
|
+
ele: 'xd-site-select-list',
|
|
288
|
+
valueKey: 'rightContentRadius',
|
|
289
|
+
value: data['rightContentRadius'] || '',
|
|
290
|
+
groupKey:'style',
|
|
291
|
+
placeholder: '请选择内容圆角设置',
|
|
292
|
+
multiple: false,
|
|
293
|
+
className: 'input80',
|
|
294
|
+
handleCustom({ action, data }) {
|
|
295
|
+
XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
|
|
296
|
+
.then(res => {
|
|
297
|
+
data.cb(res.list)
|
|
298
|
+
})
|
|
299
|
+
.catch(error => {
|
|
300
|
+
console.error(error);
|
|
301
|
+
});
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
label: '编辑地址路径:',
|
|
306
|
+
ele: 'xd-select-pages-path',
|
|
307
|
+
valueKey: 'addressUrl',
|
|
308
|
+
groupKey:'advanced',
|
|
309
|
+
placeholder: '请选择编辑地址路径',
|
|
310
|
+
value: data['addressUrl'] || null,
|
|
311
|
+
setting: {
|
|
312
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
313
|
+
},
|
|
314
|
+
rules: [
|
|
315
|
+
{required: true, message: '请选择编辑地址路径', trigger: 'change'},
|
|
316
|
+
],
|
|
317
|
+
inline: false,
|
|
184
318
|
},
|
|
185
319
|
{
|
|
186
320
|
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
|
}
|