0
我試圖在iframe元素創建後執行Vue.js組件,但它不起作用。無法運行Vue.js iframe元素加載後拖放
這裏是IFRAME例如:
<div id="screen">
<!-- This iframe created after drag and drop-->
<iframe src="/elements/cover-01.html" scrolling="no" frameborder="0" __idm_frm__="419" __idm_id__="-2084740094" style="visibility: visible; user-select: none; overflow: hidden; height: 500px; width: 2105px; opacity: 1;">
<texeditor></texteditor>
</iframe>
</div>
app.js
import Vue from 'vue';
import axios from 'axios';
import Texteditor from './components/Texteditor.vue';
new Vue({
el:'#screen',
components:{Texteditor}
});
Texteditor.vue(組分)
<template>
<div @click="removeEdit">
<p><slot></slot></p>
<textarea v-show="edit" class="texteditor"></textarea>
</div>
</template>
<script>
export default{
data(){
return {
edit: false
}
},
methods:{
toggleEdit(){
this.edit = !this.edit;
$('.texteditor').redactor({
fixed:true
});
},
removeEdit(){
this.edit=false;
$('.texteditor').destroyEditor();
}
},
mounted(){
alert();
}
}
</script>
<style>
</style>
我正在測試texteditor組件,但我無法獲得。
請幫忙。
感謝
No.There是typo.It沒有錯誤的原理之後創建iframe.But創建的iframe,當它不iframe中工作以外的iframe 。 – kodcu