fix: migrate frontend to Vite 7 and resolve lint warnings

This commit is contained in:
root
2026-02-06 06:09:17 +00:00
parent 35c8063ac5
commit efd5a107b9
23 changed files with 550 additions and 449 deletions
+4 -3
View File
@@ -260,9 +260,8 @@ export default function AdminLayout({
} else {
toast.error(response.msg || "密码修改失败");
}
} catch (error) {
} catch {
toast.error("修改密码时发生错误");
console.error("修改密码错误:", error);
} finally {
setPasswordLoading(false);
}
@@ -289,8 +288,10 @@ export default function AdminLayout({
>
{/* 移动端遮罩层 */}
{isMobile && mobileMenuVisible && (
<div
<button
aria-label="关闭菜单"
className="fixed inset-0 backdrop-blur-sm bg-white/50 dark:bg-black/30 z-40"
type="button"
onClick={hideMobileMenu}
/>
)}
+1 -1
View File
@@ -17,7 +17,7 @@ export default function H5SimpleLayout({
React.useEffect(() => {
try {
window.scrollTo({ top: 0, left: 0, behavior: "auto" });
} catch (e) {
} catch {
window.scrollTo(0, 0);
}
document.body.scrollTop = 0;
+1 -1
View File
@@ -108,7 +108,7 @@ export default function H5Layout({ children }: { children: React.ReactNode }) {
useEffect(() => {
try {
window.scrollTo({ top: 0, left: 0, behavior: "auto" });
} catch (e) {
} catch {
window.scrollTo(0, 0);
}
document.body.scrollTop = 0;