0.0.2 • Published 2 years ago
w_units v0.0.2
简单工具集合
_date
_addZero(num : string | number)
- 补零
_getDataTime(date : Date)
- 获取
Y-M-D H:MI:S
格式的日期
- 获取
_getDateStr(date : Date)
- 获取
Y-M-D
格式的日期
- 获取
_getWeekStr(date : Date)
- 获取周几
_format(date : Date , str : string)
格式化日期
l
: 毫秒Y
: 年M | m
: 月D | d
: 日H | h
: 时I | i
: 分S | s
: 秒eg :
Y-M-D H:I:S
_tips
_check
- 内部方法 查重用
_close(id : string)
- 关闭指定小提示
_onTime(_html : string , tipsTime : number , style : string)
- 创建一个
tipsTime
后消失的小提示
- 创建一个
_onConfirm(_html : string , callback : Function , btnFn : string[], style : string)
创建一个带有选择功能的小提示
btnFn : 'cancel' , 'return'
callback 返回一个id 用来关闭这个窗口或者其他操作
_onLoad(_html : string , callback : Function , style : string)
创建一个带有加载动画的小提示
callback 返回一个id 用来关闭这个窗口或者其他操作