bariew / yii2-colorbox-widget

为Yii2定制的相册小部件

安装次数: 7

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 5

类型:yii2-extension

1.0.2 2015-01-23 10:10 UTC

This package is auto-updated.

Last update: 2024-09-16 14:57:55 UTC


README

这是一个基于Colorbox的Yii2可定制相册jQuery插件。

安装

推荐通过composer安装此扩展。

运行以下命令:

php composer.phar require "himiklab/yii2-colorbox-widget" "*"

或者在您的应用程序的composer.json文件的require部分添加以下内容:

"himiklab/yii2-colorbox-widget" : "*"

to the require section of your application's composer.json file.

使用方法

  • 在视图中
use himiklab\colorbox\Colorbox;

<?= Colorbox::widget([
    'targets' => [
        '.colorbox' => [
            'maxWidth' => 800,
            'maxHeight' => 600,
        ],
    ],
    'coreStyle' => 2
]) ?>