Merge pull request #1205 from baiyutang/master
fix wrongly written character avator
This commit is contained in:
commit
ade4e82369
|
|
@ -1,5 +1,5 @@
|
||||||
.user{
|
.user{
|
||||||
&-avator-dropdown{
|
&-avatar-dropdown{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
// height: 64px;
|
// height: 64px;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="user-avator-dropdown">
|
<div class="user-avatar-dropdown">
|
||||||
<Dropdown @on-click="handleClick">
|
<Dropdown @on-click="handleClick">
|
||||||
<Badge :dot="!!messageUnreadCount">
|
<Badge :dot="!!messageUnreadCount">
|
||||||
<Avatar :src="userAvator"/>
|
<Avatar :src="userAvatar"/>
|
||||||
</Badge>
|
</Badge>
|
||||||
<Icon :size="18" type="md-arrow-dropdown"></Icon>
|
<Icon :size="18" type="md-arrow-dropdown"></Icon>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list">
|
||||||
|
|
@ -21,7 +21,7 @@ import { mapActions } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'User',
|
name: 'User',
|
||||||
props: {
|
props: {
|
||||||
userAvator: {
|
userAvatar: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<Layout>
|
<Layout>
|
||||||
<Header class="header-con">
|
<Header class="header-con">
|
||||||
<header-bar :collapsed="collapsed" @on-coll-change="handleCollapsedChange">
|
<header-bar :collapsed="collapsed" @on-coll-change="handleCollapsedChange">
|
||||||
<user :message-unread-count="unreadCount" :user-avator="userAvator"/>
|
<user :message-unread-count="unreadCount" :user-avatar="userAvatar"/>
|
||||||
<language v-if="$config.useI18n" @on-lang-change="setLocal" style="margin-right: 10px;" :lang="local"/>
|
<language v-if="$config.useI18n" @on-lang-change="setLocal" style="margin-right: 10px;" :lang="local"/>
|
||||||
<error-store v-if="$config.plugin['error-store'] && $config.plugin['error-store'].showInHeader" :has-read="hasReadErrorPage" :count="errorCount"></error-store>
|
<error-store v-if="$config.plugin['error-store'] && $config.plugin['error-store'].showInHeader" :has-read="hasReadErrorPage" :count="errorCount"></error-store>
|
||||||
<fullscreen v-model="isFullscreen" style="margin-right: 10px;"/>
|
<fullscreen v-model="isFullscreen" style="margin-right: 10px;"/>
|
||||||
|
|
@ -79,8 +79,8 @@ export default {
|
||||||
tagRouter () {
|
tagRouter () {
|
||||||
return this.$store.state.app.tagRouter
|
return this.$store.state.app.tagRouter
|
||||||
},
|
},
|
||||||
userAvator () {
|
userAvatar () {
|
||||||
return this.$store.state.user.avatorImgPath
|
return this.$store.state.user.avatarImgPath
|
||||||
},
|
},
|
||||||
cacheList () {
|
cacheList () {
|
||||||
const list = ['ParentView', ...this.tagNavList.length ? this.tagNavList.filter(item => !(item.meta && item.meta.notCache)).map(item => item.name) : []]
|
const list = ['ParentView', ...this.tagNavList.length ? this.tagNavList.filter(item => !(item.meta && item.meta.notCache)).map(item => item.name) : []]
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@ const USER_MAP = {
|
||||||
user_id: '1',
|
user_id: '1',
|
||||||
access: ['super_admin', 'admin'],
|
access: ['super_admin', 'admin'],
|
||||||
token: 'super_admin',
|
token: 'super_admin',
|
||||||
avator: 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
|
avatar: 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
|
||||||
},
|
},
|
||||||
admin: {
|
admin: {
|
||||||
name: 'admin',
|
name: 'admin',
|
||||||
user_id: '2',
|
user_id: '2',
|
||||||
access: ['admin'],
|
access: ['admin'],
|
||||||
token: 'admin',
|
token: 'admin',
|
||||||
avator: 'https://avatars0.githubusercontent.com/u/20942571?s=460&v=4'
|
avatar: 'https://avatars0.githubusercontent.com/u/20942571?s=460&v=4'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export default {
|
||||||
state: {
|
state: {
|
||||||
userName: '',
|
userName: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
avatorImgPath: '',
|
avatarImgPath: '',
|
||||||
token: getToken(),
|
token: getToken(),
|
||||||
access: '',
|
access: '',
|
||||||
hasGetInfo: false,
|
hasGetInfo: false,
|
||||||
|
|
@ -26,8 +26,8 @@ export default {
|
||||||
messageContentStore: {}
|
messageContentStore: {}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
setAvator (state, avatorPath) {
|
setAvatar (state, avatarPath) {
|
||||||
state.avatorImgPath = avatorPath
|
state.avatarImgPath = avatarPath
|
||||||
},
|
},
|
||||||
setUserId (state, id) {
|
setUserId (state, id) {
|
||||||
state.userId = id
|
state.userId = id
|
||||||
|
|
@ -111,7 +111,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
getUserInfo(state.token).then(res => {
|
getUserInfo(state.token).then(res => {
|
||||||
const data = res.data
|
const data = res.data
|
||||||
commit('setAvator', data.avator)
|
commit('setAvatar', data.avatar)
|
||||||
commit('setUserName', data.name)
|
commit('setUserName', data.name)
|
||||||
commit('setUserId', data.user_id)
|
commit('setUserId', data.user_id)
|
||||||
commit('setAccess', data.access)
|
commit('setAccess', data.access)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue