Skip to content

Commit b75db76

Browse files
oneyouziyucongshuang
andauthored
fix:处理轻卡不对内联border等多样式做处理问题 (#89)
* fix:处理轻卡不对内联border等多样式做处理问题 * fix:prettier code --------- Co-authored-by: yucongshuang <[email protected]>
1 parent a5a8844 commit b75db76

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

packages/hap-compiler/src/template/validator.js

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,24 +1564,20 @@ function checkStyle(cssText, output, locationInfo, options) {
15641564
k = hyphenedToCamelCase(k)
15651565
v = pair[1].trim()
15661566
v = exp(v, true, isLite) // 处理值表达式
1567-
if (isLite) {
1568-
style[k] = v
1569-
} else {
1570-
vResult = styler.validateDelaration(k, v, options)
1571-
v = vResult.value
1572-
v.forEach((t) => {
1573-
// 如果校验成功,则保存转换后的属性值
1574-
if (isValidValue(t.v) || typeof t.v === 'function') {
1575-
style[t.n] = t.v
1576-
}
1577-
})
1578-
if (vResult.log) {
1579-
log.push({
1580-
line: locationInfo.line || 1,
1581-
column: locationInfo.col || 1,
1582-
reason: vResult.log.reason
1583-
})
1567+
vResult = styler.validateDelaration(k, v, options)
1568+
v = vResult.value
1569+
v.forEach((t) => {
1570+
// 如果校验成功,则保存转换后的属性值
1571+
if (isValidValue(t.v) || typeof t.v === 'function') {
1572+
style[t.n] = t.v
15841573
}
1574+
})
1575+
if (vResult.log) {
1576+
log.push({
1577+
line: locationInfo.line || 1,
1578+
column: locationInfo.col || 1,
1579+
reason: vResult.log.reason
1580+
})
15851581
}
15861582
}
15871583
})

0 commit comments

Comments
 (0)