当前位置:网站首页>Input file upload
Input file upload
2022-04-23 17:04:00 【Eli-sun】
<div class="uploadexcel">
<label for="fileInput">
<span class="importBtn"> Import </span>
<!-- <el-button type="primary"> Upload files </el-button> -->
</label>
<input
v-show="false"
type="file"
id="fileInput"
@change="handleFileUpload"
accept=".xlsx"
name="file"
ref="file"
/>
</div>
//script
// Import
const handleFileUpload = (e) => {
console.log(' Import res', e);
// console.log(' Import file', file);
let file = e.target.files;
let form = new FormData()
form.append('xlsFile', e.target.files[0])
console.log('99999-----', form.get("xlsFile"));
importZbk(form).then(res => {
console.log(res);
e.target.value = ' ' // When the imported files are the same, there will be a problem that they cannot be imported for the second time
})
}
版权声明
本文为[Eli-sun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554289495.html
边栏推荐
- Solution architect's small bag - 5 types of architecture diagrams
- 信息摘要、数字签名、数字证书、对称加密与非对称加密详解
- Interface document yaml
- PHP efficiently reads large files and processes data
- 1-5 nodejs commonjs specification
- How vscode compares the similarities and differences between two files
- Promise (III)
- Production environment——
- Sub database and sub table & shardingsphere
- 详解牛客----手套
猜你喜欢
1-4 configuration executable script of nodejs installation
Grpc gateway based on Ocelot
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
PyMySQL
Bytevcharts visual chart library, I have everything you want
博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
Detailed explanation of Milvus 2.0 quality assurance system
Nacos + aspnetcore + Ocelot actual combat code
Milvus 2.0 质量保障系统详解
[pimf] openharmony paper Club - what is the experience of wandering in ACM survey
随机推荐
_ Mold_ Board_
First knowledge of go language
Wiper component encapsulation
Talk about browser cache control
[problem solving] [show2012] random tree
Generate random numbers with high quality and Gaussian distribution
面试百分百问到的进程,你究竟了解多少
Expression "func" tSource, object "to expression" func "tSource, object" []
El cascade and El select click elsewhere to make the drop-down box disappear
Knowledge points and examples of [seven input / output systems]
Collect blog posts
[pimf] openharmony paper Club - what is the experience of wandering in ACM survey
ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
1-1 NodeJS
∑GL-透视投影矩阵的推导
Copy constructor shallow copy and deep copy
freeCodeCamp----shape_ Calculator exercise
How to implement distributed locks with redis?
Lock锁
Smart doc + Torna generate interface document