Browse Source

update

master
guy 7 years ago
parent
commit
29e2b5f8a0
  1. 145
      dist/bundle.js
  2. 2
      dist/bundle.min.css
  3. 8
      dist/bundle.min.js
  4. 145
      dist/core.js
  5. 145
      dist/fineui.js
  6. 2
      dist/fineui.min.css
  7. 6
      dist/fineui.min.js
  8. 2
      lodash.md
  9. 62
      src/core/base.js
  10. 83
      src/core/lodash.js
  11. 1
      src/css/resource/font.css
  12. 145
      utils/utils.js

145
dist/bundle.js vendored

@ -9599,7 +9599,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial"`
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject"`
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -11581,6 +11581,27 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return result;
}
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
@ -16704,6 +16725,28 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@ -18209,6 +18252,41 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
/*------------------------------------------------------------------------*/
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Number
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
/**
* Produces a random number between the inclusive `lower` and `upper` bounds.
* If only one argument is provided a number between `0` and the given number
@ -18788,7 +18866,9 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.escape = escape;
lodash.every = every;
lodash.find = find;
@ -18815,6 +18895,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isString = isString;
lodash.isUndefined = isUndefined;
@ -19258,7 +19339,7 @@ if (!window.BI) {
BI[name] = _apply(name);
});
_.each(["get", "each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition"], function (name) {
"sortBy", "groupBy", "indexBy", "countBy", "partition", "clamp"], function (name) {
if (name === "any") {
BI[name] = _applyFunc("some");
} else {
@ -19266,15 +19347,6 @@ if (!window.BI) {
}
});
_.extend(BI, {
clamp: function (value, minValue, maxValue) {
if (value < minValue) {
value = minValue;
}
if (value > maxValue) {
value = maxValue;
}
return value;
},
// 数数
count: function (from, to, predicate) {
var t;
@ -19527,8 +19599,8 @@ if (!window.BI) {
// 对象相关方法
_.each(["keys", "allKeys", "values", "pairs", "invert", "create", "functions", "extend", "extendOwn",
"defaults", "clone", "property", "propertyOf", "matcher", "isEqual", "isMatch", "isEmpty",
"isElement", "isNumber", "isString", "isArray", "isObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject"], function (name) {
"isElement", "isNumber", "isString", "isArray", "isObject", "isPlainObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject", "cloneDeep"], function (name) {
BI[name] = _apply(name);
});
_.each(["mapObject", "findKey", "pick", "omit", "tap"], function (name) {
@ -19595,10 +19667,6 @@ if (!window.BI) {
return typeof obj === "undefined" || obj === null;
},
isPlainObject: function () {
return $.isPlainObject.apply($, arguments);
},
isEmptyArray: function (arr) {
return BI.isArray(arr) && BI.isEmpty(arr);
},
@ -19630,48 +19698,7 @@ if (!window.BI) {
// deep方法
_.extend(BI, {
/**
*完全克隆<EFBFBD>?个js对象
* @param obj
* @returns {*}
*/
deepClone: function (obj) {
if (obj === null || obj === undefined) {
return obj;
}
var type = Object.prototype.toString.call(obj);
// Date
if (type === "[object Date]") {
return BI.getDate(obj.getTime());
}
var i, clone, key;
// Array
if (type === "[object Array]") {
i = obj.length;
clone = [];
while (i--) {
clone[i] = BI.deepClone(obj[i]);
}
}
// Object
else if (type === "[object Object]" && obj.constructor === Object) {
clone = {};
for (var i in obj) {
if (BI.has(obj, i)) {
clone[i] = BI.deepClone(obj[i]);
}
}
}
return clone || obj;
},
deepClone: _.cloneDeep,
isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length;

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

8
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

145
dist/core.js vendored

