Skip to content

v-draggable

功能介绍

使元素可拖拽

示例

拖拽我

使用

typescript
<script setup lang="ts"></script>
<template>
  <div
    v-draggable
    :style="{
      width: '100px',
      height: '100px',
      background: 'blue',
      borderRadius: '50px',
      display: 'flex',
      justifyContent: 'center',
      alignItems: 'center',
      transform: 'translateX(50px)'
    }"
  >
    拖拽我
  </div>
</template>

Released under the MIT License.