nuke-list-view
Advanced tools
Comparing version 2.0.0 to 2.0.1
# Changelog | ||
## 2.0.1 / 2018-04-09 | ||
* [[0cb32583](http://gitlab.alibaba-inc.com/nuke/list-view/commit/0cb32583b7434c967ff73fea5890f34866f4f177)] - `fix` fix listview props passage | ||
## 2.0.0 / 2018-03-22 | ||
@@ -5,0 +9,0 @@ |
@@ -8,2 +8,3 @@ /** @jsx createElement */ | ||
*/ | ||
'use strict'; | ||
@@ -62,3 +63,2 @@ | ||
}, _this.scrollTo = function (options) { | ||
var x = parseInt(options.x); | ||
@@ -100,4 +100,4 @@ var y = parseInt(options.y); | ||
} | ||
var header = typeof renderHeader == 'function' ? renderHeader() : null; | ||
var footer = typeof renderFooter == 'function' ? renderFooter() : null; | ||
var header = typeof renderHeader === 'function' ? renderHeader() : null; | ||
var footer = typeof renderFooter === 'function' ? renderFooter() : null; | ||
@@ -127,3 +127,5 @@ var body = dataSource.map(function (i, index) { | ||
_autoWrapCell = _props2$_autoWrapCell === undefined ? true : _props2$_autoWrapCell, | ||
others = _objectWithoutProperties(_props2, ['onEndReached', 'onEndReachedThreshold', 'loadmoreretry', 'id', 'style', 'showScrollbar', '_keepScrollPosition', '_autoWrapCell']); | ||
renderRow = _props2.renderRow, | ||
dataSource = _props2.dataSource, | ||
others = _objectWithoutProperties(_props2, ['onEndReached', 'onEndReachedThreshold', 'loadmoreretry', 'id', 'style', 'showScrollbar', '_keepScrollPosition', '_autoWrapCell', 'renderRow', 'dataSource']); | ||
@@ -139,19 +141,23 @@ var children = this.getChidren(); | ||
if (_autoWrapCell && child.type != _nukeRefreshControl2.default) { | ||
if (child.key) return (0, _rax.createElement)( | ||
_nukeCell2.default, | ||
{ keepScrollPosition: _keepScrollPosition, ref: ref, key: child.key }, | ||
child | ||
);else { | ||
if (child.key) { | ||
return (0, _rax.createElement)( | ||
_nukeCell2.default, | ||
{ ref: ref }, | ||
{ | ||
keepScrollPosition: _keepScrollPosition, | ||
ref: ref, | ||
key: child.key | ||
}, | ||
child | ||
); | ||
} | ||
} else { | ||
return (0, _rax.cloneElement)(child, { ref: ref }); | ||
return (0, _rax.createElement)( | ||
_nukeCell2.default, | ||
{ ref: ref }, | ||
child | ||
); | ||
} | ||
} else { | ||
return (0, _rax.createElement)(_nukeCell2.default, { ref: ref }); | ||
return (0, _rax.cloneElement)(child, { ref: ref }); | ||
} | ||
return (0, _rax.createElement)(_nukeCell2.default, { ref: ref }); | ||
}); | ||
@@ -172,9 +178,8 @@ if (_nukeEnv.isWeex) { | ||
); | ||
} else { | ||
return (0, _rax.createElement)( | ||
_nukeScrollView2.default, | ||
_extends({}, this.props, { ref: 'list' }), | ||
cells | ||
); | ||
} | ||
return (0, _rax.createElement)( | ||
_nukeScrollView2.default, | ||
_extends({}, this.props, { ref: 'list' }), | ||
cells | ||
); | ||
} | ||
@@ -181,0 +186,0 @@ }]); |
{ | ||
"name": "nuke-list-view", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "列表", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
39082
829