Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

放在el-dialog里面再次显示报错。 #5857

Open
bbhxwl opened this issue May 13, 2024 · 1 comment
Open

放在el-dialog里面再次显示报错。 #5857

bbhxwl opened this issue May 13, 2024 · 1 comment

Comments

@bbhxwl
Copy link

bbhxwl commented May 13, 2024

我知道为什么会出错。

let Editor:any = null
let Toolbar:any = null
const model=defineModel<string>()
const toolbarConfig = {}
const isLoading = ref(false)
const editorRef = shallowRef()
const handleCreated = (editor:any) => {
    editorRef.value = editor
    console.log('editor created:', editor)
}
onBeforeUnmount(() => {
    const editor = editorRef.value
    if (editor == null) return
    editor.destroy()
})
if(process.client){
    // @ts-ignore
    let editor=await import('@wangeditor/editor-for-vue')
    Editor = editor.Editor
    Toolbar = editor.Toolbar
}

image

@cycleccc
Copy link

看着不是 wangEditor 的问题,再看看创建和销毁的流程有没有问题?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants