Noty 未定义

问题描述

我正在尝试安装 noty 以在我的 laravel 项目中获取通知,但它似乎不起作用,我总是发现 Noty 未定义,我已经尝试了所有方法但不知道该怎么做,有什么解决办法吗?

安装:

enter image description here

App.scss:

enter image description here

Bootstrap.js:

enter image description here

app.blade.PHP :

enter image description here

错误

未捕获的引用错误:未定义 Noty

我希望得到一些帮助。

解决方法

通过添加 window.onload 函数修复它

,

当你想测试时尝试添加运行这个:

npm run dev