exportI:function(but){
var v=this;
resulta=document.getElementById('resulta');
v.funDownload(resulta.value, 'test.js');//指定导出内容和文件名
},
// 下载文件方法
funDownload:function (content, filename) {
console.log('funDownload');
var eleLink = document.createElement('a');
eleLink.download = filename;
eleLink.style.display = 'none';
// 字符内容转变成blob地址
var blob = new Blob([content]);
eleLink.href = URL.createObjectURL(blob);
// 触发点击
document.body.appendChild(eleLink);
eleLink.click();
// 然后移除
document.body.removeChild(eleLink);
}
지문항성주식회사