-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(picker): fix custom height problem #1576
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deleted unexpected reset of itemHeight in initScrollParams(), changed the positioning of the indicator to a dynamic value based on --td-picker-item-height; Added a demo of using custom height fix Tencent#1207
/update-common |
@jby0107 初始化位置定位不准,滚动时激活索引计算错误。 辛苦有空在继续跟进看看~ ![]() ![]() |
/update-common |
/update-snapshot |
⏳ 正在运行快照更新。。。 CI: Open |
/update-common |
anlyyao
approved these changes
Sep 13, 2024
Merged
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤔 这个 PR 的性质是?
🔗 相关 Issue
fix #1207
💡 需求背景和解决方案
调整--td-picker-item-height后picker滚动参数不正确。发现是初始化滚动参数将itemHeight重置为了默认高度40。另外inidicator的位置写死为80px,应该为2 * --td-picker-item-height。
另外,t-popup使用v-show,在初始化滚动参数时query获取不到元素高度,自定义高度需要加一个v-if:
针对这种情况添加了demo
📝 更新日志
fix(Picker): 修复自定义高度时滚动参数异常
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单