Skip to content

fix(modal): improve modal's size #452

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

Merged
merged 4 commits into from
Sep 3, 2024
Merged

Conversation

mortalYoung
Copy link
Collaborator

@mortalYoung mortalYoung commented Mar 7, 2024

简介

  • 优化当前 Modal 的默认 size 的宽度
  • 修复 Modal 最大滚动高度为 600px 的问题

Changes

由于项目内部引用了 theme,会去修改 font-base-size,导致 Modal 的 header 和 footer 的高度并不是正常高度,所以这里没办法通过写死高度来计算 body 的高度。目前通过 Flex 的自适应来达到限制最大高度 600px 的需求。

image

预览地址
Previewer

@mortalYoung mortalYoung requested review from mumiao and liuxy0551 March 7, 2024 06:24
Copy link
Collaborator

@LuckyFBB LuckyFBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@liuxy0551
Copy link
Collaborator

+1

@mortalYoung mortalYoung changed the title fix(modal): improve modal's size WIP: fix(modal): improve modal's size Mar 7, 2024
@mortalYoung mortalYoung requested a review from LuckyFBB March 7, 2024 08:18
@mortalYoung mortalYoung changed the title WIP: fix(modal): improve modal's size fix(modal): improve modal's size Mar 7, 2024
@mortalYoung
Copy link
Collaborator Author

目前修复最大高度用 Flex 来自适应来做,感觉不太保险。但是暂时没考虑到更好的方法。
目前想到的方案是

  1. 用 Flex 的自适应来实现
  2. 在 Modal 中修改 header 和 footer 的 font-size 属性,然后可以通过写死高度来计算。

各位觉得用哪种方式更好?

@liuxy0551
Copy link
Collaborator

目前修复最大高度用 Flex 来自适应来做,感觉不太保险。但是暂时没考虑到更好的方法。 目前想到的方案是

  1. 用 Flex 的自适应来实现
  2. 在 Modal 中修改 header 和 footer 的 font-size 属性,然后可以通过写死高度来计算。

各位觉得用哪种方式更好?

title 的内容会不会多到需要换行,写死高度这时候就有点不合适了吧

@mumiao
Copy link
Collaborator

mumiao commented Mar 7, 2024

目前修复最大高度用 Flex 来自适应来做,感觉不太保险。但是暂时没考虑到更好的方法。 目前想到的方案是

  1. 用 Flex 的自适应来实现
  2. 在 Modal 中修改 header 和 footer 的 font-size 属性,然后可以通过写死高度来计算。

各位觉得用哪种方式更好?

first

@LuckyFBB
Copy link
Collaborator

LuckyFBB commented Sep 3, 2024

+1

@LuckyFBB LuckyFBB merged commit 0b3c9c0 into DTStack:master Sep 3, 2024
1 check passed
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.

4 participants