在销毁的时候,用settimout定时销毁就没事了--解决了半天才搞定/(ㄒoㄒ)/~~
beforeUnmount() {
try {
const editor = this.editor
if (editor == null) return
setTimeout(() => {
editor.destroy() // 组件销毁时,及时销毁编辑器
// console.log('wang销毁完成')
}, 300) // 添加1秒的延迟
} catch (error) {
alert('捕获了',error)
}
}