vuetifyjs / nuxt-module

Zero-config Nuxt Module for Vuetify
https://nuxt.vuetifyjs.com/
MIT License
223 stars 22 forks source link

floating-vue does not work #249

Closed sdr0x07b6 closed 3 months ago

sdr0x07b6 commented 3 months ago

I installed a library called floating-vue and it did not work. Upon further investigation, I found that it would not work if vuetify-nuxt-module was installed.

I have asked in the floating-vue side Issue, but no answer so far. https://github.com/Akryum/floating-vue/issues/1046

In it, I have Stackblitz to reproduce the problem. https://stackblitz.com/edit/nuxt-starter-ldfg7v?file=package.json,nuxt.config.ts,app.vue

In environments where vuetify-nuxt-module is installed, certain slots (#popper) seem to be disabled, is there any information or possible cause for this?

userquin commented 3 months ago

There is a collision with floating vue global components and vuetify ones.

You can import floating vue components and use them or write a custom nuxt plugin and/or module to register them with other names. The floating vue nuxt module will register the floating vue plugin (also css and some vite options) and the components.

For example, changing the app.vue to this just works:

app.vue ```html ```

Floating vue seems to be not working when enabling SSR, the popup id will change and then hydration missmatch there.

imagen

sdr0x07b6 commented 3 months ago

I see, now that you mention it there is a name collision. I wonder why I didn't notice that 🫠 It worked! Thank you for explaining it so carefully!