Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

clone props is Invalid

Open CedrusZhao opened this issue 4 years ago • 1 comments

Step by step scenario

my html is :

      <div class="col-md-3">   
      <draggable style="display:flex"   v-bind="dragOptions"  :clone="cloneDog"   @start="isDragging=true" 
    @end="isDragging=false">
        <div :key=1> zhaoxuesong  </div>
        <div :key=2> zhaoxuesong2 </div>
        <div :key=3> zhaoxuesong3 </div>
      </draggable>
    </div>

    <div style="background:red;height:100px">
        <draggable  tag="div"  v-bind="dragOptions2"    @start="isDragging=true" @end="isDragging=false">
          <div :key=2> zhaoxuesong2 </div>
        </draggable> 
     </div> 

my js code is:

methods: {
    clonec({e}){
      console.log("被调用1")
      console.log(e)
      return e

    }, 
    cloneDog({ id }) {
       console.log("123")
       return {
         id: 1,
         name: `cat ${id}`
       };
     }
    },
computed: {
    dragOptions() {
      return {
        animation: 0,
        group: {name:"description2",pull:"clone",put:"false"},
        disabled: !this.editable,
        ghostClass: "ghost"
      };
    },
     dragOptions2() {
      return {
        animation: 0,
        group: "description2",
        disabled: !this.editable,
        ghostClass: "ghost",
        
      };
    },

Actual Solution

no console.log("123")

Expected Solution

console.log("123")

CedrusZhao avatar Jan 22 '21 08:01 CedrusZhao

the same

Lionad-Morotar avatar Jul 22 '22 11:07 Lionad-Morotar