Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Vue.js 3 #32

Open
robertsulkowskiclicktrans opened this issue Feb 1, 2023 · 4 comments · May be fixed by #40
Open

Support Vue.js 3 #32

robertsulkowskiclicktrans opened this issue Feb 1, 2023 · 4 comments · May be fixed by #40
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@robertsulkowskiclicktrans

Hi,
thank you for your great plugin. However we're approaching the point where the vue 2 have to be replaced with vue 3. Is there any chance for vue 3 support?

Best,
Robert

@kytta
Copy link
Owner

kytta commented Feb 1, 2023

Hi Robert,

thank you for your support!

we're approaching the point where the vue 2 have to be replaced with vue 3. Is there any chance for vue 3 support?

For now this is not planned, as I am currently really busy pursuing my college degree. I have also not yet had a chance to try Vue 3. I thought that Vue 2 components can work in Vue 3; at least I remember reading this in the Migration guide. Is that not the case? If not, I'll try to find some time to read into the documentation and migrate the plugin 👌🏻

@kytta kytta changed the title vue 3 support Support Vue.js 3 Feb 1, 2023
@kytta kytta added this to the v2 milestone Feb 2, 2023
@kytta kytta self-assigned this Feb 2, 2023
@kytta kytta added the enhancement New feature or request label Feb 2, 2023
@kytta kytta linked a pull request Feb 2, 2023 that will close this issue
@robertsulkowskiclicktrans
Copy link
Author

I never really tested the package with vue 3, just the dependencies from your package.json tell me it is not going to work :)

"vue": "^2",

Thanks for including it to your roadmap. We'll take a look at new version when it comes. Good luck with your college degree :)

@kytta
Copy link
Owner

kytta commented Feb 3, 2023

I never really tested the package with vue 3, just the dependencies from your package.json tell me it is not going to work :)

"vue": "^2",

Well yeah, you're right :D

I have looked at it and have been doing the upgrade over in #40. It seems like the only thing I needed to change was the v-model. I have taken this as an opportunity to completely update the project, though.

The release is tagged but not published yet; I hope to publish an alpha version this evening so that maybe you coul already test it :)

@kytta
Copy link
Owner

kytta commented Feb 4, 2023

@robertsulkowskiclicktrans okay, I've published an alpha to NPM: https://www.npmjs.com/package/vue-tinybox/v/2.0.0-alpha.3

Use npm i vue-tinybox@next to install it. There are some changes you'll need to make:

  1. Update the v-model to specify the index:

    <Tinybox
    -  v-model="currentIndex"
    +  v-model:index="currentIndex"
      :images="images"
    />
  2. Import the CSS, too:

    import "vue-tinybox/css";
  3. If you use it directly in browser, the URL has changed. Consult the new README.

If you have the time, I'd be happy for you to try this out and tell me if it works. I hope to finish the migration in the coming weeks, but the currently published alpha should be stable IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants