首先 我们使用的是Element UI为我们封装的 Notifacation 所以 项目中无需额外再安装 Notifacation;
所以 更不需要 在main中引入 安装的notifacation
一些网站 说 遇到这个问题 直接安装 "vue-notification" 并且 在main.js中引入import Notifications from "vue-notification"是错误的;
如果 想要使用 notifaction 为何还需额外导入安装 其他组件 这个地方如果额外引入 请自定义 notifaction 就不要用element Ui ;
如果想要用element Ui 的话 直接在 element.js当中 做如下配置 即可解决问题:
step1: import {Notifacation} from 'element-ui'
step2: 在进行使用的时候 不要写 Vue.use(Notifacation) 而是写成:
Vue.prototype.$notify = Notification
截止目前 项目中的this.$notify is not a function问题解决;
如果项目中出现 一进入某页面或者刷新某页面上方就弹出提示吐司内容的情况 ,要把element.js中的Vue.use(Message)去掉即可,但是Import还是要进行引入的;