{/**/}
{tab.children}
{/**/}
),
closable: tabs.length > 1, // 剩最后一个就不能删除了
}
})
}, [tabs, menuList, getLocale()]);
//let tabItems=tabItemsf();
let navigate = useNavigate();
const onTabsChange = useCallback((tabKey: string) => {
tabs.forEach(tab => {
if (tab.routePath == tabKey) {
navigate(tab.pathname);
}
})
}, [tabs]);
const onTabEdit = (
targetKey: string,
action: 'add' | 'remove',
) => {
if (action === 'remove') {
closeTab(targetKey);
}
};
return (