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

fix(ActionSheet): fix height calculation error #936

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

anlyyao
Copy link
Collaborator

@anlyyao anlyyao commented Jul 6, 2023

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

背景:二次拉起多页宫格工作面板示例时,高度丢失
原因:Swipe 组件在挂载时会获取内容高度,以此计算出轮播图容器高度。如果组件处于隐藏状态,则获取到的容器高度永远为 0,因此无法正确计算高度。
方案:(1) v-show 替换为 v-if ;(2)swiper 组件暴露 updateContainerHeight 方法, 外部调用组件的 updateContainerHeight 主动触发重绘。(3)借助 popup 的 destroyOnClose 属性,在关闭浮层时销毁弹窗,保证二次拉起时能触发重绘。 当前pr内容采用方案3。

📝 更新日志

  • fix(ActionSheet): 修复多页宫格工作面板高度计算错误

  • 本条 PR 不需要纳入 Changelog

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

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

完成

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Size Change: +12 B (0%)

Total Size: 387 kB

Filename Size Change
./dist/tdesign.js 204 kB +8 B (0%)
./dist/tdesign.min.js 118 kB +4 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/reset.css 672 B
./dist/tdesign.css 37.4 kB
./dist/tdesign.min.css 27.2 kB

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Size Change: +12 B (0%)

Total Size: 387 kB

Filename Size Change
./dist/tdesign.js 204 kB +8 B (0%)
./dist/tdesign.min.js 118 kB +4 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/reset.css 672 B
./dist/tdesign.css 37.4 kB
./dist/tdesign.min.css 27.2 kB

@LeeJim LeeJim merged commit c4a6d90 into develop Jul 11, 2023
8 checks passed
@LeeJim LeeJim deleted the fix/action-sheet/theme branch July 11, 2023 07:10
@github-actions github-actions bot mentioned this pull request Aug 16, 2023
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