您好,在我们的react原生应用程序中有以下代码:
import { SvgCssUri } from 'react-native-svg';
<SvgCssUri style={styles.osIcon} uri={'https://mon.zappiehost.com/images/os/' + props.data.icon} />我甚至尝试过使用简单的SvgUri (而不是SvgCssUri)
但图像仍然加载时没有一些内容(黑色颜色):


下面是使用的原始SVG图像:https://raw.githubusercontent.com/librenms/librenms/master/html/images/os/proxmox.svg
发布于 2021-07-26 11:24:27
事实证明,由于React Native SVG不做自动填充的事实,黑色被遗漏了。
在<SvgUri>标记中添加fill={'black'}是必要的
https://stackoverflow.com/questions/68520016
复制相似问题