3lang3 / react-vant

React mobile UI Components base on Vant
https://react-vant.3lang.dev
MIT License
1.31k stars 186 forks source link

🐛 [Bug]: <GridItem>组件icon失效 #667

Closed Quokka-CQ closed 5 months ago

Quokka-CQ commented 1 year ago

Which React Vant packages are impacted?

What version of React Vant are you using?

3.3.1

Reproduce live demo(codesandebox or stackblitz)?

No response

Descripition

在NextJS中使用react-vant list中的icon形如icon: '/creditcard/apply.png', 以下为出错代码 {list.map(({ icon, typename, type }, index) => ( <GridItem key={index} icon={<Image src={icon} width={60} height={60} alt="..."></Image>} text={typename} onClick={(e) => { onClickGridItem(type, typename) }}> {typename} </GridItem> ))} 按此方法使用,icon在页面中不显示,且无报错

day-xue commented 8 months ago

有没有可能是图片问题

day-xue commented 8 months ago

我用的没问题