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: 较小的@form-item-margin-bottom时表单验证信息切换时表单项抖动 #21302

Merged
merged 2 commits into from
Feb 17, 2020

Conversation

yoyo837
Copy link
Contributor

@yoyo837 yoyo837 commented Feb 9, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

@form-item-margin-bottom = 20px 会造成 padding-top = -2px, 无效,此时应该改用margin-top

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@yoyo837 yoyo837 requested a review from zombieJ February 9, 2020 11:23
@ant-design-bot
Copy link
Contributor

ant-design-bot commented Feb 9, 2020

@yoyo837
Copy link
Contributor Author

yoyo837 commented Feb 9, 2020

image

image

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 9, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@zombieJ
Copy link
Member

zombieJ commented Feb 10, 2020

能给个 codesandbox 不?

@yoyo837
Copy link
Contributor Author

yoyo837 commented Feb 10, 2020

https://codesandbox.io/s/wk04r016q8 模版能修改变量吗?

@zombieJ
Copy link
Member

zombieJ commented Feb 10, 2020

import less 文件试试

@yoyo837
Copy link
Contributor Author

yoyo837 commented Feb 10, 2020

不能import less

@codecov
Copy link

codecov bot commented Feb 10, 2020

Codecov Report

Merging #21302 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #21302   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files         302      302           
  Lines        7017     7017           
  Branches     1935     1888   -47     
=======================================
  Hits         6865     6865           
  Misses        152      152

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 a875bfd...3626a04. Read the comment docs.

@zombieJ
Copy link
Member

zombieJ commented Feb 11, 2020

那截个 gif 吧,我好理解一下

@yoyo837
Copy link
Contributor Author

yoyo837 commented Feb 11, 2020

Feb-11-2020 18-01-45

@yoyo837
Copy link
Contributor Author

yoyo837 commented Feb 11, 2020

@zombieJ
Copy link
Member

zombieJ commented Feb 12, 2020

CI 挂了,rebase 一下

@yoyo837
Copy link
Contributor Author

yoyo837 commented Feb 12, 2020

还是 这个鬼。
image

@yoyo837
Copy link
Contributor Author

yoyo837 commented Feb 13, 2020

是我语法有问题么 🤔

@afc163
Copy link
Member

afc163 commented Feb 13, 2020

image

@yoyo837 yoyo837 requested a review from afc163 February 17, 2020 07:04
@zombieJ zombieJ merged commit e275895 into master Feb 17, 2020
@zombieJ zombieJ deleted the form-ext-distance branch February 17, 2020 11:36
@ycjcl868 ycjcl868 mentioned this pull request Feb 24, 2020
@x1mrdonut1x
Copy link
Contributor

@yoyo837 @zombieJ I found this issue while trying to solve a problem when setting
@form-item-margin-bottom: 0px

image
image

I feel like margin-top shouldn't be updated when the value is < 0?

@yoyo837
Copy link
Contributor Author

yoyo837 commented Apr 20, 2020

I will check it again later.

@yoyo837
Copy link
Contributor Author

yoyo837 commented Apr 21, 2020

@zombieJ 暂时没想到什么比较完美防止抖动的方法,因为@form-item-margin-bottom 按理说他可以修改为任何可大可小的值。先改为如果@form-item-margin-bottom=0则直接隐藏如何?

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.

5 participants