Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
Vue iterate over array of image paths and display them

So I have an array of image paths that I retrieve from rest API and i'm trying to display them using a v-for loop this is the code of the page that displays them

<template>
  <v-app>

    <app-navbar />

    <v-main>
        <h3>test {{$route.params.name}}, {{$route.query.status}},{{$route.query.tag}}</h3>
        <h3>{{imagesref}}</h3>
        <ul id="example-1">
      <li v-for="item in imagesref" :key="item">
        {{item}}
      </li>
      </ul>
      
  
    </v-main>
  </v-app>
</template>

<script>
import appNavbar from '../../../components/appNavbar.vue';
import axios from "axios";
export default {
  components : {appNavbar},
  name: "App",
  data() {
    return {
      items: [],
      imagesref: [],
          };
  },
  async created() {
    try {
      const res = await axios.get(`http://localhost:3004/tests`,{ params: {name:this.$route.params.name} });
      this.items = res.data;
      this.imagesref=res.data[0].refimages;
      
    } catch (error) {
      console.log(error);
    }
  },

};
</script>

<style lang="scss" scoped>

</style>

the images are inside the assets folder like this

/assets
  /captures
     /test_..
        /@DHRD_..
           /testname
              /1.png

the path of the images are retrieved as an array with each element being a path to an image like this

projectname/assets/captures/test../@DHRD../testname/1.png

How can I display all the images

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda