eleiva/yii2-noty

jQuery 插件 noty 的包装器

安装次数: 839

依赖者: 0

建议者: 0

安全性: 0

星星: 2

关注者: 3

分支: 5

开放问题: 4

类型:yii2-extension

dev-master 2015-03-06 13:06 UTC

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',
              ]);