New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

card-drag-sort

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

card-drag-sort

Vue3卡片拖拽排序组件

latest
npmnpm
Version
0.0.8
Version published
Maintainers
0
Created
Source

vue3 卡片拖拽排序组件

安装

npm install card-darg-sort

使用

<template>
  ...
  <card-drag-sort></card-drag-sort>
  ...
</template>

<style setup lang="ts">
import { CardDragSort } from 'card-drag-sort'
...
</style>

属性

属性描述类型是否必填默认值
data传入的卡片数据,详情见下表ArrayY-
columns卡片排列的列数NumberN3
width卡片的宽度NumberN500
height卡片的高度NumberN300
columnSpace卡片列间距NumberN20
rowSpace卡片行间距NumberN20
duration过渡效果时间,单位毫秒NumberN200

data

属性描述类型是否必填默认值
id卡片的唯一标识StringY-
title卡片的标题StringN无标题

插槽

属性描述类型
header自定义标题-
content自定义内容-
<card-drag-sort :data="data">
  <template #header="{ card }">
    {{ card.title }}
  </template>
  <template #content="{ card }">
    <div v-if="card.id === 'one'">
      <!-- 自定义内容 -->
    </div>
    ...
  </template>
</card-drag-sort>

事件

事件名描述类型
drag-start点击卡片顶部标题栏时触发,参数为卡片唯一 idFunction
drag-end在松开鼠标时触发,参数为最新卡片顺序Function

Keywords

vue

FAQs

Package last updated on 25 Jun 2024

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