const img = new Image();
img.src = this.base64String;
const newWin = window.open("", "_blank");
newWin.document.write(img.outerHTML);
newWin.document.title = "流程图"
newWin.document.close();
原理是找到 window.open 返回的 window 对象并操作里面的 document 对象。img.outerHTML 是一串字符串形式的标签,说明可以在新窗口中操作 dom 元素。