vue-json-cool

a json plugin for vue,support spread and shrinkage
17,877
Install
npm install vue-json-cool
Latest Version:2.0.6
License:MIT
Last Updated:Jul 2, 2020
Links: npm
Maintainer: coolapt

vue-json

GitHub license

A JSON component or plugin for vue(2.x), support spread and shrinkage, The highlighted rendering JSON data as a tree structure.

Links

Install

npm install vue-json-cool --save

Usage

<template>
  <div>
    <vue-json-cool :data="jsonData"></vue-json-cool>
  </div>
</template>
import vueJsonCool from 'vue-json-cool';

export default {
  components: {
    vueJsonCool,
  },
  data() {
    return {
      jsonData: {
        number: 1,
        string: 'hello world',
        boolean: true,
        object: {
          key: 1,
        },
        array: [1, '2', true, null, undefined],
        null: null,
        undefined: undefined,
      },
    };
  },
};

Example

示例1

示例2

Props

Attribute Level Description Type Default
data basic json data JSON object or object Array, {...}, [{...}, {...}] -

Events

not yet...

PS

如果喜欢请给个星星,谢谢。 If you like, please give me a star, thank you.

如果需要帮助: QQ:1573815240 邮箱: 1573815240@qq.com if you need help: QQ:1573815240 email: 1573815240@qq.com

Related Packages

vue-json-viewer-next

vue-json-viewer-next, a json-viewer component based on Vue 3.x

1,574 1
vue-json-views

一个用于展示json的vue组件

173,465
json-diff-viewer-component

Vanilla JS web component for side-by-side JSON diff visualization

16,748 47
object-visualizer

Visualize JSON object to DOM.

11,885 223
vue-dd

Vue.js component for displaying JavaScript objects with circular references, for...

17,539 17

Version History

Version Released License
2.0.6 MIT
2.0.5 MIT
2.0.4 MIT
2.0.3 MIT
2.0.2 MIT