mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
fix: Button two Chinese chars (#45126)
This commit is contained in:
parent
05cc5f1254
commit
9f55e6c11a
@ -158,6 +158,20 @@ exports[`renders components/button/demo/chinese-chars-loading.tsx extend context
|
|||||||
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small"
|
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small"
|
||||||
style="flex-wrap: wrap;"
|
style="flex-wrap: wrap;"
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-default ant-btn-two-chinese-chars"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
<span>
|
||||||
|
部署
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="ant-space-item"
|
class="ant-space-item"
|
||||||
>
|
>
|
||||||
|
@ -154,6 +154,20 @@ exports[`renders components/button/demo/chinese-chars-loading.tsx correctly 1`]
|
|||||||
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small"
|
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small"
|
||||||
style="flex-wrap:wrap"
|
style="flex-wrap:wrap"
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-default"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
<span>
|
||||||
|
部署
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="ant-space-item"
|
class="ant-space-item"
|
||||||
>
|
>
|
||||||
|
@ -9,6 +9,11 @@ const Text3 = () => 'Submit';
|
|||||||
|
|
||||||
const App: React.FC = () => (
|
const App: React.FC = () => (
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
|
<Button>
|
||||||
|
<span>
|
||||||
|
<span>部署</span>
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
<Button loading>部署</Button>
|
<Button loading>部署</Button>
|
||||||
<Button loading>
|
<Button loading>
|
||||||
<Text1 />
|
<Text1 />
|
||||||
|
@ -195,6 +195,15 @@ const genSharedButtonStyle: GenerateStyle<ButtonToken, CSSObject> = (token): CSS
|
|||||||
...genFocusStyle(token),
|
...genFocusStyle(token),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
[`&${componentCls}-two-chinese-chars::first-letter`]: {
|
||||||
|
letterSpacing: '0.34em',
|
||||||
|
},
|
||||||
|
|
||||||
|
[`&${componentCls}-two-chinese-chars > *:not(${iconCls})`]: {
|
||||||
|
marginInlineEnd: '-0.34em',
|
||||||
|
letterSpacing: '0.34em',
|
||||||
|
},
|
||||||
|
|
||||||
// make `btn-icon-only` not too narrow
|
// make `btn-icon-only` not too narrow
|
||||||
[`&-icon-only${componentCls}-compact-item`]: {
|
[`&-icon-only${componentCls}-compact-item`]: {
|
||||||
flex: 'none',
|
flex: 'none',
|
||||||
|
Loading…
Reference in New Issue
Block a user