1.3.2 • Published 3 years ago

vue3-json-view v1.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vue3-json-view

Typescript support a vue3-json-view lib which can better show

🦄 Usage

It is recommended to use this way

import JsonView from "vue3-json-view"
in vue3

<template>
    <json-view :data="data"/>
</template>

setup () {
  components: {
    JsonView
  },
  const data = reactive({
    name: 'yugang.cao',
    age: 23,
    home: 'my home'
  })
  return {
    data
  }
}
or

in main.js
import { JsonView } from 'vue3-json-view'
app.use(JsonView)

📦 Install

npm i vue3-json-view --save

or

yarn add vue3-json-view --save

相关配置说明

属性说明类型默认值
data传入的 json 数据(必填)Object-
closed是否折叠全部Booleanfalse
deep展开深度,越大渲染速度越慢,建议不超过 5Number3
icon-style折叠按钮样式,可选值为 square、circle、triangleStringsquare
icon-color两个折叠按钮的颜色Arraytheme=vs-code 时,'#c6c6c6', '#c6c6c6',其他情况为'#747983', '#747983'
theme可选主题样式,可选值为 one-dark、vs-code,不选时为默认的白色主题String-
json-key显示对象的 key 值String''
font-size字体大小,单位 pxNumber14
line-height行高,单位 pxNumber24

🌸 Thanks

This project is heavily inspired by the following awesome projects.

📄 License

MIT License © 2021-PRESENT caoyugang_1

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.8

3 years ago

1.2.9

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.2.7

3 years ago

1.1.8

3 years ago

1.2.6

3 years ago

1.1.7

3 years ago

1.2.5

3 years ago

1.1.6

3 years ago

1.2.4

3 years ago

1.1.5

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago