1、动态组件
<component is="test"></component>
第二种用法:
2、keep-alive
抽象组件,用于对组件进行缓存
<keep-alive> 缓存component 显示的组件
<component is="test"></component>
</keep-alive>
<keep-alive include="testA,testC">
<component is="test"></component>
</keep-alive>
include:匹配到的组件才会进行缓存
exclude:匹配到的组件不会缓存,没有匹配到的组件才会进行缓存
3、transition
有mode属性值为in-out或out-in
<transition name="fade">
<p v-show="flag">是否显示的内容</p>
</transition>
.fade-enter{ }
.fade-enter-active{ }
.fade-enter-to{ }
.fade-leave{ }
.fade-leave-active{ }
.fade-leave-to{ }
enter-class
enter-active-class
enter-to-class
leave-class
leave-active-class
leave-to-class