摘要: validate validate 概念 一些常用的校验封装,参数有两个,第一个为type,第二个为str,下面为type的可选值,以及对应的正则,请仔细合适在使用 //自然数,包含0和正整数 "natureNum":/^[\+]?(([1-9]\d*)|\d)$/, // 数字 正负 小数整数都可 阅读全文
posted @ 2020-08-20 14:33 金振宗 阅读(261) 评论(0) 推荐(0) 编辑
摘要: sting 方法合集 isString、replaceAll、isJSON、trim、replaceAllSpec、checkSpec、unique、getCount、getMaxCount、getMinCount、findIndex isString 概念 判断是否是字符串,区分数字、boolea 阅读全文
posted @ 2020-08-20 14:30 金振宗 阅读(165) 评论(0) 推荐(0) 编辑
摘要: object 方法合集 isObject、equalsObject、deepClone、getKeyList、deepFreeze、toQueryString、toJsonArray、isEmptyObj isObject 概念 判断是否是json,区分array 参数列表 / 参数类型 参数意义 阅读全文
posted @ 2020-08-20 14:29 金振宗 阅读(187) 评论(0) 推荐(0) 编辑
摘要: math 方法合集 isNumber、random、div、mul、add、sub、toUpperCase isNumber 概念 判断是不是number,区分"1" 参数列表 / 参数类型 参数意义 参数示例 val * 需要校验的变量 1 返回列表 返回类型 返回说明 返回示例 Boolean 阅读全文
posted @ 2020-08-20 14:28 金振宗 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Log 方法合集 error、warning、success、info、tips、confirm error 概念 输出红色日志 参数列表 / 参数类型 参数意义 参数示例 msg * 同原生也支持多个 "a","b" 返回列表 返回类型 返回说明 返回示例 使用方法 import { log } 阅读全文
posted @ 2020-08-20 14:26 金振宗 阅读(150) 评论(0) 推荐(0) 编辑
摘要: generalTool 方法合集 debounce\throttle\getType\compareVersion debounce 概念 节流函数,一定时间内只执行一次 参数列表 / 参数类型 参数意义 参数示例 fn Fcuntion 需要节流的函数 wait Number 节流等待时间,默认5 阅读全文
posted @ 2020-08-20 14:25 金振宗 阅读(198) 评论(0) 推荐(0) 编辑
摘要: date 方法合集 isDate、getCurrentTimeStamp、date、time、dateTime、getCurrentMonthFirst、getCurrentMonthLast、compare、duration、count、getMouthDay、getMonthWeek isDat 阅读全文
posted @ 2020-08-20 14:24 金振宗 阅读(164) 评论(0) 推荐(0) 编辑
摘要: cookie 方法合集 del、set、get del 概念 删除cookie 参数列表 / 参数类型 参数意义 参数示例 name String cookie的name "a" 返回列表 返回类型 返回说明 返回示例 使用方法 import { cookieTool } from "mwutil" 阅读全文
posted @ 2020-08-20 14:22 金振宗 阅读(149) 评论(0) 推荐(0) 编辑
摘要: array 方法合集 isArray、deepClone、findIndex、removeItems、unique、uniqueByFiled、getSimpleValuesByField、sort、sortByField、delVoid、deepFlat isArray 概念 判断是不是Array 阅读全文
posted @ 2020-08-20 14:21 金振宗 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 最近整理框架时候,封装了一份local操作,分享下 需要的人可以使用哦 /** * @description globelLocal操作 */ import { objectTool } from 'mwutil' class Local { constructor (name) { this.st 阅读全文
posted @ 2020-08-20 14:12 金振宗 阅读(871) 评论(0) 推荐(0) 编辑