Code Monkey home page Code Monkey logo

vue2-waterfall's Introduction

vue2-waterfall

Build Status npm npm npm npm

่ฎฟ้—ฎไธญๆ–‡็‰ˆ

Overview

An AutoHeight Waterfall Component For Vue2

demo

Install

Install vue2-waterfall

npm install vue2-waterfall

Import vue2-waterfall

ES6/commonjs import style is supported.

// ES6
import {Waterfall, WaterfallItem} from 'vue2-waterfall';

// commonjs
const Waterfall = require("vue2-waterfall").Waterfall;
const WaterfallItem = require("vue2-waterfall").WaterfallItem;

or link as a script in an html file and access global variable Vue2Waterfall.

<script src="dist/vue2-waterfall.js"></script>

Usage

<Waterfall>
  <WaterfallItem>item1</WaterfallItem>
  <WaterfallItem>item2</WaterfallItem>
  <WaterfallItem>item3</WaterfallItem>
  ...
</Waterfall>

options

Waterfall Attributes

Option Description default type acceptable values
gutterWidth the waterfall brick element horizontal gutter 0 Number -
gutterHeight the waterfall brick element vertical gutter 0 Number -
resizable triggers layout when browser window is resized true Boolean 'true' 'false'
align Alignment 'center' String 'left' 'center' 'right'
fixWidth fix the waterfall component width - Number -
minCol min columns 1 Number -
maxCol max column - Number -
percent use Fluid layout, ignore waterfallitem width. such as [1, 1] - Array -

WaterfallItem Attributes

Option Description default type
order The order of waterfallItem, often be set to index in v-for - Number
width The width of waterfallItem 150 Number

Events

Option Description
rendered the waterfall component is rendered

LICENSE

MIT@PLDaily

vue2-waterfall's People

Contributors

pldaily avatar

Watchers

Ming avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.