File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
rax-simulator-renderer/src
react-simulator-renderer/src
renderer-core/src/renderer Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -501,8 +501,6 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
501501 const _schema : any = {
502502 ...compatibleLegaoSchema ( schema ) ,
503503 } ;
504- _schema . methods = { } ;
505- _schema . lifeCycles = { } ;
506504
507505 if ( schema . componentName === 'Component' && ( schema as ComponentSchema ) . css ) {
508506 const doc = window . document ;
Original file line number Diff line number Diff line change @@ -428,8 +428,6 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
428428 const _schema : any = {
429429 ...compatibleLegaoSchema ( schema ) ,
430430 } ;
431- _schema . methods = { } ;
432- _schema . lifeCycles = { } ;
433431
434432 if ( schema . componentName === 'Component' && ( schema as ComponentSchema ) . css ) {
435433 const doc = window . document ;
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ export default function componentRendererFactory(): IBaseRenderComponent {
3232
3333 const noContainer = this . __parseData ( __schema . props ?. noContainer ) ;
3434
35+ this . __bindCustomMethods ( this . props ) ;
36+
3537 if ( noContainer ) {
3638 return this . __renderContextProvider ( { compContext : this } ) ;
3739 }
@@ -44,5 +46,12 @@ export default function componentRendererFactory(): IBaseRenderComponent {
4446
4547 return this . __renderComp ( Component , this . __renderContextProvider ( { compContext : this } ) ) ;
4648 }
49+
50+ /** 需要重载下面几个方法,如果在低代码组件中绑定了对应的生命周期时会出现死循环 */
51+ componentDidMount ( ) { }
52+ getSnapshotBeforeUpdate ( ) { }
53+ componentDidUpdate ( ) { }
54+ componentWillUnmount ( ) { }
55+ componentDidCatch ( ) { }
4756 } ;
4857}
You can’t perform that action at this time.
0 commit comments