panix/wgt-jstree

Widget JsTree

安装: 283

依赖: 2

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:pixelion-component

1.0.0 2021-03-03 06:42 UTC

This package is auto-updated.

Last update: 2024-09-07 15:02:37 UTC


README

用于Yii Framework 2.0的Widget,以便使用 JsTree

Latest Stable Version Total Downloads Monthly Downloads Daily Downloads Latest Unstable Version License

安装

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

运行以下命令之一:

php composer require --prefer-dist panix/wgt-jstree "*"

或者

"panix/wgt-jstree": "*"

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

使用方法

扩展安装完成后,只需在代码中通过以下方式使用它:

<?= \panix\ext\jstree\JsTree::widget([
    'attribute' => 'attribute_name',
    'model' => $model,
    'core' => [
        'data' => $data
        //...
    ],
    'plugins' => ['types', 'dnd', 'contextmenu', 'wholerow', 'state'],
    //...
]); ?>
<?= \panix\ext\jstree\JsTree::widget([
    'core' => [
        'data' => $data
        //...
    ],
    'plugins' => ['types', 'dnd', 'contextmenu', 'wholerow', 'state'],
    //...
]); ?>