You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue-json-pretty

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-json-pretty

A Vue.js 2.0 Toolkit for JSON

1.4.0
Source
npmnpm
Version published
Weekly downloads
175K
3.99%
Maintainers
1
Weekly downloads
 
Created
Source

vue-json-pretty

Build Status npm package GitHub license

A vue 2.x component for rendering JSON data as a tree structure.

  • basic: JSON pretty
  • advanced: get item data from JSON

Install

npm install vue-json-pretty

Usage

<template>
  <div>
    ...
    <vue-json-pretty
      :path="'res'"
      :data="{ key: 'value' }"
      @click="handleClick">
    </vue-json-pretty>
  </div>
</template>
import VueJsonPretty from 'vue-json-pretty'

export default {
  components: {
    VueJsonPretty
  }
}

Props

  • If you are using only the basic features (JSON pretty), just focus on the base properties.
  • If you are using advanced features (get item data), you need to focus on the base and advanced attributes.
AttributeLevelDescriptionTypeDefault
databasicjson dataJSON object-
deepbasicdata depth, data larger than this depth will not be expandednumberInfinity
pathadvancedroot data pathstringroot
pathCheckedadvanceddefines the selected data patharray[]
pathSelectableadvanceddefines whether a data path supports selectionFunction(itemPath, itemData)-
selectableTypeadvanceddefines the selected type, this feature is not supported by defaultenum: both, checkbox, tree-

Events

  • The following events are base on advanced features.
Event NameDescriptionCallback Parameters
clicktriggered when a data item is clicked(path, data)

Keywords

vue

FAQs

Package last updated on 22 Jul 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.