File tree 5 files changed +13
-13
lines changed
5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
.user {
2
- &-avator -dropdown {
2
+ &-avatar -dropdown {
3
3
cursor : pointer ;
4
4
display : inline-block ;
5
5
// height: 64px;
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" user-avator -dropdown" >
2
+ <div class =" user-avatar -dropdown" >
3
3
<Dropdown @on-click =" handleClick" >
4
4
<Badge :dot =" !!messageUnreadCount" >
5
- <Avatar :src =" userAvator " />
5
+ <Avatar :src =" userAvatar " />
6
6
</Badge >
7
7
<Icon :size =" 18" type =" md-arrow-dropdown" ></Icon >
8
8
<DropdownMenu slot =" list" >
@@ -21,7 +21,7 @@ import { mapActions } from 'vuex'
21
21
export default {
22
22
name: ' User' ,
23
23
props: {
24
- userAvator : {
24
+ userAvatar : {
25
25
type: String ,
26
26
default: ' '
27
27
},
Original file line number Diff line number Diff line change 12
12
<Layout >
13
13
<Header class =" header-con" >
14
14
<header-bar :collapsed =" collapsed" @on-coll-change =" handleCollapsedChange" >
15
- <user :message-unread-count =" unreadCount" :user-avator = " userAvator " />
15
+ <user :message-unread-count =" unreadCount" :user-avatar = " userAvatar " />
16
16
<language v-if =" $config.useI18n" @on-lang-change =" setLocal" style =" margin-right : 10px ;" :lang =" local" />
17
17
<error-store v-if =" $config.plugin['error-store'] && $config.plugin['error-store'].showInHeader" :has-read =" hasReadErrorPage" :count =" errorCount" ></error-store >
18
18
<fullscreen v-model =" isFullscreen" style =" margin-right : 10px ;" />
@@ -79,8 +79,8 @@ export default {
79
79
tagRouter () {
80
80
return this .$store .state .app .tagRouter
81
81
},
82
- userAvator () {
83
- return this .$store .state .user .avatorImgPath
82
+ userAvatar () {
83
+ return this .$store .state .user .avatarImgPath
84
84
},
85
85
cacheList () {
86
86
const list = [' ParentView' , ... this .tagNavList .length ? this .tagNavList .filter (item => ! (item .meta && item .meta .notCache )).map (item => item .name ) : []]
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ const USER_MAP = {
5
5
user_id : '1' ,
6
6
access : [ 'super_admin' , 'admin' ] ,
7
7
token : 'super_admin' ,
8
- avator : 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
8
+ avatar : 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
9
9
} ,
10
10
admin : {
11
11
name : 'admin' ,
12
12
user_id : '2' ,
13
13
access : [ 'admin' ] ,
14
14
token : 'admin' ,
15
- avator : 'https://avatars0.githubusercontent.com/u/20942571?s=460&v=4'
15
+ avatar : 'https://avatars0.githubusercontent.com/u/20942571?s=460&v=4'
16
16
}
17
17
}
18
18
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default {
15
15
state : {
16
16
userName : '' ,
17
17
userId : '' ,
18
- avatorImgPath : '' ,
18
+ avatarImgPath : '' ,
19
19
token : getToken ( ) ,
20
20
access : '' ,
21
21
hasGetInfo : false ,
@@ -26,8 +26,8 @@ export default {
26
26
messageContentStore : { }
27
27
} ,
28
28
mutations : {
29
- setAvator ( state , avatorPath ) {
30
- state . avatorImgPath = avatorPath
29
+ setAvatar ( state , avatarPath ) {
30
+ state . avatarImgPath = avatarPath
31
31
} ,
32
32
setUserId ( state , id ) {
33
33
state . userId = id
@@ -111,7 +111,7 @@ export default {
111
111
try {
112
112
getUserInfo ( state . token ) . then ( res => {
113
113
const data = res . data
114
- commit ( 'setAvator ' , data . avator )
114
+ commit ( 'setAvatar ' , data . avatar )
115
115
commit ( 'setUserName' , data . name )
116
116
commit ( 'setUserId' , data . user_id )
117
117
commit ( 'setAccess' , data . access )
You can’t perform that action at this time.
0 commit comments