fix: the cache problem in tabs mode;🐛

修复:多页签模式下的缓存问题;
This commit is contained in:
iczer
2020-08-07 22:14:56 +08:00
parent 9445f0fbbb
commit d741904f50
6 changed files with 199 additions and 57 deletions

21
src/utils/util.js Normal file
View 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