fix(swipe-cell): 修复t-swipe-cell 在 t-popup 中无法左右滑动 #1141
Merged
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 #1055
💡 需求背景和解决方案
t-swipe-cell
在t-popup
中无法左右滑动,经过检查,是因为t-swipe-cell
在onMounted
时获取内容宽度,而t-popup
中使用display: none;
对元素进行隐藏,在元素隐藏时无法获取到内容的宽度,导致后续设置移动距离为0,经过尝试,修改t-popup
为visibility:hidden
进行隐藏,但这样通过修改其他组件达到的效果不足以覆盖所有类似场景,于是在t-swipe-cell
中的onSwipeStart
方法开始时重新获取宽度。📝 更新日志
fix(SwipeCell): 修复组件在
Popup
中无法左右滑动本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单