使用ref绑定组件,同时用 v-if控制组件刷新,本地运行正常,打包之后刷新组件报错
Vue version
3.2.13
Link to minimal reproduction
xiexie
Steps to reproduce
let showEdit = ref(false) let ckeditorInstance = ref(null)
onMounted(() => { show.value = true })
const reloadCkeditor = () => { show.value = false nextTick(() => { show.value = true }) }
What is expected?
能保持跟本地运行时一致,打包之后不报错,组件中使用一些原生的插件需要通过v-if来刷新
What is actually happening?
run serve不报错,run build 发布之后报错
System Info
DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
Any additional comments?
No response