修复环境变量表格样式

This commit is contained in:
whyour 2021-11-13 16:44:21 +08:00
parent c1269d9dde
commit 40e0d143f4

View File

@ -118,13 +118,17 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
dataIndex: 'value',
key: 'value',
align: 'center' as const,
width: '44%',
width: '35%',
ellipsis: {
showTitle: false,
},
render: (text: string, record: any) => {
return (
<Tooltip placement="topLeft" title={text}>
<Tooltip
placement="topLeft"
title={text}
trigger={['hover', 'click']}
>
<span>{text}</span>
</Tooltip>
);
@ -141,19 +145,23 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
dataIndex: 'timestamp',
key: 'timestamp',
align: 'center' as const,
width: 164,
width: 165,
ellipsis: {
showTitle: false,
},
render: (text: string, record: any) => {
const language = navigator.language || navigator.languages[0];
const date = new Date(text)
.toLocaleString(language, {
hour12: false,
})
.replace(' 24:', ' 00:')
.toLocaleString(language, {
hour12: false,
})
.replace(' 24:', ' 00:');
return (
<Tooltip placement="topLeft" title={date}>
<Tooltip
placement="topLeft"
title={date}
trigger={['hover', 'click']}
>
<span>{date}</span>
</Tooltip>
);
@ -528,7 +536,7 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
dataSource={value}
rowKey="_id"
size="middle"
scroll={{ x: 768, y: tableScrollHeight }}
scroll={{ x: 1000, y: tableScrollHeight }}
components={components}
loading={loading}
onRow={(record: any, index: number) => {