From e79a2d8fbeb5d5b829a3199fcbffef725239198b Mon Sep 17 00:00:00 2001 From: BARM Date: Thu, 6 Jul 2023 11:18:31 +0800 Subject: [PATCH] fix(code-gen): fix example-solution.ts format problem (#2207) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 林熠 --- modules/code-generator/src/cli/solutions/example-solution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/code-generator/src/cli/solutions/example-solution.ts b/modules/code-generator/src/cli/solutions/example-solution.ts index fe303f360..0314151c6 100644 --- a/modules/code-generator/src/cli/solutions/example-solution.ts +++ b/modules/code-generator/src/cli/solutions/example-solution.ts @@ -289,8 +289,8 @@ codealike.json }, "lifeCycles": { "componentDidMount": { - "type": "JSExpression", - "value": "function() { console.log('componentDidMount'); }" + "type": "JSFunction", + "value": "function componentDidMount() {\\n console.log('componentDidMount');\\n}" } }, "methodsModule": {