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: { props: {
defaultMsg: { defaultMsg: {
type: String type: String,
}, },
config: { config: {
type: Object type: Object,
}, },
editorId:{} editorId: {},
}, },
mounted() { mounted() {
const _this = this; const _this = this;
this.editor = UE.getEditor(this.editorId, this.config); // 初始化UE this.editor = UE.getEditor(this.editorId, this.config); // 初始化UE
this.editor.addListener("ready", function () { this.editor.addListener("ready", function () {
_this.editor.setContent(_this.defaultMsg); // 确保UE加载完成后,放入内容。 _this.editor.setContent(_this.defaultMsg); // 确保UE加载完成后,放入内容。
_this.$emit('ready', _this.editor); _this.$emit("ready", _this.editor);
}); });
}, },
methods: { methods: {
getUEContent() { // 获取内容方法 getUEContent() {
return this.editor.getContent() // 获取内容方法
} return this.editor.getContent();
},
}, },
destroyed() { destroyed() {
this.editor.destroy(); 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