Skip to content
On this page

format-json-component

基本使用

[
  {
    "id": "1",
    "title": "节点1",
    "parentId": ""
  },
  {
    "id": "1-1",
    "title": "节点1-1",
    "parentId": "1"
  }
]
vue
<template #component>
<kn-format-json :data = "list" />
</template>
<script setup>
import { KnFormatJson } from 'knot-vue'
const list = [
  {
    id: '1',
    title: '节点1',
    parentId: '',
  },
  {
    id: '1-1',
    title: '节点1-1',
    parentId: '1'
  }
]
</script>

API

属性名描述类型是否必填默认值
dataJSON内容string | JSONtrue--

Released under the MIT License.