异步请求封装

okUtils.ajax(url, type, params, load)
okUtils.ajax("/permission/tree", "get", null, true).done(function (response) {
    console.log(response);
}).fail(function (error) {
    console.log(error);
});
        
参数 类型 描述
url String 请求路径
type String 请求类型
params String 请求参数
load Boolean 是否显示loading

获取body宽度

okUtils.getBodyWidth()
console.log(okUtils.getBodyWidth());
        

批量操作前的校验

okUtils.table.batchCheck(table)
待补充...
        

获取body宽度

okUtils.table.successMsg(content)
待补充...
        

格式化当前日期

okUtils.table.dateFormat(date, fmt)
待补充...
        

判断是否为一个正常的数字

okUtils.table.isNumber(num)
待补充...
        

判断一个数字是否包括在某个范围

okUtils.table.isNumberWith(num, begin, end)
待补充...