上传
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="files" label="附件">
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" underline :href="row.fileUrl" target="_blank">
|
||||
<el-link type="primary" underline target="_blank" @click="handleDownload(row.files)">
|
||||
{{ row.files }}
|
||||
</el-link>
|
||||
</template>
|
||||
@@ -195,6 +195,16 @@ function handleClickLib(index) {
|
||||
getResourceList()
|
||||
}
|
||||
|
||||
function handleDownload(href) {
|
||||
if (href) {
|
||||
let a = document.createElement('a')
|
||||
a.download = href //指定下载的文件名
|
||||
a.href = href // URL对象
|
||||
a.click() // 模拟点击
|
||||
URL.revokeObjectURL(a.href) // 释放URL 对象
|
||||
}
|
||||
}
|
||||
|
||||
function openResource(type, id) {
|
||||
resourceDialog.value.open(type, libraryList.value[libraryIndex.value], id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user