Browse Source

无JIRA任务 在注册的组件上加上xtype

master
fay 4 years ago
parent
commit
95cdb4e9e3
  1. 3
      src/core/shortcut.js
  2. 1
      typescript/index.ts

3
src/core/shortcut.js

@ -4,6 +4,9 @@
if (kv[xtype] != null) { if (kv[xtype] != null) {
_global.console && console.error("shortcut:[" + xtype + "] has been registed"); _global.console && console.error("shortcut:[" + xtype + "] has been registed");
} }
if (cls) {
cls["xtype"] = xtype;
}
kv[xtype] = cls; kv[xtype] = cls;
}; };

1
typescript/index.ts

@ -48,6 +48,7 @@ type ClassConstructor<T extends {}> = T & {
new(config: any): T; new(config: any): T;
(config: any): T; (config: any): T;
readonly prototype: T; readonly prototype: T;
readonly xtype: string;
} }
export interface BI extends _func, _i18n, _base, _inject { export interface BI extends _func, _i18n, _base, _inject {

Loading…
Cancel
Save