Closed Quokka-CQ closed 5 months ago
react-vant
react-vant-icons
3.3.1
No response
在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在页面中不显示,且无报错
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> ))}
有没有可能是图片问题
我用的没问题
Which React Vant packages are impacted?
react-vant
(React Vant core)react-vant-icons
(React Vant Icon)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在页面中不显示,且无报错