window.location.href打开新窗口

window.location.href="URL"; 表示重新定向到新页面,同时刷新打开的这个页面;

例子:打开新窗口下载文件

        commonPost('接口').then(res=>{

                window.location.href=下载文件的的接口+res

        })

你可能感兴趣的:(javascript,前端,vue,html,html5,css)