‘宽度支持百分比计算,含有固定列的表格渲染expand问题’
This commit is contained in:
parent
4b6dd9bd1c
commit
2777f07372
|
@ -32,6 +32,30 @@ const columns16 = [
|
|||
{ id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 },
|
||||
{ title: "年龄", dataIndex: "c", key: "c", width: 200 },
|
||||
|
||||
];
|
||||
const columns17 = [
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "d",
|
||||
key: "d",
|
||||
width:200,
|
||||
render(text, record, index) {
|
||||
return (
|
||||
<a
|
||||
href="#"
|
||||
onClick={() => {
|
||||
alert("这是第" + index + "列,内容为:" + text);
|
||||
}}
|
||||
>
|
||||
一些操作
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
{ title: "用户名", dataIndex: "a", key: "a", width: 100 },
|
||||
{ id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 },
|
||||
{ title: "年龄", dataIndex: "c", key: "c", width: 200 },
|
||||
|
||||
];
|
||||
|
||||
const data16 = [
|
||||
|
@ -49,14 +73,13 @@ class Demo16 extends Component {
|
|||
}
|
||||
}
|
||||
expandedRowRender = (record, index, indent) => {
|
||||
console.log(this.state.data_obj[record.key].length);
|
||||
let height = 42 * (this.state.data_obj[record.key].length+ 3);
|
||||
let height = 42 * (this.state.data_obj[record.key].length+ 2);
|
||||
|
||||
return (
|
||||
<Table
|
||||
columns={columns16}
|
||||
columns={columns17}
|
||||
style={{height:height}}
|
||||
data={this.state.data_obj[record.key]}
|
||||
data={this.state.data_obj[record.key]}
|
||||
|
||||
/>
|
||||
);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8496,6 +8496,8 @@ ul {
|
|||
background: #f7f7f7; }
|
||||
.u-table tr.u-table-expanded-row:hover {
|
||||
background: #f7f7f7; }
|
||||
.u-table tr.u-table-expanded-row .u-table {
|
||||
z-index: 1; }
|
||||
.u-table-column-hidden {
|
||||
display: none; }
|
||||
.u-table-prev-columns-page, .u-table-next-columns-page {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -356,7 +356,7 @@ class Table extends Component{
|
|||
props: {
|
||||
colSpan: colCount,
|
||||
},
|
||||
children: fixed !== 'right' ? content : contentContainer(),
|
||||
children: !fixed ? content : contentContainer(),
|
||||
}),
|
||||
}];
|
||||
if (expandIconAsCell && fixed !== 'right') {
|
||||
|
|
|
@ -192,6 +192,7 @@ $table-move-in-color: $bg-color-base;
|
|||
}
|
||||
.u-table {
|
||||
// padding: 0 40px 0 20px;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
&-column-hidden {
|
||||
|
|
Loading…
Reference in New Issue