dwqs / v2-table

A simple table component based Vue 2.x: https://dwqs.github.io/v2-table/
MIT License
100 stars 24 forks source link

the problem with the initialization BeautifyScrollbar #8

Closed dormadekhin closed 6 years ago

dormadekhin commented 6 years ago

the page displays several tables, some of them are hidden and initially, there is no data in them, after switching to the tab, the data is loaded but the scroll bar does not appear

dwqs commented 6 years ago

Thanks your feedback and i will fix it as soon as possible

dormadekhin commented 6 years ago

Thank you for the work done! I wish you further development)

dwqs commented 6 years ago

Can you show me the code? :sweat_smile:

dwqs commented 6 years ago

Do you use v-show directive to control the tab display or hide? If yes,replace v-show with v-if can fix this. Because of BeautifyScrollbar initialized once at mounted method,if you use v-show,the height of this container element which is returned by getBoundingClientRect() can be 0 for the hide element. BeautifyScrollbar initialization will be a failure. See beautify-scrollbar

dormadekhin commented 6 years ago

Hi, sorry for the long silence. Yes, I use the v-show, but it is used for the block which wraps the 2 tables. Try to change the v-if and see what happens.

dwqs commented 6 years ago

It's ok, look forward to your further feedback @dormadekhin-denis

dwqs commented 6 years ago

Long time to response