vue waterfall_Vue2的AutoHeight Waterfall组件

vue waterfall

vue2-瀑布 (vue2-waterfall)

An AutoHeight Waterfall Component For Vue2.

Vue2的AutoHeight Waterfall组件。

安装 (Install)

安装vue2-waterfall (Install vue2-waterfall)

npm install vue2-waterfall

导入vue2-瀑布 (Import vue2-waterfall)

ES6/commonjs import style is supported.

支持ES6 / commonjs导入样式。

// 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.

或链接为html文件中的script并访问全局变量Vue2Waterfall

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

用法 (Usage)

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

选项 (options)

瀑布属性 (Waterfall Attributes)

OptionDescriptiondefaulttypeacceptable values
gutterWidththe waterfall brick element horizontal gutter0Number-
gutterHeightthe waterfall brick element vertical gutter0Number-
resizabletriggers layout when browser window is resizedtrueBoolean'true' 'false'
alignAlignment'center'String'left' 'center' 'right'
fixWidthfix the waterfall component width-Number-
minColmin columns1Number-
maxColmax column-Number-
percentuse Fluid layout, ignore waterfallitem width. such as [1, 1]-Array-
选项 描述 默认 类型 可接受的值
gutterWidth 瀑布砖元素水平装订线 0 --
装订线高度 瀑布砖元素垂直排水沟 0 --
可调整大小 调整浏览器窗口大小时触发布局 真正 布尔型 '真假'
对齐 对准 '中央' “左”“中”“右”
fixWidth 固定瀑布组件的宽度 -- --
minCol 最小列 1个 --
maxCol 最大列 -- --
百分 使用流体布局,忽略Waterfallitem宽度。 例如[1,1] -- 数组 --

WaterfallItem属性 (WaterfallItem Attributes)

OptionDescriptiondefaulttype
orderThe order of waterfallItem, often be set to index in v-for-Number
widthThe width of waterfallItem150Number
选项 描述 默认 类型
订购 WaterfallItem的顺序,通常设置为在v-for中建立索引 --
宽度 瀑布宽度 150

大事记 (Events)

OptionDescription
renderedthe waterfall component is rendered
选项 描述
呈现 瀑布组件被渲染

翻译自: https://vuejsexamples.com/an-autoheight-waterfall-component-for-vue2/

vue waterfall

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值