-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
描述 / Description
import React, { useEffect } from 'react';
import { FlatList, Pressable, Text, View } from 'react-native';
import {
BaseButton,
Gesture,
GestureDetector,
GestureHandlerRootView,
ScrollView,
TouchableOpacity,
} from 'react-native-gesture-handler';
type Props = {};
const LoadingDemo = (props: Props) => {
const scrollRef = React.useRef<any>(null);
const [data, setData] = React.useState<any[]>([]);
return (
<View>
<View style={{ height: 500, width: '100%' }}>
<FlatList
data={['1', '2', '3', '4', '5', '6', '7']}
inverted={true}
windowSize={10}
maxToRenderPerBatch={10}
keyExtractor={(item) => {
return item;
}}
renderItem={({ item }) => {
return (
<TouchableOpacity
key={item}
onPress={() => {
console.log('>>> 父元素点击');
}}
onLongPress={() => {
console.log('>>> 父元素长按');
}}
>
<View style={{ width: 100, height: 100, backgroundColor: 'blue' }}>
<TouchableOpacity
onLongPress={() => {
console.log('>>> 子元素长按');
}}
onPress={() => {
console.log('>>> 子元素点击');
}}
>
<View style={{ width: 30, height: 30, backgroundColor: 'red' }}>
<Text>{item}</Text>
</View>
</TouchableOpacity>
</View>
</TouchableOpacity>
);
}}
/>
</View>
</View>
);
};
export default LoadingDemo;测试发现 tranform rotate 或者 scaleY 同样也有问题
复现步骤 / Steps to reproduce
No response
库版本 / Library version
2.14.17-rc.0
React Native OpenHarmony version
0.72.53
构建类型 / Build type
None
设备 / Device
None
设备版本 / Device model
No response
已悉知 / Acknowledgements
Yes
hangaoke1
Metadata
Metadata
Assignees
Labels
No labels