修改下载

base
JayChou 6 months ago
parent 6997bf2b39
commit deb4435e71
  1. 14
      src/views/userInfo/components/reacList.vue

@ -24,7 +24,7 @@
link
type="primary"
size="small"
@click="download(row.fileUrl)"
@click="download(row.fileUrl,row.fileName)"
v-if="row.uploadWorkFlag != 'no'"
>
下载文件
@ -174,8 +174,16 @@ const headerChange = (pageNumber: any) => {
getList()
}
//
const download = async (url:any) => {
window.open(import.meta.env.VITE_APP_BASE_API + '/sys/common/zuopin/' + url)
const download = async (url:any,name:any) => {
// window.open(import.meta.env.VITE_APP_BASE_API + '/sys/common/zuopin/' + url)
const a = document.createElement('a')
a.style.display = 'none'
document.body.appendChild(a)
a.href = import.meta.env.VITE_APP_BASE_API + '/sys/common/zuopin/' + url
a.setAttribute('download', name);
a.click()
document.body.removeChild(a)
}
const saveEvent = async (id: any) => {

Loading…
Cancel
Save