lesson 117: add a teleport tag to the ErrorAlert
This commit is contained in:
parent
dcd02c7693
commit
bdc40bb496
|
@ -3,10 +3,12 @@
|
||||||
<h2>Manage Goals</h2>
|
<h2>Manage Goals</h2>
|
||||||
<input type="text" ref="goal" />
|
<input type="text" ref="goal" />
|
||||||
<button @click="setGoal">Set Goal</button>
|
<button @click="setGoal">Set Goal</button>
|
||||||
<error-alert v-if="inputIsInvalid">
|
<teleport to="body">
|
||||||
<h2>Input may not be empty</h2>
|
<error-alert v-if="inputIsInvalid">
|
||||||
<button @click="resetErrorDialog">Ok</button>
|
<h2>Input may not be empty</h2>
|
||||||
</error-alert>
|
<button @click="resetErrorDialog">Ok</button>
|
||||||
|
</error-alert>
|
||||||
|
</teleport>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
Reference in New Issue