nuke-components
Advanced tools
Comparing version 0.2.22 to 0.2.23
@@ -26,2 +26,6 @@ # 输入框 | ||
<BizPage title="TextInput"> | ||
<TextInput | ||
style={{width: '200rem', height: '60rem', backgroundColor: '#ff0000'}} | ||
maxLength={6} | ||
></TextInput> | ||
<BizPage.Intro main="输入框" sub="单行"></BizPage.Intro> | ||
@@ -74,3 +78,5 @@ <View style={styles.singleWrap}> | ||
width: '670rem', | ||
height: '80rem', | ||
height: '100rem', | ||
fontSize:'32rem', | ||
padding:'10rem', | ||
borderWidth:'1rem', | ||
@@ -85,2 +91,4 @@ borderStyle:'solid', | ||
borderWidth:'1rem', | ||
fontSize:'32rem', | ||
padding:'20rem', | ||
borderStyle:'solid', | ||
@@ -87,0 +95,0 @@ borderColor:'#cccccc', |
# Changelog | ||
## 0.2.23 / 2017-05-03 | ||
* [[37fae1a](http://gitlab.alibaba-inc.com/nuke/components/commit/37fae1af7738cbc181dc470838f8d1c55bae44af)] - `fix` add cell support for h5 | ||
* [[13c59af](http://gitlab.alibaba-inc.com/nuke/components/commit/13c59af1ab9cb57c8f04239b6c04354f99f5c839)] - `fix` update scrollview | ||
## 0.2.22 / 2017-04-10 | ||
@@ -5,0 +10,0 @@ |
@@ -31,5 +31,5 @@ 'use strict'; | ||
var _scrollView = require('./scroll-view'); | ||
var _raxScrollview = require('rax-scrollview'); | ||
var _scrollView2 = _interopRequireDefault(_scrollView); | ||
var _raxScrollview2 = _interopRequireDefault(_raxScrollview); | ||
@@ -61,3 +61,3 @@ var _touchableHighlight = require('./touchable-highlight'); | ||
Video: _video2.default, | ||
ScrollView: _scrollView2.default, | ||
ScrollView: _raxScrollview2.default, | ||
RecyclerView: _recyclerView2.default, | ||
@@ -64,0 +64,0 @@ RefreshControl: _refreshControl2.default, |
@@ -77,5 +77,5 @@ 'use strict'; | ||
if (_nukeEnv.isWeex && this.context.isInARecyclerView) { | ||
return (0, _rax.createElement)('header', _extends({}, this.props, { append: 'tree' })); | ||
return (0, _rax.createElement)('header', _extends({ x: 'header' }, this.props, { append: 'tree' })); | ||
} else { | ||
return (0, _rax.createElement)(_view2.default, this.props); | ||
return (0, _rax.createElement)(_view2.default, _extends({ x: 'header' }, this.props)); | ||
} | ||
@@ -138,33 +138,31 @@ } | ||
if (_nukeEnv.isWeex) { | ||
var children = props.children; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
var children = props.children; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
var cells = children.map(function (child, index) { | ||
var ref = 'cell' + index; | ||
var cells = children.map(function (child, index) { | ||
var ref = 'cell' + index; | ||
if (child) { | ||
if (props._autoWrapCell && child.type != _refreshControl2.default) { | ||
if (child.key) return (0, _rax.createElement)( | ||
if (child) { | ||
if (props._autoWrapCell && child.type != _refreshControl2.default) { | ||
if (child.key) return (0, _rax.createElement)( | ||
Cell, | ||
{ ref: ref, key: child.key }, | ||
child | ||
);else { | ||
return (0, _rax.createElement)( | ||
Cell, | ||
{ ref: ref, key: child.key }, | ||
{ ref: ref }, | ||
child | ||
);else { | ||
return (0, _rax.createElement)( | ||
Cell, | ||
{ ref: ref }, | ||
child | ||
); | ||
} | ||
} else { | ||
return (0, _rax.cloneElement)(child, { ref: ref }); | ||
); | ||
} | ||
} else { | ||
return (0, _rax.createElement)(Cell, { ref: ref }); | ||
return (0, _rax.cloneElement)(child, { ref: ref }); | ||
} | ||
}); | ||
} else { | ||
return (0, _rax.createElement)(Cell, { ref: ref }); | ||
} | ||
}); | ||
if (_nukeEnv.isWeex) { | ||
return (0, _rax.createElement)( | ||
@@ -184,3 +182,7 @@ 'list', | ||
} else { | ||
return (0, _rax.createElement)(_scrollView2.default, _extends({}, props, { ref: 'scrollview' })); | ||
return (0, _rax.createElement)( | ||
_scrollView2.default, | ||
_extends({}, props, { ref: 'scrollview' }), | ||
cells | ||
); | ||
} | ||
@@ -187,0 +189,0 @@ } |
@@ -75,2 +75,6 @@ 'use strict'; | ||
} | ||
} else { | ||
if (_this.props.onScroll) { | ||
_this.props.onScroll(e); | ||
} | ||
} | ||
@@ -77,0 +81,0 @@ }, _this.resetScroll = function (options) { |
{ | ||
"name": "nuke-components", | ||
"version": "0.2.22", | ||
"version": "0.2.23", | ||
"description": "nuke原件库", | ||
@@ -36,3 +36,4 @@ "main": "lib/index", | ||
"nuke-dimensions": "0.x.x", | ||
"nuke-env": "0.x.x" | ||
"nuke-env": "0.x.x", | ||
"rax-scrollview": "^0.2.13" | ||
}, | ||
@@ -39,0 +40,0 @@ "devDependencies": { |
@@ -7,3 +7,3 @@ import View from './view'; | ||
import Video from './video'; | ||
import ScrollView from './scroll-view'; | ||
import ScrollView from 'rax-scrollview'; | ||
import TouchableHighlight from './touchable-highlight'; | ||
@@ -10,0 +10,0 @@ import RecyclerView from './recycler-view'; |
@@ -32,5 +32,5 @@ /* @jsx createElement */ | ||
if (isWeex && this.context.isInARecyclerView) { | ||
return <header {...this.props} append="tree" />; | ||
return <header x="header" {...this.props} append="tree" />; | ||
} else { | ||
return <View {...this.props} />; | ||
return <View x="header" {...this.props} />; | ||
} | ||
@@ -80,27 +80,27 @@ } | ||
if (isWeex) { | ||
let children = props.children; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
let children = props.children; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
let cells = children.map((child, index) => { | ||
const ref = 'cell' + index; | ||
let cells = children.map((child, index) => { | ||
const ref = 'cell' + index; | ||
if (child) { | ||
if (props._autoWrapCell && child.type != RefreshControl) { | ||
if(child.key) | ||
return <Cell ref={ref} key={child.key}>{child}</Cell>; | ||
else { | ||
return <Cell ref={ref}>{child}</Cell>; | ||
} | ||
} else { | ||
return cloneElement(child, {ref}); | ||
} | ||
if (child) { | ||
if (props._autoWrapCell && child.type != RefreshControl) { | ||
if(child.key) | ||
return <Cell ref={ref} key={child.key}>{child}</Cell>; | ||
else { | ||
return <Cell ref={ref}>{child}</Cell>; | ||
} | ||
} else { | ||
return <Cell ref={ref} />; | ||
return cloneElement(child, {ref}); | ||
} | ||
}); | ||
} else { | ||
return <Cell ref={ref} />; | ||
} | ||
}); | ||
if (isWeex) { | ||
return ( | ||
@@ -121,3 +121,3 @@ <list | ||
return ( | ||
<ScrollView {...props} ref="scrollview" /> | ||
<ScrollView {...props} ref="scrollview" >{cells}</ScrollView> | ||
); | ||
@@ -124,0 +124,0 @@ } |
@@ -52,2 +52,6 @@ /* @jsx createElement */ | ||
} | ||
}else{ | ||
if (this.props.onScroll) { | ||
this.props.onScroll(e); | ||
} | ||
} | ||
@@ -54,0 +58,0 @@ } |
134499
41
2491
3
+ Addedrax-scrollview@^0.2.13
+ Addeddriver-browser@0.6.7(transitive)
+ Addeddriver-server@0.6.5(transitive)
+ Addeddriver-weex@0.6.5(transitive)
+ Addedrax@0.6.7(transitive)
+ Addedrax-scrollview@0.2.13(transitive)
+ Addedrax-view@0.2.11(transitive)
+ Addedstyle-unit@0.6.5(transitive)
+ Addeduniversal-env@0.2.110.6.6(transitive)