Fix mishandled @error in stillImage
This commit is contained in:
parent
448317338e
commit
5974dfebfb
@ -24,6 +24,9 @@ const StillImage = {
|
|||||||
canvas.width = width
|
canvas.width = width
|
||||||
canvas.height = height
|
canvas.height = height
|
||||||
canvas.getContext('2d').drawImage(this.$refs.src, 0, 0, width, height)
|
canvas.getContext('2d').drawImage(this.$refs.src, 0, 0, width, height)
|
||||||
|
},
|
||||||
|
onError () {
|
||||||
|
this.imageLoadError && this.imageLoadError()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='still-image' :class='{ animated: animated }' >
|
<div class='still-image' :class='{ animated: animated }' >
|
||||||
<canvas ref="canvas" v-if="animated"></canvas>
|
<canvas ref="canvas" v-if="animated"></canvas>
|
||||||
<img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad" @error="imageLoadError"/>
|
<img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad" @error="onError"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<StillImage class="avatar" :class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }" :src="imgSrc" :imageLoadError="imageLoadError"/>
|
<StillImage
|
||||||
|
class="avatar"
|
||||||
|
:class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
|
||||||
|
:src="imgSrc"
|
||||||
|
:imageLoadError="imageLoadError"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script src="./user_avatar.js"></script>
|
<script src="./user_avatar.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user