[Vuejs]-How to display only one progress message on upload multiply files on eleme.io [vuejs]

0👍

Have you tried using any of the other events? i.e. before upload.

I’ve made a quick codepen which only shows one message when uploading multiple files.

Add this to el-upload

:before-upload="beforeUpload"

Then add this method

beforeUpload(file) {
    this.$message('Your files are uploading...');
}

EDIT:

I didn’t notice there was multiple notifications being shown. After looking at the source code, it looks like the events are fired for every file. One way around this is to use a debounce function, so that your method only gets called once in a certain period. I’ve updated the codepen to show this using a 5 second period.

Leave a comment