ofilin / yii2-lightgallery
lightgallery
0.1.0
2019-12-02 09:19 UTC
Requires
- bower-asset/lightgallery: *
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-29 05:35:49 UTC
README
从 https://github.com/kowap/yii2-lightgallery 分支而来,修复了lib路径
为Yii2的jQuery lightgallery
关于画廊的更多信息请访问 这里.
安装
安装此扩展的首选方式是通过 composer.
运行以下命令之一
composer require ofilin/yii2-lightgallery
或者在您的 composer.json
文件的 require 部分添加
"ofilin/yii2-lightgallery": "*"
使用方法
一旦安装了此扩展,您只需在代码中通过以下方式使用它
<?php echo \ofilin\lightgallery\LightGalleryWidget::widget([ 'items' => [ [ 'thumb' => '../thumb/image_1.jpg', 'src' => '../big/image_1.jpg' ], [ 'thumb' => '../thumb/image_2.jpg', 'src' => '../big/image_2.jpg' ] ], // more options http://sachinchoolur.github.io/lightGallery/docs/api.html 'options' => [ 'mode' => 'lg-zoom-in-big', 'download' => false, 'zoom' => false, 'share' => false ] ]); ?>