|
@@ -1,6 +1,7 @@
|
|
|
import React from 'react'
|
|
import React from 'react'
|
|
|
import { Table } from 'antd'
|
|
import { Table } from 'antd'
|
|
|
import EmptyContent from '../../common/emptyContent'
|
|
import EmptyContent from '../../common/emptyContent'
|
|
|
|
|
+import EllipsisTooltip from '../../common/ellipsisTooltip/index';
|
|
|
import './tableView.less'
|
|
import './tableView.less'
|
|
|
|
|
|
|
|
class TableView extends React.Component {
|
|
class TableView extends React.Component {
|
|
@@ -57,7 +58,10 @@ class TableView extends React.Component {
|
|
|
{ !columns || columns.length === 0 ? <EmptyContent /> : <Table
|
|
{ !columns || columns.length === 0 ? <EmptyContent /> : <Table
|
|
|
className={`table-view ${themeConfig.name}`}
|
|
className={`table-view ${themeConfig.name}`}
|
|
|
columns={columns ? columns.map((c, i) => {
|
|
columns={columns ? columns.map((c, i) => {
|
|
|
- let obj = { ...c };
|
|
|
|
|
|
|
+ let obj = {
|
|
|
|
|
+ ...c,
|
|
|
|
|
+ title: <EllipsisTooltip key={i} title={c.title} style={{ width: `${columnWidth - 16}px` }}>{c.title}</EllipsisTooltip>,
|
|
|
|
|
+ };
|
|
|
if(i !== columns.length - 1) {
|
|
if(i !== columns.length - 1) {
|
|
|
obj.onCell = () => {
|
|
obj.onCell = () => {
|
|
|
return {
|
|
return {
|