xlsx文件上传

博客主要探讨了xlsx文件的上传,介绍了如何实现csv文件的上传,并提供了多个详细教程链接,内容涉及文件上传的实现步骤和技术细节。
摘要由CSDN通过智能技术生成

csv文件上传

链接:
https://blog.csdn.net/weixin_44481476/article/details/108296932
https://blog.csdn.net/qq_36597079/article/details/86612667
等等,好多链接都一样内容
。。。。

<el-upload
 		 ref="upload"
	     class="upload-demo"
	     drag
	     action
	     :multiple="false"
	     :limit="1"
	     :auto-upload="false"
 >
                      <!-- :on-change="handleFileChange" -->
     <i class="el-icon-upload"></i>
     <div class="el-upload__text">将文件拖到此处,或<em>选择文件</em></div>
     <div slot="tip" class="el-upload__tip">只能上传.csv文件</div>
 </el-upload>
 <el-button size="small" type="primary" style="margin-left: 10px;" @click="handleFileChange()">上传</el-button>

<script>
export default {
    
  data(){
    
    return {
    
      sysAppIds: 'xxxxxxxxxxxsx'
    }
  },
  methods: {
    
    /**
     * 上传
     */
    async handleFileChange(uploadType) {
    
        // console.log('file',file)
        const file = this.$refs.upload.uploadFiles[0]
        this.fileTemp = file.raw;
        if (this.fileTemp) {
    
            if (
                this.fileTemp.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
                this.fileTemp.type == 'application/vnd.ms-excel'
            ) {
    
                await this.importfxx(this.fileTemp,uploadType);
                
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值