'use client'; import { useRouter } from 'next/navigation'; import { useTabStore } from '@/stores/tab-store'; /** 站内导航 + 多标签联动,替代 onMenuNavigate prop drilling */ export function useMenuNavigation() { const router = useRouter(); return (path: string, title: string) => { useTabStore.getState().openOrActivate({ path, title }); router.push(path); }; }