angular - 如果 mime 类型是 angular2+ 中的 application/csv,如何打印 csv 文件?
问题描述
此代码适用于 Pdf、Img 但不适用于 csv
const file = new Blob([data], { type: mimeType });
const fileURL = URL.createObjectURL(file);
window.open(fileURL);
解决方案
推荐阅读
- c# - 为什么 SQL Server 字符串输出参数在 EF ExecuteSqlCommand 调用上返回 0?
- c# - 发送电子邮件 WebAPI
- git - 开启gitlab的二次验证后如何使用git命令
- html - 如何使用 XSLT 1.0 检查元素的前面子字符串?
- mongodb - 使用 .jks 文件从 shell 连接到 mongo
- angular - 用于 mat-selection-list 的角材料“disableRipple”在移动设备中不起作用
- ffmpeg - 这是在转码视频吗?
- uml - UML 活动图:在输出上带有保护条件的分叉
- bash - Bash 脚本冲突
- ios - 如何创建如下图所示的渐变阴影(绿色按钮上方):