Options
All
  • Public
  • Public/Protected
  • All
Menu

Module vx-hooks/useDragArea

拖拽

Index

Functions

getDragDataSign

  • getDragDataSign(): string

useDrag

  • DOM 拖拽绑定

    example
    const { bindEle } = useDrag()
    const element = document.querySelector('.move-block')
    element.onDragstart = bindDragstart({id: 1})
    

    Parameters

    • dataSign: string = ...

    Returns UseDragAPI

    }

    • elems Ref 已绑定元素列表
    • handlers Ref 数据绑定函数
    • bindEle any => element => void 接收事件传参,返回dom元素收集器

useDragArea

  • 拖拽区 hook

    example
    
    const dropType = {
      onDom(data){
       console.log()
      }
    }
    const { dragEvents } = useDragArea(dropType)
    
    ------
    <div class='area' v-on='dragEvents'>
    </div>
    
    

    Parameters

    Returns UseDragAreaAPI

    • props 拖拽监听函数
    • isHovering 是否进入监听区

Generated using TypeDoc