diff --git a/arkui-plugins/ui-plugins/property-translators/observedTrack.ts b/arkui-plugins/ui-plugins/property-translators/observedTrack.ts index 28d0762e4cf5c86cf6941f186b4f3db1cd69ed09..e16866bebe32d9a2bfe0121f145f1e3c88668501 100644 --- a/arkui-plugins/ui-plugins/property-translators/observedTrack.ts +++ b/arkui-plugins/ui-plugins/property-translators/observedTrack.ts @@ -29,7 +29,7 @@ export class ObservedTrackTranslator { constructor(property: arkts.ClassProperty, classScopeInfo: ClassScopeInfo) { this.property = property; this.classScopeInfo = classScopeInfo; - this.hasImplement = expectName(this.property.key).startsWith(''); + this.hasImplement = expectName(this.property.key).startsWith('%%property-'); this.isTracked = hasDecorator(this.property, DecoratorNames.TRACK); } @@ -163,7 +163,7 @@ export class ObservedTrackTranslator { } removeImplementProperty(originalName: string): string { - const prefix = ''; + const prefix = '%%property-'; return originalName.substring(prefix.length); } diff --git a/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h b/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h index c03b5af27306155ba2db89c7cdb46d6adb6ac451..8a26cd4f3c4016742cf5a966c9a0b5dd40815d3d 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h +++ b/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h @@ -140,8 +140,8 @@ struct InteropTypeConverter { length.resource = 0; return length; } else if (env->IsInstanceOf(value, resource_class)) { - const static ets_method resource_p = env->Getp_method(resource_class, "id", ":D"); - return KLength{ 3, 0, 1, (KInt)env->CallDoubleMethod(value, resource_p) }; + const static ets_method resource_p = env->Getp_method(resource_class, "%%get-id", ":D"); + return KLength{ 3, 0, 1, (KInt)env->CallDoubleMethod(value, resource_p) }; } else { return KLength( { 0, 0, 0, 0}); }