From 6841ab43d337d6a637a82dbb5c1b079ea8ae6572 Mon Sep 17 00:00:00 2001 From: HongYang <33488114+hy993658052@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:09:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=85=8D=E7=BD=AEicon=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98=20(#?= =?UTF-8?q?9189)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: hongyang03 --- packages/amis-core/src/utils/style-helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amis-core/src/utils/style-helper.ts b/packages/amis-core/src/utils/style-helper.ts index bca834d7c..2a3f66a12 100644 --- a/packages/amis-core/src/utils/style-helper.ts +++ b/packages/amis-core/src/utils/style-helper.ts @@ -164,7 +164,7 @@ export function formatStyle( const fn = (key: string, value: string) => { key = valueMap[key] || key; styles.push( - `${kebabCase(key)}: ${ + `${key.startsWith('--') ? key : kebabCase(key)}: ${ value + (weights?.important ? ' !important' : '') };` );