-
Notifications
You must be signed in to change notification settings - Fork 29
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
this.$noty.button / VueNoty.button is not a function #1
Comments
Similarly, |
@nateritter I dont think |
@stranger26 Yes, I see that. I guess I should have edited this to be more of a request after I found it. I'd like buttons to be supported. :) |
A simple workarround is importing Noty from 'noty' and using Noty.button instead of this.$noty.button. Is'n the best solution, but works while this is'nt supported. |
Is this feature ever going to be supported? (: |
my workaround
|
Similar to what @FnnDK was saying, in your main.js, you could probably extend/add that function to noty similar to how you would extend a prototype or object in JS. Perhaps something like: /*
Other Main.js imports
*/
import Noty from 'noty'
import VueNoty from 'vuejs-noty'
VueNoty.button = Noty.button
Vue.use(VueNoty)
// continue with app initialization Note I haven't tested this but it seems like something that would be possible. There may be a little more involvement. Might look into this later tonight 👍 |
I'm attempting to add confirmation buttons to the dialog per https://ned.im/noty/#/confirm. When I try either ...
this.$noty.button('YES', 'btn', function () { console.debug('foo'); })
or
VueNoty.button('YES', 'btn', function () { console.debug('foo'); })
... and attempt to add it to the message's
buttons
property, I get the following error:TypeError: this.$noty.button is not a function
The text was updated successfully, but these errors were encountered: