Skip to content

Commit

Permalink
fix: 修复 tabs 的 title 渲染上下文信息错误问题 Close: #10259 (#10265)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop authored May 31, 2024
1 parent 877856f commit c2d29d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/amis/src/renderers/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,9 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
const {render} = this.props;
return typeof title === 'string' || !title
? filter(title, data)
: render(`tab-title/${index}`, title, {...data, index});
: render(`tab-title/${index}`, title, {
data: {index, __index: index, ...data}
});
}

renderToolbar() {
Expand Down

0 comments on commit c2d29d5

Please sign in to comment.