vue-codemirror
vue-codemirror copied to clipboard
Error in mounted hook: "TypeError: Cannot read property 'appendChild' of null"
The code I run contains a component that needs to add a canvas tag to the dom. `
- const oDiv = document.getElementById(self.table.id);
- const canvas = document.createElement('canvas');
- oDiv.appendChild(canvas);
` When I run it, I report an error: Error in mounted hook: "TypeError: Cannot read property 'appendChild' of null" How to solve this problem