Browse Source

Merge remote-tracking branch 'origin/master'

es6
guy 4 years ago
parent
commit
a0dc9b883d
  1. 18
      typescript/base/single/button/buttons/button.ts
  2. 10
      typescript/shims-tsx.ts

18
typescript/base/single/button/buttons/button.ts

@ -3,12 +3,26 @@ import { BasicButton } from "../button.basic";
export declare class Button extends BasicButton { export declare class Button extends BasicButton {
static xtype: string; static xtype: string;
static EVENT_CHANGE: string; static EVENT_CHANGE: string;
props: {
minWidth?: number;
readonly?: boolean;
iconCls?: string;
level?: 'common' | 'success' | 'warning' |'ignore',
block?: boolean; // 是否块状显示,即不显示边框,没有最小宽度的限制
clear?: boolean; // 是否去掉边框和背景
ghost?: boolean; // 是否幽灵显示, 即正常状态无背景
textAlign?: 'center' | 'left' | 'right';
whiteSpace?: 'nowrap' | 'normal',
textWidth?: number | null,
textHeight?: number | null,
} & BasicButton['props'];
text: Label; text: Label;
icon?: IconLabel; icon?: IconLabel;
doRedMark(...args: any[]): void; doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void; unRedMark(...args: any[]): void;

10
typescript/shims-tsx.ts

@ -35,6 +35,10 @@ interface ElementClassProps<T> extends UIProps {
}; };
tagName: string; tagName: string;
element: any; element: any;
$testId: string;
$point: any;
$value: any;
$scope: () => any;
beforeRender(callback: () => void): void; beforeRender(callback: () => void): void;
beforeInit(callback: () => void): void; beforeInit(callback: () => void): void;
@ -47,13 +51,13 @@ declare namespace JSX {
[elemName: string]: Partial<UIProps>; [elemName: string]: Partial<UIProps>;
} }
type ElementAttributesProperty = { interface ElementAttributesProperty {
/** /**
* specify the property name to use * specify the property name to use
*/ */
__props: any; __props: any,
}; }
interface IntrinsicClassAttributes<T> extends Partial<ElementClassProps<T>> {} interface IntrinsicClassAttributes<T> extends Partial<ElementClassProps<T>> {}
} }

Loading…
Cancel
Save