no message

Former-commit-id: fde02fa98ee6a9cc6a6a9ed4933b34715910b342 [formerly fde02fa98ee6a9cc6a6a9ed4933b34715910b342 [formerly fde02fa98ee6a9cc6a6a9ed4933b34715910b342 [formerly fde02fa98ee6a9cc6a6a9ed4933b34715910b342 [formerly 343afc4dcaafa419ac669d402a897531de023220 [formerly ee190663eea91b7c43fa0950ca5e599c121f227f]]]]]
Former-commit-id: b963a285c043a8f87f235b4a3d79798dc862a62e
Former-commit-id: ff681ca1d0bfd0f3487ef6f74b658e031a58db2f
Former-commit-id: ac3d0795933f1508b956b2c6a039ead7e6fb3d4a [formerly b3c5b462d69758026cef3cc29eccc1f04d454e2f]
Former-commit-id: 8a73105b1e6dee21d61cf13dd661546f13f203f2
Former-commit-id: 976f312c74cf1833ef92dd7a6c7fa36b4da6e925
Former-commit-id: 87a343d87b25969aa8bcc12665cc7e63044c8bf2
Former-commit-id: a34ef0de27cc6992af1e3c12f7ec7df6dc1618aa
Former-commit-id: 7edde307d869292feb955b4bfbf90fc03c128bd0
This commit is contained in:
liyang
2018-07-03 15:11:52 +08:00
parent 8631b700b9
commit 1a8334058b
3 changed files with 19 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
<template>
<el-dropdown class="d2-mr">
<span class="btn-text">你好</span>
<span class="btn-text">你好 {{username}}</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="logOff"><d2-icon name="power-off"/> 注销</el-dropdown-item>
<el-dropdown-item><d2-icon name="user-circle-o"/> 个人中心</el-dropdown-item>
@@ -9,8 +9,16 @@
</template>
<script>
// 插件
import Cookies from 'js-cookie'
import { mapState } from 'vuex'
export default {
computed: {
...mapState({
username: state => state.d2admin.username
})
},
methods: {
logOff () {
this.$confirm('注销此账户吗?', '注销', {
@@ -20,6 +28,7 @@ export default {
}).then(() => {
// 删除cookie
Cookies.remove('token')
Cookies.remove('uuid')
// 跳转路由
this.$router.push({
name: 'login'