Soucce code of defined transition-demo component
<template>
<div class="doc-ctn computed">
<h4 class="ctn-title">transition</h4>
<div class="ctn-demo">
<transition name="demo">
<!-- slot fangzai -->
<slot ></slot>
</transition>
</div>
</div>
</template>
Then i use transition demo component in parent component:
<transition-demo>
I am disappearing
</transition-demo>
content ' I am disappearing' dose not rendered.
Please follow the Issue Reporting Guidelines and provide a minimal JSFiddle or JSBin containing a set of reproducible steps that can lead to the behaviour you described.
Works fine: https://jsfiddle.net/z11fe07p/99/
In your usage the slot expands to a piece of plain text, which is not transition-able. Wrap it in an element like <span>.
thanks a lot
Most helpful comment
In your usage the slot expands to a piece of plain text, which is not transition-able. Wrap it in an element like
<span>.