27 lines
747 B
JavaScript
27 lines
747 B
JavaScript
|
|
import {Table} from 'antd';
|
||
|
|
import React, {useEffect, useState} from 'react';
|
||
|
|
import moment from 'moment'
|
||
|
|
|
||
|
|
|
||
|
|
const Tabledata = ({tableData}) => {
|
||
|
|
const columns = [
|
||
|
|
{ title: '序号', key: '', dataIndex: '', align: 'center',width:'40px',render:(a,b,c)=>c+1},
|
||
|
|
{ title: '数据时间', key: 'tm', dataIndex: 'tm', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> },
|
||
|
|
{ title: '温度', key: '', dataIndex: '', align: 'center',render: (rec) => <span>{rec ?? "-"}</span> },
|
||
|
|
];
|
||
|
|
|
||
|
|
return (
|
||
|
|
<>
|
||
|
|
<Table rowKey="adcd"
|
||
|
|
sticky
|
||
|
|
columns={columns}
|
||
|
|
pagination={false}
|
||
|
|
dataSource={tableData}
|
||
|
|
scroll={{ y: "420px"}}
|
||
|
|
/>
|
||
|
|
</>
|
||
|
|
)
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
export default Tabledata
|