跳到主要内容

inheritState 继承父级状态的数据

inheritState

类型: MethodDeclaration

定义位置: data.ts

描述

继承父级状态的数据

参数

参数名类型描述默认值
stateStateFile--

返回值

类型: void

源代码

位置: 第 527 行

private inheritState(state: StateFile): void {
if (state.parent) {
Data.mergeArrayByProperty(state.attributes, state.parent.attributes, 'key')
Object.setPrototypeOf(state.events, state.parent.events)
Data.mergeScripts(state.scripts, state.parent.scripts)
}
}

文档生成时间:2025/7/7 12:07:06