0👍
✅
see corrected demo
-
Use
v-show
directive. See compare v-if vs f-show<parent v-show="showContainer"></parent>
-
child elements need self-controller and binding with properties
-
add
v-if="showChild"
in<div class="Child"></div>
-
create
props
inchild
props: {
showChild: {
type: Boolean,
default: true
}
}, -
binding
props
inparent
<child :showChild="showChild"></child>
0👍
Pretty sure it’s not possible this way.
Even when using CSS transitions, the parent still need to control the child’s transition out.
We’d need a disappear prop on Transition component :p
Maybe you won’t love this solution but, in the parent’s outro, you can call this.$refs.child.outro(this.$refs.child.$el)
Source:stackexchange.com