在 vue.js 中动态的显示服务端传入的图片,好像不可以直接拼接 img 标签。查阅下了资料 vue 好像可以函数的方式来处理…
<img :src="bindImage()" />
bindImage: function() { return this.charge.voucherPath},
这样就可以显示服务端传过来的数据了。
来源: http://www.2cto.com/kf/201707/655844.html