Closed jinzhubaofu closed 7 years ago
可以使用宽度去限制水平方向的滚动, style={{width: 200}}
一般情况下,scrollview 都是占满非滚动方向的吧?比如竖直滚动时 width 应该是 window width。这样的话就要写 style={{width: Dimensions.get('window').width}} 了,很麻烦。
更主要是的在 app 中只需要写 style={{flex: 1}} 即可,为了兼容 web 还要写 width。这种不一致性导致 react-web 不好用。
比如在 vertial 方向滚动时,水平方向仍可滚动,这与 app 中表现不一致。