我正在名为 StructureWindowComponent 的组件中实现事件处理,并且还在 LeggerStructureWindowComponent 中对其进行了覆盖。
在基类(StructureWindowComponent)中,模糊事件的事件处理如下:
symbolCellLostFocus = (symbolField : MatInput, $index: number) =>{
console.log("base class symbol cell lost focus");
//implementation...
}Run Code Online (Sandbox Code Playgroud)
在派生类 LeggerStructureWindowComponent 中,我使用 super 调用此方法,如下所示...
symbolCellLostFocus = (symbolField : MatInput, $index: number) =>{
console.log("derived class symbol lost focus");
super.symbolCellLostFocus(symbolField, $index);
}
Run Code Online (Sandbox Code Playgroud)
我在控制台中收到错误: ERROR TypeError: (intermediate value).symbolCellLostFocus is not a function
不知道这里出了什么问题..有人可以请建议吗?