日照项目的居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
971 B

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
);
},
},
});