liuxiaolong
2019-05-06 acc45d2ece02563964d7b8a22ff0c40bd8358889
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
28
29
30
31
32
33
<template>
  <img :src="'/httpImage/'+src" :onerror="noneImg" :height="height" :width="width"  :alt="alt"/>
</template>
<script>
export default {
  name: 'httpImg',
  props: {
    src: {
      default: '',
      type: String
    },
    alt: {
      default: '',
      type: String
    },
    height: {
      default: '100%',
      type: String
    },
    width: {
      default: 'auto',
      type: String
    }
  },
  data() {
    return {
      noneImg: 'this.src="' + require('@/assets/img/noneImg.png') + '"'
    }
  }
}
</script>
<style scoped>
</style>