编程知识 cdmana.com

Solve [bscoll warn]: can not resolve the wrapper dom. Vue better scroll

In the process of developing a project , Use better-scroll A duplicate error was encountered in the scrolling plug-in

[BScroll warn]: Can not resolve the wrapper DOM. Vue better-scroll
[Vue warn]: Error in mounted hook: “TypeError: Cannot read property ‘children’ of undefined”

And in the process of switching to a component, there will be a load jam , At the same time, there is a handover to initiate multiple network requests

After checking, it turns out that when I click on the sixth picture , There are other components loaded below , There's no chart to scroll through

I use v-if Judge to let it not load

And I am mouted It is mounted in the better-scroll, because v-if No rendering , So we can't find this node , This led to this error , Modified into v-show We can solve the above problems .v-show Will render but not show , The node can be found

版权声明
本文为[Leise-]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224214721900c.html

Scroll to Top