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

192
Views
Vue.js3 Alternar v-show en la casilla de verificación/alternar clic, cómo hacer que v-show sea reactivo en cada clic
<template> <ToggleSwitch class="right " @onChange.preventDefault="onChange" ></ToggleSwitch> <div v-show="!hidden"> <CheckBox v-if="typeof cellProps.rowData.BrandTypeId === 'boolean'" class="right space" /> <Input v-if="typeof cellProps.rowData.BrandTypeId != 'boolean'" class="right space" label="Change Colors" /> </div> </template> <script lang="ts" setup> let hidden = true const onChange = () => { console.log("toggle successful", hidden) hidden = !hidden; } </script>

El valor oculto funciona en el procesamiento y no muestra la casilla de verificación ni la entrada en el div. Al hacer clic en el valor "oculto" cambia, pero el v-show no cambia. ¿Cómo se configura esto incorrectamente?

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

0

Puedes hacer que tu variable sea reactiva con ref :

 import { ref } from "vue' let hidden = ref(true) const onChange = () => { console.log("toggle successful", hidden) hidden.value = !hidden.value; }
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!