2.0.1 • Published 2 years ago

pic-waterfall v2.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

pic-waterfall

这是一款基于 vue2.x 的轻量级瀑布流插件

npm

npm install --save pic-waterfall

code

main.js:

import Vue from 'vue'
import imageView from 'pic-waterfall'
import 'pic-waterfall/dist/index.css'
Vue.use(imageView)

template:

<template>
  <div id="app"> 
    <div>
      <image-view :initData="initData" :width="375" :newList="newPicList" :accomplish="accomplish">
         <template v-slot="{ item,index }">
           <img class="img" :src="item.url" />
         </template>
      </image-view>
    </div>
  </div>
</template>

API

参数说明类型默认值版本
initData初始化数据Array[]-
newList加载分页后的新数据Array[]-
width每一列宽度Number120-
space间距Number4-

Event

事件名说明参数
accomplish渲染完成后触发-

Slot

名称说明
item单条数据
index当前数据所在列的下标
2.0.1

2 years ago

2.0.0

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago