lecoueyl / mijin

Tailwind CSS UI components build for Vue.js / Nuxt.js
https://lecoueyl.github.io/mijin.web
MIT License
203 stars 16 forks source link

[Question] Vue 3 support #8

Open guastallaigor opened 3 years ago

guastallaigor commented 3 years ago

Is your feature request related to a problem? Please describe.

Hello. First of all, great component library :clap:!

My question is, it's possible to I use mijin right now with Vue 3 or Vite? I tried with both in a few different ways, but I had no success. If not, do you plan to support them on a near future?

Describe the solution you'd like Use Mijin with Vue 3.

Describe alternatives you've considered Use Mijin with Vue 2.

Additional context

Console error

image

lecoueyl commented 3 years ago

Hi there,

Thank you for your message. Currently, this library is only compatible with Vue 2.0. As Vue 3.0 is now available, I would like to focus on supporting it for the next feature.

It would be relatively simple to migrate (remove functional templates, use composition API, etc) but I can not provide a release date yet.

Meanwhile, the README can be updated to clarify that only Vue 2.0 is currently supported.

guastallaigor commented 3 years ago

Hello, thank you for your quick response.

If you know a way to support Vue 3 without dropping the Vue 2 support, let me know and I can help you with that.

lecoueyl commented 3 years ago

README has been updated to specify the currently supported version

Unfortunately, Vue 3 $listeners doesn't exist anymore (merged with $attrs). Form components like input or select rely on $listeners to operate and I could not find yet a way to make it work on both Vue 2 and 3.

If it can't be done, a solution is to create a next branch dedicated to supporting Vue 3 in parallel.

Regardless, most of the components work directly on Vue 2 and Vue 3 by dropping the functional component attribute.

wobsoriano commented 3 years ago

FYI there's https://github.com/vueuse/vue-demi.

You can support both vue 2 and 3 using that. Renderless components.

Example implementation https://github.com/wobsoriano/vue-winbox/

lecoueyl commented 3 years ago

@wobsoriano Thank you for your suggestion, along with an implementation example 👍 Using vue-demi will add a dependency to the project that I would like to avoid.