Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
}
26
export
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
setSizeWithUnit
Function · 0.90
setTextSizeWithUnit
Function · 0.90
setSizeWithUnit
Function · 0.90
Calls
2
isDef
Function · 0.85
isNumber
Function · 0.85
Tested by
no test coverage detected