登录 注册

vue-json-tree-view

去点 Star
其他 javascriptjavascript-libraryjson-treetreevuevue-json-tree
473
Stars
75
Forks
8
Watchers
8
Open Issues
MIT
许可证
Vue
语言
2017-02-17
创建时间
2026-11-06
最近更新

项目能做什么

适用于 Vue.js 的 JSON 树状视图展示组件。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Vue JSON Tree View

![a demonstration](https://raw.githubusercontent.com/arvidkahl/vue-json-tree-view/master/header.png)

## Demo and Blogpost

You can check out the [demo](https://jsfiddle.net/arvidkahl/kwo6vk9d/11/) on JSFiddle and read the Blogpost called [Building a JSON Tree View Component in Vue.js from Scratch in Six Steps](http://brianyang.com/building-a-json-tree-view-component-in-vue-js-from-scratch-in-six-steps) that lead to the creation of this library.

##  Installation

Install the plugin with npm:
```shell
npm install --save vue-json-tree-view
```

Then, in your Application JavaScript, add:
```javascript
import TreeView from "vue-json-tree-view"
Vue.use(TreeView)
```

Done.

## Usage

Put the `tree-view` element into your  HTML where you want the Tree View to appear.
```html
<div>
  <tree-view :data="jsonSource" :options="{maxDepth: 3}"></tree-view>
</div>
```

## Props

#### `data`

The JSON to be displayed. Expects a valid JSON object.

#### `options`

The defaults are:
```
{
  maxDepth: 4,
  rootObjectKey: "root",
  modifiable: false,
  link: false,
  limitRenderDepth: false
}
```
- maxDepth: The maximum number of levels of the JSON Tree that should be expanded by default. Expects an Integer from 0 to Infinity.
- rootObjectKey: the name of the Root Object, will default to `root`.
- modifiable: To modify the json value.
- link: URL strings will appear as clickable links (unless `modifiable="true"`).
- limitRenderDepth: maximum number of nodes that should be rendered (for very large JSONs)

## Event

#### updated json data
If `modifiable` is true and you want to take the updated json data, you must register event handler as `v-on:change-data=...`. Only one argument is passed that is updated data - `data`.
```html
<div>
  <tree-view :data="jsonSource" :options="{modifiable: true}" @change-data="onChangeData"></tree-view>
</div>

// in your vue code
  ...
  methods: {
    onChangeData: function(data) {
      console.log(JSON.stringify(data))
    }
  },
  ...

```


## Custom Styling

All leaves will have their type indicated as a CSS class, like `tree-view-item-value-string`. Supported types: String, Number, Function, Boolean and Null Values.

Keys can also be styled. For instance to make labels red:
```
.tree-view-item-key {
    color: red;
}
```

## Contributing
Contributions to this repo are very welcome as they are what has helped it become what it is today. Simply raise an issue with new ideas or submit a pull request.

A github action automatically deploys changes when they are merged into the master branch.
阅读完整原文

项目深度分析 AI 生成

高阶数据调试与 Schema 校验工具(SaaS/扩展)

产品构想基于该组件的核心逻辑,扩展出支持超大 JSON 虚拟滚动、JSON Schema 实时校验、Diff 比对的在线工作台或浏览器插件。
核心功能树形展示、双向修改、JSON Schema 校验与提示、文本/树形双视图切换、超大文件虚拟滚动。
目标用户API 研发人员、测试工程师、前端架构师。
难度/周期中等 · 3-6 周 · 成本:轻度云存储及静态托管费用(< $50/月)
收费模式Freemium 模式(免费基础查看,团队协作分享、私有历史版本存储收费)。
竞争风险市场上有大量成熟免费竞品(如 JSONHero、JSONLint、各类免费 Chrome 插件)。
依据 AI推测

现代化企业级低代码 JSON 节点编辑器组件库(商业授权)

产品构想将基于旧版 Vue 的基础展示组件重构成支持 Vue 3 / TypeScript 的企业级可编辑 JSON Schema 表单生成器与树形编辑器,走双重许可或商用授权模式。
核心功能拖拽排序、复杂类型增删改查、自定义插槽、权限只读控制、Vue 3 + TS 深度适配、无障碍访问支持。
目标用户低代码平台开发者、企业自建中后台研发团队。
难度/周期较高 · 6-8 周 · 成本:主要是独立开发者的开发工时成本,基础设施成本极低。
收费模式按项目商业授权销售(如 $49-$299 终身授权包更新)。
竞争风险开源替代方案丰富(如 vue-json-viewer、json-editor 等),商业转化率难以保障。
依据 尚需验证的假设

离线安全敏感配置管理客户端(桌面端工具)

产品构想使用 Tauri/Electron 封装为纯本地运行的安全 JSON/YAML/Env 配置文件管理与调试工具,强调内网隔离和数据不上传。
核心功能本地配置文件树状查看与编辑、敏感字段脱敏与加密、批量替换、多环境配置 Diff 对比。
目标用户DevOps 运维工程师、金融/政企等对数据安全敏感的研发团队。
难度/周期中等 · 4-6 周 · 成本:代码签名证书费用、域名与基本托管费用(约 $100-$300/年)。
收费模式买断制独立软件授权(如通过 Gumroad/Lemon Squeezy 售卖)。
竞争风险VS Code 等现代代码编辑器配合插件已能满足大部分本地配置编辑需求。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

相似项目数据正在完善中,暂不展示(避免误导)

项目优势与风险

技术成熟度创建于 2017-02-17,近 30 天仍在推送
社区活跃Star 473 / Fork 75 / Issue 8(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。