💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[velocity.js](http://www.mrfront.com/docs/velocity.js/option.html) ~~~ <div id="app"> <transition name="fade" @before-enter="handleBeforeEnter" @enter="handleEnter" @after-enter="handleAfterEnter"> <div v-if="isShow">hello world</div> </transition> <button @click="handleClick">切换</button> </div> <script> var vm = new Vue({ data: { isShow: true }, methods: { handleClick() { this.isShow = !this.isShow; }, handleBeforeEnter(el) { el.style.opacity = 0; }, handleEnter(el, done) { Velocity(el, { opacity: 1 }, { duration: 1000, /* 动画执行完毕调用done */ complete: done }) }, handleAfterEnter(el) { el.style.color = "pink" } } }).$mount("#app") </script> ~~~