mercs600 / vue2-perfect-scrollbar

Vue.js wrapper for perfect scrollbar
https://mercs600.github.io/vue2-perfect-scrollbar/
MIT License
275 stars 43 forks source link

Add static class to avoid removing after Vue merge vnode classes #17

Closed mercs600 closed 4 years ago

mercs600 commented 4 years ago

resolves #16

So.. the problem is that .ps class is added by native js way in perfect scrollbar sources. Then Vue.js during generate classes for vnode and merge classes takes into account only vnode classes I mean staticClass and class - so these classes can be only added on vue component level. See more here https://github.com/vuejs/vue/blob/e90cc60c4718a69e2c919275a999b7370141f3bf/dist/vue.runtime.common.dev.js#L5484 and issue related with that -> https://github.com/vuejs/vue/issues/3975

So the better way is just add this class on component level.