image.tsx (1574be2be30dccf99989a1912b89911f5d39b100) image.tsx (4060c00a75883036bbd315fb25c90065209312b3)
1import React from 'react';
1import React from 'react';
2import {Image, ImageProps, StyleSheet, Text, View} from 'react-native';
3import rpx from '@/utils/rpx';
2import {Image, ImageProps} from 'react-native';
4
5interface IImageProps extends ImageProps {
3
4interface IImageProps extends ImageProps {
6 uri?: string;
7 emptySrc: any;
5 uri?: string;
6 emptySrc: any;
8}
9export default function (props: Omit<IImageProps, 'source'>) {
7}
8export default function (props: Omit<IImageProps, 'source'>) {
10 const {uri, emptySrc} = props;
11 const source = uri
12 ? {
13 uri,
14 }
15 : emptySrc;
16 return <Image {...props} source={source}></Image>;
9 const {uri, emptySrc} = props;
10 const source = uri
11 ? {
12 uri,
13 }
14 : emptySrc;
15 return <Image {...props} source={source} />;
17}
16}