fix stage loader code not regenerating when moving a level
This commit is contained in:
parent
ffe323d478
commit
fe0d19a863
1 changed files with 10 additions and 4 deletions
|
@ -35,7 +35,12 @@
|
|||
<div class="config">
|
||||
<span>Route:</span>
|
||||
<ul class="level-select">
|
||||
<draggable v-model="selectedRoute" handle=".route-drag" ghost-class="ghost">
|
||||
<draggable
|
||||
v-model="selectedRoute"
|
||||
handle=".route-drag"
|
||||
ghost-class="ghost"
|
||||
@end="onDrageEnd"
|
||||
>
|
||||
<li v-for="(level, index) in selectedRoute">
|
||||
<div class="route-drag">≡</div>
|
||||
|
||||
|
@ -45,9 +50,7 @@
|
|||
:onChange="e => onStageLoaderLevelChanged(index, e)"
|
||||
:key="index"
|
||||
/>
|
||||
<button @click="onLevelDeleted(index)" type="button" class="route-remove">
|
||||
×
|
||||
</button>
|
||||
<button @click="onLevelDeleted(index)" type="button" class="route-remove">×</button>
|
||||
</li>
|
||||
</draggable>
|
||||
</ul>
|
||||
|
@ -191,6 +194,9 @@ export default {
|
|||
if (ending) this.postGameSelection;
|
||||
this.updateCode();
|
||||
},
|
||||
onDrageEnd() {
|
||||
this.updateCode();
|
||||
},
|
||||
onClearList() {
|
||||
if (this.selectedRoute?.length > 0 && !confirm('Do you really want to clear the list?'))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue