Topic: Notification Pro version leads to error message

Pletnev priority asked 4 years ago


Expected behavior

Show notification**

Actual behavior**

Error message: Cannot read property 'info' of undefined

Resources (screenshots, code snippets etc.)

var vm = new Vue({ el: '#form',
 components: { mdbInput: mdbvue.mdbInput, mdbSelect: mdbvue.mdbSelect, mdbDatePicker: mdbvue.mdbDatePicker, mdbContainer: mdbvue.mdbContainer, mdbRow: mdbvue.mdbRow, mdbCol: mdbvue.mdbCol, mdbBtn: mdbvue.mdbBtn, mdbIcon: mdbvue.mdbIcon },
...methods: 
{ this.$notify.info({ message: 'Hi! I am info message.', position: 'top right', timeOut: 5000 }); }

Mikołaj Smoleński staff answered 2 years ago


@lgmaxim31 please open a new issue with a detailed explanation of problems.

Keep coding,  Mikołaj from MDB


lgmaxim31 free answered 2 years ago


How can I use it in vuex store ?


lgmaxim31 free answered 2 years ago


Why you just do not edit the official documentation ?


Magdalena Dembna staff answered 4 years ago


First of all, make sure that your code is correct - you can find working examples here: https://mdbootstrap.com/docs/vue/advanced/notifications/ . Make sure that this import is included in your main.js file - this is, the most likely, the reason for the error message:

import Notify from 'mdbvue/lib/components/Notify'
Vue.use(Notify)

In future tickets, please make use of our formatting tools. Best regards, Magdalena



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: 6.7.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 8
  • Provided sample code: Yes
  • Provided link: No