From 9235ae02eb8795525ee7d1e2cd3821ee9e8bea61 Mon Sep 17 00:00:00 2001 From: Dailer Date: Tue, 15 Mar 2022 15:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20=E7=B1=BB=E5=9E=8B=E8=A1=A5?= =?UTF-8?q?=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/single/button/button.basic.ts | 4 ++-- typescript/base/single/text.ts | 4 ++-- typescript/shims-tsx.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/typescript/base/single/button/button.basic.ts b/typescript/base/single/button/button.basic.ts index 3cd921b93..95ee1a3c3 100644 --- a/typescript/base/single/button/button.basic.ts +++ b/typescript/base/single/button/button.basic.ts @@ -8,7 +8,7 @@ export declare class BasicButton extends Single { props: { stopEvent?: boolean; stopPropagation?: boolean; - selected?: boolean; + selected?: boolean | ((context: any) => boolean); /** * 点击一次选中有效,再点无效 @@ -40,7 +40,7 @@ export declare class BasicButton extends Single { bubble?: Function | null | string; text?: string; el?: Obj; - } & Single['props']; + } & Single["props"]; _createShadow(): void; diff --git a/typescript/base/single/text.ts b/typescript/base/single/text.ts index 0597021ee..9e03a1cbc 100644 --- a/typescript/base/single/text.ts +++ b/typescript/base/single/text.ts @@ -8,14 +8,14 @@ export declare class Text extends Single { static formatText: (str: string) => string; props: { - text?: string; + text?: string | ((context: any) => string); textAlign?: "left" | "center" | "right", whiteSpace?: "nowrap" | "normal", lineHeight?: null | number; py?: string; highLight?: boolean; maxWidth?: null | number; - } & Single['props']; + } & Single["props"]; doRedMark(keyword: string): void; diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index 111b6a082..e77dceffb 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -25,7 +25,7 @@ interface AdditionalProps { } interface ElementClassProps extends UIProps { - cls: string | (() => string); + cls: string | ((context: any) => string); extraCls: string; ref: (ref: T) => void; listeners: { @@ -33,9 +33,9 @@ interface ElementClassProps extends UIProps { action: (...args: any[]) => any; once?: boolean; }[]; - disabled: boolean; - invisible: boolean; - invalid: boolean; + disabled: boolean | ((context: any) => boolean); + invisible: boolean | ((context: any) => boolean); + invalid: boolean | ((context: any) => boolean); attributes: { [key: string]: any; };