How to request an API only once for uploading multiple files by el-upload

< el-upload

                  class="upload-demo"
                  ref="upload"
                  :action="url"
                  name="Content"
                  :data="form"
                  :on-remove="handleRemove"
                  :on-error="uploadError"
                  :on-success="uploadSuccess"
                  :multiple="multiple"
                  :file-list="fileList"
                  :on-change="addFile"
                  :auto-upload="false">
              <el-button slot="trigger" size="small" type="primary"></el-button>
              <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload"></el-button>
          </el-upload>
Mar.18,2021

< el-upload

        :action="aliOss.host"
        :file-list="fileList"
        :data="aliOss"
        :disabled="disabled"
        :multiple="multiple"
        :limit="limit"
        :before-upload="beforeUpload"
        :on-success="handleUploadSuccess"
        :on-preview="handlePictureCardPreview"
        :on-remove="handleRemove"
        :on-exceed="handleExceed"
        list-type="picture-card">
        <i class="el-icon-plus"></i>

< / el-upload >
this is a component for uploading multiple pictures in a project I've done. I don't understand why you still need a button to select pictures

.
Menu