Search code examples
vue.jsvuetify.jsv-navigation-drawer

Vuetify3 VNavigationDrawer partly hide after upgrade to 3.6.0


Vue Version: 3.4.21 Vuetify Version: 3.5.8

I want to use the VEmptyState component, but it is only provided in Vuetify version 3.6.0 and later. After upgrading my project's version to 3.6.0, I found that some of the VNavigationDrawer components in my project, which were previously controlled by buttons to show and hide, are now permanently displayed on the screen and only half-visible. On the playground i have wrote a demo and if you switch vuetify version to 3.5.8 then it can run normally.

Playground address: https://play.vuetifyjs.com/#...

I hope the VNavigationDrawer component can be controlled by a button to show and hide, just like in the old version (3.5.8).


Solution

  • You have set temporary prop which applys alternate styles for mobile devices for VNavigationDrawer, VNavigationDrawer will open with an overlay that has a very high z-index and prevents you from interacting with other UI beneath the navigation drawer. You can only close VNavigationDrawer with a button inside the drawer or remove the persistent prop from VNavigationDrawer.

    VNavigationDrawer are permanently displayed because you add a class w-33 on it, just remove it. If you want to set the width of the drawer, please via its prop https://vuetifyjs.com/en/api/v-navigation-drawer/#props-width

    playground: https://play.vuetifyjs.com/#eNp9UsFu2zAM/RVWlyRAbLcbsMPmBiu6AbsNGAbssOygybQrTJYESfY6BPn3UZLjuGnRk03xkXyPfD8PzDtR3VlbjgOy96wO2FvFA+72GqAeC25t+k2BMDpwqdFNT+kx4GMoWomqgbHoTYPqds963+0ZVEvc76Dho1BS/KF8MF2n8JPjf9Ht2e6rRQ1NiuoqQU9DKbqcWovBB9MXGQ8OW2qYg2/YzmNjaWZfVwtVFHrhpA3gMQxZnOytcQEOsRccoXWmhxUtZLVI3qehmfGEKKvlY9wgFcQSYuwD0A7gNrZcr76gUgZ+GKeaq9XmDJlZT8DgBqR0BLSDFkEaDctVrTdwyEuYK8uRqwHLjFqn3scoOYskeWybbnxJNR57uQhQXHfxMp7u8epSPpz5S39HJEec6LdcedxQ/gUBZ+rUeirL3Kn46ulLmkAq4qfBlm7/+dEaj+vD1AyOJHShkYJL42o+yo5HAiejnN15mkZeUUYkEL062T2ESXy2O3cNCMW9p+xDcXN9PWfn/O470h7uyaKoQ3JrfFyY9xTG4Bmnl8wZ/pE+L4zFHSmMUTzicasHpbbsbfmuvHnDfv0HXxBCvA==