下载本地的exe,咱们要把须要下载的静态资源放在static文件夹下app
<a href="/static/codebase/WebComponentsKit.exe" download="WebComponentsKit.exe" target="_blank">测试</a>
模拟a标签方法测试
<el-button @click="download">test</el-button> downloadClick(row) { var a = document.createElement('a') a.setAttribute('href', "/static/codebase/WebComponentsKit.exe") a.setAttribute('download' ,"WebComponentsKit.exe") document.body.appendChild(a) a.click()~~~~ }