vue-cli3 中使用 iframe 路径不起作用

iframe 会存在能耗、安全问题,有时还是会用到

问题

在cli3中使用 iframe ,总显示#app页面内容,src中设置的路径不起作用

解决方法

将要引用的页面移动到 public 文件夹中 且路径不是用 ../../public/web.html, 而是直接用 /web.html ,问题就解决了


若有岁月可轻狂,愿可以笑看夕阳

你可能感兴趣的:(vue-cli3 中使用 iframe 路径不起作用)