Commit 2ff16653 by zhaochengxiang

提示框

parent 923330a3
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Table, Input, Drawer } from 'antd'; import { Input, Drawer } from 'antd';
import ProTable from "@ant-design/pro-table";
import { dispatch } from '../../../../model'; import { dispatch } from '../../../../model';
...@@ -93,12 +94,18 @@ const ConstraintDetailDrawer = (props) => { ...@@ -93,12 +94,18 @@ const ConstraintDetailDrawer = (props) => {
style={{ width: 230 }} style={{ width: 230 }}
/> />
</div> </div>
<Table <ProTable
loading={loading} loading={loading}
columns={columns} columns={columns}
rowKey={'ruleName'} rowKey={'ruleName'}
dataSource={(rules||[]).filter(item => (item.ruleName||'').indexOf(keyword)!==-1)} dataSource={(rules||[]).filter(item => (item.ruleName||'').indexOf(keyword)!==-1)}
pagination={false} pagination={false}
search={false}
options={{
density: false,
setting: false,
reload: false,
}}
sticky sticky
/> />
</Drawer> </Drawer>
......
...@@ -524,6 +524,7 @@ const ImportActionIndex = (props) => { ...@@ -524,6 +524,7 @@ const ImportActionIndex = (props) => {
title: '规范', title: '规范',
dataIndex: 'validate', dataIndex: 'validate',
width: 180, width: 180,
ellipsis: true,
render: (text, record, index) => { render: (text, record, index) => {
let shortCauses = []; let shortCauses = [];
let causes = []; let causes = [];
...@@ -542,9 +543,11 @@ const ImportActionIndex = (props) => { ...@@ -542,9 +543,11 @@ const ImportActionIndex = (props) => {
{ {
shortCauses && shortCauses.map((shortCause, index) => { shortCauses && shortCauses.map((shortCause, index) => {
return ( return (
<Tooltip title={shortCause}>
<div className='textOverflow' style={{ width: 130, color: '#f5222d' }} title={shortCause} key={index}> <div className='textOverflow' style={{ width: 130, color: '#f5222d' }} title={shortCause} key={index}>
<span>{shortCause||''}</span> <span>{shortCause||''}</span>
</div> </div>
</Tooltip>
); );
}) })
} }
......
import React, { useState, useCallback, useRef, useEffect } from 'react'; import React, { useState, useCallback, useRef, useEffect } from 'react';
import { Input, Form, Typography, Radio, Divider, Button, Popconfirm, Select, Row, Col, Popover, Checkbox } from 'antd'; import { Input, Form, Typography, Radio, Divider, Button, Popconfirm, Select, Row, Col, Popover, Checkbox, Tooltip } from 'antd';
import { QuestionCircleOutlined, CloseOutlined, CheckOutlined } from '@ant-design/icons'; import { QuestionCircleOutlined, CloseOutlined, CheckOutlined } from '@ant-design/icons';
import { DndProvider, useDrag, useDrop } from 'react-dnd'; import { DndProvider, useDrag, useDrop } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend'; import { HTML5Backend } from 'react-dnd-html5-backend';
...@@ -625,9 +625,11 @@ const ImportActionTable = (props) => { ...@@ -625,9 +625,11 @@ const ImportActionTable = (props) => {
{ {
shortCauses && shortCauses.map((shortCause, index) => { shortCauses && shortCauses.map((shortCause, index) => {
return ( return (
<div className='textOverflow' style={{ width: 130, color: '#f5222d' }} title={shortCause} key={index}> <Tooltip title={shortCause}>
<div className='textOverflow' style={{ width: 130, color: '#f5222d' }} key={index}>
<span>{shortCause||''}</span> <span>{shortCause||''}</span>
</div> </div>
</Tooltip>
); );
}) })
} }
......
import React, { useState, useEffect, useRef } from "react"; import React, { useState, useEffect, useRef } from "react";
import { Space, Button, Tooltip, Modal, Select, Input, Divider, Table } from 'antd'; import { Space, Button, Tooltip, Modal, Select, Input, Divider } from 'antd';
import { EditOutlined, ReconciliationOutlined, DeleteOutlined } from '@ant-design/icons'; import { EditOutlined, ReconciliationOutlined, DeleteOutlined } from '@ant-design/icons';
import SmoothScroll from 'smooth-scroll'; import SmoothScroll from 'smooth-scroll';
import ProTable from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table";
...@@ -299,15 +299,7 @@ const ModelTable = (props) => { ...@@ -299,15 +299,7 @@ const ModelTable = (props) => {
} }
}} }}
rowSelection={rowSelection} rowSelection={rowSelection}
columns={ columns={columns||[]}
columns.map((col, index) => ({
...col,
onHeaderCell: column => ({
width: column.width,
onResize: handleResize(index),
}),
}))
}
rowKey={'id'} rowKey={'id'}
dataSource={data||[]} dataSource={data||[]}
pagination={false} pagination={false}
......
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