[LayaAir 2.0]laya2.6.1 属性 isSingleton是否为单实例组件无法重写
子类继承于 Laya.Script 无法在子类中重写 getter isSingleton 属性,因为在 LayaAir.d.ts中设置为只读。。。怎么解?
/**
* <code>Script</code> 类用于创建脚本的父类,该类为抽象类,不允许实例。
* 组件的生命周期
*/
class Script extends laya.components.Component {
protected _onEnable(): void;
/**
* @inheritDoc
* @override
*/
readonly isSingleton: boolean;
/**
* <code>Script</code> 类用于创建脚本的父类,该类为抽象类,不允许实例。
* 组件的生命周期
*/
class Script extends laya.components.Component {
protected _onEnable(): void;
/**
* @inheritDoc
* @override
*/
readonly isSingleton: boolean;
没有找到相关结果
已邀请:
要回复问题请先登录
0 个回复