Open LECYWZA opened 1 month ago
@losting_timeline.js?v=10430adf:526 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getContext')
这句报错了
能否提供下完整代码,以及使用的版本?
看代码是在Vue中使用,new Timeline() 要在mounted后使用,否则会找不到DOM。 document.querySelector('#Timeline') 会返回 null
new Timeline()
document.querySelector('#Timeline')
null
@losting_timeline.js?v=10430adf:526 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getContext')
这句报错了