This commit is contained in:
parent
1510ce8664
commit
5ea9708d11
|
@ -159,8 +159,6 @@
|
|||
opacity: 1;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
display: flex !important ;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.grid-loading.show .loading-bar {
|
||||
|
|
|
@ -135,7 +135,7 @@ export default class menu extends React.Component {
|
|||
indeterminate: false,
|
||||
pageNum: 0,
|
||||
pageCount: props.dataCount,
|
||||
pageLoading: true,
|
||||
pageLoading: false,
|
||||
editShow: false,
|
||||
postion: null,
|
||||
historyrow_id: null,
|
||||
|
@ -199,11 +199,9 @@ export default class menu extends React.Component {
|
|||
this.setState({ tableData: tabledata })
|
||||
}
|
||||
|
||||
gridPageLoads() {
|
||||
let clr = null
|
||||
if (clr) clearTimeout(clr)
|
||||
gridPageLoad() {
|
||||
this.setState({ pageLoading: true })
|
||||
clr = setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
this.setState({ pageLoading: false })
|
||||
}, 800)
|
||||
}
|
||||
|
@ -278,7 +276,6 @@ export default class menu extends React.Component {
|
|||
this.setState({ page: nextProps.page, emptyText: nextProps.emptyText })
|
||||
this.setState({ dataCount: nextProps.dataCount })
|
||||
this.scrollPosition()
|
||||
this.gridPageLoads()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,9 +312,7 @@ export default class menu extends React.Component {
|
|||
this.props.countChange(e)
|
||||
this.setState({ pageCount: e })
|
||||
}
|
||||
gridPageLoad(flag) {
|
||||
this.setState({ pageLoading: flag })
|
||||
}
|
||||
|
||||
pageShow(e) {}
|
||||
gridEditChange(e) {}
|
||||
getSelectData() {
|
||||
|
@ -404,14 +399,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' }}>
|
||||
|
@ -570,14 +564,17 @@ export default class menu extends React.Component {
|
|||
count: this.props.dataCount
|
||||
}}
|
||||
onPrevClick={(e) => {
|
||||
this.gridPageLoad()
|
||||
this.props.pageChange(e)
|
||||
}}
|
||||
page={this.props.page}
|
||||
pageFn={(e) => this.setState({ page: e })}
|
||||
onNextClick={(e) => {
|
||||
this.gridPageLoad()
|
||||
this.props.pageChange(e)
|
||||
}}
|
||||
onJumpPage={(e) => {
|
||||
this.gridPageLoad()
|
||||
this.props.pageChange(e)
|
||||
}}
|
||||
onCountChange={(e) => {
|
||||
|
|
Loading…
Reference in New Issue