< form action= "/ addPackageType" method= "post" enctype= "multipart/form-data" >
<label for="packageName"></label>
<input type="text" name="packageName" id="packageName">
<label for="activeIcon"></label>
<input type="file"/ name="activeIcon">
<label for="defaultIcon"></label>
<input type="file"/name="defaultIcon">
<button type="submit"></buttom>
</form>
previously, use the above code to upload multiple images and texts. [upload multiple pictures and questions at the same time]
backend [node] processed this request with formidable
without changing the backend,
now wants to use elementUI to achieve the above effect, how should I write it?
<el-upload
class="upload-demo"
ref="upload"
action="http://192.168.31.197:6688/pcfoodaddPackageType"
:http-request="addPackageType"
:data="package"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="icons"
:on-success="hha"
multiple5 multiple5
: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>
<div slot="tip" class="el-upload__tip">jpg/png500kb</div>
</el-upload>