当前位置:网站首页>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
边栏推荐
- Variable length parameter__ VA_ ARGS__ Macro definitions for and logging
- PHP efficiently reads large files and processes data
- Idea of batch manufacturing test data, with source code
- Introduction to new functions of camtasia2022 software
- Mock test
- Milvus 2.0 détails du système d'assurance de la qualité
- Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
- Paging SQL
- SQL database
- English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
猜你喜欢

Bytevcharts visual chart library, I have everything you want

Mock test using postman

【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验

Grpc gateway based on Ocelot

PyMySQL

CentOS MySQL multi instance deployment

RTKLIB 2.4.3源码笔记

org. apache. parquet. schema. InvalidSchemaException: A group type can not be empty. Parquet does not su

Node access to Alipay open platform sandbox to achieve payment function

Detailed explanation of Milvus 2.0 quality assurance system
随机推荐
[PROJECT] small hat takeout (8)
Nodejs installation and environment configuration
Smart doc + Torna generate interface document
如何用Redis实现分布式锁?
网络安全之渗透靶场实战详解
1-1 NodeJS
◰GL-阴影贴图核心步骤
Interface document yaml
[markdown notes]
Talk about browser cache control
Mock test
Do you really understand the principle of code scanning login?
New keyword learning and summary
织梦DEDECMS安全设置指南
How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping
Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
ByteVCharts可视化图表库,你想要的我都有
Freecodecamp ---- budget & category exercise
Variable length parameter__ VA_ ARGS__ Macro definitions for and logging