docs: faq on components vertial alignment (#25544)

This commit is contained in:
07akioni 2020-07-09 17:33:27 +08:00 committed by GitHub
parent e5e44d2aae
commit a50dd21868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,10 @@ antd use shallow compare of props to optimize performance. You should always pas
Try `defaultValue` or `onChange` to change `value`, and please read [React's documentation](https://facebook.github.io/react/docs/forms.html#controlled-components).
### Components are not vertically aligned when placed in single row.
Try [Space](https://ant.design/components/space/) component to make them aligned.
### antd overrides my global styles
Yes, antd is designed to develop a complete background application, we override some global styles for styling convenience, and it can't be removed now. More info at https://github.com/ant-design/ant-design/issues/4331 .

View File

@ -53,6 +53,10 @@ antd 内部会对 props 进行浅比较实现性能优化。当状态变更,
尝试使用 `defaultValue``onChange` 来改变 `value`,请参考 [React 的文档](https://reactjs.org/docs/forms.html#controlled-components)。
### 多个组件放一排时没有垂直对齐怎么办?
尝试使用 [Space](https://ant.design/components/space-cn/) 组件来使他们对齐。
### antd 覆盖了我的全局样式!
是的antd 在设计的时候就是用来开发一个完整的应用的,为了方便,我们覆盖了一些全局样式,现在还不能移除,想要了解更多请追踪这个 issuehttps://github.com/ant-design/ant-design/issues/4331 ,或者参考这个教程 [How to avoid modifying global styles?](docs/react/customize-theme#How-to-avoid-modifying-global-styles-?)