企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 1.封装一个动画组件`Fade.vue` ~~~ <template> <transition> <slot name="fade"></slot> </transition> </template> <script> export default { name:"Fade" } </script> <style lang="scss" scoped> .v-enter,.v-leave-to{ opacity:0; } .v-enter-active,.v-leave-active{ transition:opacity .7s; } </style> ~~~ ## 2.使用 ~~~ <Fade> <Gallary slot="fade"></Gallary> </Fade> ~~~