|
|
|
@@ -47,6 +47,13 @@ export const useNavigation = (t, headerNavModules) => { |
|
|
|
itemKey: 'pricing', |
|
|
|
to: '/pricing', |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: modules.customLink?.text || '', |
|
|
|
itemKey: 'customLink', |
|
|
|
to: modules.customLink?.url || '#', |
|
|
|
isExternal: modules.customLink?.url?.startsWith('http'), |
|
|
|
externalLink: modules.customLink?.url || '#', |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
// 根据配置过滤导航链接 |
|
|
|
@@ -57,6 +64,9 @@ export const useNavigation = (t, headerNavModules) => { |
|
|
|
? modules.pricing.enabled |
|
|
|
: modules.pricing; |
|
|
|
} |
|
|
|
if (link.itemKey === 'customLink') { |
|
|
|
return modules.customLink?.enabled === true && modules.customLink?.text; |
|
|
|
} |
|
|
|
return modules[link.itemKey] === true; |
|
|
|
}); |
|
|
|
}, [t, headerNavModules]); |
|
|
|
|