mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
feat: Tabs组件title支持schema
This commit is contained in:
parent
f48b88abe1
commit
1b09b97d78
@ -709,14 +709,14 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
|
||||
|
||||
// 渲染tabs的title
|
||||
renderTabTitle(
|
||||
title: string | SchemaNode | undefined,
|
||||
title: string | SchemaObject | undefined,
|
||||
index: number,
|
||||
data: any
|
||||
) {
|
||||
const {render} = this.props;
|
||||
return isObject(title) && title
|
||||
? render(`tab-title/${index}`, title, data)
|
||||
: filter(title, data);
|
||||
return typeof title === 'string' || !title
|
||||
? filter(title, data)
|
||||
: render(`tab-title/${index}`, title, data);
|
||||
}
|
||||
|
||||
renderToolbar() {
|
||||
|
Loading…
Reference in New Issue
Block a user