🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

vue3-plock

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-plock

## Installation

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
7
16.67%
Maintainers
1
Weekly downloads
 
Created
Source

vue-plock

Installation

npm install vue3-plock

yarn add vue3-plock

pnpm add vue3-plock

Usage

vue3-plock 导出了一个 waterFall组件,接收一个data数据以及一个config配置

<script setup lang="ts">
import { waterFall } from 'vue3-plock';
import { datasource } from './assets/datasource';
</script>

<template>
  <waterFall
    :data="datasource"
    :config="{
      columns: [1, 2, 3],
      gap: [24, 12, 6],
      media: [640, 1024, 1280]
    }"
    v-slot="slotProps"
  >
    <img :src="slotProps.src" :style="{ width: '100%', height: 'auto' }" />
  </waterFall>
</template>

codesandbox

API Reference

数据源

:data=[]
ParameterTypeDescription
datastring[]Required. 图片的 url

配置项

:config={
  columns: [],
  gap: [],
  media: []
}
ParameterTypeDescription
configobject[]Required. 配置
  • media: 配置响应式断点的阈值
  • columns: 设置对应响应区间的列数
  • gap: 设置对应响应区间行列的间距

😀注意:media、columns、gap 的数量需要保持一致

Keywords

water-fall

FAQs

Package last updated on 23 Sep 2023

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