mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-19 21:35:06 +08:00
重命名组件名称,增加用户地址查看api和页面、统一组件的props userId 变量名。
This commit is contained in:
@ -1,7 +1,90 @@
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<template>
|
||||
<span>基础信息</span>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<slot name="header"></slot>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<ElAvatar shape="square" :size="140" :src="user.avatar || undefined" />
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-descriptions :column="2">
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="用户名" icon="ep:user" />
|
||||
</template>
|
||||
{{ user.name || '空' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="昵称" icon="ep:user" />
|
||||
</template>
|
||||
{{ user.nickname }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">
|
||||
<template #label>
|
||||
<descriptions-item-label label="手机号" icon="ep:phone" />
|
||||
</template>
|
||||
{{ user.mobile }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="性别" icon="fa:mars-double" />
|
||||
</template>
|
||||
<dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="user.sex" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="所在地" icon="ep:location" />
|
||||
</template>
|
||||
{{ user.areaName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="注册 IP" icon="ep:position" />
|
||||
</template>
|
||||
{{ user.registerIp }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="生日" icon="fa:birthday-cake" />
|
||||
</template>
|
||||
{{ user.birthday ? formatDate(user.birthday) : '空' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="注册时间" icon="ep:calendar" />
|
||||
</template>
|
||||
{{ user.createTime ? formatDate(user.createTime) : '空' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<descriptions-item-label label="最后登录时间" icon="ep:calendar" />
|
||||
</template>
|
||||
{{ user.loginDate ? formatDate(user.loginDate) : '空' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import * as UserApi from '@/api/member/user'
|
||||
import DescriptionsItemLabel from '@/views/member/user/components/descriptions/DescriptionsItemLabel.vue'
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
const { user }: { user: UserApi.UserVO } = defineProps({
|
||||
user: {
|
||||
type: UserApi.UserVO,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user