m_react_waterfall
v1.0.4
Published
a waterfall components
Downloads
8
Readme
###说明 react多列瀑布流布局组件。 ###安装
npm install --save m_react_waterfall
###使用方式
import Waterfall from './waterfall'
<Waterfall data={list} col={4} gap={5} temp={(item)=>{
return (
<div className={'item'}>
<div className={'tit'}>{item.name}</div>
<div className={'con'}>{item.con}</div>
</div>
)
}}>
</Waterfall>
###属性说明
- data 传入的列表数据格式为json数据
- 传入的列数,number类型
- gap列数之间的间隔宽度,number类型
- temp传入的自定义模板数据,接受单个的数据进行渲染。