0.0.0 • Published 6 months ago

qch_draggable v0.0.0

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Draggable DIV

Properties

vardescription
initstyle of the draggable DIV
callbackfunction to invoke when mouse up/down

Usage

Template

<div class="parent">
  <draggable :jobj="dobj" @dblclick="funcA">
    <template #content>Content</template>
    <template #context_menu>List</template>
  </draggable>
</div>

Script

data : function() {
  return {
    dobj : {
      container_style : { top : "200px" , left : "100px" , "background-color" : "lightgreen" } ,
      // callback : { mousedown : this.funcA , mouseup : this.funcA }
    }
  }
} ,

Specify movement boundary

Template

<div class="parent" ref="parent">
  <draggable ...></draggable>
</div>
</template>

script

mounted : function() { this.dobj.boundary = this.$refs.parent ; } ,

0.0.0

6 months ago