Skip to content

Commit 3a62a6a

Browse files
李钿李钿
authored andcommitted
package release code
1 parent f2b85cb commit 3a62a6a

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

lib/ReactPullLoad.js

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
3636

3737
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
3838

39-
var endState = {
40-
loaderState: _constants.STATS.reset,
41-
pullHeight: 0
42-
};
43-
4439
function addEvent(obj, type, fn) {
4540
if (obj.attachEvent) {
4641
obj['e' + type + fn] = fn;
@@ -73,7 +68,7 @@ var ReactPullLoad = function (_Component) {
7368

7469
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ReactPullLoad.__proto__ || Object.getPrototypeOf(ReactPullLoad)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
7570
pullHeight: 0
76-
}, _this.container = null, _this.easing = function (distance) {
71+
}, _this.easing = function (distance) {
7772
// t: current time, b: begInnIng value, c: change In value, d: duration
7873
var t = distance;
7974
var b = 0;
@@ -116,16 +111,13 @@ var ReactPullLoad = function (_Component) {
116111
}, _this.onPullUpMove = function (data) {
117112
if (!_this.canRefresh()) return false;
118113

119-
var _this$props = _this.props;
120-
var hasMore = _this$props.hasMore;
121-
var onLoadMore = _this$props.onLoadMore;
122-
123-
if (hasMore) {
124-
_this.setState({
125-
pullHeight: 0
126-
});
127-
_this.props.handleAction(_constants.STATS.loading);
128-
}
114+
// const { hasMore, onLoadMore} = this.props
115+
// if (this.props.hasMore) {
116+
_this.setState({
117+
pullHeight: 0
118+
});
119+
_this.props.handleAction(_constants.STATS.loading);
120+
// }
129121
}, _this.onTouchStart = function (event) {
130122
var targetEvent = event.changedTouches[0];
131123
_this.startX = targetEvent.clientX;
@@ -182,6 +174,10 @@ var ReactPullLoad = function (_Component) {
182174

183175
_createClass(ReactPullLoad, [{
184176
key: 'componentDidMount',
177+
178+
179+
// container = null;
180+
185181
value: function componentDidMount() {
186182
var _props = this.props;
187183
var isBlockContainer = _props.isBlockContainer;

0 commit comments

Comments
 (0)