import nextTick from "@npm/dai-mp/tools/nextTick.js"; export default Behavior({ data: {}, lifetimes: {}, methods: { animeBaseOut(id, params, time) { return new Promise((roslove) => { this.animate(id, params, time, async () => { roslove(); // 延迟清除效果,避免闪动 await nextTick(100); this.clearAnimation(id, () => {}); }); }); }, async animeFadeOut(id, time = 350) { await this.animeBaseOut( id, [ { opacity: 1.0, ease: "ease-out" }, { opacity: 0.0, ease: "ease-out" }, ], time ); }, async animeFadeOutDown(id, time = 350) { await this.animeBaseOut( id, [ { opacity: 1.0, translateY: 0, ease: "ease-out" }, { opacity: 0.0, translateY: 300, ease: "ease-out" }, ], time ); }, }, });