src/script/common.js
@@ -162,6 +162,10 @@ return res; } function isArray (target) { return Object.prototype.toString.call(target) === '[object Array]'; } // 一维数组去重 得用filter function unique (arr) { return arr.filter(function (v, i, a) { @@ -267,6 +271,7 @@ getCurrentDate, RAF, CAF, isArray, // throttle, setLocalStorage(key,val){ const _val = (typeof val == 'object') ? JSON.stringify(val) : val;