Commit 31db7d18 authored by chenshouchao's avatar chenshouchao

feat: 应用环境创建时间采用24小时制展示

parent a3ba43ef
.VTHeader {
font-size: 12px;
line-height: 20px;
color: rgba(138, 144, 153, 1);
padding: 12px 16px;
white-space: nowrap;
font-weight: 400;
}
.VTHeaderRow {
background-color: rgba(247, 248, 250, 1);
box-sizing: border-box;
}
.VTRow {
background-color: yellow;
}
import React from "react";
import { useCallback, useEffect, useState, useRef } from "react";
import { Column, Table, AutoSizer } from "react-virtualized";
import style from "./index.module.scss";
import "react-virtualized/styles.css"; // only needs to be imported once
type Order = "ASC" | "DESC"; // 升序为asc,降序为desc。
......@@ -111,10 +112,19 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
ref={virtuallyTableRef}
width={width}
height={height}
headerHeight={20}
headerHeight={59}
rowHeight={30}
rowCount={rows.length}
rowGetter={({ index }: any) => rows[index]}
headerClassName={style.VTHeader}
rowClassName={({ index }: any) => {
if (index < 0) {
return style.VTHeaderRow;
} else {
return style.VTRow;
}
}}
// rowClassName={style.VTRow}
>
{headCells.map((headCell) => {
return (
......@@ -136,8 +146,6 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
/>
);
})}
{/* <Column label="Name" dataKey="name" width={100} />
<Column width={200} label="Description" dataKey="description" /> */}
</Table>
)}
</div>
......
......@@ -128,7 +128,7 @@ const UserResourcesEnvironment = () => {
};
const renderCreatedTime = (item: any) => {
return moment(new Date(item.createdTime)).format("yyyy-MM-DD hh:mm:ss");
return moment(new Date(item.createdTime)).format("yyyy-MM-DD HH:mm:ss");
};
const handleDelete = (item: any) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment