|
|
@@ -154,19 +154,28 @@ class IntimacyAnalysePage extends BasePage<IntimacyAnalyseController> {
|
|
|
|
|
|
/// PageView
|
|
|
Widget _buildContent() {
|
|
|
- return Expanded(
|
|
|
- child: NestedPageView(
|
|
|
- controller: controller.pageController,
|
|
|
- onPageChanged: (index) {
|
|
|
- controller.handlePageChange(index);
|
|
|
- },
|
|
|
- children: [
|
|
|
- // 报告Tab
|
|
|
- IntimacyAnalyseReportView(),
|
|
|
- // 截图回复Tab
|
|
|
- IntimacyAnalyseScreenshotReplyView(),
|
|
|
- ],
|
|
|
- ),
|
|
|
- );
|
|
|
+ return Obx(() {
|
|
|
+ return Expanded(
|
|
|
+ child: NestedPageView(
|
|
|
+ controller: controller.pageController,
|
|
|
+ // 保持页面缓存
|
|
|
+ wantKeepAlive: true,
|
|
|
+ // 是否禁止滑动切换
|
|
|
+ physics:
|
|
|
+ controller.isPageViewSwipeEnabled.value
|
|
|
+ ? ScrollPhysics()
|
|
|
+ : NeverScrollableScrollPhysics(),
|
|
|
+ onPageChanged: (index) {
|
|
|
+ controller.handlePageChange(index);
|
|
|
+ },
|
|
|
+ children: [
|
|
|
+ // 报告Tab
|
|
|
+ IntimacyAnalyseReportView(),
|
|
|
+ // 截图回复Tab
|
|
|
+ IntimacyAnalyseScreenshotReplyView(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
}
|