simialbi / yii2-widget-toastr
toastr 是一个作为 yii2 小部件实现的非阻塞通知的 JavaScript 库。
1.1.0
2022-07-28 06:57 UTC
Requires
- php: >=7.3
- bower-asset/toastr: ^2.1.0
- yiisoft/yii2: ^2.0.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-08-28 11:40:09 UTC
README
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一
$ php composer.phar require --prefer-dist simialbi/yii2-widget-toastr
或将以下内容添加到您的 composer.json
文件的 require
部分
"simialbi/yii2-widget-toastr": "^1.0.0"
toastr
演示
插件文档
所有选项和事件可以在 插件仓库页面 上找到。
示例用法
<?php use simialbi\yii2\Toastr; Toastr::widget([ 'type' => Toastr::TYPE_SUCCESS, 'title' => 'This is a toast', 'message' => 'Example toast message', 'closeButton' => true, 'debug' => false, 'newestOnTop' => false, 'position' => Toastr::POSITION_BOTTOM_RIGHT, 'progressBar' => true // [...] ]);
选项
许可
yii2-widget-toastr 在 MIT 许可下发布。有关详细信息,请参阅附带的 LICENSE。