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

102
Views
Vue.js pass data from slot to component instance

I want to pass just a part of the data to instance component. For instance, I have table component and a cell slot (e.g.name), I want to pass the cell value to the instance and override it in the instance.

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

0

if we have a slot like this in our table component getting data as prop:

<slot name="name-cell" :name="row.name">
    {{row.name}}
</slot>

Scoped-slots are what you need.

We can change the title in the instance like this:

<table :data="data">
    <template #name-cell="{name}">
        This is {{name.toUpperCase()}}
    </template>
</table>

Therefore in the instance component you will see this is JACK instead of Jack as name cell.

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!