@ -9599,7 +9599,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial"`
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject"`
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -11581,6 +11581,27 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return result;
}
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
@ -16704,6 +16725,28 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@ -18209,6 +18252,41 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
/*------------------------------------------------------------------------*/
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Number
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
/**
* Produces a random number between the inclusive `lower` and `upper` bounds.
* If only one argument is provided a number between `0` and the given number
@ -18788,7 +18866,9 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.escape = escape;
lodash.every = every;
lodash.find = find;
@ -18815,6 +18895,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isString = isString;
lodash.isUndefined = isUndefined;
@ -19258,7 +19339,7 @@ if (!window.BI) {
BI[name] = _apply(name);
});
_.each(["get", "each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition"], function (name) {
"sortBy", "groupBy", "indexBy", "countBy", "partition", "clamp"], function (name) {
if (name === "any") {
BI[name] = _applyFunc("some");
} else {
@ -19266,15 +19347,6 @@ if (!window.BI) {
}
});
_.extend(BI, {
clamp: function (value, minValue, maxValue) {
if (value < minValue) {
value = minValue;
}
if (value > maxValue) {
value = maxValue;
}
return value;
},
// 数数
count: function (from, to, predicate) {
var t;
@ -19527,8 +19599,8 @@ if (!window.BI) {
// 对象相关方法
_.each(["keys", "allKeys", "values", "pairs", "invert", "create", "functions", "extend", "extendOwn",
"defaults", "clone", "property", "propertyOf", "matcher", "isEqual", "isMatch", "isEmpty",
"isElement", "isNumber", "isString", "isArray", "isObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject"], function (name) {
"isElement", "isNumber", "isString", "isArray", "isObject", "isPlainObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject", "cloneDeep"], function (name) {
BI[name] = _apply(name);
});
_.each(["mapObject", "findKey", "pick", "omit", "tap"], function (name) {
@ -19595,10 +19667,6 @@ if (!window.BI) {
return typeof obj === "undefined" || obj === null;
},
isPlainObject: function () {
return $.isPlainObject.apply($, arguments);
},
isEmptyArray: function (arr) {
return BI.isArray(arr) && BI.isEmpty(arr);
},
@ -19630,48 +19698,7 @@ if (!window.BI) {
// deep方法
_.extend(BI, {
/**
*完全克隆<EFBFBD>?个js对象
* @param obj
* @returns {*}
*/
deepClone: function (obj) {
if (obj === null || obj === undefined) {
return obj;
}
var type = Object.prototype.toString.call(obj);
// Date
if (type === "[object Date]") {
return BI.getDate(obj.getTime());
}
var i, clone, key;
// Array
if (type === "[object Array]") {
i = obj.length;
clone = [];
while (i--) {
clone[i] = BI.deepClone(obj[i]);
}
}
// Object
else if (type === "[object Object]" && obj.constructor === Object) {
clone = {};
for (var i in obj) {
if (BI.has(obj, i)) {
clone[i] = BI.deepClone(obj[i]);
}
}
}
return clone || obj;
},
deepClone: _.cloneDeep,
isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length;

145
dist/fineui.js vendored

