//获取本地路径
let paramsProtocol = window.location.protocol
let paramsHost= window.location.host
let paramsUrl=paramsProtocol+'//'+paramsHost
//本地 static文件夹下路径
<el-link type="primary" :href="`${paramsUrl}/file/1模板.xls`" target="_blank">点击下载模板</el-link>
前端下载本地项目路径文件
最新推荐文章于 2024-05-21 23:21:19 发布