From 6d0935c6a517b16d11eb0a8eba6dc22c49476840 Mon Sep 17 00:00:00 2001 From: LanQin Date: Sat, 20 Jun 2026 02:26:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E5=A2=9E=E5=8A=A0=E5=8A=A8?= =?UTF-8?q?=E6=95=88=E6=8F=92=E4=BB=B6=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 `web` 应用引入 `tailwindcss-animate`,并接入 Tailwind 配置。 - 调整 `sheet` 与 `sidebar` 的移动端遮罩、过渡时长和动画曲线,提升侧边栏展开收起体验。 - 精简移动端侧边栏无障碍标题,仅保留必要语义。 --- apps/web/package.json | 1 + apps/web/src/components/ui/sheet.tsx | 4 ++-- apps/web/src/components/ui/sidebar.tsx | 4 +--- apps/web/tailwind.config.cjs | 2 +- pnpm-lock.yaml | 12 ++++++++++++ 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index 3622822..fade335 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -57,6 +57,7 @@ "autoprefixer": "10.4.20", "postcss": "8.5.15", "tailwindcss": "3.4.15", + "tailwindcss-animate": "^1.0.7", "typescript": "5.6.3", "vite": "8.0.16" } diff --git a/apps/web/src/components/ui/sheet.tsx b/apps/web/src/components/ui/sheet.tsx index 02942db..54480f4 100644 --- a/apps/web/src/components/ui/sheet.tsx +++ b/apps/web/src/components/ui/sheet.tsx @@ -19,7 +19,7 @@ const SheetOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( - Sidebar - Displays the mobile sidebar. + 导航
{children}
diff --git a/apps/web/tailwind.config.cjs b/apps/web/tailwind.config.cjs index b0dceac..45e95a2 100644 --- a/apps/web/tailwind.config.cjs +++ b/apps/web/tailwind.config.cjs @@ -56,5 +56,5 @@ module.exports = { } } }, - plugins: [], + plugins: [require("tailwindcss-animate")], } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b40bed2..7f2b535 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -138,6 +138,9 @@ importers: tailwindcss: specifier: 3.4.15 version: 3.4.15 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.15) typescript: specifier: 5.6.3 version: 5.6.3 @@ -1491,6 +1494,11 @@ packages: tailwind-merge@2.5.4: resolution: {integrity: sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==} + tailwindcss-animate@1.0.7: + resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + tailwindcss@3.4.15: resolution: {integrity: sha512-r4MeXnfBmSOuKUWmXe6h2CcyfzJCEk4F0pptO5jlnYSIViUkVmsawj80N5h2lO3gwcmSb4n3PuN+e+GC1Guylw==} engines: {node: '>=14.0.0'} @@ -2892,6 +2900,10 @@ snapshots: tailwind-merge@2.5.4: {} + tailwindcss-animate@1.0.7(tailwindcss@3.4.15): + dependencies: + tailwindcss: 3.4.15 + tailwindcss@3.4.15: dependencies: '@alloc/quick-lru': 5.2.0