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

94
Views
Linked buttons in a loop

I want to make that when a button is clicked, a dialog appears associated only with this button. Now when clicked, they open all at once.

<v-col v-for="(goal, i) in goals" :key="i">
  <v-card>
    <v-card-actions>
      <v-btn @click="more = true">
        Подробнее
      </v-btn>
    </v-card-actions>
  </v-card>
  <v-dialog v-model="more">
    <v-card>
      <v-btn @click="more = false">
         Agree
      </v-btn>
    </v-card>
  </v-dialog>
</v-col>

<script>
export default {
  data: () => ({
    more: false,
  }),
}
</script>

click btn

4 dialogs

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

0

Try to replace true/false with id or index:

  data: () => ({
    goalId: null,
  }),

  <v-col v-for="(goal, i) in goals" :key="i">
    <v-card>
      <v-card-actions>
        <v-btn
          @click="goalId = i" //or goal.id
        >
          Подробнее
        </v-btn>
      </v-card-actions>
    </v-card>
    <v-dialog
      v-model="more" v-if="moreId === i"
    >
      <v-card>
          <v-btn
            @click="goalId = null"
          >
            Agree
          </v-btn>
      </v-card>
    </v-dialog>
  </v-col>
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!