3***@qq.com
3***@qq.com
  • 发布:2025-06-04 17:22
  • 更新:2025-07-09 15:50
  • 阅读:81

vue3项目里有iframe,真机运行iframe加载不出

分类:HBuilderX

vite+vue3的项目用HbuilderX打包,项目里有iframe,真机运行iframe加载不出来,报错“位于file:////static/XXX的网页无法加载,因为net:Err_File_Not_found”。
我的firame是写的绝对路径,为什么为变成加载file呢?
<iframe ref="myIframeRef1" :src="'/static/video/index.html?videoUrl=' + videoUrl " width="100%" height="100%" frameborder="0" scrolling="no" />

2025-06-04 17:22 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

你的 vue代码是咋写的呢?

NoahYoung

NoahYoung

安卓跟web有些不一样的,你可以使用file协议直接加载

要回复问题请先登录注册