@@ -54,7 +54,11 @@ export interface ITabbarViewProps {
5454 canHideTabbar ?: boolean ;
5555 renderOtherVisibleContainers ?: React . FC < {
5656 props : ITabbarViewProps ;
57- renderContainers : ( component : ComponentRegistryInfo , currentContainerId : string ) => JSX . Element | null ;
57+ renderContainers : (
58+ component : ComponentRegistryInfo ,
59+ tabbarService : TabbarService ,
60+ currentContainerId : string ,
61+ ) => JSX . Element | null ;
5862 } > ;
5963}
6064
@@ -109,7 +113,7 @@ export const TabbarViewBase: React.FC<ITabbarViewProps> = (props) => {
109113 } ) ;
110114
111115 const renderContainers = React . useCallback (
112- ( component : ComponentRegistryInfo , currentContainerId ?: string ) => {
116+ ( component : ComponentRegistryInfo , tabbarService : TabbarService , currentContainerId ?: string ) => {
113117 const containerId = component . options ?. containerId ;
114118 if ( ! containerId ) {
115119 return null ;
@@ -164,13 +168,13 @@ export const TabbarViewBase: React.FC<ITabbarViewProps> = (props) => {
164168 </ li >
165169 ) ;
166170 } ,
167- [ tabbarService ] ,
171+ [ ] ,
168172 ) ;
169173
170174 return (
171175 < div className = { cls ( [ styles_tab_bar , className ] ) } >
172176 < div className = { styles_bar_content } style = { { flexDirection : Layout . getTabbarDirection ( direction ) } } >
173- { visibleContainers . map ( ( component ) => renderContainers ( component , currentContainerId ) ) }
177+ { visibleContainers . map ( ( component ) => renderContainers ( component , tabbarService , currentContainerId ) ) }
174178 { renderOtherVisibleContainers ( { props, renderContainers } ) }
175179 { hideContainers . length ? (
176180 < li
@@ -308,7 +312,11 @@ export const RightTabbarRenderer: React.FC<{ barSize?: number; style?: React.CSS
308312export const LeftTabbarRenderer : React . FC < {
309313 renderOtherVisibleContainers ?: React . FC < {
310314 props : ITabbarViewProps ;
311- renderContainers : ( component : ComponentRegistryInfo , currentContainerId : string ) => JSX . Element | null ;
315+ renderContainers : (
316+ component : ComponentRegistryInfo ,
317+ tabbarService : TabbarService ,
318+ currentContainerId : string ,
319+ ) => JSX . Element | null ;
312320 } > ;
313321 isRenderExtraTopMenus ?: boolean ;
314322 renderExtraMenus ?: React . ReactNode ;
0 commit comments