diff --git a/components/CustomScrollView.tsx b/components/CustomScrollView.tsx index 6608d08..50f0c10 100644 --- a/components/CustomScrollView.tsx +++ b/components/CustomScrollView.tsx @@ -31,7 +31,7 @@ const CustomScrollView: React.FC = ({ }) => { const responsiveConfig = useResponsiveLayout(); const commonStyles = getCommonResponsiveStyles(responsiveConfig); - + // 使用响应式列数,如果没有明确指定的话 const effectiveColumns = numColumns || responsiveConfig.columns; @@ -111,7 +111,8 @@ const CustomScrollView: React.FC = ({ marginBottom: responsiveConfig.spacing, }, fullRowContainer: { - justifyContent: "space-between", + justifyContent: "space-around", + marginRight: responsiveConfig.spacing / 2, }, partialRowContainer: { justifyContent: "flex-start", @@ -126,9 +127,9 @@ const CustomScrollView: React.FC = ({ }); return ( - @@ -137,14 +138,14 @@ const CustomScrollView: React.FC = ({ {rows.map((row, rowIndex) => { const isFullRow = row.length === effectiveColumns; const rowStyle = isFullRow ? dynamicStyles.fullRowContainer : dynamicStyles.partialRowContainer; - + return ( {row.map((item, itemIndex) => { const actualIndex = rowIndex * effectiveColumns + itemIndex; const isLastItemInPartialRow = !isFullRow && itemIndex === row.length - 1; const itemStyle = isLastItemInPartialRow ? dynamicStyles.itemContainer : dynamicStyles.itemWithMargin; - + return ( {renderItem({ item, index: actualIndex })}