seche/nova-jstree
Composer 安装命令:
composer require seche/nova-jstree
包简介
A Laravel Nova field.
README 文档
README
Nova-Jstree
Nova Field for the JsTree library. This allows you to utilize JsTree in a model.
Table of Contents
Prerequisites
This package utilizes the following NPM packages:
Installation
-
The package can be installed through Composer.
composer require seche/nova-jstree -
Use the field.
use Seche\NovaJstree\Jstree; -
Publish Assets.
php artisan vendor:publish --tag=jstree-images php artisan vendor:publish --tag=jstree-fonts
Usage
public function fields(Request $request)
{
return [
Jstree::make(__('Name'), 'name')
->theme(['dots' => true, 'stripes' => false, 'icons' => false])
->checkbox()
->search()
->data(['1', '2', '3']),
];
}
Note: See JsTree Documentation for full details on each options available.
data()
Takes an array and converts it to a usable JSON object by JsTree.
You can use the ->toArray() helper method on a Collection when passing it in data().
theme()
Default:
[
'dots' => true,
'icons' => true,
'stripes' => true,
'name' => 'default', // default-dark
'variant' => 'small' // small, large, null
]
types()
Default:
[
'#' => ['max_children' => 1,
'max_depth' => 4,
'valid_children'=> ['root']
],
'root' => [
'icon' => 'fa fa-hdd text-yellow',
'valid_children' => ['default', 'file']
],
'default' => [
'icon' => 'fa fa-folder text-yellow',
'valid_children' => ['default','file']
],
'file' => [
'icon' => 'fa fa-file',
'valid_children' => []
],
'text' =>[
'icon' => 'far fa-file-alt',
'valid_children' => []
],
'word' => [
'icon' => 'far fa-file-word',
'valid_children' => []
],
'excel' => [
'icon' => 'far fa-file-excel',
'valid_children' => []
],
'ppt' => [
'icon' => 'far fa-file-powerpoint',
'valid_children' => []
],
'pdf' => [
'icon' => 'far fa-file-pdf',
'valid_children' => []
],
'archive' => [
'icon' => 'far fa-file-archive',
'valid_children' => []
],
'image' => [
'icon' => 'far fa-file-image',
'valid_children' => []
],
'audio' => [
'icon' => 'far fa-file-audio',
'valid_children' => []
],
'video' => [
'icon' => 'far fa-file-video',
'valid_children' => []
]
]
checkbox()
Default:
[
'visible' => false,
'three_state' => true,
'keep_selected_style' => true,
'whole_node' => true
]
search()
Default:
[
'visible' => false,
'show_only_matches' => true,
'case_sensitive' => false,
'fuzzy' => false,
'show_only_matches_children' => false
]
Localization
English and French are supported and located in the resources/lang/ folder and will support any other languages added.
Bugs/Issues
Have a bug or an issue with this package? Open a new issue here on GitHub.
License
The MIT License (MIT). Please see License File for more information.
seche/nova-jstree 适用场景与选型建议
seche/nova-jstree 是一款 基于 SCSS 开发的 Composer 扩展包,目前已累计 4.04k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「nova」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 seche/nova-jstree 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 seche/nova-jstree 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 seche/nova-jstree 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova card that shows you your system information.
A Laravel Nova card.
A Laravel Nova package for publishable fields
A Laravel Nova package for translatable fields
A Laravel Nova Image field. you can paste or drag or chose an image
A Laravel Nova Mail testing tool.
统计信息
- 总下载量: 4.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-27