动态的绑定src
//进行了拼接${id}在data中有声明id:''
<img
v-show="isShowimg"
style="height:100%"
:src="(`/SubmitSalesOrder/previewImg?orderId=${id}`)"
>
动态的绑定a标签的href属性
//html
<a
style="color:#409EFF"
:href="downloadImg"
download="图片"
>下载图片</a>
computed: {
downloadImg () {
const id = localStorage.getItem('submitId')
return '自己访问的ip/SubmitSalesOrder/download?orderId=' + id
}
},