.xlsx文件要放在static目录下面
<button id="hf" href="#" download @click="downfile">导入模板下载</button>
在methods写个方法就ok了
// 下载文件
downfile(urls) {
urls = location.origin + '/static/userImport.xlsx'
var elemIF = document.createElement('iframe'