Compare commits
8 Commits
master
...
iuapForNcc
Author | SHA1 | Date |
---|---|---|
yangchch6 | 4755c07ffc | |
yangchch6 | 3d48277026 | |
yangchch6 | f861b5e012 | |
yangchch6 | 7a29fb4f56 | |
yangchch6 | 5bd7ea17a8 | |
yangchch6 | 6e77f2000b | |
yangchch6 | f11b4fc4c0 | |
yangchch6 | 57f742014a |
|
@ -446,6 +446,214 @@ class Demo0505 extends Component {
|
|||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: "名字",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
render: (text, record, index) => (
|
||||
<StringEditCell
|
||||
colName={"名字"}
|
||||
editable={this.state.isEditingAll}
|
||||
isEdited={record.isEdited.b || false}
|
||||
required
|
||||
value={text}
|
||||
onChange={this.onCellChange(index, "b")}
|
||||
throwError={this.throwError}
|
||||
/>
|
||||
)
|
||||
},
|
||||
// 只是用来占位占宽度的
|
||||
{
|
||||
key: "placeholder"
|
||||
|
|
|
@ -92,15 +92,16 @@ class Demo16 extends Component {
|
|||
|
||||
render() {
|
||||
return (
|
||||
<MultiSelectTable
|
||||
<Table
|
||||
className="expanded-table"
|
||||
columns={columns16}
|
||||
data={data16}
|
||||
onExpand={this.getData}
|
||||
expandedRowRender={this.expandedRowRender}
|
||||
expandIconAsCell={true}
|
||||
collapsedIcon={<Icon type='uf-anglearrowpointingtoright'/>}
|
||||
expandedIcon={<Icon type='uf-treearrow-down'/>}
|
||||
// expandIconAsCell={true}
|
||||
expandIconColumnIndex={2}
|
||||
// collapsedIcon={<Icon type='uf-anglearrowpointingtoright'/>}
|
||||
// expandedIcon={<Icon type='uf-treearrow-down'/>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -83,6 +83,9 @@ class Demo30 extends Component {
|
|||
onBodyScroll={this.handleBodyScroll}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,16 +13,71 @@ import BigData from "../../src/lib/bigData";
|
|||
import multiSelect from '../../src/lib/multiSelect';
|
||||
import filterColumn from '../../src/lib/filterColumn';
|
||||
|
||||
let ComplexTable = filterColumn(multiSelect(BigData(Table), Checkbox), Popover, Icon);
|
||||
let ComplexTable = filterColumn(BigData(Table), Popover, Icon);
|
||||
|
||||
const columns = [
|
||||
{
|
||||
className: 'u-table-multiSelect-column',
|
||||
title: (
|
||||
<Checkbox
|
||||
className="table-checkbox"
|
||||
/>
|
||||
),
|
||||
key: "checkbox",
|
||||
dataIndex: "checkbox",
|
||||
fixed:"left",
|
||||
width: 49,
|
||||
render: (text, record, index) => {
|
||||
const obj = {
|
||||
children: <Checkbox
|
||||
key={index}
|
||||
className="table-checkbox"
|
||||
/>,
|
||||
props: {},
|
||||
};
|
||||
if (index === 0) {
|
||||
obj.props.rowSpan = 100;
|
||||
} else {
|
||||
obj.props.rowSpan = 0;
|
||||
}
|
||||
obj.props.mergeEndIndex = 100;
|
||||
// if (index < 50 ) {
|
||||
// obj.props.mergeEndIndex = 50;
|
||||
// } else if (index > 50 && index < 100) {
|
||||
// obj.props.mergeEndIndex = 100;
|
||||
// } else if (index > 100) {
|
||||
// obj.props.mergeEndIndex = 150;
|
||||
// }
|
||||
return obj;
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'序号',
|
||||
dataIndex:'index',
|
||||
width:'80',
|
||||
key:'index',
|
||||
fixed:'left',
|
||||
render:(text,record,index)=>{
|
||||
return index
|
||||
// return index
|
||||
const obj = {
|
||||
children: index,
|
||||
props: {},
|
||||
};
|
||||
if (index === 0) {
|
||||
obj.props.rowSpan = 100;
|
||||
} else {
|
||||
obj.props.rowSpan = 0;
|
||||
}
|
||||
obj.props.mergeEndIndex = 100;
|
||||
// if (index < 50 ) {
|
||||
// obj.props.mergeEndIndex = 50;
|
||||
// } else if (index > 50 && index < 100) {
|
||||
// obj.props.mergeEndIndex = 100;
|
||||
// } else if (index > 100) {
|
||||
// obj.props.mergeEndIndex = 150;
|
||||
// }
|
||||
// mergeEndIndex: 滚动加载场景,合并表行时,设置合并结束位置的行 index 值
|
||||
return obj;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -46,7 +101,7 @@ const columns = [
|
|||
{ title: "年龄", dataIndex: "c", key: "c", width: 200 }
|
||||
];
|
||||
|
||||
const data = [ ...new Array(10000) ].map((e, i) => {
|
||||
const data = [ ...new Array(100) ].map((e, i) => {
|
||||
const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };
|
||||
if(i%3==0){
|
||||
rs.b = '女';
|
||||
|
|
|
@ -47,6 +47,9 @@ const data = [ ...new Array(1000) ].map((e, i) => {
|
|||
if(i%3==0){
|
||||
rs.b = '女';
|
||||
rs.children = [];
|
||||
// for(let subi=0;subi<3;subi++){
|
||||
// rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});
|
||||
// }
|
||||
for(let subi=0;subi<3;subi++){
|
||||
rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});
|
||||
rs.children[subi].children = []
|
||||
|
|
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
|
@ -558,6 +558,10 @@ export default function bigData(Table) {
|
|||
lazyLoad.sufHeight = this.getSumHeight(endIndex, data.length);
|
||||
}
|
||||
// console.log('*******expandedRowKeys*****'+expandedRowKeys);
|
||||
// console.log(
|
||||
// "**startIndex**" , startIndex,
|
||||
// "**endIndex**" , endIndex
|
||||
// );
|
||||
return (
|
||||
<Table
|
||||
{...this.props}
|
||||
|
|
Loading…
Reference in New Issue