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’。