定制 seche/nova-jstree 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

seche/nova-jstree

Composer 安装命令:

composer require seche/nova-jstree

包简介

A Laravel Nova field.

关键字:

README 文档

README

MIT License PR's Welcome

Nova-Jstree

Nova Field for the JsTree library. This allows you to utilize JsTree in a model.

Table of Contents

  1. Prerequisites
  2. Installation
  3. Usage
    1. data()
    2. theme()
    3. types()
    4. checkbox()
    5. search()
  4. Localization
  5. Bugs/Issues
  6. License

Prerequisites

This package utilizes the following NPM packages:

Installation

  1. The package can be installed through Composer.

    composer require seche/nova-jstree

  2. Use the field.

    use Seche\NovaJstree\Jstree;
    
  3. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 seche/nova-jstree 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 4.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: SCSS

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-27