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
属性名 | 描述 | 类型 | 是否必填 | 默认值 |
---|---|---|---|---|
data | JSON内容 | string | JSON | true | -- |