You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- /*
- * @Author: 赵伟
- * @Date: 2024-04-28 14:18:11
- * @Description: 自定义 Table 日期类单元格
- */
-
- import dayjs from 'dayjs';
-
- function DateTableCell(text?: string | null) {
- if (text === undefined || text === null || text === '') {
- return <span>--</span>;
- }
- if (!dayjs(text).isValid()) {
- return <span>无效的日期</span>;
- }
- return <span>{dayjs(text).format('YYYY-MM-DD HH:mm:ss')}</span>;
- }
-
- export default DateTableCell;
|