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

192
Vistas
How do I return the event bus?

When I log in, I want to activate the like button.

To do that, I used the event bus and checked to see if I was logged in successfully.

But the like button is not activated.

It should return a true value when logged in, but it can't.

How can I return true?

I am using javascript and vue.

<template>
<div>
    <b-button
        :disabled="!validateForm"
        v-b-tooltip.hover.topleft.v-danger title="좋아요 누른 게시물" placement = "bottom"
        v-on:click="[on(), showlist()] "
        class="goodlist-btn"
        pill variant="outline-danger"
        style="box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;">
        <b-icon icon="heart-fill" ></b-icon>
    </b-button>
</div>
</template>
<script>
import {EventBus} from '../lib/event-bus.js'
import Vue from 'vue'

export default {
    name: 'likelist-btn',
    computed: {
        validateForm: function () {
            Vue.prototype.$firebaseAuth.eventBus.$on('onAuthStateChanged', (isLoggedIn) => {
                if (isLoggedIn) {
                    console.log('login ok: ' + isLoggedIn)
                    return true  //I should get this value returned.
                } else {
                    console.log('login no: ' + isLoggedIn)
                    return false  //I should get this value returned.
                }
            })
        }
    }
}

</script>
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