Commit 2b96774d authored by rencs's avatar rencs

10.14 百度编辑器遮挡bug

parent dd826306
...@@ -4,37 +4,43 @@ ...@@ -4,37 +4,43 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'UE', name: "UE",
data () { data() {
return { return {
editor: null, editor: null,
} };
},
props: {
defaultMsg: {
type: String,
}, },
props: { config: {
defaultMsg: { type: Object,
type: String
},
config: {
type: Object
},
editorId:{}
}, },
mounted() { editorId: {},
const _this = this; },
this.editor = UE.getEditor(this.editorId, this.config); // 初始化UE mounted() {
this.editor.addListener("ready", function () { const _this = this;
_this.editor.setContent(_this.defaultMsg); // 确保UE加载完成后,放入内容。 this.editor = UE.getEditor(this.editorId, this.config); // 初始化UE
_this.$emit('ready', _this.editor); this.editor.addListener("ready", function () {
}); _this.editor.setContent(_this.defaultMsg); // 确保UE加载完成后,放入内容。
_this.$emit("ready", _this.editor);
});
},
methods: {
getUEContent() {
// 获取内容方法
return this.editor.getContent();
}, },
methods: { },
getUEContent() { // 获取内容方法 destroyed() {
return this.editor.getContent() this.editor.destroy();
} },
}, };
destroyed() {
this.editor.destroy();
}
}
</script> </script>
<style lang="scss" scoped>
.edui-default {
z-index: 0;
}
</style>>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment