lesson 117: add a teleport tag to the ErrorAlert

This commit is contained in:
Andreas Zweili 2021-02-07 17:30:55 +01:00
parent dcd02c7693
commit bdc40bb496
1 changed files with 6 additions and 4 deletions

View File

@ -3,10 +3,12 @@
<h2>Manage Goals</h2>
<input type="text" ref="goal" />
<button @click="setGoal">Set Goal</button>
<error-alert v-if="inputIsInvalid">
<h2>Input may not be empty</h2>
<button @click="resetErrorDialog">Ok</button>
</error-alert>
<teleport to="body">
<error-alert v-if="inputIsInvalid">
<h2>Input may not be empty</h2>
<button @click="resetErrorDialog">Ok</button>
</error-alert>
</teleport>
</div>
</template>
<script>