1.0.20 • Published 3 years ago

xrk-tools-test v1.0.20

Weekly downloads
80
License
ISC
Repository
-
Last release
3 years ago

Constants

base

通用基础方法

Kind: global constant

base.numberFormat(num, divisor, decimalPlaces, unit)

格式化数值

Kind: static method of base

base.easyDeepClone(content)

简易深克隆(无法克隆Function Map Set undefined)

Kind: static method of base

base.deepClone(content)

深克隆

Kind: static method of base

check

数据检查

Kind: global constant

check.isNumber(num)

判断是否为数字 (数字字符串也是数字,例如'23'、'123.213')

Kind: static method of check

check.isTel(tel)

判断是否为手机号

Kind: static method of check

check.isFalseValue(value)

判断是否有值,但是值为false

Kind: static method of check

check.isFunction(param)

判断是否为函数

Kind: static method of check

check.isDate(param)

判断是否为时间对象

Kind: static method of check

check.isObject(param)

判断是否为Object对象

Kind: static method of check

check.isMap(param)

判断是否为Map

Kind: static method of check

check.isSet(param)

判断是否为Set

Kind: static method of check

check.isString(param)

判断是否为字符串

Kind: static method of check

check.isBoolean(param)

判断是否为Boolean

Kind: static method of check

date

处理时间

Kind: global constant

date.dateFormat(date, fmt, autoFillZero)

格式化时间

Kind: static method of date

file

处理文件

Kind: global constant

file.dataURLToBlob(base64)

base64转为Blob

Kind: static method of file

file.blobToDataURI(blob)

Blob转为base64

Kind: static method of file

file.imgElement2Base64(imgElement)

将img标签转为base64

Kind: static method of file

file.imgUrl2Base64(imgUrl)

将img网络资源转为base64

Kind: static method of file

file.getNetFile(url, responseType, options)

获取网络资源文件

Kind: static method of file

file.contentToQrcodeUrl(content)

将内容转为二维码图片

Kind: static method of file

money

处理金额

Kind: global constant

money.moneyFixed(num, decimalPlaces, unit)

将分格式化为元,保留两位小数

Kind: static method of money

money.moneyComplete(num)

将元格式化为分,主要用于向服务端传递参数时使用

Kind: static method of money

money.afterTaxPrice(num, tax)

给c端计算税率

Kind: static method of money

customStorage

处理本地数据

Kind: global constant

customStorage.setStorage(key, value, isLocal)

本地数据存储

Kind: static method of customStorage

customStorage.getStorage(key, isLocal)

读取本地存储的数据

Kind: static method of customStorage

transform

处理字符串

Kind: global constant

transform.hideSomeString(str, start, end, replaceStr)

将字符串指定位置替换为指定字符

Kind: static method of transform

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago