diff --git a/lib/app/features/problem/presentation/pages/problem_list_page.dart b/lib/app/features/problem/presentation/pages/problem_list_page.dart index ecaec0a..db58d18 100644 --- a/lib/app/features/problem/presentation/pages/problem_list_page.dart +++ b/lib/app/features/problem/presentation/pages/problem_list_page.dart @@ -38,7 +38,7 @@ class ProblemListPage extends GetView { const Divider(height: 1, thickness: 1), // 列表区域总是显示 - Expanded(child: _buildEnterpriseList()), + Expanded(child: _buildProblemListList()), ], ), ); @@ -272,18 +272,18 @@ class ProblemListPage extends GetView { } /// 构建问题列表 - Widget _buildEnterpriseList() { + Widget _buildProblemListList() { // 使用下拉刷新包裹列表 return RefreshIndicator( onRefresh: () async => controller.loadAndSyncProblems(), child: Obx(() { // 3. 在加载中状态,直接显示加载动画(此时不可滚动是合理的) - if (controller.isLoading.value && controller.enterpriseList.isEmpty) { + if (controller.isLoading.value && controller.problemList.isEmpty) { return const Center(child: CircularProgressIndicator()); } // 4. 当列表为空时,将空状态提示也放入一个 ListView 中 - if (controller.enterpriseList.isEmpty) { + if (controller.problemList.isEmpty) { // 使用 ListView 包裹,并设置 AlwaysScrollableScrollPhysics return ListView( // [!!!] 关键:这行代码让 ListView 即使在内容不足一屏时也能滚动