GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: change __setLifeCycleMethods to its actual meaning __excut… · zfhstudy/lowcode-engine@12f67dc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/renderer-core/src
    • renderer
      • addon.tsx
      • base.tsx
      • block.tsx
      • component.tsx
      • page.tsx
    • types
      • index.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/renderer-core/src/renderer/addon.tsx‎

Copy file name to clipboardExpand all lines: packages/renderer-core/src/renderer/addon.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function addonRendererFactory(): IBaseRenderComponent {
4545
this.__initDataSource(props);
4646
this.open = this.open || (() => { });
4747
this.close = this.close || (() => { });
48-
this.__setLifeCycleMethods('constructor', [...arguments]);
48+
this.__excuteLifeCycleMethod('constructor', [...arguments]);
4949
}
5050

5151
async componentWillUnmount() {
Collapse file

‎packages/renderer-core/src/renderer/base.tsx‎

Copy file name to clipboardExpand all lines: packages/renderer-core/src/renderer/base.tsx
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,28 +131,28 @@ export default function baseRendererFactory(): IBaseRenderComponent {
131131
}
132132

133133
async getSnapshotBeforeUpdate(...args: any[]) {
134-
this.__setLifeCycleMethods('getSnapshotBeforeUpdate', args);
134+
this.__excuteLifeCycleMethod('getSnapshotBeforeUpdate', args);
135135
this.__debug(`getSnapshotBeforeUpdate - ${this.props?.__schema?.fileName}`);
136136
}
137137

138138
async componentDidMount(...args: any[]) {
139139
this.reloadDataSource();
140-
this.__setLifeCycleMethods('componentDidMount', args);
140+
this.__excuteLifeCycleMethod('componentDidMount', args);
141141
this.__debug(`componentDidMount - ${this.props?.__schema?.fileName}`);
142142
}
143143

144144
async componentDidUpdate(...args: any[]) {
145-
this.__setLifeCycleMethods('componentDidUpdate', args);
145+
this.__excuteLifeCycleMethod('componentDidUpdate', args);
146146
this.__debug(`componentDidUpdate - ${this.props.__schema.fileName}`);
147147
}
148148

149149
async componentWillUnmount(...args: any[]) {
150-
this.__setLifeCycleMethods('componentWillUnmount', args);
150+
this.__excuteLifeCycleMethod('componentWillUnmount', args);
151151
this.__debug(`componentWillUnmount - ${this.props?.__schema?.fileName}`);
152152
}
153153

154154
async componentDidCatch(...args: any[]) {
155-
this.__setLifeCycleMethods('componentDidCatch', args);
155+
this.__excuteLifeCycleMethod('componentDidCatch', args);
156156
console.warn(args);
157157
}
158158

@@ -194,7 +194,7 @@ export default function baseRendererFactory(): IBaseRenderComponent {
194194
}
195195
}
196196

197-
__setLifeCycleMethods = (method: string, args?: any) => {
197+
__excuteLifeCycleMethod = (method: string, args?: any) => {
198198
const lifeCycleMethods = getValue(this.props.__schema, 'lifeCycles', {});
199199
let fn = lifeCycleMethods[method];
200200
if (fn) {
@@ -360,7 +360,7 @@ export default function baseRendererFactory(): IBaseRenderComponent {
360360

361361
__render = () => {
362362
const schema = this.props.__schema;
363-
this.__setLifeCycleMethods('render');
363+
this.__excuteLifeCycleMethod('render');
364364
this.__writeCss();
365365

366366
const { engine } = this.context;
Collapse file

‎packages/renderer-core/src/renderer/block.tsx‎

Copy file name to clipboardExpand all lines: packages/renderer-core/src/renderer/block.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function blockRendererFactory(): IBaseRenderComponent {
1313
const schema = props.__schema || {};
1414
this.state = this.__parseData(schema.state || {});
1515
this.__initDataSource(props);
16-
this.__setLifeCycleMethods('constructor', [...arguments]);
16+
this.__excuteLifeCycleMethod('constructor', [...arguments]);
1717
}
1818

1919
render() {
Collapse file

‎packages/renderer-core/src/renderer/component.tsx‎

Copy file name to clipboardExpand all lines: packages/renderer-core/src/renderer/component.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function componentRendererFactory(): IBaseRenderComponent {
1515
const schema = props.__schema || {};
1616
this.state = this.__parseData(schema.state || {});
1717
this.__initDataSource(props);
18-
this.__setLifeCycleMethods('constructor', arguments as any);
18+
this.__excuteLifeCycleMethod('constructor', arguments as any);
1919
}
2020

2121
render() {
Collapse file

‎packages/renderer-core/src/renderer/page.tsx‎

Copy file name to clipboardExpand all lines: packages/renderer-core/src/renderer/page.tsx
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function pageRendererFactory(): IBaseRenderComponent {
1515
const schema = props.__schema || {};
1616
this.state = this.__parseData(schema.state || {});
1717
this.__initDataSource(props);
18-
this.__setLifeCycleMethods('constructor', [props, ...rest]);
18+
this.__excuteLifeCycleMethod('constructor', [props, ...rest]);
1919
}
2020

2121
async componentDidUpdate(prevProps: IBaseRendererProps, _prevState: {}, snapshot: unknown) {
@@ -40,7 +40,7 @@ export default function pageRendererFactory(): IBaseRenderComponent {
4040
this.__bindCustomMethods(this.props);
4141
this.__initDataSource(this.props);
4242

43-
// this.__setLifeCycleMethods('constructor', arguments);
43+
// this.__excuteLifeCycleMethod('constructor', arguments);
4444

4545
this.__generateCtx({
4646
page: this,
Collapse file

‎packages/renderer-core/src/types/index.ts‎

Copy file name to clipboardExpand all lines: packages/renderer-core/src/types/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export type IBaseRendererInstance = IGeneralComponent<
240240
__beforeInit(props: IBaseRendererProps): void;
241241
__init(props: IBaseRendererProps): void;
242242
__afterInit(props: IBaseRendererProps): void;
243-
__setLifeCycleMethods(method: string, args?: any[]): void;
243+
__excuteLifeCycleMethod(method: string, args?: any[]): void;
244244
__bindCustomMethods(props: IBaseRendererProps): void;
245245
__generateCtx(ctx: Record<string, any>): void;
246246
__parseData(data: any, ctx?: any): any;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.