weex-nuke
Version:
基于 Rax 、Weex 的高性能组件体系 ~~
23 lines (18 loc) • 506 B
JavaScript
/** @jsx createElement */
;
import { createElement, Component, PropTypes } from 'rax';
import { isWeex } from 'nuke-env';
import View from 'nuke-view';
class Cell extends Component {
static contextTypes = {
isInARecyclerView: PropTypes.bool,
};
render() {
const { append = 'tree', ...others } = this.props;
if (isWeex && this.context.isInARecyclerView) {
return <cell append={append} {...others} />;
}
return <View {...others} />;
}
}
export default Cell;