nuke-components
Advanced tools
Comparing version 0.1.28 to 0.2.0
@@ -12,7 +12,7 @@ # 图片 | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text,Image} from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
let App = class NukeDemoIndex extends Component { | ||
@@ -32,4 +32,4 @@ constructor() { | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -12,5 +12,4 @@ # 滚动 | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text , ScrollView} from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
@@ -54,4 +53,4 @@ | ||
} | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -12,7 +12,7 @@ # 切换组件 | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text, Switch } from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
let App = class NukeDemoIndex extends Component { | ||
@@ -31,3 +31,3 @@ constructor() { | ||
<Switch | ||
<Switch | ||
onValueChange={(value) =>this.setState({c1: value})} | ||
@@ -43,4 +43,4 @@ checked={this.state.c1}/> | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -12,6 +12,5 @@ # 滚动 | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text , ScrollView} from 'nuke-components'; | ||
import Button from 'nuke-button'; | ||
import {mount} from 'nuke-mounter'; | ||
@@ -75,4 +74,4 @@ | ||
} | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -12,7 +12,7 @@ # 文字类型 | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text} from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
let App = class NukeDemoIndex extends Component { | ||
@@ -33,4 +33,4 @@ constructor() { | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -11,7 +11,7 @@ # 输入框 | ||
/* @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text, TextInput } from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
let App = class Page extends Component { | ||
@@ -147,4 +147,4 @@ constructor(props){ | ||
} | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -12,7 +12,7 @@ # TouchableHighlight | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text, TouchableHighlight } from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
let App = class NukeDemoIndex extends Component { | ||
@@ -37,4 +37,4 @@ constructor() { | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -12,7 +12,7 @@ # Video | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text, Video } from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
let App = class NukeDemoIndex extends Component { | ||
@@ -33,4 +33,4 @@ constructor() { | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
@@ -12,7 +12,7 @@ # View | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text} from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
let App = class NukeDemoIndex extends Component { | ||
@@ -33,4 +33,4 @@ constructor() { | ||
mount(<App/>, 'body'); | ||
render(<App/>); | ||
```` |
# Changelog | ||
## 0.2.0 / 2017-02-15 | ||
* [[28fd16e](http://gitlab.alibaba-inc.com/nuke/components/commit/28fd16e2b7f8b14955f7078ae0f01cd2f2eb9e71)] - `feat` rax改造 | ||
## 0.1.27 / 2017-02-14 | ||
@@ -5,0 +9,0 @@ |
@@ -11,3 +11,3 @@ 'use strict'; | ||
var _weexRx = require('weex-rx'); | ||
var _rax = require('rax'); | ||
@@ -51,5 +51,5 @@ var _nukeEnv = require('nuke-env'); | ||
if (_nukeEnv.isWeex && this.context.isInARecyclerView) { | ||
return (0, _weexRx.createElement)('cell', _extends({}, this.props, { append: 'tree' })); | ||
return (0, _rax.createElement)('cell', _extends({}, this.props, { append: 'tree' })); | ||
} else { | ||
return (0, _weexRx.createElement)(_view2.default, this.props); | ||
return (0, _rax.createElement)(_view2.default, this.props); | ||
} | ||
@@ -60,6 +60,6 @@ } | ||
return Cell; | ||
}(_weexRx.PureComponent); | ||
}(_rax.PureComponent); | ||
Cell.contextTypes = { | ||
isInARecyclerView: _weexRx.PropTypes.bool | ||
isInARecyclerView: _rax.PropTypes.bool | ||
}; | ||
@@ -80,5 +80,5 @@ | ||
if (_nukeEnv.isWeex && this.context.isInARecyclerView) { | ||
return (0, _weexRx.createElement)('header', _extends({}, this.props, { append: 'tree' })); | ||
return (0, _rax.createElement)('header', _extends({}, this.props, { append: 'tree' })); | ||
} else { | ||
return (0, _weexRx.createElement)(_view2.default, this.props); | ||
return (0, _rax.createElement)(_view2.default, this.props); | ||
} | ||
@@ -89,6 +89,6 @@ } | ||
return Header; | ||
}(_weexRx.PureComponent); | ||
}(_rax.PureComponent); | ||
Header.contextTypes = { | ||
isInARecyclerView: _weexRx.PropTypes.bool | ||
isInARecyclerView: _rax.PropTypes.bool | ||
}; | ||
@@ -117,3 +117,3 @@ | ||
var dom = require('@weex-module/dom'); | ||
var firstCell = (0, _weexRx.findDOMNode)(_this3.refs.cell0); | ||
var firstCell = (0, _rax.findDOMNode)(_this3.refs.cell0); | ||
dom.scrollToElement(firstCell.ref, { | ||
@@ -152,3 +152,3 @@ offset: x || y || 0 | ||
if (props._autoWrapCell && child.type != _refreshControl2.default) { | ||
if (child.key) return (0, _weexRx.createElement)( | ||
if (child.key) return (0, _rax.createElement)( | ||
Cell, | ||
@@ -158,3 +158,3 @@ { ref: ref, key: child.key }, | ||
);else { | ||
return (0, _weexRx.createElement)( | ||
return (0, _rax.createElement)( | ||
Cell, | ||
@@ -166,3 +166,3 @@ { ref: ref }, | ||
} else { | ||
return (0, _weexRx.cloneElement)(child, { ref: ref }); | ||
return (0, _rax.cloneElement)(child, { ref: ref }); | ||
} | ||
@@ -174,3 +174,3 @@ } else { | ||
return (0, _weexRx.createElement)( | ||
return (0, _rax.createElement)( | ||
'list', | ||
@@ -188,3 +188,3 @@ { | ||
} else { | ||
return (0, _weexRx.createElement)(_scrollView2.default, _extends({}, props, { ref: 'scrollview' })); | ||
return (0, _rax.createElement)(_scrollView2.default, _extends({}, props, { ref: 'scrollview' })); | ||
} | ||
@@ -195,3 +195,3 @@ } | ||
return RecyclerView; | ||
}(_weexRx.Component); | ||
}(_rax.Component); | ||
@@ -202,3 +202,3 @@ RecyclerView.defaultProps = { | ||
RecyclerView.childContextTypes = { | ||
isInARecyclerView: _weexRx.PropTypes.bool | ||
isInARecyclerView: _rax.PropTypes.bool | ||
}; | ||
@@ -205,0 +205,0 @@ |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var _weexRx = require('weex-rx'); | ||
var _rax = require('rax'); | ||
@@ -35,3 +35,3 @@ var _nukeEnv = require('nuke-env'); | ||
var displayRefresh = this.props.refreshing ? 'show' : 'hide'; | ||
return (0, _weexRx.createElement)( | ||
return (0, _rax.createElement)( | ||
'refresh', | ||
@@ -48,5 +48,5 @@ { id: this.props.id, style: this.props.style, display: displayRefresh, onRefresh: this.props.onRefresh }, | ||
return RefreshControl; | ||
}(_weexRx.Component); | ||
}(_rax.Component); | ||
exports.default = RefreshControl; | ||
module.exports = exports['default']; |
@@ -11,3 +11,3 @@ 'use strict'; | ||
var _weexRx = require('weex-rx'); | ||
var _rax = require('rax'); | ||
@@ -56,4 +56,4 @@ var _nukeEnv = require('nuke-env'); | ||
if (!_this.scrollerNode) { | ||
_this.scrollerNode = (0, _weexRx.findDOMNode)(_this.refs.scroller); | ||
_this.scrollerContentNode = (0, _weexRx.findDOMNode)(_this.refs.contentContainer); | ||
_this.scrollerNode = (0, _rax.findDOMNode)(_this.refs.scroller); | ||
_this.scrollerContentNode = (0, _rax.findDOMNode)(_this.refs.contentContainer); | ||
_this.scrollerNodeSize = _this.props.horizontal ? _this.scrollerNode.offsetWidth : _this.scrollerNode.offsetHeight; | ||
@@ -90,3 +90,3 @@ } | ||
var dom = require('@weex-module/dom'); | ||
var contentContainer = (0, _weexRx.findDOMNode)(_this.refs.contentContainer); | ||
var contentContainer = (0, _rax.findDOMNode)(_this.refs.contentContainer); | ||
dom.scrollToElement(contentContainer.ref, { | ||
@@ -99,7 +99,7 @@ offset: x || y || 0 | ||
if (x >= 0) { | ||
(0, _weexRx.findDOMNode)(_this.refs.scroller).scrollLeft = pixelRatio * x; | ||
(0, _rax.findDOMNode)(_this.refs.scroller).scrollLeft = pixelRatio * x; | ||
} | ||
if (y >= 0) { | ||
(0, _weexRx.findDOMNode)(_this.refs.scroller).scrollTop = pixelRatio * y; | ||
(0, _rax.findDOMNode)(_this.refs.scroller).scrollTop = pixelRatio * y; | ||
} | ||
@@ -146,3 +146,3 @@ } | ||
var contentContainer = (0, _weexRx.createElement)( | ||
var contentContainer = (0, _rax.createElement)( | ||
_view2.default, | ||
@@ -163,3 +163,3 @@ { | ||
return (0, _weexRx.createElement)( | ||
return (0, _rax.createElement)( | ||
'scroller', | ||
@@ -193,3 +193,3 @@ { | ||
return (0, _weexRx.createElement)( | ||
return (0, _rax.createElement)( | ||
_view2.default, | ||
@@ -204,3 +204,3 @@ _extends({}, this.props, { ref: 'scroller', style: scrollerStyle, onScroll: handleScroll }), | ||
return ScrollView; | ||
}(_weexRx.Component); | ||
}(_rax.Component); | ||
@@ -207,0 +207,0 @@ ScrollView.defaultProps = { |
@@ -13,3 +13,3 @@ /* @jsx createElement */ | ||
var _weexRx = require('weex-rx'); | ||
var _rax = require('rax'); | ||
@@ -151,6 +151,6 @@ var _nukeEnv = require('nuke-env'); | ||
if (multiline) { | ||
return (0, _weexRx.createElement)('textarea', _extends({}, propsCommon, { rows: 20, disabled: propsCommon.readOnly })); | ||
return (0, _rax.createElement)('textarea', _extends({}, propsCommon, { rows: 20, disabled: propsCommon.readOnly })); | ||
} else { | ||
// https://github.com/alibaba/weex/blob/dev/doc/components/input.md | ||
return (0, _weexRx.createElement)('input', _extends({}, propsCommon, { type: type, disabled: propsCommon.readOnly })); | ||
return (0, _rax.createElement)('input', _extends({}, propsCommon, { type: type, disabled: propsCommon.readOnly })); | ||
} | ||
@@ -166,3 +166,3 @@ } else { | ||
input = (0, _weexRx.createElement)( | ||
input = (0, _rax.createElement)( | ||
'textarea', | ||
@@ -173,3 +173,3 @@ _extends({}, propsCommon, propsMultiline, others), | ||
} else { | ||
input = (0, _weexRx.createElement)('input', _extends({}, propsCommon, others, { type: type })); | ||
input = (0, _rax.createElement)('input', _extends({}, propsCommon, others, { type: type })); | ||
} | ||
@@ -183,3 +183,3 @@ | ||
return TextInput; | ||
}(_weexRx.Component); | ||
}(_rax.Component); | ||
@@ -186,0 +186,0 @@ var styles = { |
@@ -13,3 +13,3 @@ /* @jsx createElement */ | ||
var _weexRx = require('weex-rx'); | ||
var _rax = require('rax'); | ||
@@ -49,3 +49,3 @@ var _nukeEnv = require('nuke-env'); | ||
return (0, _weexRx.createElement)(_view2.default, props); | ||
return (0, _rax.createElement)(_view2.default, props); | ||
} | ||
@@ -55,3 +55,3 @@ }]); | ||
return TouchableHighlight; | ||
}(_weexRx.Component); | ||
}(_rax.Component); | ||
@@ -58,0 +58,0 @@ var styles = { |
{ | ||
"name": "nuke-components", | ||
"version": "0.1.28", | ||
"version": "0.2.0", | ||
"description": "nuke原件库", | ||
@@ -25,5 +25,5 @@ "main": "lib/index", | ||
"dev": "nuke-bin server", | ||
"test": "nuke-bin test", | ||
"build": "nuke-bin build", | ||
"prepublish": "nuke-bin build", | ||
"test": "nuke-bin test", | ||
"lint": "eslint '@(src|docs)/**/*.@(js|jsx|md)' || true" | ||
@@ -37,3 +37,4 @@ }, | ||
"nuke-env": "0.x.x", | ||
"nuke-dimensions": "0.x.x" | ||
"nuke-dimensions": "0.x.x", | ||
"weex-rx": "0.1.2" | ||
}, | ||
@@ -40,0 +41,0 @@ "devDependencies": { |
/* @jsx createElement */ | ||
import {PureComponent, Component, createElement, cloneElement, findDOMNode, PropTypes} from 'weex-rx'; | ||
import {PureComponent, Component, createElement, cloneElement, findDOMNode, PropTypes} from 'rax'; | ||
import {isWeex} from 'nuke-env'; | ||
@@ -5,0 +5,0 @@ import View from './view'; |
/* @jsx createElement */ | ||
import {Component, createElement, PropTypes} from 'weex-rx'; | ||
import {Component, createElement, PropTypes} from 'rax'; | ||
import {isWeex} from 'nuke-env'; | ||
@@ -20,2 +20,2 @@ | ||
export default RefreshControl; | ||
export default RefreshControl; |
/* @jsx createElement */ | ||
import {Component, createElement, findDOMNode} from 'weex-rx'; | ||
import {Component, createElement, findDOMNode} from 'rax'; | ||
import {isWeex,isWeb} from 'nuke-env'; | ||
@@ -5,0 +5,0 @@ import View from './view'; |
@@ -5,4 +5,4 @@ /* @jsx createElement */ | ||
import {Component, createElement} from 'weex-rx'; | ||
import {isWeex} from 'nuke-env'; | ||
import {Component, createElement} from 'rax'; | ||
import {isWeex} from 'nuke-env'; | ||
@@ -71,3 +71,3 @@ /* @jsx createElement */ | ||
maxNumberOfLines, | ||
numberOfLines, | ||
@@ -74,0 +74,0 @@ onBlur, |
@@ -5,3 +5,3 @@ /* @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component} from 'rax'; | ||
import {isWeex} from 'nuke-env'; | ||
@@ -8,0 +8,0 @@ import View from './view'; |
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text,Image,ScrollView,TouchableHighlight,Switch,TextInput} from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
@@ -63,2 +62,2 @@ | ||
mount(<App/>, 'body'); | ||
render(<App/>); |
102393
3
37
1982
+ Addedweex-rx@0.1.2
+ Addedweex-rx@0.1.2(transitive)