问题描述
早上好
我遇到了一个我没有编写的React应用程序的问题(它是由另一个在这里不工作的人编写的)。
代码是:
const red = useSelector(state => state.red)
return (
<SAView style={MyStyle.container}>
<Header title={red.page_list.length !== 0 ? red.page_list[props.navig.getParam('id',1) - 1].name : ''} {...props} drawEnabled />
<View style={{ ...MyStyle.mainPart,padding: 0 }}>
<WView
style={{width: '100%',height: '100%'}}
source={red.page_list.length !== 0 ? {uri: red.page_list[props.navig.getParam('id',1) - 1].website} : {html: '<div>No Internet</div>'}}
/>
</View>
</SAView>
)
可能会显示页面列表:使用Android时不会出现任何问题,使用iOS时会出现问题,并且列表“ red-page_list”始终返回为空,因此应用程序显示“无互联网”(消息毫无意义,因为该应用的其他页面或屏幕也在iOS上正常运行。
所以我想解决这个问题。
SAView和View是另外两个定义一个类的文件,它们是由另一个程序员定义的。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)