【Vue】 在 vue 中使用 iframe 挂载 html 文件,帷千
cpugpu芯片开发光刻机
跨学科知识体系
10
文件名:【Vue】 在 vue 中使用 iframe 挂载 html 文件,帷千
【Vue】 在 vue 中使用 iframe 挂载 html 文件
文章目录 首先需要将要挂载的html文件放到public 文件夹中 路径的引用形式 <iframe ref="sheet" src="/luckysheet.html" width="100%" height="100%"></iframe> 通过绑定 ref 获取到 iframe,data为我需要传递的数据,通过 iframes.postMessage 的方法进行传递。 sentMsgSheet(data) {const sheetWindow = this.$refs.sheet.contentWindow;if (sheetWindow) {sheetWindow.postMessage(data, '*');}}sentMsgSheet([]); postMessage 通信具体用法请参考:https://blog.csdn.net/qq_45677671/article/details/128238860
同类推荐
-

【PUSDN】WebStorm中报错Switch language version to React JSX,akg k402
查看 -

【Proteus仿真】【STM32单片机】多路温度控制系统,天语m618(stm32proteus温度采集仿真)
查看 -

【Proteus仿真】【STM32单片机】智能垃圾桶设计,terrans force x7200
查看 -

【Proteus仿真】【STM32单片机】智能语音家居陪护机器人,hp dv1000
查看 -

【QT+CUDA】QT中使用cuda,QT+VS+cuda下载安装配置,bingbar
查看 -

【QT】 Qt自定义ui控件,广州华英雄手机店
查看 -

【QT】常用控件——按钮组,u908e(qt三种按钮控件)
查看 -

【Qt】QPalette,t328t(qtt883)
查看 -

【ROS】使用vscode浏览navigation2源码时,提示:没有那个文件或目录,锋哲v6t
查看