vuetify
vuetify copied to clipboard
[Feature Request] Simplify v-img error slot usage
Problem to solve
Right now what we have to do if we want to show an image in case of error is this:
<script setup>
const imgWidth = 40
</script>
<template>
<v-img
src="https://path/to/my-image"
:width="imgWidth"
>
<template #error>
<v-img src="https://path/to/error-image" :width="imgWidth"></v-img>
</template>
</v-img>
</template>
Which is quite some code.
Proposed solution
It would be awesome to be able to do something like this:
<v-img
src="https://path/to/my-imag"
error-src="https://path/to/error-image"
width="40"
></v-img>