39 lines
999 B
Vue
39 lines
999 B
Vue
<script setup>
|
|
import { useUserStore } from '@/stores/user'
|
|
const userStore = useUserStore()
|
|
</script>
|
|
|
|
<template>
|
|
<a-card class="personal-card">
|
|
<a-row :gutter="24">
|
|
<a-col :span="8">
|
|
<a-avatar
|
|
:size="120"
|
|
:src="userStore.user?.avatar || 'https://pic.rmb.bdstatic.com/bjh/80852bfe7c321988191838517ba64e309354.jpeg@h_1280'"
|
|
/>
|
|
</a-col>
|
|
|
|
<a-col :span="16">
|
|
<h2 class="username">{{ userStore.user?.username || '未命名用户' }}</h2>
|
|
<a-descriptions :column="1">
|
|
<a-descriptions-item label="注册时间">
|
|
{{ userStore.user?.createdAt }}
|
|
</a-descriptions-item>
|
|
<a-descriptions-item label="最后登录">
|
|
{{ userStore.user?.lastLogin }}
|
|
</a-descriptions-item>
|
|
</a-descriptions>
|
|
</a-col>
|
|
</a-row>
|
|
</a-card>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.personal-card {
|
|
margin: 24px;
|
|
}
|
|
.username {
|
|
font-size: 24px;
|
|
margin-bottom: 16px;
|
|
}
|
|
</style> |