awema-pl / module-system-notify
主题中显示通知的模块。
v1.0.9
2021-12-14 10:01 UTC
Requires
- illuminate/support: ~5|~6|~7|~8|~9
README
这里应放置您的描述。请查看contributing.md以查看待办事项清单。
文档
NPM 脚本
开发模式 npm run watch
或简单 npm start
为 IE 开发的模式 npm run watch:legacy
生产构建 npm run build
安装
通过 Composer
$ composer require awema-pl/module-system-notify
该包将自动注册自己。
使用方法
创建一个用于显示通知的容器
@notify(['name' => 'container', 'stack' => false, 'config' => "{theme: 'inline', timeout: 0}"])
// notify in different styles to specific container Notify::info('title', 'message')->to('container'); Notify::error('title', 'message')->to('container'); Notify::warning('title', 'message')->to('container'); Notify::success('title', 'message')->to('container'); // add button to notification Notify::notify('title', 'message', 'success') ->withButton([ 'text' => 'Install now', // button cta text, required 'url' => '/path', // required 'data' => [ 'param' => 'some param' ], // payload, if needed 'method' => 'patch'// if needed, POST by default ])->to('container');
还提供辅助函数
alert('title', 'message', 'info')->to('container');
允许包含基本 HTML 的消息
alert('title', '<a href="/path">message</a>', 'info')->to('container');
贡献
请参阅contributing.md以获取详细信息及待办事项清单。
安全
如果您发现任何与安全相关的问题,请通过 :author_email 发送电子邮件,而不是使用问题跟踪器。
致谢
许可证
GNU 通用公共许可证 v3.0。有关更多信息,请参阅许可证文件。