From 6a23b9f414f5dadbb776567c90a052eddb18c963 Mon Sep 17 00:00:00 2001 From: alan Date: Mon, 14 Dec 2020 09:30:55 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-6431=20=E7=B1=BB=E5=9E=8B=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/single/button/buttons/button.text.ts | 14 +++++++++++++- typescript/case/button/icon/icon.change.ts | 10 +++++++++- typescript/index.ts | 9 ++++++--- typescript/widget/downlist/combo.downlist.ts | 12 ++++++++++-- 4 files changed, 38 insertions(+), 7 deletions(-) diff --git a/typescript/base/single/button/buttons/button.text.ts b/typescript/base/single/button/buttons/button.text.ts index ffc25fd2f..b5d11e496 100644 --- a/typescript/base/single/button/buttons/button.text.ts +++ b/typescript/base/single/button/buttons/button.text.ts @@ -1,4 +1,4 @@ -import { _BasicButton } from "../button.basic"; +import { BasicButton, _BasicButton } from "../button.basic"; export interface _TextButton extends _BasicButton { setStyle(style: any): void; @@ -15,3 +15,15 @@ export interface _TextButton extends _BasicButton { export interface _TextButtonStatic { EVENT_CHANGE: string; } + +export declare class TextButton extends BasicButton { + setStyle(style: any): void; + + doRedMark(...args: any[]): void; + + unRedMark(...args: any[]): void; + + doHighLight(...args: any[]): void; + + unHighLight(...args: any[]): void; +} diff --git a/typescript/case/button/icon/icon.change.ts b/typescript/case/button/icon/icon.change.ts index 2cb609bcc..207686c8e 100644 --- a/typescript/case/button/icon/icon.change.ts +++ b/typescript/case/button/icon/icon.change.ts @@ -1,4 +1,4 @@ -import { _Single } from "../../../base/single/single"; +import { Single, _Single } from "../../../base/single/single"; export interface _IconChangeButton extends _Single { isSelected(): boolean; @@ -11,3 +11,11 @@ export interface _IconChangeButton extends _Single { export interface _IconChangeButtonStatic { EVENT_CHANGE: string; } + +export declare class IconChangeButton extends Single { + isSelected(): boolean; + + setSelected(v: boolean): void; + + setIcon(cls: string): void; +} diff --git a/typescript/index.ts b/typescript/index.ts index 50e3c9be9..9b66c143b 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -5,7 +5,7 @@ import { _Pane, _PaneStatic } from "./base/pane"; import { _BasicButton, _BasicButtonStatic, BasicButton } from "./base/single/button/button.basic"; import { _NodeButton } from "./base/single/button/button.node"; import { _Button, _ButtonStatic } from "./base/single/button/buttons/button"; -import { _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text"; +import { TextButton, _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text"; import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listitem/icontextitem"; import { _Editor, _EditorStatic } from "./base/single/editor/editor"; import { _Iframe } from "./base/single/iframe/iframe"; @@ -16,7 +16,7 @@ import { _Label, Label } from "./base/single/label/label"; import { _Single, Single } from "./base/single/single"; import { _Text } from "./base/single/text"; import { _Trigger } from "./base/single/trigger/trigger"; -import { _IconChangeButton, _IconChangeButtonStatic } from "./case/button/icon/icon.change"; +import { IconChangeButton, _IconChangeButton, _IconChangeButtonStatic } from "./case/button/icon/icon.change"; import { _MultiSelectItem, _MultiSelectItemStatic } from "./case/button/item.multiselect"; import { _BubbleCombo, _BubbleComboStatic } from "./case/combo/bubblecombo/combo.bubble"; import { _TextValueCombo, _TextValueComboStatic } from "./case/combo/combo.textvalue"; @@ -44,7 +44,7 @@ import { _AbsoluteLayout } from "./core/wrapper/layout/layout.absolute"; import { _HTapeLayout, _VTapeLayout } from "./core/wrapper/layout/layout.tape"; import { _VerticalLayout } from "./core/wrapper/layout/layout.vertical"; import { _DefaultLayout } from "./core/wrapper/layout/layout.default"; -import { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist"; +import { DownListCombo, _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist"; import { Icon } from "./base/single/icon/icon"; import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical"; import { LeftRightVerticalAdaptLayout, RightVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; @@ -137,4 +137,7 @@ export { IconButton, AbstractLabel, Label, + TextButton, + DownListCombo, + IconChangeButton, }; diff --git a/typescript/widget/downlist/combo.downlist.ts b/typescript/widget/downlist/combo.downlist.ts index 22f9ceef0..f9954c36f 100644 --- a/typescript/widget/downlist/combo.downlist.ts +++ b/typescript/widget/downlist/combo.downlist.ts @@ -1,4 +1,4 @@ -import { _Widget } from "../../core/widget"; +import { Widget, _Widget } from "../../core/widget"; export interface _DownListCombo extends _Widget { hideView: () => void; @@ -12,4 +12,12 @@ export interface _DownListComboStatic { EVENT_CHANGE: string; EVENT_SON_VALUE_CHANGE: string; EVENT_BEFORE_POPUPVIEW: string; -} \ No newline at end of file +} + +export declare class DownListCombo extends Widget { + hideView: () => void; + + showView: (e?: any) => void; + + populate: (items?: any) => void; +}