New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue3-waterfall-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-waterfall-plugin

a simple vue3 waterfall plugin for PC and phone

  • 1.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-88.89%
Maintainers
1
Weekly downloads
 
Created
Source

Vue 瀑布流组件

这是一款超轻量级的瀑布流组件,无需预设高度,支持PC和移动端。

在线演示地址

演示代码地址

安装

npm i vue3-waterfall-plugin -S

使用

import Waterfall from "vue3-waterfall-plugin";
<Waterfall
  :list="list"
  :gutter="10"
  :width="240"
  :breakpoints="{
    1200: { //当屏幕宽度小于等于1200
      rowPerView: 4,
    },
    800: { //当屏幕宽度小于等于800
      rowPerView: 3,
    },
    500: { //当屏幕宽度小于等于500
      rowPerView: 2,
    }
  }"
  animationEffect="fadeInUp" // 这里默认是fadeIn,其余的效果需要自己引入animation.css之后才能使用,也可以自己写animation
  backgroundColor="rgb(73, 74, 95)"
  ref="waterfall"
  >
  <template v-slot:item="props">
    <div class="card">
      <img :src="props.data.src" alt="" @load="$refs.waterfall.refresh">
      ...
    </div>
  </template>
</Waterfall>

参数

NameTypeDefaultDescription
listArray[]列表数据
gutterNumber6卡片之间的间隙
widthNumber200卡片在PC上的宽度
breakpointsObjectbreakpoints自定义行显示个数,主要用于对移动端的适配
backgroundColorString#fff背景颜色
animationEffectStringfadeIn进入动画,默认只有fadeIn,支持引入使用animation.css的动画效果
animationDurationString1s动画时间
animationDelayString0.3s动画延迟
breakpoints: {
  1200: { //当屏幕宽度小于等于1200
    rowPerView: 4,
  },
  800: { //当屏幕宽度小于等于800
    rowPerView: 3,
  },
  500: { //当屏幕宽度小于等于500
    rowPerView: 2,
  }
}

Keywords

FAQs

Package last updated on 11 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc