fedemotta/yii2-gridstack
最新稳定版本:v1.1
Composer 安装命令:
composer require fedemotta/yii2-gridstack
包简介
Gridstack.js widget for Yii2
关键字:
README 文档
README
This extension provides the Gridstack.js integration for the Yii2 framework.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist fedemotta/yii2-gridstack "*"
or add
"fedemotta/yii2-gridstack": "*"
to the require section of your composer.json file.
Usage
Use Gridstack.js as any other other Yii2 widget.
use fedemotta\gridstack\Gridstack;
<?php $gridstack = Gridstack::begin([ 'options'=>['class'=>'grid-stack'], 'clientOptions'=>[ 'cellHeight'=> 80, 'verticalMargin'=> 10, ], ]);?> <?=$gridstack->beginWidget(['class'=>'grid-stack-item','data-gs-width'=>"4",'data-gs-height'=>"2",'data-gs-x'=>"0",'data-gs-y'=>"0",]);?> <div class="grid-stack-item-content"></div> <?=$gridstack->endWidget();?> <?=$gridstack->beginWidget(['class'=>'grid-stack-item','data-gs-width'=>"4",'data-gs-height'=>"4",'data-gs-x'=>"4",'data-gs-y'=>"0",]);?> <div class="grid-stack-item-content"></div> <?=$gridstack->endWidget();?> <?php Gridstack::end(); ?>
You can also use Gridstack.js in the JavaScript layer of your application. To achieve this, you need to include Gridstack as a dependency of your Asset file.
public $depends = [ ... 'fedemotta\gridstack\GridstackAsset', ... ];
统计信息
- 总下载量: 14.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-29