Skip to content

Commit

Permalink
feat: add tooltip into FormItem`s props (#1079)
Browse files Browse the repository at this point in the history
* feat: add `tooltip` into FormItem`s props

* docs: add tooltip demo in form-layout.md
  • Loading branch information
yezihaohao authored Dec 9, 2020
1 parent 82d50df commit bf36096
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docs/zh-cn/jsx-develop/form-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ const App = () => {
wrapperCol={6}
>
<Card title="基本信息" style={{ marginBottom: 15 }}>
<FormItem name="aaa" label="字段1" component={Input} />
<FormItem
name="aaa"
label="字段1"
component={Input}
tooltip="这是帮助信息"
/>
<FormItem
name="bbb"
label="控制详细信息显示隐藏"
Expand All @@ -99,6 +104,7 @@ const App = () => {
]}
initialValue={true}
component={Select}
tooltip="这是帮助信息"
/>
<FormItem
name="ccc"
Expand All @@ -109,6 +115,7 @@ const App = () => {
]}
initialValue={true}
component={Select}
tooltip="这是帮助信息"
/>
</Card>
<VirtualField name="detailCard">
Expand Down
3 changes: 2 additions & 1 deletion packages/antd/src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ const NextFormItemProps = [
'extra',
'itemStyle',
'itemClassName',
'addonAfter'
'addonAfter',
'tooltip'
]

export const pickFormItemProps = (props: any) => {
Expand Down

0 comments on commit bf36096

Please sign in to comment.