jhwxapp/miniprogram/components/@mkl/wxs/add-unit.wxs

15 lines
240 B
Plaintext
Raw Normal View History

2023-08-10 01:21:29 +08:00
/* eslint-disable */
var REGEXP = getRegExp('^\d+(\.\d+)?$');
function addUnit(value) {
if (value == null) {
return undefined;
}
return REGEXP.test('' + value) ? value + 'px' : value;
}
module.exports = {
addUnit: addUnit
};