Browse Source

Pull request #1635: KERNEL-6464 补充类型

Merge in VISUAL/fineui from ~TELLER/fineui:bugfix to master

* commit '11e43467a2719860f2ddb1bd417d0b21c0abefeb':
  KERNEL-6464 补充类型
master
Teller 4 years ago
parent
commit
6782c3b7a0
  1. 34
      typescript/core/wrapper/layout.ts
  2. 5
      typescript/core/wrapper/layout/adapt/adapt.leftrightvertical.ts
  3. 3
      typescript/index.ts

34
typescript/core/wrapper/layout.ts

@ -1,4 +1,4 @@
import { _Widget } from "../widget"; import { _Widget, Widget } from "../widget";
export interface _Layout extends _Widget { export interface _Layout extends _Widget {
addItem(item: any): any; addItem(item: any): any;
@ -31,3 +31,35 @@ export interface _Layout extends _Widget {
resize(): void; resize(): void;
} }
export declare class Layout extends Widget {
addItem(item: any): any;
prependItem(item: any): any;
addItemAt(index: string, item: any): any;
removeItemAt(indexes: any): void;
shouldUpdateItem(index: number, item: any): boolean;
updateItemAt(index: number, item: any): any;
addItems<T>(items: T[], context?: any): void;
prependItems<T>(items: T[], context?: any): void;
getValue<T>(): T[];
setText(v: string): void;
update(opt: any): any;
stroke<T>(items: T[]): void;
removeWidget(nameOrWidget: any): void;
populate<T>(items?: T[]): void;
resize(): void;
}

5
typescript/core/wrapper/layout/adapt/adapt.leftrightvertical.ts

@ -0,0 +1,5 @@
import { Layout } from "../../layout";
export declare class LeftRightVerticalAdapt extends Layout {
static xtype: string;
}

3
typescript/index.ts

@ -47,6 +47,7 @@ import { _DefaultLayout } from "./core/wrapper/layout/layout.default";
import { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist"; import { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist";
import { Icon } from "./base/single/icon/icon"; import { Icon } from "./base/single/icon/icon";
import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical"; import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical";
import { LeftRightVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftrightvertical";
type ClassConstructor<T extends {}> = T & { type ClassConstructor<T extends {}> = T & {
@ -105,6 +106,7 @@ export interface BI extends _func, _i18n, _base, _inject {
SearchTextValueCombo: ClassConstructor<_SearchTextValueCombo> & _SearchTextValueComboStatic; SearchTextValueCombo: ClassConstructor<_SearchTextValueCombo> & _SearchTextValueComboStatic;
Icon: typeof Icon; Icon: typeof Icon;
LeftVerticalAdaptLayout: ClassConstructor<_LeftVerticalAdapt>; LeftVerticalAdaptLayout: ClassConstructor<_LeftVerticalAdapt>;
LeftRightVerticalAdapt: typeof LeftRightVerticalAdapt;
} }
export default { export default {
@ -114,4 +116,5 @@ export {
Widget, Widget,
Single, Single,
Icon, Icon,
LeftRightVerticalAdapt,
}; };

Loading…
Cancel
Save