Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit ae77f26

Browse files
committed
Use v-if for modal instead of v-show
1 parent c3a6ed3 commit ae77f26

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/components/modal.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ A classic modal overlay, in which you can include any content you want.
66
<v-button @click="open('modal1')" appearance="primary">Open modal 1</v-button>
77
<v-modal :open="modal1" @close="close('modal1')" title="Modal 1">
88
Modal content
9-
<template slot="footer">
10-
<v-button @click="close('modal1')" appearance="subtle">
11-
Close
12-
</v-button>
13-
<v-button appearance="primary">Apply changes</v-button>
9+
<template v-slot:footer>
10+
<div class="flex flex-justify-end">
11+
<v-button class="mr-2" @click="close('modal1')" appearance="subtle">Close</v-button>
12+
<v-button appearance="primary">Apply changes</v-button>
13+
</div>
1414
</template>
1515
</v-modal>
1616
</div>

src/components/Modal/main.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<transition name="modal" @after-enter="onEnter" @after-leave="onLeave">
3-
<div class="modal modal__mask" v-show="open" :role="role" :class="classes">
3+
<div class="modal modal__mask" v-if="open" :role="role" :class="classes">
44
<div ref="backdrop" class="modal__wrapper" @click="dismissOnBackdrop && close($event)">
55
<div
66
ref="container"

0 commit comments

Comments
 (0)