MCPcopy Create free account
hub / github.com/CoderOpen/waimai / addUnit

Function addUnit

front/wxcomponents/vant/common/utils.js:26–32  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

24 return systemInfo;
25}
26export function addUnit(value) {
27 if (!isDef(value)) {
28 return undefined;
29 }
30 value = String(value);
31 return isNumber(value) ? `${value}px` : value;
32}

Callers 3

setSizeWithUnitFunction · 0.90
setTextSizeWithUnitFunction · 0.90
setSizeWithUnitFunction · 0.90

Calls 2

isDefFunction · 0.85
isNumberFunction · 0.85

Tested by

no test coverage detected