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' : '') };` );