Closed obonyojimmy closed 6 years ago
i tried using it as below in my project , however doing a console check on the pnotify object return a fuction , but no errors or notification shown :
<script> var PNotify = require('pnotify') module.exports = { props:{ }, data: function () { return { } }, created: function() { }, ready: function(){ //this.generatePnotify(); }, methods : { generatePnotify : function(){ var self = this ; var pn = new PNotify({ title: 'Regular Notice', text: 'Check me out! I\'m a notice.' }); console.log(pn); } }, events: { 'show::pnotify-js': function () { console.log('pnotify-js event received'); this.generatePnotify(); } }, computed: { } } </script>
If you mean this code specifically, you've got the call to generatePnotify commented out. If you mean it's being called from somewhere else and it's not working, you might not be including the CSS.
generatePnotify
i tried using it as below in my project , however doing a console check on the pnotify object return a fuction , but no errors or notification shown :