Add on error for images
parent
97ba4a7ddb
commit
227cdb94a4
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<span :class="containerClass" :style="style">
|
<span :class="containerClass" :style="style">
|
||||||
<img v-bind="$attrs" :style="imageStyle" :class="imageClass" />
|
<img v-bind="$attrs" :style="imageStyle" :class="imageClass" @error="onError"/>
|
||||||
<div class="p-image-preview-indicator" v-if="preview" @click="onImageClick">
|
<div class="p-image-preview-indicator" v-if="preview" @click="onImageClick">
|
||||||
<slot name="indicator">
|
<slot name="indicator">
|
||||||
<i class="p-image-preview-icon pi pi-eye"></i>
|
<i class="p-image-preview-icon pi pi-eye"></i>
|
||||||
|
@ -92,6 +92,9 @@ export default {
|
||||||
|
|
||||||
this.previewClick = false;
|
this.previewClick = false;
|
||||||
},
|
},
|
||||||
|
onError() {
|
||||||
|
this.$emit('onError');
|
||||||
|
},
|
||||||
rotateRight() {
|
rotateRight() {
|
||||||
this.rotate += 90;
|
this.rotate += 90;
|
||||||
this.previewClick = true;
|
this.previewClick = true;
|
||||||
|
|
Loading…
Reference in New Issue