diff --git a/cool/animation/index.ts b/cool/animation/index.ts index d866f6a..b9c045d 100644 --- a/cool/animation/index.ts +++ b/cool/animation/index.ts @@ -1428,6 +1428,15 @@ export class AnimationEngine { 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 持续时间 @@ -1618,15 +1627,6 @@ export class AnimationEngine { .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 持续时间 @@ -1757,7 +1757,7 @@ export class AnimationEngine { } /** - * 创建动画实例的便捷函数 + * 创建动画实例 * @param element 目标元素 * @param options 动画选项 */ diff --git a/pages.json b/pages.json index 2094bac..d4e7f1b 100644 --- a/pages.json +++ b/pages.json @@ -449,9 +449,9 @@ } }, { - "path": "other/animate", + "path": "other/animation", "style": { - "navigationBarTitleText": "Animate 动画" + "navigationBarTitleText": "Animation 动画" } } ] diff --git a/pages/demo/other/animate.uvue b/pages/demo/other/animation.uvue similarity index 100% rename from pages/demo/other/animate.uvue rename to pages/demo/other/animation.uvue diff --git a/pages/index/home.uvue b/pages/index/home.uvue index f90ad27..57e33f3 100644 --- a/pages/index/home.uvue +++ b/pages/index/home.uvue @@ -460,9 +460,9 @@ const data = computed(() => { path: "/pages/demo/other/slide-verify" }, { - label: "Animate", + label: "Animation", icon: "instance-line", - path: "/pages/demo/other/animate" + path: "/pages/demo/other/animation" } ] } diff --git a/uni_modules/cool-ui/types/component.d.ts b/uni_modules/cool-ui/types/component.d.ts index 2b43cc6..a8dc933 100644 --- a/uni_modules/cool-ui/types/component.d.ts +++ b/uni_modules/cool-ui/types/component.d.ts @@ -225,3 +225,8 @@ declare type ClTreeComponentPublicInstance = { expandAll: () => void; collapseAll: () => void; }; + +declare type ClCalendarComponentPublicInstance = { + open(cb: ((value: string | string[]) => void) | null = null): void; + close(): void; +};