<template>
  <d2-container class="page">
    <!-- <el-dropdown size="small" class="d2-mr"> -->
        <span class="btn-text">你好 {{StdReg.std_name}}</span>
        <span style="cursor:pointer" @click="logOff">
          <d2-icon name="power-off" class="d2-mr-5" @click.native="logOff"/>退出
        </span>

      <!-- <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click.native="changePassword">
          <d2-icon name="key" class="d2-mr-5"/>
          修改密码
        </el-dropdown-item>
        <el-dropdown-item @click.native="logOff">
          <d2-icon name="power-off" class="d2-mr-5"/>
          注销
        </el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown> -->
  </d2-container>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
  computed: {
    ...mapState({
      StdReg: state => state.enrol.StdReg,
    }),
  },
   data() {
    return {
    }
  },
  methods: {
    ...mapActions('d2admin/account', [
      'logout'
    ]),
    /**
     * @description 登出
     */
    logOff () {
      this.logout({
        vm: this,
        confirm: true
      })
    },
    changePassword(){
      this.goUrl("/password");
    },
  }
}
</script>
