Files
vue-antd-admin-skeleton/src/utils/util.js
iczer d741904f50 fix: the cache problem in tabs mode;🐛
修复:多页签模式下的缓存问题;
2020-08-07 22:14:56 +08:00

22 lines
399 B
JavaScript

export function isDef (v){
return v !== undefined && v !== null
}
/**
* Remove an item from an array.
*/
export function remove (arr, item) {
if (arr.length) {
const index = arr.indexOf(item)
if (index > -1) {
return arr.splice(index, 1)
}
}
}
export function isRegExp (v) {
return _toString.call(v) === '[object RegExp]'
}
const _toString = Object.prototype.toString