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

@dramaorg/recusandae-unde

Package Overview
Dependencies
Maintainers
0
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dramaorg/recusandae-unde

  • 1.7.72
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Vue Json Pretty

A Vue component for rendering JSON data as a tree structure.

Now it supports Vue3 at least. If you still use Vue2, see 1.x.

Build Status npm package GitHub license Sizes NPM downloads Issues

English | 简体中文

Features

  • As a JSON Formatter.
  • Written in TypeScript, support d.ts.
  • Support get item data from JSON.
  • Support big data.
  • Support editable.

Environment Support

  • Modern browsers, Electron and Internet Explorer 11 (with polyfills)
  • Server-side Rendering
IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Electron
Electron
IE11, Edgelast 10 versionslast 10 versionslast 10 versionslast 2 versions

Using NPM or Yarn

$ npm install @dramaorg/recusandae-unde --save
$ yarn add @dramaorg/recusandae-unde

Use Vue2

$ npm install @dramaorg/recusandae-unde@v1-latest --save

Usage

The CSS file is included separately and needs to be imported manually. You can either import CSS globally in your app (if supported by your framework) or directly from the component.

<template>
  <div>
    <@dramaorg/recusandae-unde :data="{ key: 'value' }" />
  </div>
</template>

<script>
import VueJsonPretty from '@dramaorg/recusandae-unde';
import '@dramaorg/recusandae-unde/lib/styles.css';

export default {
  components: {
    VueJsonPretty,
  },
};
</script>

Use Nuxt.js

  1. In plugins/@dramaorg/recusandae-unde.js
import Vue from 'vue'
import VueJsonPretty from '@dramaorg/recusandae-unde'

Vue.component("@dramaorg/recusandae-unde", VueJsonPretty)
  1. In nuxt.config.js
css: [
  '@dramaorg/recusandae-unde/lib/styles.css'
],
plugins: [
  '@/plugins/@dramaorg/recusandae-unde'
],

Props

PropertyDescriptionTypeDefault
data(v-model)JSON data, support v-model when use editableJSON object-
collapsedNodeLengthObjects or arrays which length is greater than this threshold will be collapsednumber-
deepPaths greater than this depth will be collapsednumber-
showLengthShow the length when collapsedbooleanfalse
showLineShow the linebooleantrue
showLineNumberShow the line numberbooleanfalse
showIconShow the iconbooleanfalse
showDoubleQuotesShow doublequotes on keybooleantrue
virtualUse virtual scrollbooleanfalse
heightThe height of list when using virtualnumber400
itemHeightThe height of node when using virtualnumber20
selectedValue(v-model)Selected data pathstring, array-
rootPathRoot data pathstringroot
nodeSelectableDefines whether a node supports selection(node) => boolean-
selectableTypeSupport path select, default nonemultiple | single-
showSelectControllerShow the select controllerbooleanfalse
selectOnClickNodeTrigger select when click nodebooleantrue
highlightSelectedNodeSupport highlighting selected nodesbooleantrue
collapsedOnClickBracketsSupport click brackets to collapsebooleantrue
renderNodeKeyrender node key, or use slot #renderNodeKey({ node, defaultKey }) => vNode-
renderNodeValuerender node value, or use slot #renderNodeValue({ node, defaultValue }) => vNode-
editableSupport editablebooleanfalse
editableTriggerTriggerclick | dblclickclick
themeSets the theme of the component. Options are 'light' or 'dark', with dark mode enhancing visibility on dark backgrounds'light' | 'dark'light

Events

Event NameDescriptionParameters
nodeClicktriggers when click node(node: NodeData)
bracketsClicktriggers when click brackets(collapsed: boolean, node: NodeData)
iconClicktriggers when click icon(collapsed: boolean, node: NodeData)
selectedChangetriggers when the selected value changed(newVal, oldVal)

Slots

Slot NameDescriptionParameters
renderNodeKeyrender node key{ node, defaultKey }
renderNodeValuerender node value{ node, defaultValue }

Contributors

Keywords

FAQs

Package last updated on 12 Aug 2024

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