From fc508884fe00ae469b989caf191c6f4210b57621 Mon Sep 17 00:00:00 2001 From: yanlongqi Date: Sat, 8 Nov 2025 04:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=20Ant=20Design=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=BA=E4=B8=AD=E6=96=87=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 通过添加 ConfigProvider 和 zhCN 语言包,将所有 antd 组件的文本显示为中文。这包括日期选择器、分页器、表格等组件的界面文本。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- web/src/App.tsx | 50 ++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 280f701..452d34c 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,5 +1,7 @@ import React from 'react' import { BrowserRouter as Router, Routes, Route } from 'react-router-dom' +import { ConfigProvider } from 'antd' +import zhCN from 'antd/locale/zh_CN' import TabBarLayout from './components/TabBarLayout' import ProtectedRoute from './components/ProtectedRoute' import AdminRoute from './components/AdminRoute' @@ -13,32 +15,34 @@ import QuestionList from './pages/QuestionList' const App: React.FC = () => { return ( - - - {/* 带TabBar的页面,需要登录保护 */} - }> - } /> - } /> - + + + + {/* 带TabBar的页面,需要登录保护 */} + }> + } /> + } /> + - {/* 不带TabBar的页面,但需要登录保护 */} - } /> - } /> + {/* 不带TabBar的页面,但需要登录保护 */} + } /> + } /> - {/* 题库管理页面,需要管理员权限 */} - - - - - - } /> + {/* 题库管理页面,需要管理员权限 */} + + + + + + } /> - {/* 不带TabBar的页面,不需要登录保护 */} - } /> - } /> - - + {/* 不带TabBar的页面,不需要登录保护 */} + } /> + } /> + + + ) }