client: fix type

This commit is contained in:
fantasticit 2022-05-19 14:36:17 +08:00
parent 657b0e0ef9
commit 43f83ff243
5 changed files with 5 additions and 10 deletions

View File

@ -34,7 +34,7 @@ export const CommentItem: React.FC<IProps> = ({ comment, replyComment, editComme
<Space> <Space>
<Text strong>{(createUser as IUser).name}</Text> <Text strong>{(createUser as IUser).name}</Text>
<Text type="tertiary"> <Text type="tertiary">
<LocaleTime date={comment.createdAt} timeago /> <LocaleTime date={comment.createdAt} />
</Text> </Text>
</Space> </Space>
</header> </header>

View File

@ -31,7 +31,7 @@ export const Author: React.FC<IProps> = ({ document }) => {
</p> </p>
<p style={{ margin: '8px 0 0' }}> <p style={{ margin: '8px 0 0' }}>
<LocaleTime date={document.updatedAt} timeago /> <LocaleTime date={document.updatedAt} />
{' ⦁ '} {' ⦁ '}
{document.views} {document.views}
</p> </p>

View File

@ -45,7 +45,7 @@ const List: React.FC<{ data: IDocument[] }> = ({ data }) => {
<Text size="small" type="tertiary"> <Text size="small" type="tertiary">
{doc.createUser && doc.createUser.name} <LocaleTime date={doc.updatedAt} timeago /> {doc.createUser && doc.createUser.name} <LocaleTime date={doc.updatedAt} />
</Text> </Text>
</div> </div>
</div> </div>

View File

@ -51,7 +51,7 @@ export const RecentDocs = () => {
<Text size="small" type="tertiary"> <Text size="small" type="tertiary">
{doc.createUser && doc.createUser.name} <LocaleTime date={doc.updatedAt} timeago /> {doc.createUser && doc.createUser.name} <LocaleTime date={doc.updatedAt} />
</Text> </Text>
</div> </div>
</div> </div>

View File

@ -63,12 +63,7 @@ const RecentDocs = () => {
); );
}} }}
/>, />,
<Column <Column title="更新时间" dataIndex="updatedAt" key="updatedAt" render={(date) => <LocaleTime date={date} />} />,
title="更新时间"
dataIndex="updatedAt"
key="updatedAt"
render={(date) => <LocaleTime date={date} timeago />}
/>,
<Column <Column
title="操作" title="操作"
dataIndex="operate" dataIndex="operate"