!133 css 属性 border 空格异常报错修复

Merge pull request !133 from Bo Jiang/master
This commit is contained in:
openharmony_ci 2022-12-14 08:12:32 +00:00 committed by Gitee
commit 00ec3a6b29
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -659,8 +659,14 @@ var SHORTHAND_VALIDATOR = function SHORTHAND_VALIDATOR(v, validateFunction, isAr
}
var BORDER_VALIDATOR = function BORDER_VALIDATOR (value, name) {
value = (value || '').toString().trim()
const values = value.split(/\s+/)
value = (value || '').toString().trim();
let values = '';
const colorAttribute = value.match(/\(.*?\)/g);
if (colorAttribute && colorAttribute.length === 1) {
values = value.replace(colorAttribute[0], colorAttribute[0].replace(/\s+/g, '')).split(/\s+/);
} else {
values = value.split(/\s+/);
}
const res = []
let hasError = false
const reasons = []