Repository: ant-design/ant-design-mobile (ts)

Issue:
Dropdown.Item组件click事件未触发
### Version of antd-mobile

any

### Operating system and its version

Others

### Browser and its version

any

### Sandbox to reproduce

https://codesandbox.io/p/sandbox/funny-black-kl36y5?file=%2Fsrc%2FApp.tsx%3A11%2C39

### What happened?

#### 问题
Dropdown.Item 组件 click事件在点击相应 item 的 title 后未触发

#### 期望
Dropdown.Item 的 click 事件正确触发

### Relevant log output

_No response_

Pull request:
fix(Dropdown.Item): trigger the click event of "Dropdown. Item"  (#6480)
fix #6480

Patch:
diff --git a/commitlint.config.js b/commitlint.config.js
index 97c5fb37f..d482cec92 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -11,7 +11,7 @@ module.exports = {
         'enhance',
         'chore',
         'test',
-        'doc',
+        'docs',
         'refactor',
         'style',
         'revert',
diff --git a/src/components/dropdown/dropdown.tsx b/src/components/dropdown/dropdown.tsx
index ad31f4f12..993ba2270 100644
--- a/src/components/dropdown/dropdown.tsx
+++ b/src/components/dropdown/dropdown.tsx
@@ -89,8 +89,9 @@ const Dropdown = forwardRef<DropdownRef, PropsWithChildren<DropdownProps>>(
       if (isValidElement<ComponentProps<typeof Item>>(child)) {
         const childProps = {
           ...child.props,
-          onClick: () => {
+          onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
             changeActive(child.key as string)
+            child.props.onClick?.(event)
           },
           active: child.key === value,
           arrow:
diff --git a/src/components/dropdown/index.en.md b/src/components/dropdown/index.en.md
index 28f817a3d..915555728 100644
--- a/src/components/dropdown/index.en.md
+++ b/src/components/dropdown/index.en.md
@@ -42,3 +42,4 @@ It is suitable for filtering, sorting and changing the display range or order of
 | highlight | Highlight | `boolean` | `false` |
 | key | The unique value | `string` | - |
 | title | Title | `ReactNode` | - |
+| onClick | The click event | `(event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void` | - |
diff --git a/src/components/dropdown/index.zh.md b/src/components/dropdown/index.zh.md
index 6558b1b36..8aba614b9 100644
--- a/src/components/dropdown/index.zh.md
+++ b/src/components/dropdown/index.zh.md
@@ -34,11 +34,12 @@
 
 ### 属性
 
-| 属性           | 说明                        | 类型              | 默认值  |
-| -------------- | --------------------------- | ----------------- | ------- |
-| arrow          | 自定义 arrow                | `React.ReactNode` | -       |
-| destroyOnClose | 不可见时是否销毁 `DOM` 结构 | `boolean`         | `false` |
-| forceRender    | 被隐藏时是否渲染 `DOM` 结构 | `boolean`         | `false` |
-| highlight      | 高亮                        | `boolean`         | `false` |
-| key            | 唯一值                      | `string`          | -       |
-| title          | 标题                        | `ReactNode`       | -       |
+| 属性 | 说明 | 类型 | 默认值 |
+| --- | --- | --- | --- |
+| arrow | 自定义 arrow | `React.ReactNode` | - |
+| destroyOnClose | 不可见时是否销毁 `DOM` 结构 | `boolean` | `false` |
+| forceRender | 被隐藏时是否渲染 `DOM` 结构 | `boolean` | `false` |
+| highlight | 高亮 | `boolean` | `false` |
+| key | 唯一值 | `string` | - |
+| title | 标题 | `ReactNode` | - |
+| onClick | 点击事件 | `(event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void` | - |
diff --git a/src/components/number-keyboard/index.en.md b/src/components/number-keyboard/index.en.md
index b778566a9..aacb49ac4 100644
--- a/src/components/number-keyboard/index.en.md
+++ b/src/components/number-keyboard/index.en.md
@@ -12,6 +12,8 @@ If possible, we recommend using the native keyboard provided by the system or cl
 
 ## Demos
 
+tips: It is recommended to open the demo on the mobile side for better preview effect, because the touch event used by the component cannot be seen on the web side.
+
 <code src="./demos/demo1.tsx"></code>
 
 <code src="./demos/demo2.tsx"></code>
diff --git a/src/components/number-keyboard/index.zh.md b/src/components/number-keyboard/index.zh.md
index 71464df5b..f59a9ffe2 100644
--- a/src/components/number-keyboard/index.zh.md
+++ b/src/components/number-keyboard/index.zh.md
@@ -12,6 +12,8 @@
 
 ## 示例
 
+tips: 建议在移动端打开 demo 预览效果更佳，因为组件使用的 touch 事件在 web 端看不到效果
+
 <code src="./demos/demo1.tsx"></code>
 
 <code src="./demos/demo2.tsx"></code>


Test patch:
diff --git a/src/components/dropdown/tests/dropdown.test.tsx b/src/components/dropdown/tests/dropdown.test.tsx
index e207f4945..852afc14a 100644
--- a/src/components/dropdown/tests/dropdown.test.tsx
+++ b/src/components/dropdown/tests/dropdown.test.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useState } from 'react'
 import { fireEvent, render, screen, waitFor } from 'testing'
 import Dropdown from '..'
 
@@ -83,4 +83,28 @@ describe('Dropdown', () => {
     )
     expect(screen.getByText('content')).toBeInTheDocument()
   })
+
+  test('trigger the click of Dropdown.Item ', () => {
+    const ClickTest = () => {
+      const [count, setCount] = useState(0)
+      return (
+        <Dropdown>
+          <Dropdown.Item
+            onClick={() => setCount(count + 1)}
+            title='sorter'
+            key='sorter'
+          >
+            click{count}
+          </Dropdown.Item>
+        </Dropdown>
+      )
+    }
+
+    render(<ClickTest />)
+
+    fireEvent.click(screen.getByText('sorter'))
+    expect(screen.getByText('click1'))
+    fireEvent.click(screen.getByText('sorter'))
+    expect(screen.getByText('click2'))
+  })
 })