feat: support custom render in the TabDetail component

support custom render in the TabDetail, not only the class or string

Change-Id: I152e611d1478e149baf9104143ca18171e799730
This commit is contained in:
Jingwei.Zhang
2022-12-19 11:35:18 +08:00
parent a307f457e4
commit 2d437e5b4e

View File

@@ -411,7 +411,10 @@ export default class DetailBase extends React.Component {
}
renderTabComponent(tabItem) {
const { component, key } = tabItem;
const { component, key, render } = tabItem;
if (render) {
return render;
}
return component ? (
<tabItem.component
{...this.props}