Better Scroll failure (go to nanyuner project mobile terminal)

Before, when I imitated the VUE project of mobile terminal, THERE was a link of using Better-Scroll. When I used it for the first time, I could still scroll, but after refreshing the page, I found that scrolling failed. I searched for many methods and finally found the reason

Mounted: > < span style = “font-size: 14.0mm; line-height: 14.0mm; line-height: 14.0mm;


To explain how better Scroll works, according to the image, the parent element (the green wrpper) has a fixed height, and the height of the first child element (the yellow content) expands with the size of the content. Scrolling can only be done if the content height is greater than the wrpper height, otherwise scrolling cannot be done if the child element’s content is small.

In this project, Vue +vuex is used. When vuex data is sent, it is equivalent to content that has a lot of data and has enough height. Better Scroll can be used to achieve scrolling. Mounted (vuex) {/ / Mounted (vuex) {/ / Mounted (Vuex) {/ / Mounted (Vuex) {/ / Mounted (Vuex) {/ / Mounted (Vuex)} Changing Mounted to updated fixes this problem.