Vue DropZone中的Vue JS自定义函数

时间:2019-06-21 17:18:54

标签: laravel vue.js

我在v-for循环中使用vue-dropzone 如何将每个循环的索引作为参数传递给@ vdropzone-complete函数

这是我的代码

<vue-dropzone 
      ref="dropzone" 
      id="drop1" 
      :include-styling="false"
      :options="dropOptions" 
       v-on:vdropzone-removed-file="removeThisFile"
       @vdropzone-complete="afterComplete(file, index)">
</vue-dropzone>    

这是我完成后的功能

afterComplete(file, index) {
  console.log(index);
  console.log(file);
}

我不能将文件作为afterComplete函数的参数

1 个答案:

答案 0 :(得分:0)

您可以在for循环中访问索引,

Dim MyDuplicate as boolean

MyDuplicate = False

For Each Sheet In ThisWorkbook.Sheets
    If Sheet.Name = Range("D10") Then
        MsgBox ("ERROR: This Acct No has already been formulated")
        NewName = InputBox("Please Rename:")
        ActiveSheet.Name = NewName
        MyDuplicate = True
        Exit for
    End If
Next Sheet

If MyDuplicate = False then ActiveSheet.Name = Range("D10")

相对于doc