From 78146238bc422e9402841135bb4351e6edf21c0c Mon Sep 17 00:00:00 2001 From: "shenmin.JIN" Date: Mon, 2 Dec 2024 13:40:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(hm):=20=E4=BF=AE=E5=A4=8D=20getPropertyValu?= =?UTF-8?q?e=20=E6=96=B9=E6=B3=95=E4=B8=AD=E8=8E=B7=E5=8F=96=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=B2=A1=E6=9C=89=E5=85=BC=E5=AE=B9=E5=8E=9F=E5=9E=8B?= =?UTF-8?q?=E9=93=BE=E4=B8=8A=E5=8F=96=E5=80=BC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/runtime-ets/dom/cssStyleDeclaration.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/taro-platform-harmony/src/runtime-ets/dom/cssStyleDeclaration.ts b/packages/taro-platform-harmony/src/runtime-ets/dom/cssStyleDeclaration.ts index 373b27f3c034..555a9c8fe12f 100644 --- a/packages/taro-platform-harmony/src/runtime-ets/dom/cssStyleDeclaration.ts +++ b/packages/taro-platform-harmony/src/runtime-ets/dom/cssStyleDeclaration.ts @@ -77,7 +77,8 @@ class CSSStyleDeclaration { prop = prop.includes('-') ? toCamelCase(prop) : prop const node = this.el const value = node._st[prop] - return value === undefined ? '' : value + // 兼容原型链上的取值 + return value === undefined ? this[prop] ?? '' : value } public removeProperty (prop: string): string | number {