Skip to content
New issue

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

feat: 新增监听initialIndex值的变化,动态去改变currentSwiperIndex #3103

Closed

Conversation

dadtakesmefly
Copy link
Contributor

@dadtakesmefly dadtakesmefly commented Aug 28, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复

🔗 相关 Issue

#3102

💡 需求背景和解决方案

  1. ImageViewer组件预览时候,删除当前预览的图片,如果传递了 initial-index,删除多个图片时候,会出现 initial-index比图片列表的长度大的bug。
  2. 监听 initialIndex,动态去设置currentSwiperIndex。

📝 更新日志

  • fix(ImageViewer): 支持动态设置 initial-index 的值

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@jarmywang
Copy link
Collaborator

感谢建议,此pr需要用户主动去更新initialIndex,感觉不是很好,应该监听initialIndex,images的变化去设置currentSwiperIndex,参考 #3111,此pr就先关闭了,期待下次共建!

@jarmywang jarmywang closed this Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants