mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-19 16:43:34 -04:00
!796 fix装饰属性名与内置属性名称重名报错问题
Merge pull request !796 from Bo Jiang/master
This commit is contained in:
@@ -1284,7 +1284,7 @@ export function getName(node: ts.ExpressionStatement | ts.Expression): string {
|
||||
name = temp.escapedText.toString();
|
||||
break;
|
||||
} else if (ts.isPropertyAccessExpression(temp) && temp.name && ts.isIdentifier(temp.name) &&
|
||||
!BUILDIN_STYLE_NAMES.has(temp.name.escapedText.toString())) {
|
||||
isCustomAttributes(temp)) {
|
||||
name = temp.name.escapedText.toString();
|
||||
break;
|
||||
}
|
||||
@@ -1293,6 +1293,14 @@ export function getName(node: ts.ExpressionStatement | ts.Expression): string {
|
||||
return name;
|
||||
}
|
||||
|
||||
function isCustomAttributes(temp: ts.PropertyAccessExpression): boolean {
|
||||
if (temp.expression && temp.expression.getText() === THIS) {
|
||||
return true;
|
||||
} else {
|
||||
return !BUILDIN_STYLE_NAMES.has(temp.name.escapedText.toString());
|
||||
}
|
||||
}
|
||||
|
||||
export function isAttributeNode(node: ts.ExpressionStatement): boolean {
|
||||
let temp: any = node.expression;
|
||||
let name: string;
|
||||
|
||||
Reference in New Issue
Block a user