Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Cómo no repetir un elemento en particular en una tarjeta en vuetify

¿Alguien puede ayudarme? Quiero mostrar el título de la tarjeta solo en la tarjeta 1. No quiero mostrar el título de la tarjeta en tarjeta-2, tarjeta-3 y tarjeta-4.

 <v-app> <v-row v-for="(item, index) in list" :key="index"> <v-col cols="12"> <v-card> <v-card-title> <v-avatar size="60" color='primary'>{{item.avatarText}}</v-avatar> </v-card-title> <v-card-text>{{item.name}}</v-card-text> </v-card> </v-col> </v-row> </v-app> </template> <script> export default{ data(){ return{ list:[{name:'apple1',avatarText:'Abc',}, {name:'apple2'}, {name:'apple3'}, {name:'apple4'}] } }
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Usando v-if , puede verificar el index :

 new Vue({ el: "#app", vuetify: new Vuetify(), data: () => ({ list:[ {name:'apple1', avatarText:'Abc'}, {name:'apple2'}, {name:'apple3'}, {name:'apple4'} ] }) });
 <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script><link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"> <v-app id="app"> <v-row v-for="(item, index) in list" :key="index"> <v-col cols="12"> <v-card> <v-card-title v-if="index === 0"> <v-avatar size="60" color='primary'>{{item.avatarText}}</v-avatar> </v-card-title> <v-card-text>{{item.name}}</v-card-text> </v-card> </v-col> </v-row> </v-app>

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!