Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.4k views
in Technique[技术] by (71.8m points)

关于vue图片加载的问题?

图片需从后端(nodejs开发的后台服务)的接口经过查询后才返回,前端(vue)该如何动态的展示这个图片

目前是采用静态资源的形式,但是感觉这样不太严谨

img.src = 'http://localhost:9000/public/images/'+this.data.stuFile

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

直接返回完整路径呀,不太明白你是路径拼接不严谨,还是已静态资源的形式存储不严谨


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...