Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在开启自动上传的模式,多次拖入多批文件上传,每次拖入文件的事件可以获取到吗 #416

Open
iafine opened this issue Jan 13, 2022 · 1 comment

Comments

@iafine
Copy link

iafine commented Jan 13, 2022

您好,很优秀的上传组件,但是使用过程中有些疑问,麻烦帮忙解惑下:

  1. 在拖入一批文件上传自动上传前,想做一些业务处理,是针对这一批文件列表的,是否有相关的API可以获取到这一批文件列表,类似AntD的beforeUpload事件,目前看到的input-file或者intpu-filter都是针对单个文件的,批量文件before hook貌似没法实现;
  2. 在自动上传模式下,上传大批量文件列表,如果把每个file的active更新成true,会造成thread失效,直接浏览器卡死,是否需要加个安全机制防止此类异常。
@lian-yue
Copy link
Owner

https://lian-yue.github.io/vue-upload-component/#/zh-cn/documents#%E5%AE%9E%E4%BE%8B-%E6%95%B0%E6%8D%AE-active

// https://github.com/lian-yue/vue-upload-component/blob/master/docs/views/examples/Full.vue#L594
// input-file 事件里面
if (Boolean(newFile) !== Boolean(oldFile) || oldFile.error !== newFile.error) {
    if (!this.$refs.upload.active) {
        this.$refs.upload.active = true
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants