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

82
Views
multiple v-model in components

is there any way to make this code simplier?

<b-address 
    v-model:name="address.name" 
    v-model:addressLine="address.addressLine"
    v-model:streetNumber="address.streetNumber" 
    v-model:town="address.town" 
    v-model:country="address.country"
    v-model:postcode="address.postcode" 
    v-model:phoneNumber="address.phoneNumber"
    v-model:homeAddress="address.homeAddress" 
/>

it would be nice if some shorthand would exist, some like this:

<b-address 
    v-model="address" 
/>

then, since b-address is a component and address is an object, shorthand would be great! any ideas? Thank you

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

0

in case the component is not made by you or you do not have the possibility to go and modify that code, nom you cannot :(

if instead, that component is yours, then a hypothesis could be to do v-model:fullAddress giving access to the whole object as a model!

with a result like this

<b-address v-model:fullAddress="address" />
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!