UNPKG

drag-ultra

Version:

Ultra版本的拖拽组件,可以贴边隐藏,类似电脑管家内存清理悬浮小球。

46 lines (35 loc) 1.98 kB
## DragUltra 拖拽组件Ultra版本 > **组件名:drag-ultra** ### 使用示例 ```vue <template> <drag-ultra></drag-ultra> </template> <script> import DragUltra from 'drag-ultra'; export default { components: { DragUltra }, data() { return {}; }, methods: {} }; </script> <style scoped lang="scss"></style> ``` ### 参数 API 说明 | 参数 | 说明 | 类型 | 默认值 | | ------------------ | ---------------------------------------------------- | -------- | ------------------------------------------------------ | | `topDistance` | 初始距离顶部的位置 | String | 75% | | `leftDistance` | 初始距离左边的位置 | String | calc(100% - 100px) | | `isDragg` | 是否可以拖拽 | Boolean | true | | `list` | 列表数据 | Array | [{ name: '列表1' }, { name: '列表2' }] | | `customHeight` | 自定义列表的时候传入的高度(有高度才有动画) | String | '' | | `itemHeight` | 单个列表的高度(如果自定义item,传高度才有动画效果) | String | '' | | 事件通知 | 触发时机 | 参数示例 | |----------------|-------------|-----------------------| | handleDblClick | 双击入口 | 空 | | handleClick | 单击入口 | 空 | | handleItem | 点击展开列表某一个项目 | item |