7
7
700Hp2022-02-01 20:05:13
Vue.js
700Hp, 2022-02-01 20:05:13

Vue3, why is the component not working globally?

Connected the library for authorization via https://github.com/phanan/vue-google-signin-button

My code:

import { createApp } from 'vue'
// прочие
import GSignInButton from 'vue-google-signin-button'

createApp(App).use(store).use(router).use(GSignInButton).mount('#app')


app.vue
<template>
  <component :is="layout + '-layout'"></component>
</template>


Sample
<router-view v-slot="{ Component }">
    <transition mode="out-in" name="component-fade">
      <component :is="Component" />
    </transition>
  </router-view>


A button in a nested component.
<g-signin-button
          :params="googleSignInParams"
          @success="onSignInSuccess"
          @error="onSignInError">
          Sign in with Google </g-signin-button>


Error: 61f968997a528618388292.png
I tried to enter the correct clientId
When I place this button directly in the VUE component, it disappears. How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LJ322, 2022-02-05
@LJ322

This plugin most likely does not work on version 3. The plugin was last updated 3 years ago

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question