From 8faf4677a93350f363e55faf771943e6c08bb64b Mon Sep 17 00:00:00 2001 From: alan Date: Fri, 11 Dec 2020 16:03:13 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-6431=20=E8=A1=A5=E5=85=85=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/single/button/button.basic.ts | 38 ++++++++++++++++++- .../button/listitem/icontexticonitem.ts | 5 +++ typescript/index.ts | 5 ++- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 typescript/base/single/button/listitem/icontexticonitem.ts diff --git a/typescript/base/single/button/button.basic.ts b/typescript/base/single/button/button.basic.ts index 741c82358e..24f26a1970 100644 --- a/typescript/base/single/button/button.basic.ts +++ b/typescript/base/single/button/button.basic.ts @@ -1,4 +1,4 @@ -import { _Single } from "../single"; +import { Single, _Single } from "../single"; export interface _BasicButton extends _Single { _createShadow(): void; @@ -39,3 +39,39 @@ export interface _BasicButton extends _Single { export interface _BasicButtonStatic { EVENT_CHANGE: string; } + +export declare class BasicButton extends Single { + _createShadow(): void; + + bindEvent(): void; + + _trigger(e: Event): void; + + _doClick(e: Event): void; + + beforeClick(): void; + + doClick(): void; + + handle(): BasicButton; + + hover(): void; + + dishover(): void; + + setSelected(b: boolean): void; + + isSelected(): boolean; + + isOnce(): boolean; + + isForceSelected(): boolean; + + isForceNotSelected(): boolean; + + isDisableSelected(): boolean; + + setText(v: string): void; + + getText(): string; +} diff --git a/typescript/base/single/button/listitem/icontexticonitem.ts b/typescript/base/single/button/listitem/icontexticonitem.ts new file mode 100644 index 0000000000..be5c6c18ce --- /dev/null +++ b/typescript/base/single/button/listitem/icontexticonitem.ts @@ -0,0 +1,5 @@ +import { BasicButton } from "../button.basic"; + +export declare class IconTextIconItem extends BasicButton { + static xtype: string; +} diff --git a/typescript/index.ts b/typescript/index.ts index 58fdc23930..1a96119a9d 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -2,7 +2,7 @@ import { _Combo, _ComboStatic } from "./base/combination/combo"; import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from "./base/combination/group.button"; import { _Tab, _TabStatic } from "./base/combination/tab"; import { _Pane, _PaneStatic } from "./base/pane"; -import { _BasicButton, _BasicButtonStatic } from "./base/single/button/button.basic"; +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"; @@ -48,6 +48,7 @@ import { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.do import { Icon } from "./base/single/icon/icon"; import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical"; import { LeftRightVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; +import { IconTextIconItem } from "./base/single/button/listitem/icontexticonitem"; type ClassConstructor = T & { @@ -115,6 +116,8 @@ export default { export { Widget, Single, + BasicButton, Icon, + IconTextIconItem, LeftRightVerticalAdapt, };