Commit ea8ed9ba by zhaochengxiang

样本数据问题

parent d5b4b53e
import React, { useEffect, useState } from 'react';
import { Modal, Button, Form, Input, Table } from 'antd';
import { Modal, Button, Form, Input, Table, Tooltip, Typography } from 'antd';
import { dispatch } from '../../../../model';
const FC = (props) => {
......@@ -29,7 +29,15 @@ const FC = (props) => {
const newCols = [];
data?.headers?.forEach(item => {
newCols.push({title: item, dataIndex: item, width: 150, ellipsis: true});
newCols.push({
title: item,
dataIndex: item,
width: 150,
ellipsis: true,
render: (value, record) => <Tooltip title={value}>
<Typography.Text ellipsis={true}>{value}</Typography.Text>
</Tooltip>
});
});
setCols(newCols);
},
......@@ -68,8 +76,7 @@ const FC = (props) => {
columns={cols}
dataSource={data||[]}
size='small'
style={{ maxHeight: 300, overflow: 'auto' }}
scroll={{ x: true }}
scroll={{ x: 600, y: 300 }}
pagination={false}
/>
</Modal>
......
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