Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Simplify v-img error slot usage #19763

Open
simionato-mobisec opened this issue May 7, 2024 · 0 comments
Open

[Feature Request] Simplify v-img error slot usage #19763

simionato-mobisec opened this issue May 7, 2024 · 0 comments

Comments

@simionato-mobisec
Copy link

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 simionato-mobisec changed the title [Feature Request] Simplify error slot usage [Feature Request] Simplify v-img error slot usage May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant