Skip to content

Commit

Permalink
fix: memorandum show updatedAt
Browse files Browse the repository at this point in the history
  • Loading branch information
xjh22222228 committed Nov 28, 2024
1 parent 2b29aa6 commit 565301e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/views/memorandum/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import './style.scss'
import dayjs from 'dayjs'
import NoData from '@/components/no-data/index'
import { Card, Col, Row, Button, Popconfirm, Spin } from 'antd'
import { Link, useNavigate } from 'react-router-dom'
import { useNavigate } from 'react-router-dom'
import { serviceGetMemorandum, serviceDeleteMemorandum } from '@/services'
import { defaultTitle } from './constants'

Expand Down Expand Up @@ -47,7 +47,9 @@ const MemorandumPage: React.FC = () => {
serviceGetMemorandum()
.then((res) => {
const data = res.map((item: any) => {
item.createdAt = dayjs(item.createdAt).format('YYYY/M/D HH:mm')
const format = 'YYYY.M.D HH:mm'
item.createdAt = dayjs(item.createdAt).format(format)
item.updatedAt = dayjs(item.updatedAt).format(format)
item.title = item.title || defaultTitle
return item
})
Expand Down Expand Up @@ -76,7 +78,7 @@ const MemorandumPage: React.FC = () => {
title={item.title}
hoverable
>
{item.createdAt}
{item.updatedAt}
<div
className="content"
dangerouslySetInnerHTML={{ __html: item.html }}
Expand Down

0 comments on commit 565301e

Please sign in to comment.