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

config object not working? #9

Closed
GsHeri opened this issue Feb 28, 2019 · 2 comments
Closed

config object not working? #9

GsHeri opened this issue Feb 28, 2019 · 2 comments

Comments

@GsHeri
Copy link

GsHeri commented Feb 28, 2019

(or am i doing it wrong?)

// ...
mounted() {
      this.$noty.show('Notification', { timeout: 3000 })
},
// ...

[Vue warn]: Error in mounted hook: "TypeError: Cannot create property 'timeout' on string 'alert'"

    at t (vuejs-noty.js?caee:formatted:327)
    at Object.t [as deepExtend] (vuejs-noty.js?caee:formatted:327)
    at new t (vuejs-noty.js?caee:formatted:1293)
    at Object.show (vuejs-noty.js?caee:formatted:1736)
    at VueComponent.mounted (ExchangeTrade.vue?1bec:67)
    at callHook (vue.esm.js?efeb:2921)
    at Object.insert (vue.esm.js?efeb:4158)
    at invokeInsertHook (vue.esm.js?efeb:5960)
    at Vue.patch [as __patch__] (vue.esm.js?efeb:6179)
    at Vue._update (vue.esm.js?efeb:2660)``` 


thanks for any help :)
@renoguyon
Copy link
Owner

Well, I think I should update the documentation :)

.show() method accepts 3 parameters, usage as follows:

this.$noty.show(message, notificationType, optionalParams)

  • notificationType is a string and can be alert (default), success, error, warning or info
  • optionalParams is your config object

You can also use shorthand methods such as :

this.$noty.success('Your message here', { timeout: 3000 })

Hope this helps!

@GsHeri
Copy link
Author

GsHeri commented Feb 28, 2019

ohhhhhhhhhhhhhhh, ok. it totally helps, now i see. it just doesn't work with "show"...
ok thanks very much :D didn't really see that from the docs.
have a nice day :)

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