qrcodejs
qrcodejs copied to clipboard
Cannot read property 'appendChild' of null
vue.esm.js?efeb:1696 TypeError: Cannot read property 'appendChild' of null at new Drawing (qrcode.js:361) at new QRCode (qrcode.js:570) at VueComponent.qrcodePic (share.vue?5619:78) at VueComponent.boundFn [as qrcodePic] (vue.esm.js?efeb:189) at VueComponent.mounted (share.vue?5619:59) at callHook (vue.esm.js?efeb:2868) at Object.insert (vue.esm.js?efeb:4045) at invokeInsertHook (vue.esm.js?efeb:5806) at VueComponent.patch [as patch] (vue.esm.js?efeb:6025) at VueComponent.Vue._update (vue.esm.js?efeb:2623) 请问一下这个问题怎么解决
https://stackoverflow.com/questions/39095499/uncaught-typeerror-cannot-read-property-appendchild-of-null-with-onsen-ui
I tried the code that answers the question from the link and it generated another error as soons as I open my page: "Uncaught TypeError: Cannot read property 'value' of null"
Probably you're, like me, is using a class to generate the qr code or a jquery selector. You must return the element directly, like this: $('.myclass').find()[0]
Probably you're, like me, is using a class to generate the qr code or a jquery selector. You must return the element directly, like this: $('.myclass').find()[0]
Thank you