Closed
Conversation
Author
|
之前列位置只能通过className去自己实现。 那么我的想法是通过参数配置,align。。align加了之后,方式有两种: 1、自己实现class 这里为了偷懒,感觉style更方便一些 |
Member
|
这个算是 feature 了,麻烦提交到 branch 然后需要更新 API 文档并修复CI,谢谢。 |
benjycui
reviewed
Apr 25, 2017
| const cell = { | ||
| key: column.key, | ||
| className: column.className || '', | ||
| style: styleProp, |
Member
Author
There was a problem hiding this comment.
api好像没有提供,不过我觉得如果开放这个api,直接在配置里面这样写:
column: [{
styleProp: {textAlign: "center"}
}]
也是可以的,但感觉有些麻烦。。
不过开放这个API之后,我上面的写法确实会有问题,所以要么是通过叠加class,即内部规定三个class,让其定位位置吧?
|
的确加className就行 |
Member
|
除非没有其他的解决方案,不然不认可特定场景专用的 API。 这种场景可以用 columns[n].className 解决,所以就不新增这个 feature 了。 |
Member
|
I think it is useful, className is advanced usage, espacially for non front-end developer. |
afc163
reviewed
Oct 9, 2017
| rows.push([]); | ||
| } | ||
| } | ||
| const styleProp = column.align ? { textAlign: column.align } : null; |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ant-design/ant-design#2465