vue2-editor
vue2-editor copied to clipboard
warning browser memory up up up
mounted() {
this.registerCustomModules(Quill);
this.registerPrototypes();
this.initializeEditor();
},
beforeDestroy() {
this.quill = null;
delete this.quill;
},
methods: {
initializeEditor() {
this.setupQuillEditor();
this.checkForCustomImageHandler();
this.handleInitialContent();
this.registerEditorEventListeners();
this.$emit("ready", this.quill);
},
}
You registered the listener(【 this.registerEditorEventListeners()】), but you didn't close the listener in the beforeDestroy method, resulting in the memory not being recycled.