Vue element UI uses this. $notify is not a function problem resolution using the notification box

first we use the Element UI that encapsulates Notifacation for us so there is no need to install Notifacation in your project;

so there is no need to introduce the installed notifacation

in main

some web sites say that installing “Notifications” directly and importing Notifications from “Notifications” in main.js is wrong.

if you want to use notifaction why do you need to import additional components to install other components in this place if you bring in additional notifaction please customize the notifaction do not use element Ui;

if you want to use element Ui, simply make the following configuration in element. Js to solve the problem:

step1: import {Notifacation} from ‘element-ui’

step2: do not write vue. use(Notifacation) when using; instead, write

Vue.prototype.$notify = Notification

> this.$notify is not a function;

> this.$notify is not a function.

if a prompt for toast pops up as soon as you enter a page or refresh the top of a page in the project, remove vue. use (Message) from element.js, but Import is still needed;

Read More: