Don't show children expansion panel if not needed

This commit is contained in:
Stefan Zermatten
2022-06-20 14:22:13 +02:00
parent a8ffa2f786
commit b31760af0c
23 changed files with 83 additions and 39 deletions

View File

@@ -79,7 +79,10 @@
/>
<form-sections>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>
<form-section name="Resources Consumed">

View File

@@ -60,6 +60,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -93,7 +93,10 @@
</form-section>
</v-expand-transition>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>

View File

@@ -46,6 +46,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -56,6 +56,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -25,6 +25,7 @@
/>
<calculation-error-list :errors="clientErrors" />
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -56,7 +56,10 @@
/>
<form-sections>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>

View File

@@ -54,6 +54,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -46,7 +46,10 @@
</v-col>
</v-row>
<form-sections>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>
<form-section

View File

@@ -151,8 +151,8 @@
</v-slide-x-transition>
<form-sections>
<form-section
v-if="$slots.children"
name="Children"
standalone
>
<slot name="children" />
</form-section>

View File

@@ -36,6 +36,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -11,8 +11,8 @@
/>
<form-sections>
<form-section
v-if="$slots.children"
name="Children"
standalone
>
<slot name="children" />
</form-section>

View File

@@ -101,7 +101,10 @@
/>
<form-sections>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>

View File

@@ -36,6 +36,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -38,6 +38,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -35,7 +35,10 @@
$emit('change', {path: ['roll', ...path], value, ack})"
/>
<form-sections>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>

View File

@@ -66,6 +66,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -45,36 +45,44 @@
$emit('change', {path: ['description', ...path], value, ack})"
/>
<form-section
name="Advanced"
standalone
>
<smart-combobox
label="Tags"
multiple
chips
deletable-chips
:value="model.tags"
@change="change('tags', ...arguments)"
/>
<div class="layout justify-center">
<computed-field
label="Base Value"
hint="This is the value of the skill before effects are applied"
:model="model.baseValue"
:error-messages="errors.baseValue"
@change="({path, value, ack}) =>
$emit('change', {path: ['baseValue', ...path], value, ack})"
<form-sections>
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>
<form-section
name="Advanced"
>
<smart-combobox
label="Tags"
multiple
chips
deletable-chips
:value="model.tags"
@change="change('tags', ...arguments)"
/>
<proficiency-select
style="flex-basis: 300px;"
label="Base Proficiency"
:value="model.baseProficiency"
:error-messages="errors.baseProficiency"
@change="change('baseProficiency', ...arguments)"
/>
</div>
</form-section>
<div class="layout justify-center">
<computed-field
label="Base Value"
hint="This is the value of the skill before effects are applied"
:model="model.baseValue"
:error-messages="errors.baseValue"
@change="({path, value, ack}) =>
$emit('change', {path: ['baseValue', ...path], value, ack})"
/>
<proficiency-select
style="flex-basis: 300px;"
label="Base Proficiency"
:value="model.baseProficiency"
:error-messages="errors.baseProficiency"
@change="change('baseProficiency', ...arguments)"
/>
</div>
</form-section>
</form-sections>
</div>
</template>

View File

@@ -85,6 +85,7 @@
@change="change('tags', ...arguments)"
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -158,7 +158,10 @@
/>
<form-sections>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>

View File

@@ -293,7 +293,10 @@
/>
</form-section>
<form-section name="Children">
<form-section
v-if="$slots.children"
name="Children"
>
<slot name="children" />
</form-section>

View File

@@ -56,6 +56,7 @@
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>

View File

@@ -86,6 +86,7 @@
/>
<form-section
v-if="$slots.children"
name="Children"
standalone
>