|
@@ -1,8 +1,7 @@
|
|
|
-
|
|
|
<template>
|
|
|
<page-view :avatar="avatar" :title="false">
|
|
|
<div slot="headerContent">
|
|
|
- <div class="title">{{ timeFix }},{{ user.name }}<span class="welcome-text">,{{ welcome() }}</span></div>
|
|
|
+ <div class="title">{{ timeFix }},{{ user.name }}<span class="welcome-text">,{{ welcome }}</span></div>
|
|
|
<div>前端工程师 | 蚂蚁金服 - 某某某事业群 - VUE平台</div>
|
|
|
</div>
|
|
|
<div slot="extra">
|
|
@@ -112,7 +111,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { timeFix } from '@/utils/util'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
+import { mapState } from 'vuex'
|
|
|
|
|
|
import { PageView } from '@/layouts'
|
|
|
import HeadInfo from '@/components/tools/HeadInfo'
|
|
@@ -181,6 +180,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState({
|
|
|
+ nickname: (state) => state.user.nickname,
|
|
|
+ welcome: (state) => state.user.welcome
|
|
|
+ }),
|
|
|
userInfo () {
|
|
|
return this.$store.getters.userInfo
|
|
|
}
|
|
@@ -204,7 +207,6 @@ export default {
|
|
|
this.initRadar()
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapGetters(['nickname', 'welcome']),
|
|
|
getProjects () {
|
|
|
this.$http.get('/list/search/projects')
|
|
|
.then(res => {
|