allow use Blob to download csv

This commit is contained in:
lambert 2017-07-24 18:02:29 +08:00
parent c110b728f6
commit 5d284605c4

View file

@ -41,7 +41,7 @@ const csv = {
_getDownloadUrl (text) {
const BOM = '\uFEFF';
// 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' });
return URL.createObjectURL(csvData);
} else {