IDuxFE / idux

🚀 A UI Component Library for Vue3.x
https://idux.site
MIT License
545 stars 141 forks source link

fix(comp:carousel): pre and next arrow should hide when item count is 0 #1871

Closed sallerli1 closed 7 months ago

sallerli1 commented 7 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

What is the current behavior?

Carousel的item 数量只有一个的时候,next,pre,goto的跳转调用,会触发切换动画,但实际上没有可切换的内容

What is the new behavior?

  1. 当item数量只有一个的时候,切换的调用不应该执行
  2. 当item数量只有一个的时候,切换的箭头按钮不应该显示

Other information

idux-bot[bot] commented 7 months ago

This preview will be available after the AzureCI is passed.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.79%. Comparing base (49eb4ea) to head (2643b12).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1871 +/- ## ======================================= Coverage 90.79% 90.79% ======================================= Files 359 359 Lines 35225 35225 Branches 2805 2805 ======================================= Hits 31981 31981 Misses 3244 3244 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.