react-native获取设备宽高 import { Dimensions } from “react-native”; 你可以用下面的方法来获取设备的宽高: const windowWidth = Dimensions.get(“window”).width; const windowHeight = Dimensions.get(“window”).height;