Merge branch 'lixinli_varcalc_0120' of https://gitee.com/superFat/third_party_weex-loader into lixinli_varcalc_0120

Signed-off-by: Li <xlliaq@isoftstone.com>
This commit is contained in:
Li 2022-02-21 09:48:23 +08:00
commit 86d0c5fe88

View File

@ -3242,6 +3242,19 @@ function validate(name, value) {
/* istanbul ignore else */
else {
result = {value: value}
if (name != "border") {
var value = result.value.toString()
if (value.match(/var/)) {
value = cssVarFun(value)
}
if (value.match(/calc/)) {
value = dal2Rpn(value)
value = evalRpn(value)
} else {
value = value
}
result = {value: value}
}
}
if (result.reason) {
log = {reason: result.reason(name, value, result.value)}
@ -3263,17 +3276,6 @@ function validate(name, value) {
'` is not a standard attribute name and may not be supported' + suggested}
}
if (name != "border") {
var value = result.value.toString()
if (value.match(/var/)) {
value = cssVarFun(value)
}
if (value.match(/calc/)) {
value = dal2Rpn(value)
value = evalRpn(value)
}
result = {value: value}
}
return {
value: result.value,