vue项目中内嵌iframe,打包上线时候iframe地址如何写?

vue项目中内嵌iframe,打包上线时候iframe地址如何写

前提描述,项目是用webpack打包的,内嵌一个完整的js小组件

一、项目结构

1.内嵌的iframe文件位置

2.打包后的iframe的位置

没有配置对iframePhone文件进行打包,打包之前的iframePhone和之前文件结果一样

二、代码

javascript 复制代码
  <!-- 嵌套HTML5页面示例 -->
     //1.想对定位只能适用于本地调试
         <!-- <iframe
             src="../../../../../static/edb/html/login.html"
             style="width: 100%; height: 500px"
         ></iframe> -->
      //2.打包后的相对定位适用于本地和生产调试
         <iframe
             src="/static/iframePhone/html/login.html"
             style="width: 100%; height: 500px"
         ></iframe>
       //3.本机完整地址适用于本地调试
         <!-- <iframe
             src="http://localhost:8080/static/edb/html/login.html"
             style="width: 100%; height: 500px"
         ></iframe> -->
       //4.生产完整地址适用于生产调试
         <!-- <iframe
             src="https://生产地址/static/edb/html/login.html"
             style="width: 100%; height: 500px"
         ></iframe> -->
相关推荐
开开心心就好4 天前
开源免费高速看图工具,支持漫画大图秒开
linux·运维·服务器·安全·ruby·symfony·1024程序员节
unable code7 天前
磁盘取证-Flying_High
网络安全·ctf·misc·1024程序员节·磁盘取证
unable code8 天前
磁盘取证-ColorfulDisk
网络安全·ctf·misc·1024程序员节·内存取证
unable code9 天前
磁盘取证-[第十章][10.1.2 磁盘取证方法]磁盘取证1
网络安全·ctf·misc·1024程序员节·内存取证
开开心心就好10 天前
免费抽奖工具支持批量导入+自定义主题
linux·运维·服务器·macos·pdf·phpstorm·1024程序员节
开开心心就好14 天前
卸载工具清理残留,检测垃圾颜色标识状态
linux·运维·服务器·python·安全·tornado·1024程序员节
子燕若水15 天前
Facebook reels 运营指南
1024程序员节
尘觉18 天前
创作 1024 天|把热爱写成长期主义
数据库·1024程序员节
写点什么呢19 天前
Word使用记录
word·1024程序员节
开开心心就好19 天前
内存清理工具点击清理,自动间隔自启
linux·运维·服务器·安全·硬件架构·材料工程·1024程序员节