diff options
| author | taehoon <th.dev91@gmail.com> | 2019-02-02 14:11:36 -0500 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-02-02 14:11:36 -0500 |
| commit | 95b735ff7244a44c61034be1c1e927f2fef3798e (patch) | |
| tree | 4e05a0af7d9f662fa29ee2c959c225da6d50c98d /src/components/still-image | |
| parent | 815b9d239145d29c9c2472a5abd1a9d1fb653903 (diff) | |
Show placeholder image if avatar image url is broken
Diffstat (limited to 'src/components/still-image')
| -rw-r--r-- | src/components/still-image/still-image.js | 3 | ||||
| -rw-r--r-- | src/components/still-image/still-image.vue | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 5ad06dc2..8f3a7206 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -2,7 +2,8 @@ const StillImage = { props: [ 'src', 'referrerpolicy', - 'mimetype' + 'mimetype', + 'imageLoadError' ], data () { return { diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index 1dcb7ce6..29c59e42 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -1,7 +1,7 @@ <template> <div class='still-image' :class='{ animated: animated }' > <canvas ref="canvas" v-if="animated"></canvas> - <img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad"/> + <img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad" @error="imageLoadError"/> </div> </template> |
