coderovich/yii2-sortablejs

SortableJS/Sortable 扩展的 Yii2 实现。用于创建现代浏览器和触摸设备上的可重新排序的拖放列表。

安装次数: 205

依赖关系: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 1

开放问题: 0

类型:yii2-extension

1.1 2019-01-27 16:11 UTC

This package is auto-updated.

Last update: 2024-09-28 05:49:08 UTC


README

这是一个用于创建现代浏览器和触摸设备上的可重新排序的拖放列表的 Yii 框架 2.0

https://github.com/yii-ui/yii2-rubaxa-sortable 分支复制

修复:

  • 客户端事件
  • SortableJS 插件调用

安装

安装此扩展的首选方式是通过 composer

运行以下命令之一

php composer.phar require coderovich/yii2-sortablejs

"coderovich/yii2-sortablejs": "~1.0.0"

将以下内容添加到您的 composer.json 文件的 require 部分。

使用方法

use coderovich\sortablejs\Sortable;

echo Sortable::widget([
    'items' => [
        'Item 1',
        ['content' => 'Item2'],
        [
            'content' => 'Item3',
            'options' => ['class' => 'text-danger'],
        ],
    ],
    'containerOptions' => ['class' => 'list-group'],
    'itemOptions' => ['class' => 'list-group-item'],
    'clientOptions' => ['animation' => 0],
]);

文档

https://github.com/SortableJS/Sortable 上查看[文档]。

许可证

coderovich/yii2-sortableJS 在 BSD 3-Clause 许可证下发布。有关详细信息,请参阅 LICENSE.md