small_waterfull
v1.0.6
Published
An easy waterfull for page
Downloads
4
Readme
this is small waterfull for React
- npm i small_waterfull --save
demo
- 代码案例
import React, {Component} from 'react';
import css from "./live.css";
import WaterFull from "../../../component/waterfull/waterFull.jsx";
import a from "../../asset/brand/img_201611.jpg";
import b from "../../asset/bg_MaterialZXB.jpg";
import c from "../../asset/bg_BuildScreen08.jpg";
import d from "../../asset/project/img_ProDetail01.jpg";
export default class AppView extends Component {
state = {
datas: [
{
text: "a",
url: a
}, {
text: "b",
url: b
}, {
text: "c",
url: c
}, {
text: "d",
url: d
}
]
};
renderItem = (item) => {
return (
<div ><img src={item.url} style={{
width: "100%"
}}/>{item.tetx}</div>
);
}
componentDidMount() {};
render() {
return (
<div className={css.LiveBox}>
<WaterFull
width={1200}
col={4}
datas={this.state.datas}
renderItem={this.renderItem}></WaterFull>
</div>
)
}
}