@ -9842,7 +9842,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial"`
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject"`
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -11824,6 +11824,27 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return result;
}
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
@ -16947,6 +16968,28 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@ -18452,6 +18495,41 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
/*------------------------------------------------------------------------*/
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Number
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
/**
* Produces a random number between the inclusive `lower` and `upper` bounds.
* If only one argument is provided a number between `0` and the given number
@ -19031,7 +19109,9 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.escape = escape;
lodash.every = every;
lodash.find = find;
@ -19058,6 +19138,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isString = isString;
lodash.isUndefined = isUndefined;
@ -19501,7 +19582,7 @@ if (!window.BI) {
BI[name] = _apply(name);
});
_.each(["get", "each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition"], function (name) {
"sortBy", "groupBy", "indexBy", "countBy", "partition", "clamp"], function (name) {
if (name === "any") {
BI[name] = _applyFunc("some");
} else {
@ -19509,15 +19590,6 @@ if (!window.BI) {
}
});
_.extend(BI, {
clamp: function (value, minValue, maxValue) {
if (value < minValue) {
value = minValue;
}
if (value > maxValue) {
value = maxValue;
}
return value;
},
// 数数
count: function (from, to, predicate) {
var t;
@ -19770,8 +19842,8 @@ if (!window.BI) {
// 对象相关方法
_.each(["keys", "allKeys", "values", "pairs", "invert", "create", "functions", "extend", "extendOwn",
"defaults", "clone", "property", "propertyOf", "matcher", "isEqual", "isMatch", "isEmpty",
"isElement", "isNumber", "isString", "isArray", "isObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject"], function (name) {
"isElement", "isNumber", "isString", "isArray", "isObject", "isPlainObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject", "cloneDeep"], function (name) {
BI[name] = _apply(name);
});
_.each(["mapObject", "findKey", "pick", "omit", "tap"], function (name) {
@ -19838,10 +19910,6 @@ if (!window.BI) {
return typeof obj === "undefined" || obj === null;
},
isPlainObject: function () {
return $.isPlainObject.apply($, arguments);
},
isEmptyArray: function (arr) {
return BI.isArray(arr) && BI.isEmpty(arr);
},
@ -19873,48 +19941,7 @@ if (!window.BI) {
// deep方法
_.extend(BI, {
/**
*完全克隆<EFBFBD>?个js对象
* @param obj
* @returns {*}
*/
deepClone: function (obj) {
if (obj === null || obj === undefined) {
return obj;
}
var type = Object.prototype.toString.call(obj);
// Date
if (type === "[object Date]") {
return BI.getDate(obj.getTime());
}
var i, clone, key;
// Array
if (type === "[object Array]") {
i = obj.length;
clone = [];
while (i--) {
clone[i] = BI.deepClone(obj[i]);
}
}
// Object
else if (type === "[object Object]" && obj.constructor === Object) {
clone = {};
for (var i in obj) {
if (BI.has(obj, i)) {
clone[i] = BI.deepClone(obj[i]);
}
}
}
return clone || obj;
},
deepClone: _.cloneDeep,
isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length;

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

6
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
lodash.md

@ -1 +1 @@
lodash core plus=debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial
lodash core plus=debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject

62
src/core/base.js

