From a617ca41a0f292d3cb3542f8576cc7dc28a04dc2 Mon Sep 17 00:00:00 2001 From: chenjiajian <798095202@qq.com> Date: Mon, 8 Mar 2021 17:19:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(runtime):=20=E4=BF=AE=E5=A4=8D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=20Webkit=20=E5=89=8D=E7=BC=80=20style=20=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8Cfix=20#8805?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-runtime/src/dom/style.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/taro-runtime/src/dom/style.ts b/packages/taro-runtime/src/dom/style.ts index 1898b39ef960..c24550468a39 100644 --- a/packages/taro-runtime/src/dom/style.ts +++ b/packages/taro-runtime/src/dom/style.ts @@ -115,7 +115,8 @@ export class Style { } public setProperty (propertyName: string, value?: string | null) { - if (isCssVariable(propertyName)) { + if (propertyName[0] === '-') { + // 支持 webkit 属性或 css 变量 this.setCssVariables(propertyName) } else { propertyName = toCamelCase(propertyName)