diff --git a/packages/renderer-core/src/renderer/component.tsx b/packages/renderer-core/src/renderer/component.tsx index 4be33f5c1..f9f6e8f96 100644 --- a/packages/renderer-core/src/renderer/component.tsx +++ b/packages/renderer-core/src/renderer/component.tsx @@ -47,11 +47,25 @@ export default function componentRendererFactory(): IBaseRenderComponent { return this.__renderComp(Component, this.__renderContextProvider({ compContext: this })); } + getComponentName() { + return this.props?.componentName; + } + /** 需要重载下面几个方法,如果在低代码组件中绑定了对应的生命周期时会出现死循环 */ - componentDidMount() {} - getSnapshotBeforeUpdate() {} - componentDidUpdate() {} - componentWillUnmount() {} - componentDidCatch() {} + componentDidMount() { + this.__debug(`componentDidMount - ${this.getComponentName()}`); + } + getSnapshotBeforeUpdate() { + this.__debug(`getSnapshotBeforeUpdate - ${this.getComponentName()}`); + } + componentDidUpdate() { + this.__debug(`componentDidUpdate - ${this.getComponentName()}`); + } + componentWillUnmount() { + this.__debug(`componentWillUnmount - ${this.getComponentName()}`); + } + componentDidCatch() { + this.__debug(`componentDidCatch - ${this.getComponentName()}`); + } }; }