mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: e2e
This commit is contained in:
parent
0c6c3f3a82
commit
d45eefe644
@ -215,7 +215,15 @@ const InternalPageContent = (props: PageContentProps) => {
|
||||
// 兼容旧版本的 tab 路径
|
||||
const oldTab = currentRoute?.children?.find((tabRoute) => tabRoute.tabSchemaName === activeKey);
|
||||
if (oldTab) {
|
||||
navigate(location.pathname.replace(activeKey, oldTab.schemaUid) + location.search);
|
||||
const searchParams = new URLSearchParams(location.search);
|
||||
// Check if activeKey exists in search params and remove it
|
||||
if (searchParams.has('tab') && searchParams.get('tab') === activeKey) {
|
||||
searchParams.delete('tab');
|
||||
}
|
||||
// Create a clean search string or empty string if only '?' remains
|
||||
const searchString = searchParams.toString() ? `?${searchParams.toString()}` : '';
|
||||
|
||||
navigate(location.pathname.replace(activeKey, oldTab.schemaUid) + searchString);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user