This commit is contained in:
2026-01-05 12:47:14 +08:00
commit 1fc846fae3
1614 changed files with 162035 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import type { ExtractPropTypes } from 'vue'
import { commonProps, makeStringProp } from '../_utils'
export const dragProps = {
...commonProps,
/**
* @description 是否开启自动吸边(根据 screenWidth 进行吸边)
*/
attract: Boolean,
/**
* @description 拖拽元素的拖拽方向限制,'x'/'y'/'all'三选一
*/
direction: makeStringProp<'x' | 'y' | 'all'>('all'),
/**
* @description 拖拽元素的拖拽边界
*/
boundary: {
type: Object,
default: () => {
return {
top: 0,
left: 0,
right: 0,
bottom: 0,
}
},
},
}
export type DragProps = ExtractPropTypes<typeof dragProps>