Commit 7bcf7dc5 authored by 皮倩雯's avatar 皮倩雯

fix: '修改表字段样式'

parent 6d542bbc
Pipeline #48063 passed with stages
in 7 minutes 12 seconds
...@@ -101,6 +101,15 @@ const AddModal = props => { ...@@ -101,6 +101,15 @@ const AddModal = props => {
key: 'name', key: 'name',
align: 'left', align: 'left',
width: 300, width: 300,
onCell: () => ({
style: {
maxWidth: 300,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
render: (text, record) => { render: (text, record) => {
let aa = ( let aa = (
<div style={{ fontWeight: 'bold' }}> <div style={{ fontWeight: 'bold' }}>
...@@ -109,7 +118,11 @@ const AddModal = props => { ...@@ -109,7 +118,11 @@ const AddModal = props => {
</span> </span>
</div> </div>
); );
let bb = <div style={{ color: styleConfig(record) }}>{text}</div>; let bb = (
<Tooltip placement="topLeft" title={text}>
<div style={{ color: styleConfig(record) }}>{text}</div>
</Tooltip>
);
const obj = { const obj = {
children: record.children ? aa : bb, children: record.children ? aa : bb,
props: {}, props: {},
...@@ -124,9 +137,22 @@ const AddModal = props => { ...@@ -124,9 +137,22 @@ const AddModal = props => {
key: 'alias', key: 'alias',
align: 'center', align: 'center',
width: 300, width: 300,
onCell: () => ({
style: {
maxWidth: 300,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
render: (text, record) => { render: (text, record) => {
const obj = { const obj = {
children: <span style={{ color: styleConfig(record) }}>{text} </span>, children: (
<Tooltip placement="topLeft" title={text}>
<span style={{ color: styleConfig(record) }}>{text} </span>
</Tooltip>
),
props: {}, props: {},
}; };
obj.props.colSpan = record.children ? 0 : 1; obj.props.colSpan = record.children ? 0 : 1;
...@@ -169,9 +195,22 @@ const AddModal = props => { ...@@ -169,9 +195,22 @@ const AddModal = props => {
key: 'config', key: 'config',
align: 'center', align: 'center',
width: 250, width: 250,
onCell: () => ({
style: {
maxWidth: 250,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
render: (text, record) => { render: (text, record) => {
const obj = { const obj = {
children: <span style={{ color: styleConfig(record) }}>{text} </span>, children: (
<Tooltip placement="topLeft" title={text}>
<span style={{ color: styleConfig(record) }}>{text} </span>
</Tooltip>
),
props: {}, props: {},
}; };
obj.props.colSpan = record.children ? 0 : 1; obj.props.colSpan = record.children ? 0 : 1;
......
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