Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

401
Vistas
VueJS + quasar + TypeScript No se puede llamar a esto. $router.push()

Estoy tratando de enrutar a otra página dentro de una función dentro de un componente. No puedo llamar a this.$router.push() y obtengo los siguientes errores:

 Compiled with problems:X ERROR in src/components/ButtonList.vue:118:16 TS2339: Property '$router' does not exist on type 'RenderFunction | { showLoading(): void; todoCount: ComputedRef<number>; clickCount: Ref<number>; increment: () => number; } | Promise<{ showLoading(): void; todoCount: ComputedRef<...>; clickCount: Ref<...>; increment: () => number; }>'. Property '$router' does not exist on type 'RenderFunction'. 116 | $q.loading.hide(); 117 | timer = void 0; > 118 | this.$router.push('step-02'); | ^^^^^^^ 119 | }, 2000); 120 | }, 121 | }; ERROR in src/components/ButtonList.vue:118:11 @typescript-eslint/no-unsafe-member-access: Unsafe member access .push on an `any` value. 116 | $q.loading.hide(); 117 | timer = void 0; > 118 | this.$router.push('step-02'); | ^^^^^^^^^^^^^^^^^ 119 | }, 2000); 120 | }, 121 | }; ERROR in src/components/ButtonList.vue:118:11 @typescript-eslint/no-unsafe-call: Unsafe call of an `any` typed value. 116 | $q.loading.hide(); 117 | timer = void 0; > 118 | this.$router.push('step-02'); | ^^^^^^^^^^^^^^^^^ 119 | }, 2000); 120 | }, 121 | };

Alguna idea de cómo solucionar este problema? Obtuve un botón que debería enrutar a la página siguiente después de un retraso, por lo tanto, la función setTimeout.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda