Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swiper组件list本地图片该如何写,谢谢 #1937

Closed
gandyf opened this issue Sep 8, 2017 · 1 comment
Closed

swiper组件list本地图片该如何写,谢谢 #1937

gandyf opened this issue Sep 8, 2017 · 1 comment

Comments

@gandyf
Copy link

gandyf commented Sep 8, 2017

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

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

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

@agileago
Copy link
Contributor

agileago commented Sep 8, 2017

你可以试试这样

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants