-
Notifications
You must be signed in to change notification settings - Fork 507
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
Extra classNames to the visible slides #167
Extra classNames to the visible slides #167
Conversation
@@ -66,6 +66,12 @@ export default { | |||
}; | |||
}, | |||
mixins: [autoplay], | |||
// use `provide` to avoid `Slide` being nested with other components | |||
provide() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah this is cool, I've never seen it before. Could lead to some really good refactoring for v1.0.0
🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, this is new in 2.2.0+.
And I've noticed that in Navigation
and Pagination
, we're using
{
/**
* link on Carousel
*/
parentContainer: this.$parent
}
This is ok in vue-carousel, since these two components are directly nested in Carousel
. But when the DOM structure has been modified, it likely leads to some errors. So I highly recommend that we use provide/inject
to link to the Carousel
instance.
What do you think?😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think it's much better! Good fix, I'm just going to test the branch now and will merge later today
This looks great @stop2stare, I'll merge it in and release when I'm back in the office on Monday 🎉 I'll also roll up the build file for your last PR. Thanks a million! |
@quinnlangille my pleasure to contribute to open source project.😄 |
@quinnlangille resolved. |
This PR is related to #146.
Features:
VueCarousel-slide-active
for the visible slides.VueCarousel-slide-center
for the middle visible slide.VueCarousel-slide-center
is helpful when we want to build a gallery with vue-carousel. With some css, we can highlight the middle one.