-
Notifications
You must be signed in to change notification settings - Fork 239
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
img 动态src两个问题 #60
Comments
@Dowgen 请问解决了吗 |
@634323580 这玩意儿搞了我好久,最后放弃动态src的写法,直接把可能会显示的图片dom全部写上,通过某data的值来区分当前应该显示哪张图片 |
这就是你自己的问题咯,如果你要:src="'/assets/xxx.jpg'"这样写,比如xxx.png放在src下的assets文体夹下,你要把xxx.png移到项目/static/assets文件夹下,:src=“‘/static/assets/xxx.png’” @Dowgen |
用require |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.如果是 img :src="path"
这样的话,把需要的图片放同级目录下assets文件夹内,
data:{ path:'./assets/xxx.img'} 这样是引用不到的
2.我在根目录里添加static/img目录,把图片放这里面去,run dev倒是引用到了,但是run build之后dist/static/img里是不会有这些图片的,求解
The text was updated successfully, but these errors were encountered: