// 这个组件只用来渲染多色SVG import React from 'react'; import {Platform, Image, ImageRequireSource, StyleSheet, View} from 'react-native'; interface SvgImageProps { uri: ImageRequireSource; size?: number; color?: string; style?: any; highlight?: boolean; } const SVGImg: React.FC = ({uri, highlight, color, style, size, ...ext}) => { const ImgSize = size || style?.fontSize || 24; const styles = React.useMemo( () => StyleSheet.create({ iconStyle: { width: ImgSize, height: ImgSize, }, }), [ImgSize], ); const SVG = uri as any; return ( {Platform.OS === 'web' ? ( ) : ( )} ); }; export default SVGImg;