diff --git a/src/components/gird/main.js b/src/components/gird/main.js
index 662bd117..e618a0bd 100644
--- a/src/components/gird/main.js
+++ b/src/components/gird/main.js
@@ -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 {
})}{' '}
-