sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 513 forks source link

Node Error , No notification No error #243

Closed obonyojimmy closed 6 years ago

obonyojimmy commented 8 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>
hperrin commented 6 years ago

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.