mallka / yii2-flyingpage
飞页的包装器
dev-master
2020-11-24 15:46 UTC
Requires
- yiisoft/yii2: ~2.0.14
This package is auto-updated.
Last update: 2024-09-25 00:20:55 UTC
README
飞页的包装器。
参考:https://github.com/gijo-varghese/flying-pages
安装
通过Composer
php composer.phar require --prefer-dist yiirise/yii2-flyingpage "dev-master"
将以下行添加到您的composer.json中
"mallka/yii2-flyingpage": "dev-master"
然后执行composer update
如何使用
<?= \mallka\flyingpage\FlyingPage::widget([ 'delay'=>0,//delay: Start prefetching after a delay (in seconds). Will be started when the browser becomes idle, using requestIdleCallback. Default to 0. 'ignoreKeywords'=>['A','B'], //ignoreKeywords: An array of keywords to ignore from prefetching. Example ['/logout','/cart','about.html','sample.png','#']. 'maxRPS'=>3,//maxRPS: Maximum requests per second the queue should process. Set to 0 to process all requests immediately (without queue). Default to 3. 'hoverDelay'=>50,//hoverDelay: Delay in prefetching links on mouse hover (in milliseconds). Default 50. ]); ?>