【动态创建a链接执行跳转】
1 export const createLinkToClick1 = (link, linkType) => { 2 let aLink = document.createElement('a'); 3 aLink.href = link; 4 aLink.target = linkType || '_blank'; 5 aLink.style.display = 'none'; 6 document.body.appendChild('aLink'); 7 aLink.click(); 8 document.body.removeChild('aLink') 9 }