vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Feature Request] Simplify v-img error slot usage

Open simionato-mobisec opened this issue 9 months ago • 0 comments

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>

simionato-mobisec avatar May 07 '24 10:05 simionato-mobisec