nuke-components
Advanced tools
Comparing version 0.2.29 to 0.2.30
# Changelog | ||
## 0.2.30 / 2017-05-18 | ||
* [[787b7e9](http://gitlab.alibaba-inc.com/nuke/components/commit/787b7e947e03e44d4eba042209fc299c39390836)] - `feat` 1. scrollview bugfix 2. cell add keepscrollposition ali | ||
## 0.2.29 / 2017-05-15 | ||
@@ -5,0 +9,0 @@ |
@@ -144,2 +144,5 @@ 'use strict'; | ||
var _props$_keepScrollPos = props._keepScrollPosition, | ||
_keepScrollPosition = _props$_keepScrollPos === undefined ? false : _props$_keepScrollPos; | ||
var children = props.children; | ||
@@ -157,3 +160,3 @@ if (!Array.isArray(children)) { | ||
Cell, | ||
{ ref: ref, key: child.key }, | ||
{ keepScrollPosition: _keepScrollPosition, ref: ref, key: child.key }, | ||
child | ||
@@ -160,0 +163,0 @@ );else { |
@@ -25,6 +25,2 @@ 'use strict'; | ||
var _wptr = require('./wptr.js'); | ||
var _wptr2 = _interopRequireDefault(_wptr); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -43,2 +39,7 @@ | ||
var WebPullToRefresh = void 0; | ||
if (isWeb) { | ||
WebPullToRefresh = require('./wptr.js'); | ||
} | ||
var DEFAULT_END_REACHED_THRESHOLD = 500; | ||
@@ -168,3 +169,3 @@ var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50; | ||
if (isWeb && !this.state.initializedWptr) { | ||
(0, _wptr2.default)().init({ | ||
WebPullToRefresh().init({ | ||
bodyEl: this.refs.scroller, | ||
@@ -171,0 +172,0 @@ ptrEl: this.refs.refreshX, |
{ | ||
"name": "nuke-components", | ||
"version": "0.2.29", | ||
"version": "0.2.30", | ||
"description": "nuke原件库", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
@@ -79,3 +79,3 @@ /* @jsx createElement */ | ||
let props = this.props; | ||
let { _keepScrollPosition = false } = props; | ||
@@ -94,3 +94,3 @@ | ||
if(child.key) | ||
return <Cell ref={ref} key={child.key}>{child}</Cell>; | ||
return <Cell keepScrollPosition={_keepScrollPosition} ref={ref} key={child.key}>{child}</Cell>; | ||
else { | ||
@@ -97,0 +97,0 @@ return <Cell ref={ref}>{child}</Cell>; |
@@ -5,5 +5,10 @@ import {Component, createElement, findDOMNode,cloneElement} from 'rax'; | ||
import RefreshControl from './refresh-control'; | ||
import WebPullToRefresh from './wptr.js'; | ||
const {isWeex, isWeb} = Env; | ||
let WebPullToRefresh; | ||
if(isWeb){ | ||
WebPullToRefresh = require('./wptr.js'); | ||
} | ||
const DEFAULT_END_REACHED_THRESHOLD = 500; | ||
@@ -10,0 +15,0 @@ const DEFAULT_SCROLL_CALLBACK_THROTTLE = 50; |
161636
3028