Skip to content

Commit

Permalink
fix(swiper): dynamic rendering error (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Sep 1, 2022
1 parent f90481f commit c0fc6a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swiper/swiper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ export default defineComponent({
});
if (props.animation === 'slide' && items.length > 1) {
const first = cloneVNode(items[0], {
key: 'swiper-item-append',
key: `swiper-item-append-${0}`,
});
const last = cloneVNode(items[items.length - 1], {
key: 'swiper-item-prepend',
key: `swiper-item-prepend-${items.length - 1}`,
});
items.unshift(last);
items.push(first);
Expand Down

0 comments on commit c0fc6a4

Please sign in to comment.