From 4c4215882e16992fdc054d364af2e3a0ef6f1a22 Mon Sep 17 00:00:00 2001 From: shu Date: Sun, 6 Sep 2026 19:41:09 +0800 Subject: 支持环境变量配置路由模式和资源路径并更新菜单图标 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增默认环境配置,通过 VITE_ROUTER_MODE 切换 Hash 与 History 路由,默认使用 Hash;通过 VITE_BASE_URL 配置资源基础路径,默认使用 /。 补充本地环境覆盖、构建方式及部署注意事项文档,保持 .env.local 不纳入版本控制。 桌面侧栏按钮改用 SidebarSimpleIcon,展开时填充、折叠时描边,保留无障碍状态描述。 验证:pnpm lint、pnpm build 和 git diff --check 通过。构建仍有现存的主包超过 500 kB 提示。 --- src/layouts/BasicLayout.tsx | 10 ++++++---- src/router.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 9851fd4..512da63 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -14,7 +14,7 @@ import { useMantineTheme, } from '@mantine/core' import { useDisclosure, useMediaQuery } from '@mantine/hooks' -import { CaretLeftIcon, CaretRightIcon } from '@phosphor-icons/react' +import { SidebarSimpleIcon } from '@phosphor-icons/react' import { NavLink as RouterNavLink, Outlet, useLocation, useMatches } from 'react-router' import { pageRoutes } from '../routes.ts' import type { PageRoute } from '../routes.ts' @@ -181,9 +181,11 @@ export function BasicLayout() { aria-expanded={sidebarOpened} aria-controls="desktop-navigation" > - {sidebarOpened - ?