|
@@ -164,11 +164,13 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ window.addEventListener('click', this.hideToolbarDrawer);
|
|
|
if (this.isFill) {
|
|
|
window.addEventListener('click', this.hideContentmenu);
|
|
|
}
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
+ window.removeEventListener('click', this.hideToolbarDrawer);
|
|
|
if (this.isFill) {
|
|
|
window.removeEventListener('click', this.hideContentmenu);
|
|
|
}
|
|
@@ -367,6 +369,14 @@ export default {
|
|
|
this.deleteContent();
|
|
|
this.hideContentmenu();
|
|
|
},
|
|
|
+ // 隐藏工具栏抽屉
|
|
|
+ hideToolbarDrawer() {
|
|
|
+ let editor = tinymce.get(this.id);
|
|
|
+ if (editor.queryCommandState('ToggleToolbarDrawer')) {
|
|
|
+ editor.execCommand('ToggleToolbarDrawer');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 隐藏填空右键菜单
|
|
|
hideContentmenu() {
|
|
|
this.isShow = false;
|
|
|
},
|