小编Vis*_*iya的帖子

使用不带src属性的vuejs在iframe中渲染Component

<iframe id="frame" width="100%" height="100%">

</ifrme>
Run Code Online (Sandbox Code Playgroud)

我想在这个iframe中渲染组件.有没有在iframe中创建html元素或渲染组件的选项?

new Vue({
   el:'#frame',
   store:store,
   router:router,
   render: component
})
Run Code Online (Sandbox Code Playgroud)

html iframe vue.js

5
推荐指数
2
解决办法
5253
查看次数

在Vue JS中动态导入文件

下面的代码对我有用

var Index = require('./theme/dir1/index.vue');
Run Code Online (Sandbox Code Playgroud)

但是我想这样使用它

var path = './theme/'+variable+'/index.vue';
var Index = require(path);
Run Code Online (Sandbox Code Playgroud)

哪个对我不起作用,有什么办法可以解决该问题。,

javascript meteor reactjs vue.js vuejs2

3
推荐指数
1
解决办法
1406
查看次数

标签 统计

vue.js ×2

html ×1

iframe ×1

javascript ×1

meteor ×1

reactjs ×1

vuejs2 ×1