Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vue3 版本的 @file-added 事件会触发两次 #215

Closed
@xakoy

Description

@xakoy
 <uploader
    :options="options"
    :file-status-text="statusText"
    class="uploader-example"
    ref="uploaderRef"
    @file-complete="fileComplete"
    @file-added="fileAdd"
    @complete="complete"
  ></uploader>
function fileAdd() {
        console.log('file add')
}

结果会打印两次。

看了你的代码,可能是从vue2迁移过来的,vue3的props改版了,事件也会包含在props中。所以会触发两次。

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions