1.0.3 • Published 1 year ago

xkl-utils v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

日期时间

calendarPanel(date)  //获取普通日历一个面板的日期数据

aroundDate(date, 'month')  //获取当前日期的前后时间

nextStepTime(time, step = 30)  //获取下个整点时间,整点规则由step决定

timeDisplay (time, dateSeparator = '-', timeSeparator = ':') //一般用于前端列表上的时间展示

timeStep (start, end, unit) // 获取两个时间的差值

设备类型

osType.isIE,
osType.isTablet
osType.isIOS
osType.isAndroid
osType.isPC
osType.isChrome

form表单

resetForm (form) //重置表单form

常用函数

toPromise(fn, flag = true)  //将普通函数转换成promise对象

debounce(fn, wait = 300)  // 防抖函数

urlParse (key, href= window.location.href) // 地址解析参数

getUUID() // 获取uuid
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago