Signed-off-by: fupengfei001 <fupengfei6@huawei.com>
This commit is contained in:
fupengfei001 2023-03-24 18:54:39 +08:00
parent e1a273720f
commit 2c034b1b0b

View File

@ -57,7 +57,7 @@ export function generateIndex(): string {
}
if (value.fileName.startsWith('ohos_')) {
caseBody += `case '${value.fileName.split('ohos_')[1].replace('_', '.')}':\n\treturn ${functionName}();\n`;
caseBody += `case '${value.fileName.split('ohos_')[1].replace(/_/g, '.')}':\n\treturn ${functionName}();\n`;
} else {
caseBody += `case '${value.fileName}':\n\treturn ${functionName}();\n`;
}