From fe9ba5908ac793cd74fc472692c192b9a05114ee Mon Sep 17 00:00:00 2001 From: Kira Date: Wed, 19 May 2021 12:00:52 +0800 Subject: [PATCH 1/5] =?UTF-8?q?KERNEL-7826=20refactor:=20=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E5=B1=9E=E6=80=A7=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/shims-tsx.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index a8ad8e6ac..7763bf313 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -14,9 +14,21 @@ interface UIProps { } interface ElementClassProps extends UIProps { - baseCls: string; cls: string; + extraCls: string; ref: (ref: T) => void; + listeners: { + eventName: string; + action: (...args: any[]) => any; + once?: boolean; + }[]; + disabled: boolean; + invisible: boolean; + invalid: boolean; + attributes: { + [key: string]: any + } + tagName: string; } declare namespace JSX { From 14c3ecfd66fbe830de73d21c3bfa680b82c5f09c Mon Sep 17 00:00:00 2001 From: Kira Date: Wed, 19 May 2021 12:11:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?KERNEL-7826=20refactor:=20=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E5=B1=9E=E6=80=A7=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/shims-tsx.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index 7763bf313..dc9d4da65 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -29,6 +29,11 @@ interface ElementClassProps extends UIProps { [key: string]: any } tagName: string; + element: any; + + beforeRender(callback: () => void): void; + beforeInit(callback: () => void): void; + render(): void; } declare namespace JSX { From 9d3dde250c7d5f4d4e849916d2ec4d1bfeab790c Mon Sep 17 00:00:00 2001 From: Kira Date: Wed, 19 May 2021 13:51:07 +0800 Subject: [PATCH 3/5] =?UTF-8?q?KERNEL-7826=20refactor:=20=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E5=B1=9E=E6=80=A7=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/shims-tsx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index dc9d4da65..85c480d20 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -33,7 +33,7 @@ interface ElementClassProps extends UIProps { beforeRender(callback: () => void): void; beforeInit(callback: () => void): void; - render(): void; + render(): any; } declare namespace JSX { From 2279621a471c0f0f98c9e8015549633670e523a7 Mon Sep 17 00:00:00 2001 From: Kira Date: Wed, 19 May 2021 14:19:49 +0800 Subject: [PATCH 4/5] =?UTF-8?q?KERNEL-7826=20refactor:=20=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E5=B1=9E=E6=80=A7=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/shims-tsx.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index 85c480d20..daf5ac1e2 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -26,8 +26,11 @@ interface ElementClassProps extends UIProps { invisible: boolean; invalid: boolean; attributes: { - [key: string]: any - } + [key: string]: any; + }; + css: { + [key: string]: any; + }; tagName: string; element: any; From f48168f47c7a6e6d7906edda20e401edae3f9406 Mon Sep 17 00:00:00 2001 From: Kira Date: Wed, 19 May 2021 16:15:10 +0800 Subject: [PATCH 5/5] =?UTF-8?q?KERNEL-7826=20refactor:=20=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E5=B1=9E=E6=80=A7=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/shims-tsx.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/shims-tsx.ts b/typescript/shims-tsx.ts index daf5ac1e2..57f43e870 100644 --- a/typescript/shims-tsx.ts +++ b/typescript/shims-tsx.ts @@ -1,8 +1,8 @@ declare const React: any; interface UIProps { - width: number; - height: number; + width: number | string; + height: number | string; top: number; left: number; bottom: number;