From 05a81e4ff29dd331d6c75fbc916abdd9fb29ab19 Mon Sep 17 00:00:00 2001 From: xuqm Date: Mon, 1 Sep 2025 16:54:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor(home):=20=E4=BC=98=E5=8C=96=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E7=B2=BE=E5=93=81=E6=9C=8D=E5=8A=A1=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 HomeFeaturesView 组件中添加了一个 content容器,用于更好地组织内容结构 - 调整了 header、DataEmpty 和 items 的层级关系,提高了代码的可读性和可维护性 --- .../home/home/components/HomeFeaturesView.tsx | 66 ++++++++++--------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/src/app/screens/home/home/components/HomeFeaturesView.tsx b/src/app/screens/home/home/components/HomeFeaturesView.tsx index 0944787..d730945 100644 --- a/src/app/screens/home/home/components/HomeFeaturesView.tsx +++ b/src/app/screens/home/home/components/HomeFeaturesView.tsx @@ -22,39 +22,41 @@ type Props = { export default function HomeFeaturesView(props: Props) { return ( - - - - 精品服务 - - - {props.error && props.error.type !== 'Cancel' && ( - { - props.reload && props.reload(); - }} - /> - )} - {props.error === undefined && props.features && ( - - {props.features.map((feature, index) => { - return ( - { - props.onPress && props.onPress(index); - }} - /> - ); - })} + + + + + 精品服务 + - )} + {props.error && props.error.type !== 'Cancel' && ( + { + props.reload && props.reload(); + }} + /> + )} + {props.error === undefined && props.features && ( + + {props.features.map((feature, index) => { + return ( + { + props.onPress && props.onPress(index); + }} + /> + ); + })} + + )} + ); }