Commit a4be0e3c authored by 柳 佳乐's avatar 柳 佳乐
Browse files

20221117

parents 06681c94 743d1e85
......@@ -30,7 +30,7 @@ export const downloadPDFFile = function (url, fileName) {
export const previewPDF = async (filename) => {
const a = document.createElement("a"); //创建一个<a></a>标签
// a.href = url; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a.href=(await getFileUrl(filename)).data
a.href=(await getFileUrl(filename)).data
a.target = "_blank";
a.style.display = "none"; // 障眼法藏起来a标签
document.body.appendChild(a); // 将a标签追加到文档对象中
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment