@no_one_safe,
<template>
<v-container fluid>
<v-dialog v-model="loading" max-width="500px">
<v-progress-linear
indeterminate
color="white"
class="mb-0"
></v-progress-linear>
</v-dialog>
<v-row align="center">
<v-col cols="12">
<tree
class="treechart"
:data="test"
node-text="name"
:zoomable="true"
layoutType="horizontal"
></tree>
</v-col>
</v-row>
</v-container>
</template>
<script>
export default {
data() {
return {
loading: true,
test:{},
tree1: {
name: "father",
children: [
{
name: "son1",
children: [{ name: "grandson" }, { name: "grandson2" }],
},
{
name: "son2",
children: [{ name: "grandson3" }, { name: "grandson4" }],
},
],
},
};
},
created() {
this.fetchDataNew();
},
methods: {
fetchDataNew() {
this.test = this.tree1;
this.loading = false;
return this.tree;
});
},
},
};