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

vue-snotify 3.2.1 is not work in vue 2.5.21 #73

Open
mlinquan opened this issue Jan 15, 2019 · 2 comments
Open

vue-snotify 3.2.1 is not work in vue 2.5.21 #73

mlinquan opened this issue Jan 15, 2019 · 2 comments

Comments

@mlinquan
Copy link

OS: macOS High Sierra 10.13.6
vue-snotify: v3.2.1
vue: v2.5.21
no error, no waring, no display snotify.

import Snotify, { SnotifyPosition } from 'vue-snotify'

const options = {
  toast: {
    position: SnotifyPosition.rightTop
  }
}

Vue.use(Snotify, options)
        console.log(vm.$snotify)
        vm.$snotify.info('Example body content', 'Example title', {
          timeout: 2000,
          showProgressBar: false,
          closeOnClick: false,
          pauseOnHover: true
        });

image

@DaveAuld
Copy link

I am also having the same issue on latest versions. The Snotify instance is responding from the console when i do vm0.$snotify but from a component, if I do this.$Snotify,warning("some error"); nothing happens,

I have imported the vue-snotify, added it using Use placed the element at the top of App.vue in the template and it is all visible in Vue Dev Tools,, when triggered via console it outputs the instance object;
image

Checking the console on loading the site I get a 'Failed to mount component message' despite it being clearly visible in the View Dev Tools.;

image

Any ideas?

@DaveAuld
Copy link

DaveAuld commented Mar 11, 2019

@mlinquan I followed this page and got it working. The name of the component added to the main App.vue page made all the difference, I was using the name by which I imported it with, when I noticed on the link below the component name was different from the imported name, I went back and changed it and boom all works.
https://alligator.io/vuejs/vue-notifications-snotify/

so, just sharing for info, as I was looking the rag with it and ready to move onto another notifications plug in!

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

2 participants