2017-05-25 68 views
1

我只是有一個問題,從URI加載此圖像這樣陣營本地顯示圖片URI空白屏幕

<Image style={{ width: '100%' }} source={{uri:'http://192.168.43.225:8887/imgUpload/1739998147-71.jpg'}}/>

的圖像不顯示。但是,當使用本機的基礎縮略圖我這工作得很好,但它不是我想要

<Thumbnail style={{ width: '100%' }} source={{uri:'http://192.168.43.225:8887/imgUpload/1739998147-71.jpg'}}/>

任何解決方案?

回答

1

您需要指定source屬性或style中的高度和寬度。

E.g. 1

<Image source={{uri:'https://facebook.github.io/react/img/logo_small.png', width: 38, height: 38}} /> 

例如, 2

<Image style={{height: 38, width: 38}} source={{uri:'https://facebook.github.io/react/img/logo_small.png'}} /> 
+0

謝謝,通過添加高度圖像修復了問題 –