1.0.6 • Published 7 years ago

small_waterfull v1.0.6

Weekly downloads
9
License
ISC
Repository
github
Last release
7 years ago

this is small waterfull for React

  • npm i small_waterfull --save

demo

Alt text

  • 代码案例
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>
        )
    }
}
1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago