修改表格样式

This commit is contained in:
whyour
2023-03-02 23:31:46 +08:00
parent 3b9a4f0834
commit f865018cd6
10 changed files with 13 additions and 76 deletions
+3 -12
View File
@@ -49,13 +49,11 @@ const Setting = () => {
title: '名称',
dataIndex: 'name',
key: 'name',
align: 'center' as const,
},
{
title: 'Client ID',
dataIndex: 'client_id',
key: 'client_id',
align: 'center' as const,
render: (text: string, record: any) => {
return <Text copyable>{record.client_id}</Text>;
},
@@ -64,7 +62,6 @@ const Setting = () => {
title: 'Client Secret',
dataIndex: 'client_secret',
key: 'client_secret',
align: 'center' as const,
render: (text: string, record: any) => {
return <Text copyable={{ text: record.client_secret }}>*******</Text>;
},
@@ -73,22 +70,16 @@ const Setting = () => {
title: '权限',
dataIndex: 'scopes',
key: 'scopes',
align: 'center' as const,
width: '40%',
render: (text: string, record: any) => {
return (
<div style={{ textAlign: 'left' }}>
{record.scopes.map((scope: any) => {
return <Tag key={scope}>{(config.scopesMap as any)[scope]}</Tag>;
})}
</div>
);
return record.scopes.map((scope: any) => {
return <Tag key={scope}>{(config.scopesMap as any)[scope]}</Tag>;
});
},
},
{
title: '操作',
key: 'action',
align: 'center' as const,
render: (text: string, record: any, index: number) => {
const isPc = !isPhone;
return (
-6
View File
@@ -18,7 +18,6 @@ enum LoginStatusColor {
const columns = [
{
title: '序号',
align: 'center' as const,
width: 50,
render: (text: string, record: any, index: number) => {
return index + 1;
@@ -28,7 +27,6 @@ const columns = [
title: '登录时间',
dataIndex: 'timestamp',
key: 'timestamp',
align: 'center' as const,
render: (text: string, record: any) => {
return new Date(record.timestamp).toLocaleString();
},
@@ -37,25 +35,21 @@ const columns = [
title: '登录地址',
dataIndex: 'address',
key: 'address',
align: 'center' as const,
},
{
title: '登录IP',
dataIndex: 'ip',
key: 'ip',
align: 'center' as const,
},
{
title: '登录设备',
dataIndex: 'platform',
key: 'platform',
align: 'center' as const,
},
{
title: '登录状态',
dataIndex: 'status',
key: 'status',
align: 'center' as const,
render: (text: string, record: any) => {
return (
<Tag color={LoginStatusColor[record.status]} style={{ marginRight: 0 }}>