vue-hand-drop
v0.1.0
Published
这是一个类似于微信视频小窗口拖拽吸附功能,具有左右方向识别并且现在整体吸附轮廓,能够自定义大小和背景图片
Downloads
13
Readme
安装
npm安装
npm install vue-hand-drop
yarn安装
yarn add vue-hand-drop
使用
全局
import vueHandDrop from 'vue-hand-drop'
Vue.use(vueHandDrop);
局部
import vueHandDrop from 'vue-hand-drop'
components{vueHandDrop};
组件位置
<vue-hand-drop :options="{}">
<div>自定义样式</div>
</vue-hand-drop>
配置
{
/**
* @description 拖拽按钮的宽度
* @type {Number<String>}
* @default 100
*/
dragWidth: 100,
/**
* @description 拖拽按钮的高度
* @type {Number<String>}
* @default 100
*/
dragHeight: 100,
/**
* @description 拖拽按钮的透明度
* @type {Number<String>}
* @default 1
*/
dragOpacity: 1,
/**
* @description 拖拽按钮的left值,鼠标抬起还是会根据父级定位
* @type {Number<String>}
* @default 0
*/
dragLeft: 0,
/**
* @description 拖拽按钮的top值
* @type {Number<String>}
* @default 0
*/
dragTop: 0,
/**
* @description 执行动画时间,单位毫秒
* @type {Number<String>}
* @default 300
*/
animationTime:300
}