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 (#1346)
  • Loading branch information
liuzaijiang committed Dec 9, 2022
1 parent 86c59f8 commit 6a5f46b
Showing 1 changed file with 1 addition and 1 deletion.
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 6a5f46b

Please sign in to comment.