eleiva / yii2-noty
jQuery 插件 noty 的包装器
dev-master
2015-03-06 13:06 UTC
Requires
- bower-asset/animate.css: 3.2.3
- bower-asset/noty: 2.3.4
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-24 08:02:46 UTC
README
jQuery 插件 noty 的包装器 ( http://ned.im/noty/ )
安装
安装此扩展的首选方式是通过 composer。
你可以运行
php composer.phar require --prefer-dist eleiva/yii2-noty "*"
或者在你的 composer.json 文件的 require 部分添加
"eleiva/yii2-noty": "*"
使用
扩展安装完成后,只需在代码中使用它即可
use eleiva\noty\Noty; echo Noty::widget([ 'text' => 'Hi! Looks good!', 'type' => Noty::INFORMATION, 'useAnimateCss' => true, 'clientOptions' => [ 'timeout' => 5000, 'layout' => 'top', 'dismissQueue' => true, 'theme' => 'relax', 'animation' => [ 'open' => 'animated bounceInLeft', 'close' => 'animated bounceOutLeft', 'easing' => 'swing', 'speed' => 500 ] ] ]);
或简单地
use eleiva\noty\Noty; echo Noty::widget([ 'text'=> 'Helloo WORLD', ]);