
// 预览
export function winOpenFile(fileName, content) {
if (imgReg(fileName)) {
// 验证是否为图片
const img = new Image();
img.src = content; //base64图片链接
const newWin = window.open("", "_blank");
newWin.document.write(img.outerHTML);
newWin.document.title = fileName
newWin.document.close();
} else {
window.open(content, "_blank");
}
}
标签: base64, window.open
上面是“vuejs用window.open打开base64图片”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_29.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

帝国CMS6.6功能之如何自动生成缩略图
One More Shot官网 - 上传歌曲后AI几分钟内即可完成完整音乐视频制作
微软亚洲研究院网页版官网入口及各大模型介绍
AIBox365官方网址入口,一款国内领先的AI工具集合平台
1AI