From 95cdb4e9e3f875633154bc42fa7121b5fb1898b1 Mon Sep 17 00:00:00 2001 From: fay Date: Fri, 14 Aug 2020 10:19:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=9C=A8?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=9A=84=E7=BB=84=E4=BB=B6=E4=B8=8A=E5=8A=A0?= =?UTF-8?q?=E4=B8=8Axtype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/shortcut.js | 3 +++ typescript/index.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/core/shortcut.js b/src/core/shortcut.js index 9ab6d37689..a287091cb9 100644 --- a/src/core/shortcut.js +++ b/src/core/shortcut.js @@ -4,6 +4,9 @@ if (kv[xtype] != null) { _global.console && console.error("shortcut:[" + xtype + "] has been registed"); } + if (cls) { + cls["xtype"] = xtype; + } kv[xtype] = cls; }; diff --git a/typescript/index.ts b/typescript/index.ts index ed9f792153..903d9c6e36 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -48,6 +48,7 @@ type ClassConstructor = T & { new(config: any): T; (config: any): T; readonly prototype: T; + readonly xtype: string; } export interface BI extends _func, _i18n, _base, _inject {