This commit is contained in:
icssoa
2025-09-11 18:37:44 +08:00
parent 0a70e9237c
commit ec1f85fa3d
5 changed files with 19 additions and 14 deletions

View File

@@ -1428,6 +1428,15 @@ export class AnimationEngine {
return this.setDuration(duration).rotate("0deg", `${degrees}deg`).opacity("0", "1"); return this.setDuration(duration).rotate("0deg", `${degrees}deg`).opacity("0", "1");
} }
/**
* 旋转退出动画
* @param duration 持续时间
* @param degrees 旋转角度
*/
rotateOut(duration: number = 500, degrees: number = 360): AnimationEngine {
return this.setDuration(duration).rotate("0deg", `${degrees}deg`).opacity("1", "0");
}
/** /**
* 弹跳动画 * 弹跳动画
* @param duration 持续时间 * @param duration 持续时间
@@ -1618,15 +1627,6 @@ export class AnimationEngine {
.setLoopCount(4); .setLoopCount(4);
} }
/**
* 旋转退出动画
* @param duration 持续时间
* @param degrees 旋转角度
*/
rotateOut(duration: number = 500, degrees: number = 360): AnimationEngine {
return this.setDuration(duration).rotate("0deg", `${degrees}deg`).opacity("1", "0");
}
/** /**
* 滚动进入动画 * 滚动进入动画
* @param duration 持续时间 * @param duration 持续时间
@@ -1757,7 +1757,7 @@ export class AnimationEngine {
} }
/** /**
* 创建动画实例的便捷函数 * 创建动画实例
* @param element 目标元素 * @param element 目标元素
* @param options 动画选项 * @param options 动画选项
*/ */

View File

@@ -449,9 +449,9 @@
} }
}, },
{ {
"path": "other/animate", "path": "other/animation",
"style": { "style": {
"navigationBarTitleText": "Animate 动画" "navigationBarTitleText": "Animation 动画"
} }
} }
] ]

View File

@@ -460,9 +460,9 @@ const data = computed<Item[]>(() => {
path: "/pages/demo/other/slide-verify" path: "/pages/demo/other/slide-verify"
}, },
{ {
label: "Animate", label: "Animation",
icon: "instance-line", icon: "instance-line",
path: "/pages/demo/other/animate" path: "/pages/demo/other/animation"
} }
] ]
} }

View File

@@ -225,3 +225,8 @@ declare type ClTreeComponentPublicInstance = {
expandAll: () => void; expandAll: () => void;
collapseAll: () => void; collapseAll: () => void;
}; };
declare type ClCalendarComponentPublicInstance = {
open(cb: ((value: string | string[]) => void) | null = null): void;
close(): void;
};