1ceb900cdS猫头猫import React from 'react'; 2ceb900cdS猫头猫import {StyleProp, StyleSheet, ViewStyle} from 'react-native'; 3ceb900cdS猫头猫import rpx from '@/utils/rpx'; 4476c9cacS猫头猫import {TouchableOpacity} from 'react-native'; 5ceb900cdS猫头猫import Image from './image'; 6ceb900cdS猫头猫import {ImgAsset} from '@/constants/assetsConst'; 7ceb900cdS猫头猫import ThemeText from './themeText'; 8ceb900cdS猫头猫 9ceb900cdS猫头猫interface IImageBtnProps { 10ceb900cdS猫头猫 uri?: string; 11ceb900cdS猫头猫 title?: string; 12ceb900cdS猫头猫 onPress?: () => void; 13ceb900cdS猫头猫 style?: StyleProp<ViewStyle>; 14ceb900cdS猫头猫} 15ceb900cdS猫头猫export default function ImageBtn(props: IImageBtnProps) { 16ceb900cdS猫头猫 const {onPress, uri, title, style: _style} = props ?? {}; 17ceb900cdS猫头猫 return ( 18ceb900cdS猫头猫 <TouchableOpacity 19ceb900cdS猫头猫 activeOpacity={0.5} 20ceb900cdS猫头猫 onPress={onPress} 21ceb900cdS猫头猫 style={[style.wrapper, _style]}> 22ceb900cdS猫头猫 <Image 23ceb900cdS猫头猫 style={style.image} 24ceb900cdS猫头猫 uri={uri} 25ceb900cdS猫头猫 emptySrc={ImgAsset.albumDefault} 26ceb900cdS猫头猫 /> 27ceb900cdS猫头猫 <ThemeText 28ceb900cdS猫头猫 fontSize="subTitle" 29ceb900cdS猫头猫 numberOfLines={2} 30ceb900cdS猫头猫 ellipsizeMode="tail"> 31ceb900cdS猫头猫 {title ?? ''} 32ceb900cdS猫头猫 </ThemeText> 33ceb900cdS猫头猫 </TouchableOpacity> 34ceb900cdS猫头猫 ); 35ceb900cdS猫头猫} 36ceb900cdS猫头猫 37ceb900cdS猫头猫const style = StyleSheet.create({ 38ceb900cdS猫头猫 wrapper: { 39ceb900cdS猫头猫 width: rpx(210), 40ceb900cdS猫头猫 height: rpx(290), 41ceb900cdS猫头猫 flexGrow: 0, 42ceb900cdS猫头猫 flexShrink: 0, 43ceb900cdS猫头猫 }, 44ceb900cdS猫头猫 image: { 45ceb900cdS猫头猫 width: rpx(210), 46ceb900cdS猫头猫 height: rpx(210), 47ceb900cdS猫头猫 borderRadius: rpx(12), 48*400ab63dS猫头猫 marginBottom: rpx(16), 49ceb900cdS猫头猫 }, 50ceb900cdS猫头猫}); 51