1.0.6 • Published 5 years ago

vue-pre-waterfall v1.0.6

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

vue-pre-waterfall

a vue waterfall component

git

vue-pre-waterfall

How to use

# Installation
npm install vue-pre-waterfall --save

# es6 import
import vuePreWaterfall from 'vue-pre-waterfall'
Vue.use(vuePreWaterfall)

# Example
<pre-waterfall :imgs="data"
                :gap="15"
                :radius="6"
                :border="false"
                shadow
                hover
                @scrollToBottom="updateData"
                @imgClick="imgClick">
   <div class="info" slot-scope="props">
        第{{props.index + 1}}张图片
   </div>
   <div class="loading" slot="loading">
        loading...
   </div>
</pre-waterfall>

Props

propstypedefaultdescription
imgsArray必填,例:{src: 'a.png', ...}, ...
gapNumber20卡片间距,单位px
hoverBooleanfalse鼠标悬浮图片特效
borderBooleantrue卡片边框
shadowBooleanfalse卡片阴影
radiusNumber8卡片圆角,单位px

Event

nameparamsdescription
scrollToBottom滚动到底部触发事件
imgClickimg index点击图片触发事件

Slot

1.default
params
paramdescription
img
index
2.slot="loading"
params 无
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago