定制 yiidoc/yii2-lazyload 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yiidoc/yii2-lazyload

Composer 安装命令:

composer require yiidoc/yii2-lazyload

包简介

Extension redactor for Yii2 Framework.

README 文档

README

Extension LazyLoad for Yii2 Framework.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiidoc/yii2-lazyload "*"

or

 "yiidoc/yii2-lazyload": "*"

to the require section of your composer.json.

Configure

Default use LazyWidget automatic render with options attributes img html tag and configure client scripts

use yiidoc\lazyload\LazyWidget;
...
<?=LazyWidget::widget();

or manual generate img tags

   use yiidoc\lazyload\LayzAsset;
   LayzAsset::register($view); // $view instanceOf yii\web\View
   $js = "jQuery('img.img-lazy').lazyload();";
   $view->registerJs($js);
   //manaul generate img tag
   Html::img($blank-img,['class'=>'img-lazy','data-src'=>$url]);

Bummer! i was tested on my project but not have many time to write document on file and usage. If you have problem please create a issue

Thanks!

统计信息

  • 总下载量: 241
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-10-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固