Last active
May 17, 2024 15:54
-
-
Save buiducnhat/ff41344768a74dd17fd8ededa2769af5 to your computer and use it in GitHub Desktop.
blog1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Table | |
rowKey={(record) => record.id} | |
columns={[ | |
{ | |
title: 'ID', | |
dataIndex: 'id', | |
key: 'id', | |
}, | |
{ | |
title: 'Tên', | |
dataIndex: 'name', | |
key: 'name', | |
render: (text: string) => ( | |
<Typography.Text strong>{text}</Typography.Text> | |
), | |
}, | |
{ | |
title: 'Phương thức', | |
dataIndex: 'method', | |
key: 'method', | |
render: (text) => <RequestMethodTag method={text} />, | |
}, | |
{ | |
title: 'URL', | |
key: 'url', | |
render: (_, record) => ( | |
<Typography.Link>{`${record.protocol}://${record.host}:${record.port}${record.path}`}</Typography.Link> | |
), | |
}, | |
{ | |
title: 'Hành động', | |
key: 'actions', | |
render: (_, record) => ( | |
<Flex> | |
<Button | |
icon={<EditOutlined />} | |
type="link" | |
onClick={() => { | |
setRequestById(record.id); | |
}} | |
> | |
Sửa | |
</Button> | |
<Button danger type="link" icon={<DeleteOutlined />}> | |
Xóa | |
</Button> | |
</Flex> | |
), | |
}, | |
]} | |
dataSource={project.requests} | |
pagination={false} | |
/>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment