我是靠谱客的博主 心灵美嚓茶,这篇文章主要介绍Vue在模板文件中初始化wangeditor,Vue在模板文件中使用钩子函数获取DOMlist.vue 模板文件add.vue,现在分享给大家,希望可以做个参考。

list.vue

 

 import add from './add';
export default {
data() {
return {
}
},
methods:{
showAdd(){
this.$layer.iframe({
content: {
content: add, //传递的组件对象
parent: this,//当前的vue对象
data:{}//props
},
area:['100%','800px'],
title: '添加笔记'
});
}
}
}

模板文件add.vue

<template>
<div ref="editor" ></div>
</template>
export default {
data() {
return {
editor:''
}
},created:function () {
//主要是该方法
this.$nextTick(function () {
this.initEditor();
})
},methods:{
initEditor(){
//获取DOM
const editorDOM = this.$refs.editor;
this.editor = new E(editorDOM);
this.initEditorConfig();
this.editor.create();
this.createDisabled = true;
},
//初始化副文本编辑器配置
initEditorConfig(){
}
}
}

参考:https://segmentfault.com/a/1190000012861862

最后

以上就是心灵美嚓茶最近收集整理的关于Vue在模板文件中初始化wangeditor,Vue在模板文件中使用钩子函数获取DOMlist.vue 模板文件add.vue的全部内容,更多相关Vue在模板文件中初始化wangeditor,Vue在模板文件中使用钩子函数获取DOMlist内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(126)

评论列表共有 0 条评论

立即
投稿
返回
顶部