From 3bf85e0495a8378e9a7e9e676f74007210122049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Sat, 6 Sep 2025 13:56:59 +0800 Subject: [PATCH] =?UTF-8?q?style=20:=20=E6=9B=B4=E6=96=B0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/modules/home/controllers/home_controller.dart | 2 +- lib/modules/home/views/home_page.dart | 10 +++++----- lib/modules/problem/views/widgets/problem_card.dart | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/modules/home/controllers/home_controller.dart b/lib/modules/home/controllers/home_controller.dart index 459158c..b6b7c5a 100644 --- a/lib/modules/home/controllers/home_controller.dart +++ b/lib/modules/home/controllers/home_controller.dart @@ -9,7 +9,7 @@ class HomeController extends GetxController { // 页面列表 final List pages = [ - const Center(child: Text('首页内容')), + // const Center(child: Text('首页内容')), const ProblemPage(), // 使用 const 确保子页面不会频繁重建 const MyPage(), ]; diff --git a/lib/modules/home/views/home_page.dart b/lib/modules/home/views/home_page.dart index 545362a..4a8279b 100644 --- a/lib/modules/home/views/home_page.dart +++ b/lib/modules/home/views/home_page.dart @@ -14,11 +14,11 @@ class HomePage extends GetView { selectedIndex: controller.selectedIndex.value, onDestinationSelected: controller.changeIndex, // 回调控制状态更新 destinations: const [ - NavigationDestination( - icon: Icon(Icons.home_outlined), - selectedIcon: Icon(Icons.home), - label: '首页', - ), + // NavigationDestination( + // icon: Icon(Icons.home_outlined), + // selectedIcon: Icon(Icons.home), + // label: '首页', + // ), NavigationDestination( icon: Icon(Icons.description_outlined), selectedIcon: Icon(Icons.description), diff --git a/lib/modules/problem/views/widgets/problem_card.dart b/lib/modules/problem/views/widgets/problem_card.dart index d8d24b5..96e3e46 100644 --- a/lib/modules/problem/views/widgets/problem_card.dart +++ b/lib/modules/problem/views/widgets/problem_card.dart @@ -74,12 +74,13 @@ class ProblemCard extends StatelessWidget { SizedBox(width: 16.w), Icon(Icons.access_time, color: Colors.grey, size: 16.h), SizedBox(width: 8.w), - SizedBox( - width: 100.w, + Expanded( child: Text( - DateFormat('yyyy-MM-dd HH:mm').format(problem.creationTime), + DateFormat( + 'yyyy-MM-dd HH:mm:ss', + ).format(problem.creationTime), style: TextStyle(fontSize: 12.sp), - overflow: TextOverflow.ellipsis, + // overflow: TextOverflow.ellipsis, ), ), ],