Commit a392bd6c by zhaochengxiang

tooltip提示优化

parent b974d3db
import React,{ useState, useEffect, useRef } from "react";
import { Button, Pagination, Space, Modal, Input, Table, Tooltip, Checkbox } from "antd";
import { Button, Pagination, Space, Modal, Input, Table, Tooltip, Checkbox, Typography } from "antd";
import classNames from 'classnames';
import SmoothScroll from 'smooth-scroll';
import { Resizable } from 'react-resizable';
......@@ -15,6 +15,8 @@ import { AnchorId, AnchorTimestamp, AssetBrowseReference, AssetManageReference,
import "./AssetTable.less";
const { Text } = Typography;
const ResizeableHeaderCell = props => {
const { onResize, width, onClick, ...restProps } = props;
......@@ -168,7 +170,9 @@ const AssetTable = (props) => {
render: (text, record) => {
return (
<Tooltip title={text||''}>
{text||''}
<Text ellipsis={true}>
{text||''}
</Text>
</Tooltip>
);
}
......@@ -209,7 +213,9 @@ const AssetTable = (props) => {
return (
<Tooltip title={_content}>
<span>{_content}</span>
<Text ellipsis={true}>
{_content}
</Text>
</Tooltip>
);
}
......
import React, { useState, useEffect, useRef } from "react";
import { Tooltip, Modal, Pagination, Table } from 'antd';
import { Tooltip, Modal, Pagination, Table, Typography } from 'antd';
import { DownOutlined, UpOutlined } from '@ant-design/icons';
import SmoothScroll from 'smooth-scroll';
import classnames from 'classnames';
......@@ -15,6 +15,8 @@ import { AnchorId, AnchorTimestamp, Action, CatalogId, ModelerId } from '../../.
import './ModelTable.less';
import 'react-contexify/dist/ReactContexify.css';
const { Text } = Typography;
const ModelNameColumn = (props) => {
const { text, record, detailItem } = props;
const [ data, setData ] = useState(record);
......@@ -163,7 +165,7 @@ const ModelTable = (props) => {
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
<span>{text||''}</span>
<Text ellipsis={true}>{text||''}</Text>
</Tooltip>
)
}
......@@ -240,7 +242,7 @@ const ModelTable = (props) => {
render: (text, _, __) => {
return (
<Tooltip title={text||''} overlayClassName='tooltip-common'>
<span>{text||''}</span>
<Text ellipsis={true}>{text||''}</Text>
</Tooltip>
);
}
......@@ -257,7 +259,7 @@ const ModelTable = (props) => {
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
<span>{text||''}</span>
<Text ellipsis={true}>{text||''}</Text>
</Tooltip>
)
}
......
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