Closed tianming229 closed 10 months ago
👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
不同设备偶现机率不同
https://github.com/reactnativecn/react-native-website/assets/76057323/9099c652-5a9e-481c-981c-4450016337d2![微信截图_20230530171900](https://github.com/reactnativecn/react-native-website/assets/76057323/06b08146-ee70-41d3-ae64-0148d7398062)
源码: <ScrollView style={{ flex: 1 }} showsHorizontalScrollIndicator={false} alwaysBounceHorizontal={false} horizontal={true} ref={(ref) => (this.svrefIdx = ref)} onContentSizeChange={(contentWidth, contentHeight) => { if (this.state.selectMode === 'mother') { // console.log('first', contentWidth, contentHeight) } this.svrefIdx.scrollTo({ x: 0, y: 0, animated: true }); }} onScroll={(e) => { if (this.state.selectMode === 'mother') { const handleBox = findNodeHandle(this.refs.box) UIManager.measure(handleBox, (x, y, width, height, pageX, pageY) => { console.log('父组件宽度width:', width); console.log('父组件高度height:', height); }) const handle = findNodeHandle(this.refs.eeeRef) UIManager.measure(handle, (x, y, width, height, pageX, pageY) => { console.log('list相对父视图位置x:', x); console.log('list相对父视图位置y:', y); console.log('list组件宽度width:', width); console.log('list组件高度height:', height); console.log('list距离屏幕的绝对位置x:', pageX); console.log('list距离屏幕的绝对位置y:', pageY); console.log('=========:'); }) } }}