thtmorais/yii2-pace
最新稳定版本:1.2.4.2
Composer 安装命令:
composer require thtmorais/yii2-pace
包简介
PACE (Progress Automatically Certain to Entertain) - Automatic page load progress bar for Yii PHP Framework
README 文档
README
PACE (Progress Automatically Certain to Entertain) - Automatic page load progress bar for Yii PHP Framework
Installation
The preferred way to install this extension is through composer.
Either run
composer require thtmorais/yii2-pace "*"
or add
"thtmorais/yii2-pace": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?php use thtmorais\pace\Pace; echo Pace::widget(); ?>
or
<?= \thtmorais\pace\Pace::widget() ?>
We recommend using in the layouts/main.php file. Or if you prefer in each view file with their respective settings.
Configuration
By default the PACE comes configured with blue color and animation minimal.
You can add general rule for all views in the config/params.php file as follows:
<?php return [ 'paceOptions' => [ 'color' => 'blue', 'theme' => 'minimal', 'options' => [] ] ]; ?>
or individually in each view:
<?php use thtmorais\pace\Pace; echo Pace::widget([ 'color'=>'red', 'theme'=>'corner-indicator', 'options'=>[] ]); ?>
You can preview themes and colors here.
统计信息
- 总下载量: 14.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-18