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

284
Views
How to put alternate background for nested recursive tree structure in Vue

I am trying to build an OKR type of component with nested tree structure. I have used dynamic recursive component to not make the depth hard code. All the nodes of the tree can be expanded. However I am not able to write a proper logic to make the nodes having alternate background. Since the nodes can be expanded, the background of the child nodes has to be adjusted accordingly.

Here is my sample in code sandbox: code link here.

What I want to achieve is like this: enter image description here

when expanded it should adjust the child node backgrounds like this:

enter image description here

about 4 years ago · Juan Pablo Isaza
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!