feat: 更新 APP_VERSION 和添加 maxItemsInRecyclePool 属性以优化列表性能
This commit is contained in:
parent
59190cbd78
commit
4ffaadeb7d
|
|
@ -12,7 +12,7 @@ export const IOS_UNIVERSAL_LINK = 'duooomi.bowong.cn'
|
|||
// 原生版本,原生代码变更时需要更新此版本号
|
||||
export const VERSION = '1.1.0'
|
||||
// JavaScript版本,JS代码变更时需要更新此版本号
|
||||
export const APP_VERSION = 'dev202601151552'
|
||||
export const APP_VERSION = 'dev202601161658'
|
||||
|
||||
const ALIPAY_SCHEMA = 'alipay2021006119657394'
|
||||
const ALIPAY_SCHEMA_SANDBOX = 'alipay9021000158673972'
|
||||
|
|
|
|||
|
|
@ -309,6 +309,7 @@ const Generate = observer(function Generate() {
|
|||
ListFooterComponent={ListFooter}
|
||||
ListHeaderComponent={ListHeader}
|
||||
numColumns={3}
|
||||
maxItemsInRecyclePool={0}
|
||||
renderItem={renderItem}
|
||||
showsVerticalScrollIndicator={false}
|
||||
refreshControl={
|
||||
|
|
|
|||
|
|
@ -351,8 +351,6 @@ const Index = observer(function Index() {
|
|||
// 简化的 selectedId,避免对象引用变化
|
||||
const selectedId = selectedItem?.id
|
||||
|
||||
console.log('ssss--------------')
|
||||
|
||||
// 可见性状态
|
||||
const visibleIdsRef = useRef<Set<string>>(new Set())
|
||||
const [visibilityVersion, setVisibilityVersion] = useState(0)
|
||||
|
|
@ -426,6 +424,7 @@ const Index = observer(function Index() {
|
|||
}
|
||||
numColumns={3}
|
||||
onEndReached={handleLoadMore}
|
||||
maxItemsInRecyclePool={0}
|
||||
removeClippedSubviews={true}
|
||||
drawDistance={600}
|
||||
onEndReachedThreshold={0.3}
|
||||
|
|
@ -666,7 +665,7 @@ const GridItem = memo<GridItemProps>(function GridItem({ item, isSelected, itemW
|
|||
// 使用压缩好了webp预览,不可见情况下不渲染图片
|
||||
|
||||
return (
|
||||
<Block className="relative mb-[12px]" onClick={onSelect} key={item?.id}>
|
||||
<Block className="relative mb-[12px]" onClick={onSelect}>
|
||||
<Block
|
||||
className={`relative overflow-hidden border-2 ${isSelected ? 'border-accent' : 'border-black'}`}
|
||||
style={{
|
||||
|
|
|
|||
Loading…
Reference in New Issue