<template>
    <div class="container">
        <el-card shadow="hover" class="mgb20" style="height: 252px">
            <div class="user-info">
                <el-avatar :size="120" :src="imgurl" />
                <div class="user-info-cont">
                    <div class="user-info-name">{{ name }}</div>
                    <div>{{ role }}</div>
                </div>
            </div>
            <div class="user-info-list">
                上次登录时间：
                <span>2022-10-01</span>
            </div>
            <div class="user-info-list">
                上次登录地点：
                <span>东莞</span>
            </div>
        </el-card>
    </div>
</template>

<script setup lang="ts" name="dashboard">
import { ref, reactive } from 'vue';
import imgurl from '../assets/img/img.jpg';

const roleMap = {

}
const name = localStorage.getItem('ms_username');
const role: string = name === 'admin' ? '超级管理员' : '普通用户';
</script>

<style scoped></style>
