diff --git a/typescript/core/widget.ts b/typescript/core/widget.ts index 7bc644721..457b092f9 100644 --- a/typescript/core/widget.ts +++ b/typescript/core/widget.ts @@ -42,6 +42,8 @@ export interface _Widget extends _OB { element: { width(): number; height(): number; + width(width: number): _Widget['element']; + height(height: number): _Widget['element']; [key: string]: any; }; @@ -79,7 +81,7 @@ export interface _Widget extends _OB { * 初始化前 */ beforeInit?(cb: Function): void; - + /** * 创建前 */ @@ -442,6 +444,8 @@ export declare class Widget extends OB { element: { width(): number; height(): number; + width(width: number): Widget['element']; + height(height: number): Widget['element']; [key: string]: any; }; @@ -479,7 +483,7 @@ export declare class Widget extends OB { * 初始化前 */ beforeInit?(cb: Function): void; - + /** * 创建前 */