Skip to content

Commit

Permalink
fix(comp:carousel): only two items and arrow is true, the switch appe…
Browse files Browse the repository at this point in the history
…ars blank
  • Loading branch information
liuzaijiang committed Dec 8, 2022
1 parent 6eeffb8 commit a1ae7da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function useStrategy(
runningIndex.value = to

sliderTrackElement.style.transition = `transform 0.5s ease`
const needToAdjust = length > 2 && index !== to
const needToAdjust = index !== to

if (needToAdjust) {
const stylePropertyName = mergedVertical.value ? 'top' : 'left'
Expand Down

0 comments on commit a1ae7da

Please sign in to comment.