Add user's avatar.

This commit is contained in:
Yang Luo
2021-02-13 14:49:31 +08:00
parent 4daa4416c1
commit 9677282017
3 changed files with 53 additions and 10 deletions

View File

@ -49,6 +49,7 @@ class UserListPage extends React.Component {
password: "123456",
passwordType: "plain",
displayName: `New User - ${this.state.users.length}`,
avatar: "https://casbin.org/img/casbin.svg",
email: "user@example.com",
phone: "1-12345678",
}
@ -144,6 +145,19 @@ class UserListPage extends React.Component {
// width: '100px',
sorter: (a, b) => a.displayName.localeCompare(b.displayName),
},
{
title: 'Avatar',
dataIndex: 'avatar',
key: 'avatar',
width: '100px',
render: (text, record, index) => {
return (
<a target="_blank" href={text}>
<img src={text} alt={text} width={50} />
</a>
)
}
},
{
title: 'Email',
dataIndex: 'email',