我试图通过一个道具来满足'要求'在反应原生组件的IMAGE标签中。但是,它显示错误"服务器代码错误500"。如果我使用URI传递一个链接它也适用于道具。
工作:
<Image
style={{ width: 70, height: 61 }}
source={{ uri: imgCode }}
/>
imgCode="https://i.imgur.com/edgLzLO.png"
需要修复:
<Image
style={{ width: 70, height: 61 }}
source={require('./images/header_arrow.png')}
/>
imgCode="./images/batter_logo.png"
答案 0 :(得分:0)
<Image
style={{ width: 70, height: 61 }}
source={require({ uri: imgCode })}
/>
imgCode="https://i.imgur.com/edgLzLO.png"
试试这个 可能有用