Expand build slot tree by 2 levels by default
This commit is contained in:
@@ -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' &&
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user