在vue中使用iframe直接引入本地页面:<template><div>
<iframe src="../../../static/yuanhoutaiyemian/admin/dk/html/LoanPlatformConfig.html" frameborder="0" width="100%" height="100%"></iframe></div></template>本地文件在static文件;不打包,本地起服务运行时没有问题,打包放到服务器上iframe里面的页面就404报错;感觉是路径问题,打包前将iframe里面的src更改后打包或者外面增加文件夹将本地文件copy到src结构的路径文件夹中都是尝试了。。没有用。
1 回答

陪伴而非守候
TA贡献1757条经验 获得超8个赞
<iframe src="/static/yuanhoutaiyemian/admin/dk/html/LoanPlatformConfig.html" frameborder="0" width="100%" height="100%"></iframe></div>
添加回答
举报
0/150
提交
取消