fix(badge): fix badge number is rtl (#43998)

* fix(badge): fix badge number is rtl

* test: fix snapshots

* feat: use dir attribute instead of bdi

* test: update snapshots

* test: back of snapshot

---------

Co-authored-by: 二货机器人 <smith3816@gmail.com>
This commit is contained in:
猫猫 2023-08-14 19:14:46 +08:00 committed by GitHub
parent d1bd2d0605
commit e0e373f301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1353 additions and 1163 deletions

View File

@ -39,6 +39,7 @@ exports[`renders components/avatar/demo/badge.tsx extend context correctly 1`] =
data-show="true"
title="1"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -49,6 +50,7 @@ exports[`renders components/avatar/demo/badge.tsx extend context correctly 1`] =
1
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -531,6 +533,7 @@ Array [
data-show="true"
title="1"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -541,6 +544,7 @@ Array [
1
</span>
</span>
</bdi>
</sup>
</span>
</div>

View File

@ -39,6 +39,7 @@ exports[`renders components/avatar/demo/badge.tsx correctly 1`] = `
data-show="true"
title="1"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -49,6 +50,7 @@ exports[`renders components/avatar/demo/badge.tsx correctly 1`] = `
1
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -438,6 +440,7 @@ Array [
data-show="true"
title="1"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -448,6 +451,7 @@ Array [
1
</span>
</span>
</bdi>
</sup>
</span>
</div>

View File

@ -51,7 +51,9 @@ const ScrollNumber = React.forwardRef<HTMLElement, ScrollNumberProps>((props, re
if (count && Number(count) % 1 === 0) {
const numberList = String(count).split('');
numberNodes = numberList.map((num, i) => (
numberNodes = (
<bdi>
{numberList.map((num, i) => (
<SingleNumber
prefixCls={prefixCls}
count={Number(count)}
@ -59,7 +61,9 @@ const ScrollNumber = React.forwardRef<HTMLElement, ScrollNumberProps>((props, re
// eslint-disable-next-line react/no-array-index-key
key={numberList.length - i}
/>
));
))}
</bdi>
);
}
// allow specify the border

View File

@ -24,6 +24,7 @@ exports[`renders components/badge/demo/basic.tsx extend context correctly 1`] =
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -34,6 +35,7 @@ exports[`renders components/badge/demo/basic.tsx extend context correctly 1`] =
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -136,6 +138,7 @@ exports[`renders components/badge/demo/change.tsx extend context correctly 1`] =
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -146,6 +149,7 @@ exports[`renders components/badge/demo/change.tsx extend context correctly 1`] =
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -655,6 +659,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -675,6 +680,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -695,6 +701,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -715,6 +722,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -735,6 +743,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -755,6 +764,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -775,6 +785,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -795,6 +806,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -815,6 +827,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -835,6 +848,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -855,6 +869,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -875,6 +890,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -895,6 +911,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -915,6 +932,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -935,6 +953,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -955,6 +974,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -975,6 +995,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -995,6 +1016,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1015,6 +1037,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1035,6 +1058,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1055,6 +1079,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1075,6 +1100,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1095,6 +1121,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1115,6 +1142,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1135,6 +1163,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1155,6 +1184,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1469,6 +1499,7 @@ exports[`renders components/badge/demo/link.tsx extend context correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1479,6 +1510,7 @@ exports[`renders components/badge/demo/link.tsx extend context correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</a>
@ -1519,6 +1551,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1529,6 +1562,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1552,6 +1586,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1562,6 +1597,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1585,6 +1621,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1595,6 +1632,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1619,6 +1657,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
style="background: rgb(250, 84, 28);"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1629,6 +1668,7 @@ exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1894,6 +1934,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx extend context correctly 1
style="background: rgb(250, 173, 20);"
title="11"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1914,6 +1955,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx extend context correctly 1
1
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1929,6 +1971,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx extend context correctly 1
data-show="true"
title="25"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1949,6 +1992,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx extend context correctly 1
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2023,6 +2067,7 @@ exports[`renders components/badge/demo/offset.tsx extend context correctly 1`] =
style="margin-top: 10px; right: -10px;"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -2033,6 +2078,7 @@ exports[`renders components/badge/demo/offset.tsx extend context correctly 1`] =
5
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -2063,6 +2109,7 @@ exports[`renders components/badge/demo/overflow.tsx extend context correctly 1`]
data-show="true"
title="99"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -2083,6 +2130,7 @@ exports[`renders components/badge/demo/overflow.tsx extend context correctly 1`]
9
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2704,6 +2752,7 @@ exports[`renders components/badge/demo/size.tsx extend context correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -2714,6 +2763,7 @@ exports[`renders components/badge/demo/size.tsx extend context correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2736,6 +2786,7 @@ exports[`renders components/badge/demo/size.tsx extend context correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -2746,6 +2797,7 @@ exports[`renders components/badge/demo/size.tsx extend context correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2937,6 +2989,7 @@ exports[`renders components/badge/demo/title.tsx extend context correctly 1`] =
data-show="true"
title="Custom hover text"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -2947,6 +3000,7 @@ exports[`renders components/badge/demo/title.tsx extend context correctly 1`] =
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2969,6 +3023,7 @@ exports[`renders components/badge/demo/title.tsx extend context correctly 1`] =
data-show="true"
title="Negative"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -2989,6 +3044,7 @@ exports[`renders components/badge/demo/title.tsx extend context correctly 1`] =
5
</span>
</span>
</bdi>
</sup>
</span>
</div>

View File

@ -24,6 +24,7 @@ exports[`renders components/badge/demo/basic.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -34,6 +35,7 @@ exports[`renders components/badge/demo/basic.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -134,6 +136,7 @@ exports[`renders components/badge/demo/change.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -144,6 +147,7 @@ exports[`renders components/badge/demo/change.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -650,6 +654,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -670,6 +675,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -690,6 +696,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -710,6 +717,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -730,6 +738,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -750,6 +759,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -770,6 +780,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -790,6 +801,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -810,6 +822,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -830,6 +843,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -850,6 +864,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -870,6 +885,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -890,6 +906,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -910,6 +927,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -930,6 +948,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -950,6 +969,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -970,6 +990,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -990,6 +1011,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1010,6 +1032,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1030,6 +1053,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1050,6 +1074,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1070,6 +1095,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1090,6 +1116,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1110,6 +1137,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1130,6 +1158,7 @@ Array [
data-show="true"
title="44"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1150,6 +1179,7 @@ Array [
4
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1460,6 +1490,7 @@ exports[`renders components/badge/demo/link.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1470,6 +1501,7 @@ exports[`renders components/badge/demo/link.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</a>
@ -1508,6 +1540,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1518,6 +1551,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1541,6 +1575,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1551,6 +1586,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1574,6 +1610,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1584,6 +1621,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1608,6 +1646,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
style="background:#fa541c"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1618,6 +1657,7 @@ exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1881,6 +1921,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx correctly 1`] = `
style="background:#faad14"
title="11"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1901,6 +1942,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx correctly 1`] = `
1
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -1916,6 +1958,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx correctly 1`] = `
data-show="true"
title="25"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -1936,6 +1979,7 @@ exports[`renders components/badge/demo/no-wrapper.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2008,6 +2052,7 @@ exports[`renders components/badge/demo/offset.tsx correctly 1`] = `
style="margin-top:10px;right:-10px"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -2018,6 +2063,7 @@ exports[`renders components/badge/demo/offset.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -2046,6 +2092,7 @@ exports[`renders components/badge/demo/overflow.tsx correctly 1`] = `
data-show="true"
title="99"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -2066,6 +2113,7 @@ exports[`renders components/badge/demo/overflow.tsx correctly 1`] = `
9
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2681,6 +2729,7 @@ exports[`renders components/badge/demo/size.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -2691,6 +2740,7 @@ exports[`renders components/badge/demo/size.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2713,6 +2763,7 @@ exports[`renders components/badge/demo/size.tsx correctly 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -2723,6 +2774,7 @@ exports[`renders components/badge/demo/size.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2910,6 +2962,7 @@ exports[`renders components/badge/demo/title.tsx correctly 1`] = `
data-show="true"
title="Custom hover text"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -2920,6 +2973,7 @@ exports[`renders components/badge/demo/title.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -2942,6 +2996,7 @@ exports[`renders components/badge/demo/title.tsx correctly 1`] = `
data-show="true"
title="Negative"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -2962,6 +3017,7 @@ exports[`renders components/badge/demo/title.tsx correctly 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>

View File

@ -11,6 +11,7 @@ exports[`Badge render Badge status/color when contains children 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -21,6 +22,7 @@ exports[`Badge render Badge status/color when contains children 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -32,6 +34,7 @@ exports[`Badge render Badge status/color when contains children 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -42,6 +45,7 @@ exports[`Badge render Badge status/color when contains children 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -54,6 +58,7 @@ exports[`Badge render Badge status/color when contains children 1`] = `
style="background: rgb(0, 136, 204);"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -64,6 +69,7 @@ exports[`Badge render Badge status/color when contains children 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -79,6 +85,7 @@ exports[`Badge render correct with negative number 1`] = `
data-show="true"
title="-10"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -109,6 +116,7 @@ exports[`Badge render correct with negative number 1`] = `
0
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -119,6 +127,7 @@ exports[`Badge render correct with negative number 1`] = `
data-show="true"
title="-10"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -149,6 +158,7 @@ exports[`Badge render correct with negative number 1`] = `
0
</span>
</span>
</bdi>
</sup>
</span>
</div>
@ -176,6 +186,7 @@ exports[`Badge rtl render component should be rendered correctly in RTL directio
style="margin-top: 10px; left: 10px;"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -186,6 +197,7 @@ exports[`Badge rtl render component should be rendered correctly in RTL directio
5
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -200,6 +212,7 @@ exports[`Badge should be compatible with borderColor style 1`] = `
style="background-color: rgb(255, 255, 255); color: rgb(153, 153, 153); border-color: #d9d9d9; box-shadow: 0 0 0 1px #d9d9d9 inset;"
title="4"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -210,6 +223,7 @@ exports[`Badge should be compatible with borderColor style 1`] = `
4
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -274,6 +288,7 @@ exports[`Badge should render when count is changed 1`] = `
data-show="true"
title="10"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -354,6 +369,7 @@ exports[`Badge should render when count is changed 1`] = `
0
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -367,6 +383,7 @@ exports[`Badge should render when count is changed 2`] = `
data-show="true"
title="11"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -447,6 +464,7 @@ exports[`Badge should render when count is changed 2`] = `
1
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -460,6 +478,7 @@ exports[`Badge should render when count is changed 3`] = `
data-show="true"
title="11"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -481,6 +500,7 @@ exports[`Badge should render when count is changed 3`] = `
1
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -508,6 +528,7 @@ exports[`Badge should render when count is changed 5`] = `
data-show="true"
title="10"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -528,6 +549,7 @@ exports[`Badge should render when count is changed 5`] = `
0
</span>
</span>
</bdi>
</sup>
</span>
`;
@ -541,6 +563,7 @@ exports[`Badge should render when count is changed 6`] = `
data-show="true"
title="9"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transform: translateY(100%);"
@ -611,6 +634,7 @@ exports[`Badge should render when count is changed 6`] = `
9
</span>
</span>
</bdi>
</sup>
</span>
`;

View File

@ -133,6 +133,10 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
[`${componentCls}-multiple-words`]: {
padding: `0 ${token.paddingXS}px`,
bdi: {
unicodeBidi: 'plaintext',
},
},
[`${componentCls}-dot`]: {

View File

@ -901,6 +901,7 @@ exports[`ConfigProvider components Badge configProvider 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="config-scroll-number-only"
style="transition: none;"
@ -911,6 +912,7 @@ exports[`ConfigProvider components Badge configProvider 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -936,6 +938,7 @@ exports[`ConfigProvider components Badge configProvider componentDisabled 1`] =
data-show="true"
title="5"
>
<bdi>
<span
class="config-scroll-number-only"
style="transition: none;"
@ -946,6 +949,7 @@ exports[`ConfigProvider components Badge configProvider componentDisabled 1`] =
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -971,6 +975,7 @@ exports[`ConfigProvider components Badge configProvider componentSize large 1`]
data-show="true"
title="5"
>
<bdi>
<span
class="config-scroll-number-only"
style="transition: none;"
@ -981,6 +986,7 @@ exports[`ConfigProvider components Badge configProvider componentSize large 1`]
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -1006,6 +1012,7 @@ exports[`ConfigProvider components Badge configProvider componentSize middle 1`]
data-show="true"
title="5"
>
<bdi>
<span
class="config-scroll-number-only"
style="transition: none;"
@ -1016,6 +1023,7 @@ exports[`ConfigProvider components Badge configProvider componentSize middle 1`]
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -1041,6 +1049,7 @@ exports[`ConfigProvider components Badge configProvider componentSize small 1`]
data-show="true"
title="5"
>
<bdi>
<span
class="config-scroll-number-only"
style="transition: none;"
@ -1051,6 +1060,7 @@ exports[`ConfigProvider components Badge configProvider componentSize small 1`]
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -1076,6 +1086,7 @@ exports[`ConfigProvider components Badge normal 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -1086,6 +1097,7 @@ exports[`ConfigProvider components Badge normal 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -1111,6 +1123,7 @@ exports[`ConfigProvider components Badge prefixCls 1`] = `
data-show="true"
title="5"
>
<bdi>
<span
class="prefix-scroll-number-only"
style="transition: none;"
@ -1121,6 +1134,7 @@ exports[`ConfigProvider components Badge prefixCls 1`] = `
5
</span>
</span>
</bdi>
</sup>
</span>
<span

View File

@ -124,6 +124,7 @@ Array [
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -134,6 +135,7 @@ Array [
5
</span>
</span>
</bdi>
</sup>
</span>
<div
@ -201,6 +203,7 @@ Array [
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -211,6 +214,7 @@ Array [
5
</span>
</span>
</bdi>
</sup>
</span>
</button>
@ -264,6 +268,7 @@ Array [
data-show="true"
title="12"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -284,6 +289,7 @@ Array [
2
</span>
</span>
</bdi>
</sup>
</span>
</button>
@ -330,6 +336,7 @@ Array [
data-show="true"
title="123"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -360,6 +367,7 @@ Array [
3
</span>
</span>
</bdi>
</sup>
</span>
</button>

View File

@ -122,6 +122,7 @@ Array [
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -132,6 +133,7 @@ Array [
5
</span>
</span>
</bdi>
</sup>
</span>
</button>
@ -178,6 +180,7 @@ Array [
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -188,6 +191,7 @@ Array [
5
</span>
</span>
</bdi>
</sup>
</span>
</button>
@ -241,6 +245,7 @@ Array [
data-show="true"
title="12"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -261,6 +266,7 @@ Array [
2
</span>
</span>
</bdi>
</sup>
</span>
</button>
@ -307,6 +313,7 @@ Array [
data-show="true"
title="123"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -337,6 +344,7 @@ Array [
3
</span>
</span>
</bdi>
</sup>
</span>
</button>

View File

@ -31,6 +31,7 @@ exports[`renders components/radio/demo/badge.tsx extend context correctly 1`] =
data-show="true"
title="1"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -41,6 +42,7 @@ exports[`renders components/radio/demo/badge.tsx extend context correctly 1`] =
1
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -70,6 +72,7 @@ exports[`renders components/radio/demo/badge.tsx extend context correctly 1`] =
data-show="true"
title="2"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
@ -80,6 +83,7 @@ exports[`renders components/radio/demo/badge.tsx extend context correctly 1`] =
2
</span>
</span>
</bdi>
</sup>
</span>
</div>

View File

@ -31,6 +31,7 @@ exports[`renders components/radio/demo/badge.tsx correctly 1`] = `
data-show="true"
title="1"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -41,6 +42,7 @@ exports[`renders components/radio/demo/badge.tsx correctly 1`] = `
1
</span>
</span>
</bdi>
</sup>
</span>
<span
@ -70,6 +72,7 @@ exports[`renders components/radio/demo/badge.tsx correctly 1`] = `
data-show="true"
title="2"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition:none"
@ -80,6 +83,7 @@ exports[`renders components/radio/demo/badge.tsx correctly 1`] = `
2
</span>
</span>
</bdi>
</sup>
</span>
</div>