mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
fix: 修复style不支持css variable问题 (#8827)
* fix: 修复style不支持css variable问题 * 添加注释 --------- Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com>
This commit is contained in:
parent
7beb05a2fe
commit
3e651e9910
@ -46,7 +46,8 @@ export function buildStyle(style: any, data: any) {
|
||||
styleVar.radius['bottom-left-border-radius'];
|
||||
delete styleVar['radius'];
|
||||
}
|
||||
if (key.indexOf('-') !== -1) {
|
||||
// 将属性短横线命名转换为驼峰命名,如background-color => backgroundColor。但不处理css variable,如--colors-brand-5
|
||||
if (key.indexOf('-') > 0) {
|
||||
styleVar[camelCase(valueMap[key] || key)] = styleVar[key];
|
||||
delete styleVar[key];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user