快速选择用户登陆

Former-commit-id: 610c12b2a8679bfcad918e3d24d04a1a6af41c4c [formerly 610c12b2a8679bfcad918e3d24d04a1a6af41c4c [formerly 610c12b2a8679bfcad918e3d24d04a1a6af41c4c [formerly 610c12b2a8679bfcad918e3d24d04a1a6af41c4c [formerly cc710028c0810b73facbb1f00ba054da58bd88da [formerly 39767add7846a4a3f27fb79c47d121ceb1d3d6a0]]]]]
Former-commit-id: 740804501e73b47382d505ce1fa24e7bba3beb3b
Former-commit-id: a61192c10d96e687b6fe7ebd5e40e2a2cc816d8b
Former-commit-id: e142163ddd0be72d2de796dc90a54de29e64da4d [formerly 1f32a6afe0a2302808606bcb9c9776e93d4d805b]
Former-commit-id: 2bd41fd483228f0aff6255f5be5b72aa72e4b64e
Former-commit-id: bfd7e5e99f4774d60e8433e4f519d1d44db187ad
Former-commit-id: 8c4f66b40505956019099d80abbdaaa88808b011
Former-commit-id: aa887c968ab01b652512c95dc5b8503f68230c49
Former-commit-id: 0785746511cac0ba75c813f15e5b0914fbd916c1
This commit is contained in:
liyang
2018-07-18 13:57:52 +08:00
parent a43757c436
commit 31c16f2d3a
14 changed files with 139 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
<template>
<el-dropdown class="d2-mr">
<span class="btn-text">你好 {{username}}</span>
<span class="btn-text">你好 {{userInfo.name}}</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>
@@ -12,11 +12,10 @@
// 插件
import Cookies from 'js-cookie'
import { mapState, mapMutations } from 'vuex'
export default {
computed: {
...mapState({
username: state => state.d2admin.username
userInfo: state => state.d2admin.userInfo
})
},
methods: {
@@ -29,9 +28,9 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 删除用户
// 删除用户信息
this.d2adminUtilDbRemoveByUuid({
key: 'username',
key: 'userInfo',
emptyValue: ''
})
// 删除cookie