1.0.7 • Published 1 year ago
lintingyue v1.0.7
自用库
npm i lintingyue
vue 和 uni-app 用到的一些常用方法,不定期更新
(qlite未完善,暂不能用)
common
- indexEmpty : 数组或者多个参数,获取未空的索引
- isEmpty: 参数是否为空
- protectName: 名字脱敏
- protectTel: 电话号码脱敏
- protectBank: 银行卡脱敏
- getDateArea: 获取日期范围(week本周,month本月,year本年)
- formatDuration: 时间转换为中文单位
- formatDate: 时间补零
- getAstro: 获取日期对应的星座
- getDistance: 获取两个经纬度之间的距离
- getNumberTransform: 数字转换为距离
- randomColor: 随机颜色
- listShuffle: 数组洗牌
- sleep: 休眠函数
uniapp
- toast: 弹窗
- doing: 开发中的暂时弹窗
- loading: 转圈圈
- loaded: 关闭转圈圈
- back: 返回到页面
- getAppMeta: 获取app的渠道标识
- getPkg: 获取app的包名