From e5e10e7abc17ae881c93ed881a5c1f38a0574cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Tue, 13 Jun 2023 15:11:00 +0800 Subject: [PATCH] js: declare slider style gallery --- doric-js/index.d.ts | 5 +++++ doric-js/lib/src/widget/slider.d.ts | 5 +++++ doric-js/src/widget/slider.ts | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doric-js/index.d.ts b/doric-js/index.d.ts index b7d72cde..74f3d46f 100644 --- a/doric-js/index.d.ts +++ b/doric-js/index.d.ts @@ -1105,6 +1105,11 @@ declare module "doric" { type: "zoomOut"; minScale: number; maxScale: number; + } | { + type: "gallery"; + itemWidth: number; + minScale: number; + minAlpha: number; }; slidePosition?: number; /** diff --git a/doric-js/lib/src/widget/slider.d.ts b/doric-js/lib/src/widget/slider.d.ts index f43c8d2f..ab762d0b 100644 --- a/doric-js/lib/src/widget/slider.d.ts +++ b/doric-js/lib/src/widget/slider.d.ts @@ -32,6 +32,11 @@ export declare class Slider extends Superview { type: "zoomOut"; minScale: number; maxScale: number; + } | { + type: "gallery"; + itemWidth: number; + minScale: number; + minAlpha: number; }; slidePosition?: number; /** diff --git a/doric-js/src/widget/slider.ts b/doric-js/src/widget/slider.ts index 16e7f122..f8199508 100644 --- a/doric-js/src/widget/slider.ts +++ b/doric-js/src/widget/slider.ts @@ -69,7 +69,7 @@ export class Slider extends Superview { * ZoomOut is currently supported */ @Property - slideStyle?: "zoomOut" | { type: "zoomOut", minScale: number, maxScale: number } + slideStyle?: "zoomOut" | { type: "zoomOut", minScale: number, maxScale: number } | { type: "gallery", itemWidth: number, minScale: number, minAlpha: number } @InconsistProperty slidePosition?: number