1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| <template>
<img id="img1" :src="imageUrl1" alt="" style="width: 700px"/> </template> <script> data(){ return{ imageUrl1:'', } } mounted(){ this.initImage(); } method(){ initImage(){ this.axiosFun() .then(function (response) { var blob = new Blob([response]); this.imageUrl1 = window.URL.createObjectURL(blob); }) .catch(function (err) { console.log(err); }); } } </script>
|