//根据propId一次找出所有父元素的name getConKeyName(props: model.proItem[], propId: number): string { let res = '' for (let item of props) { if (item.children && item.children.length > 0) { let child = this.getConKeyName(item.children, propId); if(child){ res = `${item.propertyName}-${child}` break } } else if (item.propertyId == propId) { res = item.propertyName; break } } return res }