10eb1edf9S猫头猫import React from 'react'; 21119c2eaS猫头猫import ListItem from '@/components/base/listItem'; 30eb1edf9S猫头猫import {ImgAsset} from '@/constants/assetsConst'; 4*b4c389f4Smaotoumaoimport {ROUTE_PATH, useNavigate} from '@/core/router'; 51119c2eaS猫头猫import TitleAndTag from '@/components/mediaItem/titleAndTag'; 60eb1edf9S猫头猫 70eb1edf9S猫头猫interface IArtistResultsProps { 80eb1edf9S猫头猫 item: IArtist.IArtistItem; 90eb1edf9S猫头猫 index: number; 1020e2869eS猫头猫 pluginHash: string; 110eb1edf9S猫头猫} 120eb1edf9S猫头猫export default function ArtistResultItem(props: IArtistResultsProps) { 1320e2869eS猫头猫 const {item: artistItem, pluginHash} = props; 14e7fa3837S猫头猫 const navigate = useNavigate(); 150eb1edf9S猫头猫 return ( 160eb1edf9S猫头猫 <ListItem 175589cdf3S猫头猫 withHorizontalPadding 181119c2eaS猫头猫 heightType="big" 191119c2eaS猫头猫 onPress={() => { 201119c2eaS猫头猫 navigate(ROUTE_PATH.ARTIST_DETAIL, { 211119c2eaS猫头猫 artistItem: artistItem, 221119c2eaS猫头猫 pluginHash, 231119c2eaS猫头猫 }); 241119c2eaS猫头猫 }}> 251119c2eaS猫头猫 <ListItem.ListItemImage 261119c2eaS猫头猫 uri={artistItem.avatar} 271119c2eaS猫头猫 fallbackImg={ImgAsset.albumDefault} 281119c2eaS猫头猫 /> 291119c2eaS猫头猫 <ListItem.Content 301119c2eaS猫头猫 description={ 312d0ec5c1S猫头猫 artistItem.desc 322d0ec5c1S猫头猫 ? artistItem.desc 335a7651c3S猫头猫 : `${ 345a7651c3S猫头猫 artistItem.worksNum 355a7651c3S猫头猫 ? artistItem.worksNum + '个作品' // TODO 用字符串模板函数更好 365a7651c3S猫头猫 : '' 375a7651c3S猫头猫 } ${artistItem.description ?? ''}` 382d0ec5c1S猫头猫 } 391119c2eaS猫头猫 title={ 401119c2eaS猫头猫 <TitleAndTag 411119c2eaS猫头猫 title={artistItem.name} 420eb1edf9S猫头猫 tag={artistItem.platform} 434060c00aS猫头猫 /> 441119c2eaS猫头猫 } 451119c2eaS猫头猫 /> 461119c2eaS猫头猫 </ListItem> 470eb1edf9S猫头猫 ); 480eb1edf9S猫头猫} 49