diff --git a/web/src/app/(main)/_components/main-content.tsx b/web/src/app/(main)/_components/main-content.tsx index 3d2afa8..05cba41 100644 --- a/web/src/app/(main)/_components/main-content.tsx +++ b/web/src/app/(main)/_components/main-content.tsx @@ -25,7 +25,10 @@ function isFullBleed(pathname: string) { return pathname; } })(); - return p.startsWith("/function/tasks/"); + // 静态导出开了 trailingSlash,列表页自身的 pathname 是 "/function/tasks/", + // 先去掉尾斜杠再判前缀,否则列表页会被误判成详情页而丢掉全局头部。 + const normalized = p.replace(/\/+$/, ""); + return normalized.startsWith("/function/tasks/"); } export function MainContent({ children }: { children: ReactNode }) {