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

156
Views
How to apply styles for v-slot?

<template>
<div>
 <app-tabs  class="w-11/12 lg:w-10/12 mx-auto" :tabList="contentList"  variant="horizontal">
 <template  v-for="content in contentList" v-slot:[content.SID]="">
 <div class="align-items">{{ content.id }}<br/> //not breaking line and giving error
 {{ content.name }}{{ content.val}}</div>
 </template>
</app-tabs>
</div>
</template>

Unable to add css class inside of vuejs slots. I am getting error as,

error Elements in iteration expect to have 'v-bind:key' directives vue/require-v-for-key

Is there any way to add css class, or any other alternative ways to do it? With internet resources, I found the way to do it by Deep Selectors like >>> but not sure how to proceed.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your error occurs because the key (:key="uniqueID") is missing. Add in your loop a key like :

<template  v-for="content in contentList" v-slot:[content.SID]="">
   <div :key="content.id" class="align-items">{{ content.id }}<br/> 
 {{ content.name }} {{ content.val }}</div>
</template>
about 4 years ago · Juan Pablo Isaza 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!