当前位置:网站首页>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
边栏推荐
- How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
- Nacos + aspnetcore + Ocelot actual combat code
- Nodejs installation and environment configuration
- Modify the test case name generated by DDT
- Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
- [pimf] openharmony paper Club - what is the experience of wandering in ACM survey
- Wiper component encapsulation
- Pseudo Distributed installation spark
- Zhimeng dedecms security setup Guide
- ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
猜你喜欢
Sub database and sub table & shardingsphere
线性代数感悟之1
Nacos + aspnetcore + Ocelot actual combat code
Lock lock
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
Feign report 400 processing
Detailed explanation of Milvus 2.0 quality assurance system
oracle 中快速获取表的列名列表
ByteVCharts可视化图表库,你想要的我都有
1-4 configuration executable script of nodejs installation
随机推荐
Shell script -- shell programming specification and variables
Introduction to how to set up LAN
杂文 谈谈古典的《拆掉思维里的墙》
Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
线性代数感悟之2
Detailed explanation of Milvus 2.0 quality assurance system
How vscode compares the similarities and differences between two files
Node access to Alipay open platform sandbox to achieve payment function
Summary of common websites
ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
How does flash cache data in memory?
VsCode-Go
Get the column name list of the table quickly in Oracle
[problem solving] [show2012] random tree
Scope and scope chain in JS
1-3 nodejs installation list configuration and project environment
Feign report 400 processing
Introduction to new functions of camtasia2022 software
Loggie source code analysis source file module backbone analysis
Go language, array, string, slice