Skip to content

Commit d5193dc

Browse files
committed
avator => avatar
1 parent 5a86680 commit d5193dc

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/components/main/components/user/user.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.user{
2-
&-avator-dropdown{
2+
&-avatar-dropdown{
33
cursor: pointer;
44
display: inline-block;
55
// height: 64px;

src/components/main/components/user/user.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
2-
<div class="user-avator-dropdown">
2+
<div class="user-avatar-dropdown">
33
<Dropdown @on-click="handleClick">
44
<Badge :dot="!!messageUnreadCount">
5-
<Avatar :src="userAvator"/>
5+
<Avatar :src="userAvatar"/>
66
</Badge>
77
<Icon :size="18" type="md-arrow-dropdown"></Icon>
88
<DropdownMenu slot="list">
@@ -21,7 +21,7 @@ import { mapActions } from 'vuex'
2121
export default {
2222
name: 'User',
2323
props: {
24-
userAvator: {
24+
userAvatar: {
2525
type: String,
2626
default: ''
2727
},

src/components/main/main.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Layout>
1313
<Header class="header-con">
1414
<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"/>
1616
<language v-if="$config.useI18n" @on-lang-change="setLocal" style="margin-right: 10px;" :lang="local"/>
1717
<error-store v-if="$config.plugin['error-store'] && $config.plugin['error-store'].showInHeader" :has-read="hasReadErrorPage" :count="errorCount"></error-store>
1818
<fullscreen v-model="isFullscreen" style="margin-right: 10px;"/>
@@ -79,8 +79,8 @@ export default {
7979
tagRouter () {
8080
return this.$store.state.app.tagRouter
8181
},
82-
userAvator () {
83-
return this.$store.state.user.avatorImgPath
82+
userAvatar () {
83+
return this.$store.state.user.avatarImgPath
8484
},
8585
cacheList () {
8686
const list = ['ParentView', ...this.tagNavList.length ? this.tagNavList.filter(item => !(item.meta && item.meta.notCache)).map(item => item.name) : []]

src/mock/login.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ const USER_MAP = {
55
user_id: '1',
66
access: ['super_admin', 'admin'],
77
token: 'super_admin',
8-
avator: 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
8+
avatar: 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
99
},
1010
admin: {
1111
name: 'admin',
1212
user_id: '2',
1313
access: ['admin'],
1414
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'
1616
}
1717
}
1818

src/store/module/user.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default {
1515
state: {
1616
userName: '',
1717
userId: '',
18-
avatorImgPath: '',
18+
avatarImgPath: '',
1919
token: getToken(),
2020
access: '',
2121
hasGetInfo: false,
@@ -26,8 +26,8 @@ export default {
2626
messageContentStore: {}
2727
},
2828
mutations: {
29-
setAvator (state, avatorPath) {
30-
state.avatorImgPath = avatorPath
29+
setAvatar (state, avatarPath) {
30+
state.avatarImgPath = avatarPath
3131
},
3232
setUserId (state, id) {
3333
state.userId = id
@@ -111,7 +111,7 @@ export default {
111111
try {
112112
getUserInfo(state.token).then(res => {
113113
const data = res.data
114-
commit('setAvator', data.avator)
114+
commit('setAvatar', data.avatar)
115115
commit('setUserName', data.name)
116116
commit('setUserId', data.user_id)
117117
commit('setAccess', data.access)

0 commit comments

Comments
 (0)