filesbox/miniprogram/FilesBox/miniprogram_npm/@vant/weapp/wxs/add-unit.wxs

13 lines
227 B
Plaintext
Raw Permalink Normal View History

2023-09-21 02:23:31 +00: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;