Bugfix: fixed the tabContent's children transform

Signed-off-by: laibo102 <laibo2@huawei.com>
Change-Id: Ic7f6b388426a73f2b71f1453c2cece878909af12
This commit is contained in:
laibo102
2022-08-19 14:31:42 +08:00
parent 12d0747c55
commit bbedae985b
+2 -3
View File
@@ -827,10 +827,9 @@ function processTabContent(node: ts.ExpressionStatement, innerCompStatements: ts
ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier(TABCONTENT_COMPONENT),
ts.factory.createIdentifier(COMPONENT_POP_FUNCTION)), undefined, []));
const tabAttrs: ts.Statement[] = [];
if (TabContentBody) {
const TabContentBodyChild = TabContentBody.statements[0] as ts.ExpressionStatement;
if (TabContentBody && TabContentBody.statements.length) {
const newTabContentChildren: ts.Statement[] = [];
processInnerComponent(TabContentBodyChild, newTabContentChildren, log);
processComponentChild(TabContentBody, newTabContentChildren, log);
tabContentCreation = ts.factory.createExpressionStatement(
ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(
ts.factory.createIdentifier(TABCONTENT_COMPONENT), ts.factory.createIdentifier(COMPONENT_CREATE_FUNCTION)),