Closed yianpuodiaotu closed 6 years ago
The lifecycle function beforeDestroyed
will be called after DOM of component was removed.
And I call function toTextArea
to destroy the CodeMirror instance in beforeDestroyed
. toTextArea
will look for the parent node. But at that moment DOM of component was removed from document. So the error occurred.
when this component user with
v-if
:when the value of
flag
turns to false from true, the console of explorer prints error as follow: