|
|
@@ -18,7 +18,7 @@
|
|
|
<i class="el-icon-user" />
|
|
|
<span slot="title">个人中心</span>
|
|
|
</el-menu-item>
|
|
|
- <el-menu-item index="2-3" @click="exit">
|
|
|
+ <el-menu-item index="2-3" @click.native="goToLogout">
|
|
|
<i class="el-icon-close" />
|
|
|
<span slot="title">登出</span>
|
|
|
</el-menu-item>
|
|
|
@@ -27,10 +27,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { userMixin } from 'assets/js/mixin'
|
|
|
import { getAuthedUser } from '@/utils/auth'
|
|
|
|
|
|
export default {
|
|
|
name: 'TopNav',
|
|
|
+ mixins: [userMixin],
|
|
|
data: function() {
|
|
|
return {
|
|
|
user: null,
|
|
|
@@ -57,9 +59,6 @@ export default {
|
|
|
},
|
|
|
onClickUser() {
|
|
|
this.$message.info('click user')
|
|
|
- },
|
|
|
- exit() {
|
|
|
- this.$message.info('logout system')
|
|
|
}
|
|
|
}
|
|
|
}
|