桌面应用中VUE使用新浏览器窗口打开页面
1、浏览器应用忽略此方式,可任意方式打开。针对桌面应用设置
newWindowClick(){try {this.fileUrl = "";this.params.year = ""this.params.date = ""axios({method: 'post',url: '/url/pdf/preview',data: this.params,}).then(res=> {this.fileUrl = res.data.dataconsole.log("windowPdfUrl本地访问路径: " + JSON.stringify(this.fileUrl))// 窗口特性参数,建议新窗口的尺寸和功能const windowFeatures = 'width=1000,height=600,left=500,top=200,resizable=yes';// 打开新窗口 window.open(this.fileUrl, '_system', windowFeatures);})} catch (error) {console.error('预览失败:', error);}
},
‘_system’。