allow use Blob to download csv
This commit is contained in:
parent
c110b728f6
commit
5d284605c4
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ const csv = {
|
||||||
_getDownloadUrl (text) {
|
_getDownloadUrl (text) {
|
||||||
const BOM = '\uFEFF';
|
const BOM = '\uFEFF';
|
||||||
// Add BOM to text for open in excel correctly
|
// Add BOM to text for open in excel correctly
|
||||||
if (window.Blob && window.URL && window.URL.createObjectURL && !has('Safari')) {
|
if (window.Blob && window.URL && window.URL.createObjectURL) {
|
||||||
const csvData = new Blob([BOM + text], { type: 'text/csv' });
|
const csvData = new Blob([BOM + text], { type: 'text/csv' });
|
||||||
return URL.createObjectURL(csvData);
|
return URL.createObjectURL(csvData);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue