Commit ea8ed9ba by zhaochengxiang

样本数据问题

parent d5b4b53e
import React, { useEffect, useState } from 'react'; 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'; import { dispatch } from '../../../../model';
const FC = (props) => { const FC = (props) => {
...@@ -29,7 +29,15 @@ const FC = (props) => { ...@@ -29,7 +29,15 @@ const FC = (props) => {
const newCols = []; const newCols = [];
data?.headers?.forEach(item => { 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); setCols(newCols);
}, },
...@@ -68,8 +76,7 @@ const FC = (props) => { ...@@ -68,8 +76,7 @@ const FC = (props) => {
columns={cols} columns={cols}
dataSource={data||[]} dataSource={data||[]}
size='small' size='small'
style={{ maxHeight: 300, overflow: 'auto' }} scroll={{ x: 600, y: 300 }}
scroll={{ x: true }}
pagination={false} pagination={false}
/> />
</Modal> </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