npm install vue-json-viewer@2 --save
<template>
<div>
<json-viewer :value="data" :expand-depth="5" copyable boxed sort class="w-100%"></json-viewer>
</div>
</template>
<script>
import JsonViewer from 'vue-json-viewer'
export default {
components: {
JsonViewer
},
data() {
return {
data: [
{
id: '5968fcad629fa84ab65a5247',
firstname: 'Ada',
lastname: 'Lovelace',
aa:11
},
]
}
}
}
</script>