vue2加载本地html文件

实现方法:

1、在public文件夹下创建static文件夹,static文件夹下放置需要展示的html文件,有没有static都没问题,需要在public文件夹下

javascript 复制代码
<div style="width: 100%">
    <!--静态html资源-->
    <div class="textCenter">
      <h2>标题</h2>
    </div>
    <div>
      <iframe src="/static/home.html" scrolling="auto" frameborder="0" style="width: 100%;height: 600px;"></iframe>
    </div>
</div>
相关推荐
AI逐月几秒前
解决 ComfyUI 插件安装后 Nanobind 报错问题:soxr 版本冲突原理解读
开发语言·python
Gofarlic_OMS9 分钟前
SolidEdge专业许可证管理工具选型关键评估标准
java·大数据·运维·服务器·人工智能
清华都得不到的好学生13 分钟前
数据结构->1.稀疏数组,2.数组队列(没有取模),3.环形队列
java·开发语言·数据结构
光影少年13 分钟前
数组去重方法
开发语言·前端·javascript
我命由我1234513 分钟前
浏览器的 JS 模块化支持观察记录
开发语言·前端·javascript·css·html·ecmascript·html5
软件开发技术深度爱好者18 分钟前
用python + pillow实现GUI界面图片GUI处理工具
开发语言·python
weyyhdke23 分钟前
基于SpringBoot和PostGIS的省域“地理难抵点(最纵深处)”检索及可视化实践
java·spring boot·spring
ILYT NCTR29 分钟前
【springboot】Spring 官方抛弃了 Java 8!新idea如何创建java8项目
java·spring boot·spring
weixin_4250230030 分钟前
PG JSONB 对应 Java 字段 + MyBatis-Plus 完整实战
java·开发语言·mybatis
leaves falling1 小时前
C++ string 类:从入门到模拟实现
开发语言·c++