Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't use Vue.toast.show('Welcome!', 'Hey') #52

Open
Razor7w opened this issue Jul 2, 2020 · 0 comments
Open

I can't use Vue.toast.show('Welcome!', 'Hey') #52

Razor7w opened this issue Jul 2, 2020 · 0 comments

Comments

@Razor7w
Copy link

Razor7w commented Jul 2, 2020

Describe the bug
I try use library in external js, export all:

import VueIziToast from 'vue-izitoast'
import 'izitoast/dist/css/iziToast.min.css'
Vue.use(VueIziToast)

and when I want to use

Vue.toast.show('Welcome!', 'Hey')

shows on the console

Uncaught (in promise) TypeError: Cannot read property 'show' of undefined
    at eval (izitoast.js?57fa:29)
    at eval (vuex.esm.js?2f62:468)
    at Array.forEach (<anonymous>)
    at Store.commit (vuex.esm.js?2f62:468)
    at Store.boundCommit [as commit] (vuex.esm.js?2f62:405)
    at local.commit (vuex.esm.js?2f62:792)
    at eval (actions.js?43b5:36)
    at <anonymous>

Additional context
Use js external to vue, i cant use this.$toast.show('Welcome!', 'Hey') in this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant