3.0.1 • Published 5 years ago

@rguanghui/vue2-waterfall v3.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

vue2-waterfall

npm npm npm npm

Overview

An AutoHeight Waterfall Component For Vue2

Install

npm install @rguanghui/vue2-waterfall

Usage

import { Waterfall, WaterfallItem } from 'vue2-waterfall'
<Waterfall>
  <WaterfallItem>item1</WaterfallItem>
  <WaterfallItem>item2</WaterfallItem>
  <WaterfallItem>item3</WaterfallItem>
  ...
</Waterfall>

See the source code to get the complete example.

options

Waterfall Attributes

OptionDescriptiondefaulttype
gutterWidththe waterfall brick element horizontal gutter10Number
gutterHeightthe waterfall brick element vertical gutter10Number
resizabletriggers layout when browser window is resizedtrueBoolean
percentuse Fluid layout. such as 1, 1-Array

WaterfallItem Attributes

OptionDescriptiondefaulttype
emitEventemit an event when the component rendered complete by yourself-String

Note: the effect of the emitEvent is to let code know how height is this component. in some case(such as async component or has child component to render), we don't know when to get the final height in the browser. so you may need to actively emit an event to help get the correct dom tree.

3.0.1

5 years ago

3.0.0

5 years ago

3.0.0-alpha.4

5 years ago

3.0.0-alpha.3

5 years ago

3.0.0-alpha.2

5 years ago

3.0.0-alpha.1

5 years ago

2.0.1

5 years ago