fix: the cache problem in tabs mode;🐛
修复:多页签模式下的缓存问题;
This commit is contained in:
21
src/utils/util.js
Normal file
21
src/utils/util.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
Reference in New Issue
Block a user