1.0.4 • Published 4 years ago

@xohu/vue-drag v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

效果演示

DEMO 地址(可使用 chrome 手机模式预览)

@xohu/vue-drag

vue 的 vue-drag 插件

安装

cnpm install @xohu/vue-drag -S

import VDrag from '@xohu/vue-drag'
or
import VDrag from '@xohu/vue-drag/packages/drag-list'

Vue.use(VDrag)

drag-list 插件

Attributes

参数说明类型可选值默认值
tag标签名stringdiv
damping阻尼系数string0
open打开的距离条件number10
close关闭的距离条件number10
draw是否拉伸右侧区域booleantrue / falsetrue
drawMax右侧拉伸最大值(默认不限制)number0
once是否每次只展开一个booleantrue / falsetrue

Events

事件名说明参数
start开始执行时回调this(组件实例)
opend打开后回调this(组件实例)
moved移动中回调this(组件实例)
closed关闭后回调this(组件实例)

Methods

事件名说明参数
opend打开滑块
opendAll打开所有滑块
closed关闭滑块
closedAll关闭所有滑块

Scoped Slot

name说明参数
主体内容{ opend, closed, opendAll, closedAll }
right右侧滑块内容{ opend, closed, opendAll, closedAll }

使用

<v-drag-list>
    <div>内容</div>

    <div slot="right" slot-scope="{ closed, closedAll }">
        右侧
    </div>
</v-drag-list>

演示图

image

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago