Repository: ant-design/ant-design-mobile
Pull request #6219 (2023-06-26 08:41:15)

doc: update TabBar name

github-actions[bot]: PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6219.surge.sh
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/ant-design/ant-design-mobile/pull/6219?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design) Report
Patch and project coverage have no change.
> Comparison is base [(`234c083`)](https://app.codecov.io/gh/ant-design/ant-design-mobile/commit/234c083bb4dcea9be1f606af953a0250c75a3401?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design) 90.75% compared to head [(`350d735`)](https://app.codecov.io/gh/ant-design/ant-design-mobile/pull/6219?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design) 90.75%.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master    #6219   +/-   ##
=======================================
  Coverage   90.75%   90.75%           
=======================================
  Files         304      304           
  Lines        6597     6597           
  Branches     1644     1644           
=======================================
  Hits         5987     5987           
  Misses        562      562           
  Partials       48       48           
```




</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/ant-design/ant-design-mobile/pull/6219?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design).   
:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design).


Patch:
diff --git a/src/components/input/input.tsx b/src/components/input/input.tsx
index 9d2a9a315..0ab19f3d0 100644
--- a/src/components/input/input.tsx
+++ b/src/components/input/input.tsx
@@ -121,9 +121,13 @@ export const Input = forwardRef<InputRef, InputProps>((p, ref) => {
   function checkValue() {
     let nextValue = value
     if (props.type === 'number') {
-      nextValue =
+      const boundValue =
         nextValue &&
         bound(parseFloat(nextValue), props.min, props.max).toString()
+      // fix the display issue of numbers starting with 0
+      if (Number(nextValue) !== Number(boundValue)) {
+        nextValue = boundValue
+      }
     }
     if (nextValue !== value) {
       setValue(nextValue)
diff --git a/src/components/tab-bar/index.en.md b/src/components/tab-bar/index.en.md
index 7c4fff5d4..22990e7dc 100644
--- a/src/components/tab-bar/index.en.md
+++ b/src/components/tab-bar/index.en.md
@@ -19,7 +19,7 @@ Useful for switching between different pages.
 | Name | Description | Type | Default |
 | --- | --- | --- | --- |
 | activeKey | `key` of currently active `item` | `string \| null` | - |
-| defaultActiveKey | The initialized `key` of the selected `item`, if the `activeKey` is not set | `string \| null` | `key` of the 1st `Tab` |
+| defaultActiveKey | The initialized `key` of the selected `item`, if the `activeKey` is not set | `string \| null` | `key` of the first `TabBar.Item` |
 | onChange | Callback when switching panel | `(key: string) => void` | - |
 | safeArea | Whether to enable safe area padding | `boolean` | `false` |
 
diff --git a/src/components/tab-bar/index.zh.md b/src/components/tab-bar/index.zh.md
index 90112ec71..54032233b 100644
--- a/src/components/tab-bar/index.zh.md
+++ b/src/components/tab-bar/index.zh.md
@@ -19,7 +19,7 @@
 | 属性 | 说明 | 类型 | 默认值 |
 | --- | --- | --- | --- |
 | activeKey | 当前激活 `item` 的 `key` | `string \| null` | - |
-| defaultActiveKey | 初始化选中 `item` 的 `key`，如果没有设置 `activeKey` | `string \| null` | 第一个 `Tab` 的 `key` |
+| defaultActiveKey | 初始化选中 `item` 的 `key`，如果没有设置 `activeKey` | `string \| null` | 第一个 `TabBar.Item` 的 `key` |
 | onChange | 切换面板的回调 | `(key: string) => void` | - |
 | safeArea | 是否开启安全区适配 | `boolean` | `false` |
 


Test patch:
diff --git a/src/components/input/tests/input.test.tsx b/src/components/input/tests/input.test.tsx
index c6373bee4..46fee2229 100644
--- a/src/components/input/tests/input.test.tsx
+++ b/src/components/input/tests/input.test.tsx
@@ -190,4 +190,22 @@ describe('Input', () => {
     })
     expect(ref.current?.nativeElement?.value).toBe('')
   })
+
+  test('numbers that start with 0 should be work', () => {
+    const ref = createRef<InputRef>()
+    render(<Input type='number' ref={ref} />)
+    const input = document.querySelector('input')!
+    fireEvent.change(input, {
+      target: { value: '012' },
+    })
+    // input.blur()
+    act(() => {
+      input.focus()
+    })
+    act(() => {
+      input.blur()
+    })
+
+    expect(input.value).toBe('012')
+  })
 })