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

Dialog margin no footer #3809

Merged
merged 9 commits into from
Mar 21, 2022

Conversation

guoyunhe
Copy link
Contributor

Fix #3799

@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #3809 (d365960) into master (dd7d557) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3809      +/-   ##
==========================================
- Coverage   90.59%   90.56%   -0.03%     
==========================================
  Files         303      303              
  Lines       17819    17835      +16     
  Branches     5369     5375       +6     
==========================================
+ Hits        16143    16153      +10     
- Misses       1657     1662       +5     
- Partials       19       20       +1     
Impacted Files Coverage Δ
src/dialog/inner.jsx 73.68% <100.00%> (ø)
src/table/list.jsx 68.29% <0.00%> (-1.71%) ⬇️
src/select/base.jsx 83.48% <0.00%> (-0.78%) ⬇️
src/upload/card.jsx 86.66% <0.00%> (-0.52%) ⬇️
src/table/selection.jsx 81.87% <0.00%> (-0.41%) ⬇️
src/select/select.jsx 92.40% <0.00%> (-0.19%) ⬇️
src/dialog/dialog.jsx 93.20% <0.00%> (ø)
src/table/tree.jsx 80.24% <0.00%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51f0208...d365960. Read the comment docs.

@bindoon
Copy link
Member

bindoon commented Mar 17, 2022

docs/dialog/theme/index.jsx 里面增加一个 footer 显示隐藏控制项,默认为显示
image

}

&-body-no-footer {
margin-bottom: $dialog-content-margin-bottom-no-footer;
Copy link
Member

Choose a reason for hiding this comment

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

这个样式感觉可以删掉,下面 {$dialog-prefix}-header + #{$dialog-prefix}-body-no-footer 才展示 margin-bottom

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这样就只支持 v2 了,旧弹窗不支持了

Copy link
Member

Choose a reason for hiding this comment

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

  1. 这一行是重复样式,没有 footer 的时候会在 body 上设置 margin-bottom。

  2. 下面是有 header + no-footer {} 是有 header 的时候才设置 margin-bottom。

如果你一直想加上留1,如果只有header存在的时候才加留2。我建议是留2删1

@@ -6,6 +6,8 @@
@include box-sizing;
position: fixed;
z-index: 1001;
display: flex;
flex-direction: column;
Copy link
Member

Choose a reason for hiding this comment

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

在body 上面用了 margin 就不需要 flex 布局了吧,感觉可以去掉这两行

@@ -28,6 +30,11 @@
font-size: $dialog-content-font-size;
line-height: $font-lineheight-2;
color: $dialog-content-color;
flex: 1 1 auto;
Copy link
Member

Choose a reason for hiding this comment

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

同上

@bindoon bindoon merged commit 6ddace0 into alibaba-fusion:master Mar 21, 2022
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.

[Dialog]支持配置有 Footer 和无 Footer 时,Body 的 padding-bottom 不同
2 participants