vue.js - Vue.js,将一个项目渲染到另一个项目中
问题描述
我有两个项目,localhost:8080 和 localhost:8081
我需要在第一个项目中渲染第二页,并使用类似这样的东西
在routes.js中
{
name:'someThing',
path: 'someThing',
component: something,
props: { source: 'localhost:8081' }
}
东西.vue
<template>
<iframe
:src="source"
:style="{ width: '100%', height: '99%', border: 0, overflow: hidden, margin:0, padding: 0 }"
>
</iframe>
</template>
<script>
export default {
name: 'something',
props: {
source: {
type: String,
required: true
}
}
}
</script>
正常吗?或者我应该使用插槽可能是
解决方案
推荐阅读
- javascript - 从渲染方法中取出分页(React)
- visual-studio-code - VS Code:登录错误:您似乎处于离线状态。请检查您的网络连接
- swift - watchOS,不接收远程通知
- java - 我的sql中的PreparedStatement nsert逻辑操作(=,<,>=,<,>=)
- java - 如何使用 JPA 选择原生表列?
- javascript - 在等待承诺中设置超时
- javascript - 如何检查当前位置是否超出设定的半径?
- azure - Azure Databricks 中的 dbutils.notebook.run 问题
- asp.net-mvc - 我已将我的 asp.net core 3 发布到 iis,但点击目录并没有向我显示站点 index.cshtml 页面
- java - 使用 ASPOSE 库无法正确呈现 PDF 样式