Kaynağa Gözat

feat: 限制登录时间的转换

outaozhen 2 yıl önce
ebeveyn
işleme
aaa7e5736d
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      src/pages/Institutions/Restrict/index.tsx

+ 3 - 1
src/pages/Institutions/Restrict/index.tsx

@@ -9,6 +9,7 @@ import { useRequest } from '@umijs/max'
 import { Modal } from 'antd'
 import React, { useRef, useState } from 'react'
 import StaffDetail from '../Staff/components/StaffDetail'
+import dayjs from 'dayjs'
 
 type iRestrictProps = {
   title: Nullable<string>
@@ -92,7 +93,8 @@ const Restrict: React.FC = () => {
       width: 106,
       align: 'center',
       title: '创建时间',
-      onHeaderCell: () => ({ style: { textAlign: 'center' } })
+      onHeaderCell: () => ({ style: { textAlign: 'center' } }),
+      renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
     {
       title: '操作',