We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e26f23e commit fa97449Copy full SHA for fa97449
src/mvc/core/Singleton.ts
@@ -43,7 +43,11 @@ namespace mvc {
43
* 完整的类路径
44
* @param c 类
45
*/
46
- static GetClassFullName(c: new () => any): string {
+ static GetClassFullName(c:any): string {
47
+ if (!c || typeof c != "object") {
48
+ //is new();
49
+ }
50
+
51
//todo 先从注册列表中取;
52
return egret.getQualifiedClassName(c);
53
}
src/test/BagView.ts
@@ -29,7 +29,7 @@ class BagView extends mvc.AbstactPanel implements mvc.IInjectable {
29
tf.x=this.tx;
30
tf.width=this.s.width;
31
tf.height=100;
32
- tf.text="inject:"+mvc.Singleton.GetClassFullName(Object.getPrototypeOf(this));
+ tf.text="inject:"+mvc.Singleton.GetClassFullName(this);
33
34
35
this.addChild(this.s);
0 commit comments