fix showing error on empty
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="image">
|
<div class="image">
|
||||||
<SMLoading v-if="imgLoaded == false && imgError == false" />
|
<SMLoading
|
||||||
|
v-if="props.src != '' && imgLoaded == false && imgError == false" />
|
||||||
<img
|
<img
|
||||||
v-if="imgError == false"
|
v-if="props.src != '' && imgError == false"
|
||||||
:src="src"
|
:src="src"
|
||||||
@load="imgLoaded = true"
|
@load="imgLoaded = true"
|
||||||
@error="imgError = true" />
|
@error="imgError = true" />
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import SMLoading from "./SMLoading.vue";
|
import SMLoading from "./SMLoading.vue";
|
||||||
|
|
||||||
defineProps({
|
const props = defineProps({
|
||||||
src: {
|
src: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user