-
-
Notifications
You must be signed in to change notification settings - Fork 49.2k
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
style: Optimize select other sizes placeholder text centered #20884
Conversation
文字过长时 要 怎么处理,我不太能确定,问问大家的意见? |
你是说这个 #20883? |
Deploy preview for ant-design ready! Built with commit 91f97bb |
样式不用动,这个已经在这里 #20883 解决了。 |
😂😂😂 解决了啊。。。。刚看到 |
但是 好像 居中问题 好像没修复吧 |
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. Latest deployment of this branch, based on commit 91f97bb:
|
可以继续来 patch~ |
Codecov Report
@@ Coverage Diff @@
## master #20884 +/- ##
=======================================
Coverage 97.47% 97.47%
=======================================
Files 296 296
Lines 6899 6899
Branches 1868 1915 +47
=======================================
Hits 6725 6725
Misses 174 174 Continue to review full report at Codecov.
|
我这个 主要是解决 居中的问题 过长的 我不能确定,所以没动 |
height: @select-selection-height + @select-multiple-padding + @select-multiple-padding * 2 + | ||
@border-width-base; | ||
line-height: @select-selection-height + @select-multiple-padding + @select-multiple-padding * | ||
2 + @border-width-base; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里看看能不能直接 transform 来居中?否则不同 size 算法都不太一样。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,我改改
@zombieJ 大佬,改好了,你看一下 |
代码有冲突要解决一下 |
rebase 了一下,你看下还有冲突吗? |
Preview deploy to https://preview-20884-ant-design.surge.sh |
components/select/index.zh-CN.md
Outdated
@@ -42,7 +42,7 @@ title: Select | |||
| maxTagCount | 最多显示多少个 tag | number | - | | | |||
| maxTagTextLength | 最大显示的 tag 文本长度 | number | - | | | |||
| maxTagPlaceholder | 隐藏 tag 时显示的内容 | ReactNode/function(omittedValues) | - | | | |||
| mode | 设置 Select 的模式为多选或标签 | 'multiple' \| 'tags' | - | | | |||
| mode | 设置 Select 的模式为多选或标签 | string: `multiple` `tags` | - | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple
| tags
,竖线保留一下。不用写 string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只要 '
改成 `
就行了
Preview deployed to https://preview-20884-ant-design.surge.sh |
🤔 This is a ...
🔗 Related issue link
none
💡 Background and solution
ant-select-selection-placeholder
的position: absolute;
这里修改为 加上了 2个padding
和border
mode
的描述,在类型中写了直接的属性值,参照 Menu 组件中 关于mode
的定义,修改了一下📝 Changelog
large
small
模式下,placeholder
的文字居中☑️ Self Check before Merge
View rendered components/select/index.en-US.md
View rendered components/select/index.zh-CN.md