Expand build slot tree by 2 levels by default

This commit is contained in:
Stefan Zermatten
2023-04-21 11:31:03 +02:00
parent 93b0fe1885
commit 656a079c58
2 changed files with 11 additions and 1 deletions

View File

@@ -93,6 +93,7 @@
v-if="showExpanded"
:children="computedChildren"
:parent-slot-id="computedSlotId"
:depth="depth"
@selected="e => $emit('selected', e)"
/>
<div v-else>
@@ -141,6 +142,10 @@ export default {
context: { default: {} }
},
props: {
depth: {
type: Number,
default: 0,
},
node: {
type: Object,
required: true,
@@ -155,7 +160,7 @@ export default {
},
},
data(){return {
expanded: false,
expanded: this.depth <= 2,
/* expand if there's a slot needing attention:
this.node._descendantCanFill || (
this.node.type === 'propertySlot' &&

View File

@@ -6,6 +6,7 @@
:node="child.node"
:children="child.children"
:parent-slot-id="parentSlotId"
:depth="depth + 1"
@selected="e => $emit('selected', e)"
/>
</div>
@@ -27,6 +28,10 @@ export default {
type: String,
default: undefined,
},
depth: {
type: Number,
default: 0,
},
},
data() {
return {