Browse Source

Pull request #1436: 无JIRA任务 在注册的组件上加上xtype, 方便外部直接获取xtype

Merge in VISUAL/fineui from ~FAY/fineui:master to master

* commit '95cdb4e9e3f875633154bc42fa7121b5fb1898b1':
  无JIRA任务 在注册的组件上加上xtype
es6
fay 4 years ago
parent
commit
0d01a3aed7
  1. 3
      src/core/shortcut.js
  2. 1
      typescript/index.ts

3
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;
};

1
typescript/index.ts

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

Loading…
Cancel
Save