Vux: swiper组件list本地图片该如何写,谢谢

Created on 8 Sep 2017  ·  1Comment  ·  Source: airyland/vux

按照作者您的范例,我的写法如下:

const imgList = [
'../assets/img/IMG_0205'
]

const demoList = imgList.map((one,index) => ({
url: 'javacript:',
img: one
}))
图片路径能找到,但是图片无法加载出来,求解,谢谢

componenswiper

Most helpful comment

你可以试试这样

const imgList = [
  require('../assets/img/IMG_0205')
]

>All comments

你可以试试这样

const imgList = [
  require('../assets/img/IMG_0205')
]
Was this page helpful?
0 / 5 - 0 ratings