按照作者您的范例,我的写法如下:
const imgList = [ '../assets/img/IMG_0205' ]
const demoList = imgList.map((one,index) => ({ url: 'javacript:', img: one })) 图片路径能找到,但是图片无法加载出来,求解,谢谢
你可以试试这样
const imgList = [ require('../assets/img/IMG_0205') ]
Most helpful comment
你可以试试这样