-
+
@@ -22,10 +43,28 @@ export default {
data() {
return {
component: null,
+ collapsed: true,
justUpdated: false,
}
},
+ computed: {
+ computedChildren() {
+ return Object.values(this.children || {}).filter((child) => child)
+ },
+
+ hasChildren() {
+ return !!this.computedChildren.length
+ },
+
+ isCollapsed() {
+ if (!this.hasChildren)
+ return true
+
+ return this.collapsed
+ },
+ },
+
methods: {
valuesEqual(a, b) {
a = {...a}
@@ -68,10 +107,47 @@ export default {