this.addComponent(UI_mainView);报错

(alias) class UI_mainView
import UI_mainView
This is an automatically generated class by FairyGUI. Please do not modify it. *

没有与此调用匹配的重载。
第 1 个重载(共 2 个),“(type: new () => Component): Component”,出现以下错误。
类型“typeof UI_mainView”的参数不能赋给类型“new () => Component”的参数。
构造签名的类型不兼容。
不能将类型“new () => UI_mainView”分配给类型“new () => Component”。
类型“UI_mainView”缺少类型“Component”的以下属性: uuid, enabledInHierarchy, _isOnLoadCalled, update 及其他 19 项。
第 2 个重载(共 2 个),“(className: string): any”,出现以下错误。
类型“typeof UI_mainView”的参数不能赋给类型“string”的参数。ts(2769)
已邀请:

谷主

赞同来自:

先调用bindAll。教程 发布。

要回复问题请先登录注册