Skip to content

Commit fa97449

Browse files
committed
GetClassFullName todo
1 parent e26f23e commit fa97449

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/mvc/core/Singleton.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ namespace mvc {
4343
* 完整的类路径
4444
* @param c 类
4545
*/
46-
static GetClassFullName(c: new () => any): string {
46+
static GetClassFullName(c:any): string {
47+
if (!c || typeof c != "object") {
48+
//is new();
49+
}
50+
4751
//todo 先从注册列表中取;
4852
return egret.getQualifiedClassName(c);
4953
}

src/test/BagView.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BagView extends mvc.AbstactPanel implements mvc.IInjectable {
2929
tf.x=this.tx;
3030
tf.width=this.s.width;
3131
tf.height=100;
32-
tf.text="inject:"+mvc.Singleton.GetClassFullName(Object.getPrototypeOf(this));
32+
tf.text="inject:"+mvc.Singleton.GetClassFullName(this);
3333

3434

3535
this.addChild(this.s);

0 commit comments

Comments
 (0)