MCPcopy Create free account
hub / github.com/circircir-circle/human_exist_device / addUnit

Method addUnit

mini_program/common/Tools.js:834–836  ·  view source on GitHub ↗
(value = 'auto', unit = 'rpx')

Source from the content-addressed store, hash-verified

832 }
833
834 addUnit(value = 'auto', unit = 'rpx') {
835 return this.isNumber(value) ? `${value}${unit}` : value;
836 }
837
838 // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
839 // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx

Callers

nothing calls this directly

Calls 1

isNumberMethod · 0.95

Tested by

no test coverage detected