This commit is contained in:
wangsongsole 2022-08-24 18:10:02 +08:00
parent 24d8c1e754
commit a90dfa654f
1 changed files with 22 additions and 11 deletions

View File

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