fix: 后台管理时间格式化
This commit is contained in:
parent
c32c8d5e4f
commit
db59c6d95b
@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|||||||
import { PageContainer } from '@ant-design/pro-components';
|
import { PageContainer } from '@ant-design/pro-components';
|
||||||
import { Table, Button, Modal, Form, Input, Tag, Space, Popconfirm, message, Avatar } from 'antd';
|
import { Table, Button, Modal, Form, Input, Tag, Space, Popconfirm, message, Avatar } from 'antd';
|
||||||
import { listAllPostsUsingGet, updatePostUsingPost, deletePostUsingPost, addPostUsingPost } from '@/services/hebi/postController';
|
import { listAllPostsUsingGet, updatePostUsingPost, deletePostUsingPost, addPostUsingPost } from '@/services/hebi/postController';
|
||||||
|
import dayjs from 'dayjs'; // 新增
|
||||||
|
|
||||||
const ForumAdmin: React.FC = () => {
|
const ForumAdmin: React.FC = () => {
|
||||||
const [posts, setPosts] = useState<any[]>([]);
|
const [posts, setPosts] = useState<any[]>([]);
|
||||||
@ -116,6 +117,7 @@ const ForumAdmin: React.FC = () => {
|
|||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
width: 180,
|
width: 180,
|
||||||
|
render: (time: string) => time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|||||||
import { PageContainer } from '@ant-design/pro-components';
|
import { PageContainer } from '@ant-design/pro-components';
|
||||||
import { Table, Button, Modal, Form, Input, Space, Popconfirm, message, Avatar, Select } from 'antd';
|
import { Table, Button, Modal, Form, Input, Space, Popconfirm, message, Avatar, Select } from 'antd';
|
||||||
import { listUserByPageUsingPost, updateUserUsingPost, deleteUserUsingPost, addUserUsingPost } from '@/services/hebi/userController';
|
import { listUserByPageUsingPost, updateUserUsingPost, deleteUserUsingPost, addUserUsingPost } from '@/services/hebi/userController';
|
||||||
|
import dayjs from 'dayjs'; // 新增
|
||||||
|
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
|
|
||||||
@ -167,6 +168,7 @@ const UserManage: React.FC = () => {
|
|||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
width: 180,
|
width: 180,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
render: (time: string) => time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user