Commit a392bd6c by zhaochengxiang

tooltip提示优化

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