We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://codesandbox.io/p/sandbox/swiper-vue-default-forked-xf0jp2?file=%2Fsrc%2FApp.vue
When using a Swiper inside a component, and the slots are passed from the parent component to the Swiper, they're not printed in the right slot.
slot
Slots, used like that, inside a component:
<template v-slot:container-start><slot name="outer-container-start"></slot></template> <template v-slot:container-end><slot name="outer-container-end"></slot></template> <template v-slot:wrapper-start><slot name="outer-wrapper-start"></slot></template> <template v-slot:wrapper-end><slot name="outer-wrapper-end"></slot></template>
should render in the right slot.
All slots passed from a parent component, are rendered in container-end, as per vue/get-children.js file:
container-end
vue/get-children.js
... if (slotName === 'default') slotName = 'container-end'; if (isFragment && vnode.children) { getSlidesFromElements(vnode.children, 'default'); } ...
Simply change
getSlidesFromElements(vnode.children, 'default');
to
getSlidesFromElements(vnode.children, slotName);
fixes the problem.
9.2.0 (and also lower)
All
The text was updated successfully, but these errors were encountered:
642b455
No branches or pull requests
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/swiper-vue-default-forked-xf0jp2?file=%2Fsrc%2FApp.vue
Bug description
When using a Swiper inside a component, and the
slot
s are passed from the parent component to the Swiper, they're not printed in the rightslot
.Expected Behavior
Slots, used like that, inside a component:
should render in the right
slot
.Actual Behavior
All
slot
s passed from a parent component, are rendered incontainer-end
, as pervue/get-children.js
file:Simply change
to
fixes the problem.
Swiper version
9.2.0 (and also lower)
Platform/Target and Browser Versions
All
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: