获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
const printContentHtml = (document.getElementById('printInfo') as any).innerHTML const iframe: any = document.createElement('iframe') iframe.setAttribute('style', 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;') document.body.appendChild(iframe) iframe.contentDocument.write(printContentHtml) iframe.contentDocument.close() iframe.contentWindow.print() document.body.removeChild(iframe) 使用的这种打印方式,但是嵌套小程序中好像被屏蔽了
小程序webview进行调用打印机时有没有比较好的方法https://developers.weixin.qq.com/doc/oplatform/Miniprogram_Frame/faq.html
08-08