@ -163,7 +163,7 @@ if (!window.BI) {
BI[name] = _apply(name);
});
_.each(["get", "each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition"], function (name) {
"sortBy", "groupBy", "indexBy", "countBy", "partition", "clamp"], function (name) {
if (name === "any") {
BI[name] = _applyFunc("some");
} else {
@ -171,15 +171,6 @@ if (!window.BI) {
}
});
_.extend(BI, {
clamp: function (value, minValue, maxValue) {
if (value < minValue) {
value = minValue;
}
if (value > maxValue) {
value = maxValue;
}
return value;
},
// 数数
count: function (from, to, predicate) {
var t;
@ -432,8 +423,8 @@ if (!window.BI) {
// 对象相关方法
_.each(["keys", "allKeys", "values", "pairs", "invert", "create", "functions", "extend", "extendOwn",
"defaults", "clone", "property", "propertyOf", "matcher", "isEqual", "isMatch", "isEmpty",
"isElement", "isNumber", "isString", "isArray", "isObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject"], function (name) {
"isElement", "isNumber", "isString", "isArray", "isObject", "isPlainObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject", "cloneDeep"], function (name) {
BI[name] = _apply(name);
});
_.each(["mapObject", "findKey", "pick", "omit", "tap"], function (name) {
@ -500,10 +491,6 @@ if (!window.BI) {
return typeof obj === "undefined" || obj === null;
},
isPlainObject: function () {
return $.isPlainObject.apply($, arguments);
},
isEmptyArray: function (arr) {
return BI.isArray(arr) && BI.isEmpty(arr);
},
@ -535,48 +522,7 @@ if (!window.BI) {
// deep方法
_.extend(BI, {
/**
*完全克隆<EFBFBD>?个js对象
* @param obj
* @returns {*}
*/
deepClone: function (obj) {
if (obj === null || obj === undefined) {
return obj;
}
var type = Object.prototype.toString.call(obj);
// Date
if (type === "[object Date]") {
return BI.getDate(obj.getTime());
}
var i, clone, key;
// Array
if (type === "[object Array]") {
i = obj.length;
clone = [];
while (i--) {
clone[i] = BI.deepClone(obj[i]);
}
}
// Object
else if (type === "[object Object]" && obj.constructor === Object) {
clone = {};
for (var i in obj) {
if (BI.has(obj, i)) {
clone[i] = BI.deepClone(obj[i]);
}
}
}
return clone || obj;
},
deepClone: _.cloneDeep,
isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length;

83
src/core/lodash.js

@ -1,7 +1,7 @@
/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial"`
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject"`
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -1983,6 +1983,27 @@
return result;
}
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
@ -7106,6 +7127,28 @@
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@ -8611,6 +8654,41 @@
/*------------------------------------------------------------------------*/
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Number
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
/**
* Produces a random number between the inclusive `lower` and `upper` bounds.
* If only one argument is provided a number between `0` and the given number
@ -9190,7 +9268,9 @@
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.escape = escape;
lodash.every = every;
lodash.find = find;
@ -9217,6 +9297,7 @@
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isString = isString;
lodash.isUndefined = isUndefined;

1
src/css/resource/font.css

@ -2,7 +2,6 @@
font-family: 'bi';
src: url('font/iconfont.eot');
src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */
}
.b-font {

145
utils/utils.js

@ -1,7 +1,7 @@
/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial"`
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject"`
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -1983,6 +1983,27 @@
return result;
}
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
@ -7106,6 +7127,28 @@
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@ -8611,6 +8654,41 @@
/*------------------------------------------------------------------------*/
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Number
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
/**
* Produces a random number between the inclusive `lower` and `upper` bounds.
* If only one argument is provided a number between `0` and the given number
@ -9190,7 +9268,9 @@
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.escape = escape;
lodash.every = every;
lodash.find = find;
@ -9217,6 +9297,7 @@
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isString = isString;
lodash.isUndefined = isUndefined;
@ -10466,7 +10547,7 @@ if (!window.BI) {
BI[name] = _apply(name);
});
_.each(["get", "each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition"], function (name) {
"sortBy", "groupBy", "indexBy", "countBy", "partition", "clamp"], function (name) {
if (name === "any") {
BI[name] = _applyFunc("some");
} else {
@ -10474,15 +10555,6 @@ if (!window.BI) {
}
});
_.extend(BI, {
clamp: function (value, minValue, maxValue) {
if (value < minValue) {
value = minValue;
}
if (value > maxValue) {
value = maxValue;
}
return value;
},
// 数数
count: function (from, to, predicate) {
var t;
@ -10735,8 +10807,8 @@ if (!window.BI) {
// 对象相关方法
_.each(["keys", "allKeys", "values", "pairs", "invert", "create", "functions", "extend", "extendOwn",
"defaults", "clone", "property", "propertyOf", "matcher", "isEqual", "isMatch", "isEmpty",
"isElement", "isNumber", "isString", "isArray", "isObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject"], function (name) {
"isElement", "isNumber", "isString", "isArray", "isObject", "isPlainObject", "isArguments", "isFunction", "isFinite",
"isBoolean", "isDate", "isRegExp", "isError", "isNaN", "isUndefined", "zipObject", "cloneDeep"], function (name) {
BI[name] = _apply(name);
});
_.each(["mapObject", "findKey", "pick", "omit", "tap"], function (name) {
@ -10803,10 +10875,6 @@ if (!window.BI) {
return typeof obj === "undefined" || obj === null;
},
isPlainObject: function () {
return $.isPlainObject.apply($, arguments);
},
isEmptyArray: function (arr) {
return BI.isArray(arr) && BI.isEmpty(arr);
},
@ -10838,48 +10906,7 @@ if (!window.BI) {
// deep方法
_.extend(BI, {
/**
*完全克隆<EFBFBD>?个js对象
* @param obj
* @returns {*}
*/
deepClone: function (obj) {
if (obj === null || obj === undefined) {
return obj;
}
var type = Object.prototype.toString.call(obj);
// Date
if (type === "[object Date]") {
return BI.getDate(obj.getTime());
}
var i, clone, key;
// Array
if (type === "[object Array]") {
i = obj.length;
clone = [];
while (i--) {
clone[i] = BI.deepClone(obj[i]);
}
}
// Object
else if (type === "[object Object]" && obj.constructor === Object) {
clone = {};
for (var i in obj) {
if (BI.has(obj, i)) {
clone[i] = BI.deepClone(obj[i]);
}
}
}
return clone || obj;
},
deepClone: _.cloneDeep,
isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length;

Loading…
Cancel
Save