Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-json-editor

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-json-editor

A json editor of vue

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.7K
decreased by-23.14%
Maintainers
1
Weekly downloads
 
Created
Source

vue-json-editor

A jsoneditor of vue.js

依赖

vue.js

组件属性

v-model:必须,[json对象]组件的json对象
:showBtns: boolean,是否显示保存按钮,默认为true
@json-change: json发生变化后的事件

怎么使用

1. 使用npm安装vue-json-editor

npm install vue-json-editor --save

2. 在vue组件中使用vue-json-editor

<template>
  <div>
    <p>vue-json-editor使用</p>
    <!--在模板中使用vue-json-editor-->
    <vue-json-editor v-model="json" :showBtns="true" @json-change="onJsonChange"></vue-json-editor
  <div>
</template>

<script>
  // 引入vue-json-editor模块
  import vueJsonEditor from 'vue-json-editor'
  export default {
    data () {
      json: {
        msg: 'demo of jsoneditor'
      }
    },

    // 注入vueJsonEditor组件
    components: {
      vueJsonEditor
    },

    methods: {
      onJsonChange (value) {
        console.log('value:', value)
      }
    }
  }
</script>

Keywords

FAQs

Package last updated on 26 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc