vue3前端页面下载excel模版

1.excel上传到public目录下

在这里插入图片描述

2.代码中引用excel路径

<el-space direction="horizontal" size="small">
        <el-button @click="handleChangePage">刷新列表</el-button>
        <el-button type="primary" @click="handleBatchUpload">批量上传</el-button>
        <a :href="templateUrl" download="阿里巴巴全链接表_模版.xlsx">
          <el-button type="info">下载 Excel 模板</el-button>
        </a>
      </el-space>

const templateUrl = '/public/阿里巴巴全链接表_模版.xlsx'

相关推荐

  1. vue3 项目中 前端实现下载模板 csv文件

    2024-07-16 21:08:03       21 阅读
  2. 前端Vue中引入excel模板下载以及XLSX使用

    2024-07-16 21:08:03       46 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-16 21:08:03       66 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-16 21:08:03       70 阅读
  3. 在Django里面运行非项目文件

    2024-07-16 21:08:03       57 阅读
  4. Python语言-面向对象

    2024-07-16 21:08:03       68 阅读

热门阅读

  1. 【Python】Arcpy将excel点生成shp文件

    2024-07-16 21:08:03       21 阅读
  2. Linux批量更改文件后缀名

    2024-07-16 21:08:03       19 阅读
  3. android gradle 开发与应用(一) : Gradle基础

    2024-07-16 21:08:03       17 阅读
  4. Python学习4---迭代器和生成器的区别

    2024-07-16 21:08:03       24 阅读
  5. Linux基本命令(续)

    2024-07-16 21:08:03       21 阅读
  6. HTTPS

    HTTPS

    2024-07-16 21:08:03      19 阅读
  7. Vue3 基础

    2024-07-16 21:08:03       22 阅读
  8. redis-缓存三剑客

    2024-07-16 21:08:03       15 阅读
  9. python爬虫豆瓣电影TOP250

    2024-07-16 21:08:03       19 阅读