You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
import { useEffect } from 'react'
import {
Row , Col , Space , Descriptions , Avatar , Tag
} from 'antd'
import {
UserOutlined
} from '@ant-design/icons'
import { useAuthContext } from '@/stores/AuthContext'
function AccountProfile ( ) {
const { loginUser } = useAuthContext ( )
useEffect ( ( ) => {
// 测试错误捕获:
// throw new Error('💥 CABOOM 💥')
} , [ ] )
return (
< Row >
< Col span = { 12 } offset = { 6 } >
< Descriptions title = '个人资料' layout = 'vertical' column = { 2 } >
< Descriptions . Item label = '名字' > < Space size = 'middle' > < Avatar src = { loginUser . avatarUrl } > { loginUser . username . substring ( 1 ) } < / A v a t a r > { l o g i n U s e r . u s e r n a m e } < / S p a c e > < / D e s c r i p t i o n s . I t e m >
< Descriptions . Item label = 'HT 账号' >
{ loginUser . accountList ? . map ( a => { return (
< Tag key = { a . OPI _Code } icon = { < UserOutlined / > } bordered = { false } > { a . OPI _Code } < / T a g >
) } ) }
< / D e s c r i p t i o n s . I t e m >
< Descriptions . Item label = '手机' > { loginUser . mobile } < / D e s c r i p t i o n s . I t e m >
< Descriptions . Item label = '邮件' > { loginUser . email } < / D e s c r i p t i o n s . I t e m >
< / D e s c r i p t i o n s >
< / C o l >
< / R o w >
)
}
export default AccountProfile