From 55588614e1d194afae76c6dd7cff2fd1257655a0 Mon Sep 17 00:00:00 2001 From: Kobi Date: Mon, 31 May 2021 11:44:16 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-7828=20=E8=A1=A5=E5=85=85=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/single/button/buttons/button.ts | 18 ++++++++++++++++-- typescript/shims-tsx.ts | 10 +++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/typescript/base/single/button/buttons/button.ts b/typescript/base/single/button/buttons/button.ts index 328bd0596..f4cf8de03 100644 --- a/typescript/base/single/button/buttons/button.ts +++ b/typescript/base/single/button/buttons/button.ts @@ -3,12 +3,26 @@ import { BasicButton } from "../button.basic"; export declare class Button extends BasicButton { static xtype: 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; icon?: IconLabel; - + doRedMark(...args: any[]): void; unRedMark(...args: any[]): void; diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index 1d55fd430..cc39b52fd 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -35,6 +35,10 @@ interface ElementClassProps extends UIProps { }; tagName: string; element: any; + $testId: string; + $point: any; + $value: any; + $scope: () => any; beforeRender(callback: () => void): void; beforeInit(callback: () => void): void; @@ -47,13 +51,13 @@ declare namespace JSX { [elemName: string]: Partial; } - type ElementAttributesProperty = { + interface ElementAttributesProperty { /** * specify the property name to use */ - __props: any; - }; + __props: any, + } interface IntrinsicClassAttributes extends Partial> {} }