Multi column layout component
$ npm install rax-multirow --save
import MultiRow from 'rax-multirow';
name | type | default | describe |
---|---|---|---|
renderCell | Function | render template function(need) | |
dataSource | List | data for render(need) | |
cells | Number | 1 | each row contains several columns, default 1 columns |
(need) |
// demo
import {createElement, Component, render} from 'rax';
import MultiRow from 'rax-multirow';
import View from 'rax-view';
class Demo extends Component {
render() {
return (
<View style={{width: 750}}>
<MultiRow dataSource={['tom', 'jeck', 'lilei', 'hanmeimei']}
cells={2} renderCell={(num, index) => { return <View>{num}</View> }}
/>
</View>
);
}
}
render(<Demo />);