Browse Source

REPORT-19560 feat: 补充类

es6
iapyang 5 years ago
parent
commit
2e2e73d026
  1. 33
      typescript/base/single/button/button.basic.ts
  2. 31
      typescript/base/single/single.ts
  3. 6
      typescript/core/ob.ts
  4. 5
      typescript/core/widget.ts
  5. 18
      typescript/index.ts

33
typescript/base/single/button/button.basic.ts

@ -0,0 +1,33 @@
import { _Single } from "../single";
export interface _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: any): void;
isSelected(): boolean;
isOnce(): boolean;
isForceSelected(): boolean;
isForceNotSelected(): boolean;
isDisableSelected(): boolean;
}

31
typescript/base/single/single.ts

@ -0,0 +1,31 @@
import { _Widget } from "../../core/widget";
export interface _Single extends _Widget {
_showToolTip(e: Event, opt?: SingleOpt): void;
_hideTooltip(): void;
_clearTimeOut(): void;
enableHover(opt?: SingleOpt): void;
disabledHover(): void;
setTitle(title: string, opt?: SingleOpt): void;
setWarningTitle(title: string, opt?: SingleOpt): void;
getTipType(): string;
isReadOnly(): boolean;
getTitle(): string;
getWarningTitle(): string;
popluate(..._args: any[]): void;
}
interface SingleOpt {
container?: any, belowMouse?: boolean
}

6
typescript/core/ob.ts

@ -1,9 +1,3 @@
export interface OBConstructor {
new(config: any): _OB;
(config: any): _OB;
readonly prototype: _OB;
}
export interface _OB { export interface _OB {
props: Props | (<T>(config: T) => Props & T); props: Props | (<T>(config: T) => Props & T);

5
typescript/core/widget.ts

@ -1,9 +1,6 @@
import { _OB } from "./ob"; import { _OB } from "./ob";
export interface WidgetConstructor { export interface _WidgetStatic {
new(config: any): _Widget;
(config: any): _Widget;
readonly prototype: _Widget;
/** /**
* *
* @param engine * @param engine

18
typescript/index.ts

@ -1,9 +1,19 @@
import { _i18n } from "./core/i18n"; import { _i18n } from "./core/i18n";
import { OBConstructor } from "./core/ob"; import { _OB } from "./core/ob";
import { _func } from "./core/func"; import { _func } from "./core/func";
import { WidgetConstructor } from "./core/widget"; import { _Widget, _WidgetStatic } from "./core/widget";
import { _Single } from "./base/single/single";
import { _BasicButton } from "./base/single/button/button.basic";
type Constructor<T extends {}> = T & {
new(config: any): T;
(config: any): T;
readonly prototype: T;
}
export interface _BI extends _func, _i18n { export interface _BI extends _func, _i18n {
OB: OBConstructor; OB: Constructor<_OB>;
Widget: WidgetConstructor; Widget: Constructor<_Widget> & _WidgetStatic;
Single: Constructor<_Single>;
BasicButton: Constructor<_BasicButton>;
} }

Loading…
Cancel
Save