Git Product home page Git Product logo

json-editor-vue3's Introduction

JsonEditor

Vue3 JSON online editor developed based on JSONeditor. 基于 jsoneditor 开发的 vue3 json在线编辑器。

  1. Fully compatible with all functions of JSONEDITOR, and supports Vue3 syntax.

    完全兼容 jsoneditor 所有功能,并且支持 vue3 语法。

  2. Support all configurations of JSONEDITOR, simple

    支持 jsoneditor 的所有配置, 简单的配置方式。

  3. More flexible, support custom configuration.

    更加灵活, 支持自定义配置。

Install

    npm install ceel-json-editor
    # or
    yarn add ceel-json-editor
    # or
    pnpm add ceel-json-editor

JsonEditor API文档

Use

Global import

import Vue from 'vue'
import JsonEditorVue from 'ceel-json-editor'

Vue.use(JsonEditorVue)

Local introduction

    import JsonEditor from 'ceel-json-editor'

Parameter description

Attributes Type Default Value Description
v-model - - -
height string 100% height
width string 100% width
option object - options

Configuration item

Attributes Type Default Value Description
mode string 'code' Edit mode, optional value:'code'、'tree'、'form'
onChange function - Value change event
....

JsonEditor API文档

Example

<script setup lang="ts">
import { ref } from 'vue'

import JsonEditor from 'ceel-json-editor'

// Set default value 
const c = ref(`{"abd":121212123,"abc":1999999998}`)

/**
* For all configuration items, see: 
* 请查看 api 文档
* https://github.com/josdejong/jsoneditor/blob/master/docs/api.md#configuration-options
 */
const option = {
  mode: 'code', // Override default configuration
  onChange: (v: string) => { // Add change event
    console.log(v)
  },
}
</script>

<template>
  
  <JsonEditor height="500px" v-model="c" :option="option" />

</template>

Donate 捐赠

paypalme

json-editor-vue3's People

Contributors

mrceel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.