Welcome to OStack Knowledge Sharing 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 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...