mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
chore: tab 里面直接写 type, 虽然是一种不推荐的用法,但是还是兼容一下 (#2256)
This commit is contained in:
parent
3b477cda35
commit
a90bb85c6c
@ -389,7 +389,8 @@ export default class Form extends React.Component<FormProps, object> {
|
|||||||
'formInited',
|
'formInited',
|
||||||
'simpleMode',
|
'simpleMode',
|
||||||
'inputOnly',
|
'inputOnly',
|
||||||
'value'
|
'value',
|
||||||
|
'actions'
|
||||||
];
|
];
|
||||||
|
|
||||||
hooks: {
|
hooks: {
|
||||||
|
@ -484,7 +484,7 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
|
|||||||
>
|
>
|
||||||
{render(
|
{render(
|
||||||
`item/${index}/${tabIndex}`,
|
`item/${index}/${tabIndex}`,
|
||||||
tab.tab || tab.body || '',
|
(tab as any)?.type ? (tab as any) : tab.tab || tab.body,
|
||||||
{
|
{
|
||||||
data: ctx,
|
data: ctx,
|
||||||
formMode: tab.mode || subFormMode || formMode,
|
formMode: tab.mode || subFormMode || formMode,
|
||||||
@ -519,11 +519,15 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
|
|||||||
? this.renderTab(tab, this.props, index)
|
? this.renderTab(tab, this.props, index)
|
||||||
: tabRender
|
: tabRender
|
||||||
? tabRender(tab, this.props, index)
|
? tabRender(tab, this.props, index)
|
||||||
: render(`tab/${index}`, tab.tab || tab.body || '', {
|
: render(
|
||||||
formMode: tab.mode || subFormMode || formMode,
|
`tab/${index}`,
|
||||||
formHorizontal:
|
(tab as any)?.type ? (tab as any) : tab.tab || tab.body,
|
||||||
tab.horizontal || subFormHorizontal || formHorizontal
|
{
|
||||||
})}
|
formMode: tab.mode || subFormMode || formMode,
|
||||||
|
formHorizontal:
|
||||||
|
tab.horizontal || subFormHorizontal || formHorizontal
|
||||||
|
}
|
||||||
|
)}
|
||||||
</Tab>
|
</Tab>
|
||||||
) : null
|
) : null
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user