This commit is contained in:
parent
24d8c1e754
commit
a90dfa654f
|
@ -199,6 +199,13 @@ export default class menu extends React.Component {
|
||||||
this.setState({ tableData: tabledata })
|
this.setState({ tableData: tabledata })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gridPageLoad() {
|
||||||
|
this.setState({ pageLoading: true })
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({ pageLoading: false })
|
||||||
|
}, 800)
|
||||||
|
}
|
||||||
|
|
||||||
checkChange(index, e) {
|
checkChange(index, e) {
|
||||||
this.state.tableData[index].checked = e.target.checked
|
this.state.tableData[index].checked = e.target.checked
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -268,10 +275,16 @@ export default class menu extends React.Component {
|
||||||
this.setState({ page: nextProps.page })
|
this.setState({ page: nextProps.page })
|
||||||
this.setState({ page: nextProps.page, emptyText: nextProps.emptyText })
|
this.setState({ page: nextProps.page, emptyText: nextProps.emptyText })
|
||||||
this.setState({ dataCount: nextProps.dataCount })
|
this.setState({ dataCount: nextProps.dataCount })
|
||||||
this.gridPageLoad()
|
this.scrollPosition()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 重置grid滚动条 */
|
||||||
|
scrollPosition() {
|
||||||
|
document.getElementById('grid').scrollLeft = 0
|
||||||
|
document.getElementById('grid').scrollTop = 0
|
||||||
|
}
|
||||||
|
|
||||||
onConfirm = () => {}
|
onConfirm = () => {}
|
||||||
|
|
||||||
onCancel = () => {}
|
onCancel = () => {}
|
||||||
|
@ -303,7 +316,7 @@ export default class menu extends React.Component {
|
||||||
this.setState({ pageLoading: true })
|
this.setState({ pageLoading: true })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({ pageLoading: false })
|
this.setState({ pageLoading: false })
|
||||||
}, 800)
|
}, 500)
|
||||||
}
|
}
|
||||||
pageShow(e) {}
|
pageShow(e) {}
|
||||||
gridEditChange(e) {}
|
gridEditChange(e) {}
|
||||||
|
@ -316,7 +329,6 @@ export default class menu extends React.Component {
|
||||||
}
|
}
|
||||||
rowItemClick(index) {
|
rowItemClick(index) {
|
||||||
console.log(index)
|
console.log(index)
|
||||||
|
|
||||||
this.setState({ curIndex: index })
|
this.setState({ curIndex: index })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,14 +404,13 @@ export default class menu extends React.Component {
|
||||||
})}{' '}
|
})}{' '}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<InlineLoading
|
<div
|
||||||
loading={this.state.pageLoading}
|
className={
|
||||||
iconSize={16}
|
this.state.pageLoading ? 'grid-loading show' : 'grid-loading'
|
||||||
textSize={14}
|
}>
|
||||||
icon='circle'
|
<div className='loading-bar'></div>
|
||||||
className='grid-loading show'
|
<div className='loading-txt'>数据加载中,请耐心等待</div>
|
||||||
iconText='数据加载中,请耐心等待'
|
</div>
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
className={this.state.pageLoading ? 'th-body hide' : 'th-body'}
|
className={this.state.pageLoading ? 'th-body hide' : 'th-body'}
|
||||||
style={{ maxHeight: this.props.maxheight + 'px' }}>
|
style={{ maxHeight: this.props.maxheight + 'px' }}>
|
||||||
|
|
Loading…
Reference in New Issue