jufubao-base 1.0.203 → 1.0.204
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/XdAddress.vue +12 -6
- package/src/components/JfbBaseCardEntry/Attr.js +472 -443
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +124 -98
- package/src/components/JfbBaseCardEntry/Mock.js +1 -0
- package/src/components/JfbBaseCardEntry/XdCardNew.vue +135 -0
- package/src/components/JfbBaseHeader/Attr.js +134 -51
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +118 -31
- package/src/components/JfbBaseHeaderElephant/Api.js +22 -0
- package/src/components/JfbBaseHeaderElephant/Attr.js +510 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +464 -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/JfbBaseUserInfo/Attr.js +134 -33
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +89 -8
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import {oldTonNewBorAndSha, checkValue} from '@/utils/AttrTools'
|
|
3
|
+
import ICONS from "@/ICONS.js"
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
@@ -33,16 +34,31 @@ export default {
|
|
|
33
34
|
]
|
|
34
35
|
},
|
|
35
36
|
{
|
|
36
|
-
label:
|
|
37
|
-
ele:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
label: "头像右侧内容:",
|
|
38
|
+
ele: "xd-radio-self",
|
|
39
|
+
valueKey: "rightContent",
|
|
40
|
+
value: data.rightContent || {
|
|
41
|
+
type: "logout",
|
|
42
|
+
name: "退出登录",
|
|
43
|
+
icon: "",
|
|
44
|
+
iconName: "",
|
|
45
|
+
},
|
|
46
|
+
groupKey: "content",
|
|
47
|
+
setting: {
|
|
48
|
+
icons: ICONS
|
|
49
|
+
}
|
|
45
50
|
},
|
|
51
|
+
// {
|
|
52
|
+
// label: '退出登录自定义名称:',
|
|
53
|
+
// ele: 'el-input',
|
|
54
|
+
// type: 'text',
|
|
55
|
+
// groupKey:'content',
|
|
56
|
+
// valueKey: 'logoutName',
|
|
57
|
+
// value: data['logoutName'] || '',
|
|
58
|
+
// notice: '退出登录自定义名称设置,默认值:<span style="color:red">[退出登录]</span>',
|
|
59
|
+
// inline: false,
|
|
60
|
+
// className: 'input60',
|
|
61
|
+
// },
|
|
46
62
|
|
|
47
63
|
{
|
|
48
64
|
ele: 'title',
|
|
@@ -85,6 +101,26 @@ export default {
|
|
|
85
101
|
placeholder: '请选择背景颜色',
|
|
86
102
|
classNmae: 'input80',
|
|
87
103
|
},
|
|
104
|
+
{
|
|
105
|
+
label: '内容背景图片:', //label
|
|
106
|
+
ele: 'xd-upload', //package 名称
|
|
107
|
+
valueKey: 'bgImage', //form[valueKey]
|
|
108
|
+
value: data.bgImage || null, //v-model
|
|
109
|
+
defaultValue: data.bgImage || null, //默认图片对象
|
|
110
|
+
groupKey: "style",
|
|
111
|
+
slot: true, //按钮是否使用slot
|
|
112
|
+
oneWidth: 200, //单个图片显示宽度
|
|
113
|
+
oneHeight: 100, //单个图片显示高度
|
|
114
|
+
elinputClassName: 'input40',
|
|
115
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
|
|
116
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
117
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
118
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
119
|
+
size: 5, //5M
|
|
120
|
+
action: 'aliyun',
|
|
121
|
+
sort: true, //当上传图片列表时候,是否启用排序
|
|
122
|
+
maxlen: 100, //当上传图片列表时候,最大数量数量
|
|
123
|
+
},
|
|
88
124
|
{
|
|
89
125
|
label: '圆角设置:',
|
|
90
126
|
ele: 'xd-site-select-list',
|
|
@@ -164,30 +200,6 @@ export default {
|
|
|
164
200
|
});
|
|
165
201
|
},
|
|
166
202
|
},
|
|
167
|
-
{
|
|
168
|
-
label: "退出字体样式设置",
|
|
169
|
-
ele: "xd-text-and-bgc",
|
|
170
|
-
groupKey:'style',
|
|
171
|
-
valueKey: 'logoutStyle',
|
|
172
|
-
value: data['logoutStyle'] || null,
|
|
173
|
-
setting: {
|
|
174
|
-
fontSize: true,
|
|
175
|
-
color: true,
|
|
176
|
-
bgColor: false,
|
|
177
|
-
weight: true,
|
|
178
|
-
selected:false
|
|
179
|
-
},
|
|
180
|
-
handleCustom({action, data}) {
|
|
181
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
|
|
182
|
-
.then(res => {
|
|
183
|
-
data.cb(res.list)
|
|
184
|
-
})
|
|
185
|
-
.catch(error => {
|
|
186
|
-
console.error(error);
|
|
187
|
-
data.cb([])
|
|
188
|
-
});
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
203
|
|
|
192
204
|
{
|
|
193
205
|
ele: 'title',
|
|
@@ -351,6 +363,95 @@ export default {
|
|
|
351
363
|
{label: '显示', value: 'Y'},
|
|
352
364
|
]
|
|
353
365
|
},
|
|
366
|
+
{
|
|
367
|
+
label: "头像右侧内容配置",
|
|
368
|
+
ele: "title",
|
|
369
|
+
size: "small",
|
|
370
|
+
groupKey: "style"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
label: "头像右侧内容背景颜色:",
|
|
374
|
+
ele: "xd-color",
|
|
375
|
+
valueKey: "rightContentBgColor",
|
|
376
|
+
value: data.rightContentBgColor || '',
|
|
377
|
+
placeholder: '请选择头像右侧内容背景颜色',
|
|
378
|
+
groupKey: "style",
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
label: "头像右侧内容文字颜色",
|
|
382
|
+
ele: "xd-text-and-bgc",
|
|
383
|
+
groupKey:'style',
|
|
384
|
+
valueKey: 'logoutStyle',
|
|
385
|
+
value: data['logoutStyle'] || null,
|
|
386
|
+
setting: {
|
|
387
|
+
fontSize: true,
|
|
388
|
+
color: true,
|
|
389
|
+
bgColor: false,
|
|
390
|
+
weight: true,
|
|
391
|
+
selected:false
|
|
392
|
+
},
|
|
393
|
+
handleCustom({action, data}) {
|
|
394
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
|
|
395
|
+
.then(res => {
|
|
396
|
+
data.cb(res.list)
|
|
397
|
+
})
|
|
398
|
+
.catch(error => {
|
|
399
|
+
console.error(error);
|
|
400
|
+
data.cb([])
|
|
401
|
+
});
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
// {
|
|
405
|
+
// label: "头像右侧内容文字颜色:",
|
|
406
|
+
// ele: "xd-color",
|
|
407
|
+
// valueKey: "rightContentTextColor",
|
|
408
|
+
// value: data.rightContentTextColor || '',
|
|
409
|
+
// placeholder: '请选择头像右侧内容文字颜色',
|
|
410
|
+
// groupKey: "style",
|
|
411
|
+
// },
|
|
412
|
+
{
|
|
413
|
+
label: "头像右侧内容内边距配置:",
|
|
414
|
+
ele: 'xd-margin-padding',
|
|
415
|
+
valueKey: 'rightContentPadding',
|
|
416
|
+
groupKey: "style",
|
|
417
|
+
value: data.rightContentPadding || {},
|
|
418
|
+
setting: {
|
|
419
|
+
type: 'padding',
|
|
420
|
+
},
|
|
421
|
+
inline: false,
|
|
422
|
+
notice: '设置外填充,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
label: "头像右侧内容圆角:",
|
|
426
|
+
ele: 'xd-site-select-list',
|
|
427
|
+
valueKey: 'rightContentRadius',
|
|
428
|
+
value: data['rightContentRadius'] || '',
|
|
429
|
+
groupKey:'style',
|
|
430
|
+
placeholder: '请选择内容圆角设置',
|
|
431
|
+
multiple: false,
|
|
432
|
+
className: 'input80',
|
|
433
|
+
handleCustom({ action, data }) {
|
|
434
|
+
XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
|
|
435
|
+
.then(res => {
|
|
436
|
+
data.cb(res.list)
|
|
437
|
+
})
|
|
438
|
+
.catch(error => {
|
|
439
|
+
console.error(error);
|
|
440
|
+
});
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
label: '编辑地址路径:',
|
|
445
|
+
ele: 'xd-select-pages-path',
|
|
446
|
+
valueKey: 'addressUrl',
|
|
447
|
+
groupKey:'advanced',
|
|
448
|
+
placeholder: '请选择编辑地址路径',
|
|
449
|
+
value: data['addressUrl'] || null,
|
|
450
|
+
setting: {
|
|
451
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
452
|
+
},
|
|
453
|
+
inline: false,
|
|
454
|
+
},
|
|
354
455
|
{
|
|
355
456
|
label: '',
|
|
356
457
|
ele: 'slot',
|
|
@@ -36,16 +36,47 @@
|
|
|
36
36
|
<view v-if="logined && textType ==='N'" :style="[nickNameStyle]">{{userInfo|getName}}</view>
|
|
37
37
|
<view class="vertical-user" v-if="logined && textType ==='Y'">
|
|
38
38
|
<view :style="[nickNameStyle]">{{userInfo|getName}}</view>
|
|
39
|
-
<view
|
|
40
|
-
|
|
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
|
+
:style="[logoutStyleComp]"
|
|
46
|
+
@click="handleLogout()"
|
|
47
|
+
>
|
|
48
|
+
<xd-font-icon v-if="rightContent.icon" class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
49
|
+
{{rightContent.name || '退出登录'}}
|
|
50
|
+
</view>
|
|
51
|
+
<view v-if="rightContent && rightContent.type === 'addr'"
|
|
52
|
+
class="right_cont_i"
|
|
53
|
+
:style="[logoutStyleComp]"
|
|
54
|
+
@click="handleAddress()"
|
|
55
|
+
>
|
|
56
|
+
<xd-font-icon v-if="rightContent.icon" class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
57
|
+
{{ rightContent.name || '地址' }}
|
|
58
|
+
</view>
|
|
41
59
|
</view>
|
|
42
60
|
<view @click="handleToLink()" v-if="isSetting === 'Y'">
|
|
43
61
|
<xd-font-icon size="26" icon="iconshezhi_mian"></xd-font-icon>
|
|
44
62
|
</view>
|
|
45
63
|
</view>
|
|
46
64
|
</view>
|
|
47
|
-
<view
|
|
48
|
-
<view
|
|
65
|
+
<view v-if="logined && textType ==='N' && rightContent && rightContent.type !== 'hidden'" class="logout" :style="[logoutBtnStyle]">
|
|
66
|
+
<view v-if="rightContent && rightContent.type === 'logout'" class="right_cont_i"
|
|
67
|
+
:style="[logoutStyleComp]"
|
|
68
|
+
@click="handleLogout()"
|
|
69
|
+
>
|
|
70
|
+
<xd-font-icon v-if="rightContent.icon" class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
71
|
+
{{rightContent.name || '退出登录'}}
|
|
72
|
+
</view>
|
|
73
|
+
<view v-if="rightContent && rightContent.type === 'addr'" class="right_cont_i"
|
|
74
|
+
:style="[logoutStyleComp]"
|
|
75
|
+
@click="handleAddress()"
|
|
76
|
+
>
|
|
77
|
+
<xd-font-icon v-if="rightContent.icon"class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
|
|
78
|
+
{{ rightContent.name || '地址' }}
|
|
79
|
+
</view>
|
|
49
80
|
</view>
|
|
50
81
|
</view>
|
|
51
82
|
</view>
|
|
@@ -62,6 +93,7 @@
|
|
|
62
93
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
63
94
|
import {mapState} from 'vuex';
|
|
64
95
|
import store from "@/store";
|
|
96
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
65
97
|
export default {
|
|
66
98
|
name: "JfbBaseUserInfo",
|
|
67
99
|
components: {
|
|
@@ -86,7 +118,8 @@
|
|
|
86
118
|
})
|
|
87
119
|
return {
|
|
88
120
|
margin: this.getMarginAndPadding(this.margin, 20),
|
|
89
|
-
|
|
121
|
+
backgroundColor : this.backgroundColor,
|
|
122
|
+
backgroundImage: `url(${this.bgImage})`,
|
|
90
123
|
padding: this.getMarginAndPadding(this.padding, 20),
|
|
91
124
|
boxShadow: shadow,
|
|
92
125
|
borderRadius: this.radius + 'rpx',
|
|
@@ -117,6 +150,18 @@
|
|
|
117
150
|
color: `${this.logoutStyle.color || '#333'}`,
|
|
118
151
|
fontWeight: `${this.logoutStyle.fontWeight || 'normal'}`,
|
|
119
152
|
}
|
|
153
|
+
},
|
|
154
|
+
logoutBtnStyle(){
|
|
155
|
+
let padding = `${this.checkValue(this.rightContentPadding.top, 20)}rpx`;
|
|
156
|
+
padding = `${padding} ${this.checkValue(this.rightContentPadding.right, 20)}rpx`;
|
|
157
|
+
padding = `${padding} ${this.checkValue(this.rightContentPadding.bottom, 20)}rpx`;
|
|
158
|
+
padding = `${padding} ${this.checkValue(this.rightContentPadding.left, 20)}rpx`;
|
|
159
|
+
return {
|
|
160
|
+
backgroundColor: this.rightContentBgColor,
|
|
161
|
+
// color: this.rightContentTextColor || this.color,
|
|
162
|
+
padding: padding,
|
|
163
|
+
borderRadius: this.rightContentRadius + 'rpx'
|
|
164
|
+
}
|
|
120
165
|
}
|
|
121
166
|
},
|
|
122
167
|
filters:{
|
|
@@ -129,7 +174,7 @@
|
|
|
129
174
|
logined: false,
|
|
130
175
|
userInfo: null,
|
|
131
176
|
isSetting:'N',
|
|
132
|
-
logoutName:'[退出登录]',
|
|
177
|
+
// logoutName:'[退出登录]',
|
|
133
178
|
imageRadius:'50%',
|
|
134
179
|
|
|
135
180
|
//基础
|
|
@@ -155,6 +200,13 @@
|
|
|
155
200
|
padding: {},
|
|
156
201
|
nickStyle:{},
|
|
157
202
|
logoutStyle:{},
|
|
203
|
+
rightContent: null,
|
|
204
|
+
addressUrl: '',
|
|
205
|
+
bgImage: "",
|
|
206
|
+
rightContentBgColor: "",
|
|
207
|
+
// rightContentTextColor: "",
|
|
208
|
+
rightContentPadding: "",
|
|
209
|
+
rightContentRadius: 0
|
|
158
210
|
}
|
|
159
211
|
},
|
|
160
212
|
watch: {
|
|
@@ -233,7 +285,7 @@
|
|
|
233
285
|
this.textType = getContainerPropsValue(container, 'content.text_type', 'N');
|
|
234
286
|
this.radius = getContainerPropsValue(container, 'content.radius', '10');
|
|
235
287
|
this.isSetting = getContainerPropsValue(container, 'content.isSetting', 'N');
|
|
236
|
-
this.logoutName = getContainerPropsValue(container, 'content.logoutName', '[退出登录]');
|
|
288
|
+
// this.logoutName = getContainerPropsValue(container, 'content.logoutName', '[退出登录]');
|
|
237
289
|
this.imageRadius = getContainerPropsValue(container, 'content.imageRadius', '50%');
|
|
238
290
|
this.imageColor = getContainerPropsValue(container, 'content.imageColor', '#333');
|
|
239
291
|
|
|
@@ -252,8 +304,25 @@
|
|
|
252
304
|
|
|
253
305
|
this.nickStyle = getContainerPropsValue(container, 'content.nickStyle', {});
|
|
254
306
|
this.logoutStyle = getContainerPropsValue(container, 'content.logoutStyle', {});
|
|
307
|
+
this.rightContent = getContainerPropsValue(container, 'content.rightContent', {
|
|
308
|
+
type: "logout",
|
|
309
|
+
name: "退出登录",
|
|
310
|
+
icon: "",
|
|
311
|
+
iconName: "",
|
|
312
|
+
});
|
|
313
|
+
this.addressUrl = getContainerPropsValue(container, 'content.addressUrl', {value: ""}).value;
|
|
314
|
+
this.bgImage = getServiceUrl(getContainerPropsValue(container, 'content.bgImage', '').url);
|
|
315
|
+
this.rightContentBgColor = getContainerPropsValue(container, 'content.rightContentBgColor', 'transparent');
|
|
316
|
+
// this.rightContentTextColor = getContainerPropsValue(container, 'content.rightContentTextColor', '');
|
|
317
|
+
this.rightContentPadding = getContainerPropsValue(container, 'content.rightContentPadding', {});
|
|
318
|
+
this.rightContentRadius = getContainerPropsValue(container, 'content.rightContentRadius', 0);
|
|
255
319
|
|
|
256
320
|
},
|
|
321
|
+
handleAddress(){
|
|
322
|
+
this.$xdUniHelper.navigateTo({
|
|
323
|
+
url: this.addressUrl
|
|
324
|
+
})
|
|
325
|
+
}
|
|
257
326
|
}
|
|
258
327
|
}
|
|
259
328
|
|
|
@@ -264,6 +333,7 @@
|
|
|
264
333
|
|
|
265
334
|
.vertical-user {
|
|
266
335
|
display: flex;
|
|
336
|
+
flex-direction: column;
|
|
267
337
|
justify-content: center;
|
|
268
338
|
align-items: center;
|
|
269
339
|
& > view:nth-child(2) {
|
|
@@ -285,7 +355,8 @@
|
|
|
285
355
|
display: flex;
|
|
286
356
|
align-items: center;
|
|
287
357
|
justify-content: flex-start;
|
|
288
|
-
|
|
358
|
+
background-size: cover;
|
|
359
|
+
background-repeat: no-repeat;
|
|
289
360
|
|
|
290
361
|
&-left {
|
|
291
362
|
display: flex;
|
|
@@ -337,6 +408,16 @@
|
|
|
337
408
|
|
|
338
409
|
.logout {
|
|
339
410
|
font-size: unit(24, rpx);
|
|
411
|
+
.right_cont_i{
|
|
412
|
+
display: flex;
|
|
413
|
+
align-items: center;
|
|
414
|
+
font-size: 28rpx;
|
|
415
|
+
color: inherit;
|
|
416
|
+
font-weight: 400;
|
|
417
|
+
.xd-font-icon{
|
|
418
|
+
margin-right:8rpx;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
340
421
|
& > view {
|
|
341
422
|
cursor: pointer;
|
|
342
423
|
}
|