示例修改
This commit is contained in:
parent
71f9f42555
commit
73e40dae1e
|
@ -13,7 +13,6 @@ const columns16 = [
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "d",
|
dataIndex: "d",
|
||||||
key: "d",
|
key: "d",
|
||||||
fixed:'left',
|
|
||||||
width:200,
|
width:200,
|
||||||
render(text, record, index) {
|
render(text, record, index) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -118,10 +118,54 @@ const dataList = [
|
||||||
voucherDate:"kkkk",
|
voucherDate:"kkkk",
|
||||||
approvalState_name:"vvvv",
|
approvalState_name:"vvvv",
|
||||||
confirmState_name:"aaaa",
|
confirmState_name:"aaaa",
|
||||||
closeState_name:"vnnnnnvnnnnnvnnnnnvnnnnnvnnnnnvnnnnnvnnnnnvnnnnnvnnnnnvnnnnnvnnnnnvnnnnn",
|
closeState_name:"vnnnnn",
|
||||||
d:"操作",
|
d:"操作",
|
||||||
key: "1"
|
key: "1"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
index: 2,
|
||||||
|
_checked:true,
|
||||||
|
orderCode:"222",
|
||||||
|
supplierName: "22xxx",
|
||||||
|
type_name: "1223",
|
||||||
|
purchasing:'内行2',
|
||||||
|
purchasingGroup:"3223",
|
||||||
|
voucherDate:"222kk",
|
||||||
|
approvalState_name:"22vvvv",
|
||||||
|
confirmState_name:"2aaaa",
|
||||||
|
closeState_name:"2vnnnnn",
|
||||||
|
d:"2操作",
|
||||||
|
key: "2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 3,
|
||||||
|
orderCode:"222",
|
||||||
|
supplierName: "22xxx",
|
||||||
|
_disabled:true,
|
||||||
|
type_name: "1223",
|
||||||
|
purchasing:'内行2',
|
||||||
|
purchasingGroup:"3223",
|
||||||
|
voucherDate:"222kk",
|
||||||
|
approvalState_name:"22vvvv",
|
||||||
|
confirmState_name:"2aaaa",
|
||||||
|
closeState_name:"2vnnnnn",
|
||||||
|
d:"3操作",
|
||||||
|
key: "3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 4,
|
||||||
|
orderCode:"222",
|
||||||
|
supplierName: "22xxx",
|
||||||
|
type_name: "1223",
|
||||||
|
purchasing:'内行2',
|
||||||
|
purchasingGroup:"3223",
|
||||||
|
voucherDate:"222kk",
|
||||||
|
approvalState_name:"22vvvv",
|
||||||
|
confirmState_name:"2aaaa",
|
||||||
|
closeState_name:"2vnnnnn",
|
||||||
|
d:"4操作",
|
||||||
|
key: "4"
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const DragColumnTable = filterColumn(dragColumn(multiSelect(Table, Checkbox)),Popover);
|
const DragColumnTable = filterColumn(dragColumn(multiSelect(Table, Checkbox)),Popover);
|
||||||
|
@ -147,12 +191,6 @@ class Demo25 extends Component {
|
||||||
console.log("sum",sum);
|
console.log("sum",sum);
|
||||||
return (sum);
|
return (sum);
|
||||||
}
|
}
|
||||||
onExpand = (expandedKeys) => {
|
|
||||||
this.setState({
|
|
||||||
expandedKeys,
|
|
||||||
autoExpandParent: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
selectedRow=(record, index)=>{
|
selectedRow=(record, index)=>{
|
||||||
|
|
||||||
|
@ -161,7 +199,8 @@ class Demo25 extends Component {
|
||||||
render() {
|
render() {
|
||||||
let columns = getCloumns();
|
let columns = getCloumns();
|
||||||
|
|
||||||
return <div className="demo25"><DragColumnTable
|
return <div className="demo25">
|
||||||
|
<DragColumnTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={dataList}
|
data={dataList}
|
||||||
getSelectedDataFunc={this.getSelectedDataFunc}
|
getSelectedDataFunc={this.getSelectedDataFunc}
|
||||||
|
@ -169,10 +208,11 @@ class Demo25 extends Component {
|
||||||
checkMinSize={7}
|
checkMinSize={7}
|
||||||
draggable={true}
|
draggable={true}
|
||||||
multiSelect={{type: "checkbox"}}
|
multiSelect={{type: "checkbox"}}
|
||||||
scroll={{x:"130%", y: true}}
|
scroll={{x:"130%", y: 100}}
|
||||||
selectedRow={this.selectedRow}
|
selectedRow={this.selectedRow}
|
||||||
// scroll={{x:this.getCloumnsScroll(columns), y: 150}}
|
// scroll={{x:this.getCloumnsScroll(columns), y: 150}}
|
||||||
/></div>
|
/>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Demo25.defaultProps = defaultProps25;
|
Demo25.defaultProps = defaultProps25;
|
||||||
|
|
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
|
@ -626,6 +626,10 @@ class Table extends Component {
|
||||||
tableStyle.width = this.contentWidth;
|
tableStyle.width = this.contentWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//自动出现滚动条
|
||||||
|
// if(this.contentDomWidth < this.contentWidth){
|
||||||
|
// tableStyle.width = this.contentWidth;
|
||||||
|
// }
|
||||||
const tableBody = hasBody ? getBodyWrapper(
|
const tableBody = hasBody ? getBodyWrapper(
|
||||||
<tbody className={`${clsPrefix}-tbody`}>
|
<tbody className={`${clsPrefix}-tbody`}>
|
||||||
{this.getRows(columns, fixed)}
|
{this.getRows(columns, fixed)}
|
||||||
|
|
Loading…
Reference in New Issue