📜  溢出滚动反应本机 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:13.938000             🧑  作者: Mango

代码示例1
import React, { Component } from "react";
import { ScrollView, View } from "react-native";
const { height } = Dimensions.get("window");

export class index extends Component {
  state = {
    screenHeight: 0,
  };
  onContentSizeChange = (contentWidth, contentHeight) => {
    this.setState({ screenHeight: contentHeight });
  };
  render() {
    const scrollEnabled = this.state.screenHeight > height;
    return (
      
        
      
    );
  }
}

export default index;