Browse Source

Pull request #1651: KERNEL-6465 补充类型

Merge in VISUAL/fineui from ~YOUKI/fineui:master to master

* commit '6cd55160b5e1b23ab906a13752f863a918eebd5f':
  KERNEL-6465 refactor: 补充类型
  KERNEL-6465 refactor: 补充类型
master
Youki 4 years ago
parent
commit
d27001efc7
  1. 44
      typescript/base/combination/group.button.ts
  2. 6
      typescript/base/combination/tree.button.ts
  3. 12
      typescript/base/single/button/button.node.ts
  4. 22
      typescript/base/tree/customtree.ts
  5. 9
      typescript/case/button/node/node.icon.arrow.ts
  6. 17
      typescript/case/button/treeitem/item.first.treeleaf.ts
  7. 17
      typescript/case/button/treeitem/item.last.treeleaf.ts
  8. 17
      typescript/case/button/treeitem/item.mid.treeleaf.ts
  9. 24
      typescript/index.ts

44
typescript/base/combination/group.button.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { _Widget, Widget } from "../../core/widget";
export interface _ButtonGroup extends _Widget {
prependItems<T>(items: T[]): void;
@ -45,3 +45,45 @@ export interface _ButtonGroupChooseType {
export interface _ButtonGroupStatic {
EVENT_CHANGE: string;
}
export declare class ButtonGroup extends Widget {
static xtype: string;
static CHOOSE_TYPE_SINGLE: number;
static CHOOSE_TYPE_MULTI: number;
static CHOOSE_TYPE_ALL: number;
static CHOOSE_TYPE_NONE: number;
static CHOOSE_TYPE_DEFAULT: number;
static EVENT_CHANGE: string;
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
removeItemAt(indexes: any): void;
removeItems(values: any): void;
populate(items?: any, ...args: any[]): void;
setNotSelectedValue(v: any): void;
getNotSelectedValue<T>(): T[];
setEnabledValue(v: any): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getSelectedButtons<T>(): T[];
getNotSelectedButtons<T>(): T[];
getIndexByValue(value: any): number;
getNodeById(id: any): any;
getNodeByValue(value: any): any;
getValue<T>(): T[];
}

6
typescript/base/combination/tree.button.ts

@ -0,0 +1,6 @@
import { ButtonGroup } from './group.button';
export declare class ButtonTree extends ButtonGroup {
static xtype: string;
static EVENT_CHANGE: string;
}

12
typescript/base/single/button/button.node.ts

@ -1,4 +1,4 @@
import { _BasicButton } from "./button.basic";
import { _BasicButton, BasicButton } from "./button.basic";
export interface _NodeButton extends _BasicButton {
isOpened(): void;
@ -9,3 +9,13 @@ export interface _NodeButton extends _BasicButton {
triggerExpand(): void;
}
export declare class NodeButton extends BasicButton {
isOpened(): boolean;
setOpened(b: boolean): void;
triggerCollapse(): void;
triggerExpand(): void;
}

22
typescript/base/tree/customtree.ts

@ -0,0 +1,22 @@
import { Widget } from '../../core/widget';
export declare class CustomTree extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
initTree(nodes: any, ...args: any[]): void;
stroke(...args: any[]): void;
populate(nodes: any, ...args: any[]): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getNodeById(id: any): any;
getNodeByValue(value: any): any;
getValue<T>(): T[];
}

9
typescript/case/button/node/node.icon.arrow.ts

@ -0,0 +1,9 @@
import { NodeButton } from '../../../base/single/button/button.node';
export declare class IconArrowNode extends NodeButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
}

17
typescript/case/button/treeitem/item.first.treeleaf.ts

@ -0,0 +1,17 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class FirstTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

17
typescript/case/button/treeitem/item.last.treeleaf.ts

@ -0,0 +1,17 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class LastTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

17
typescript/case/button/treeitem/item.mid.treeleaf.ts

@ -0,0 +1,17 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class MidTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

24
typescript/index.ts

@ -1,9 +1,9 @@
import { _Combo, _ComboStatic } from "./base/combination/combo";
import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from "./base/combination/group.button";
import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic, ButtonGroup } from "./base/combination/group.button";
import { _Tab, _TabStatic, Tab } from "./base/combination/tab";
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 { _NodeButton, NodeButton } from "./base/single/button/button.node";
import { _Button, _ButtonStatic, Button } from "./base/single/button/buttons/button";
import { TextButton, _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text";
import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listitem/icontextitem";
@ -58,6 +58,12 @@ import { IconLabel } from "./base/single/label/icon.label";
import { Popover, BarPopover } from "./base/layer/layer.popover";
import { IconCombo } from "./case/combo/iconcombo/combo.icon";
import { DynamicDateCombo } from "./widget/dynamicdate/dynamicdate.combo";
import { CustomTree } from "./base/tree/customtree";
import { ButtonTree } from "./base/combination/tree.button";
import { IconArrowNode } from "./case/button/node/node.icon.arrow";
import { MidTreeLeafItem } from "./case/button/treeitem/item.mid.treeleaf";
import { FirstTreeLeafItem } from "./case/button/treeitem/item.first.treeleaf";
import { LastTreeLeafItem } from "./case/button/treeitem/item.last.treeleaf";
type ClassConstructor<T extends {}> = T & {
@ -129,6 +135,12 @@ export interface BI extends _func, _i18n, _base, _inject {
BarPopover: typeof BarPopover;
IconCombo: typeof IconCombo;
DynamicDateCombo: typeof DynamicDateCombo;
CustomTree: typeof CustomTree;
ButtonTree: typeof ButtonTree;
IconArrowNode: typeof IconArrowNode;
MidTreeLeafItem: typeof MidTreeLeafItem;
FirstTreeLeafItem: typeof FirstTreeLeafItem;
LastTreeLeafItem: typeof LastTreeLeafItem;
}
export default {
@ -162,4 +174,12 @@ export {
IconCombo,
DynamicDateCombo,
MultiSelectItem,
CustomTree,
ButtonGroup,
ButtonTree,
NodeButton,
IconArrowNode,
MidTreeLeafItem,
FirstTreeLeafItem,
LastTreeLeafItem,
};

Loading…
Cancel
Save