Skip to content

Commit ded92e5

Browse files
李钿李钿
authored andcommitted
1、清理代码;
2、上拉刷新动作取消 hasMore 的判断
1 parent 00c94bd commit ded92e5

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

src/ReactPullLoad.jsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ import HeadNode from './HeadNode'
66
import FooterNode from './FooterNode'
77
import './ReactPullLoad.less'
88

9-
const endState = {
10-
loaderState: STATS.reset,
11-
pullHeight: 0
12-
};
13-
149
function addEvent(obj, type, fn) {
1510
if (obj.attachEvent) {
1611
obj['e' + type + fn] = fn;
@@ -56,7 +51,7 @@ export default class ReactPullLoad extends Component {
5651
pullHeight: 0
5752
};
5853

59-
container = null;
54+
// container = null;
6055

6156
componentDidMount() {
6257
const {isBlockContainer, offsetScrollTop, downEnough, distanceBottom} = this.props
@@ -151,13 +146,13 @@ export default class ReactPullLoad extends Component {
151146
onPullUpMove = (data) => {
152147
if(!this.canRefresh())return false;
153148

154-
const { hasMore, onLoadMore} = this.props
155-
if (hasMore) {
156-
this.setState({
157-
pullHeight: 0,
158-
})
159-
this.props.handleAction(STATS.loading)
160-
}
149+
// const { hasMore, onLoadMore} = this.props
150+
// if (this.props.hasMore) {
151+
this.setState({
152+
pullHeight: 0,
153+
})
154+
this.props.handleAction(STATS.loading)
155+
// }
161156
}
162157

163158
onTouchStart = (event) => {

0 commit comments

Comments
 (0)