(cache, //缓存对象
key, //单个key
keys, //多个key
current //当前虚拟dom
)
| 7207 | |
| 7208 | //检测缓存中的组件,如果不是当前激活的组件则销毁 |
| 7209 | function pruneCacheEntry(cache, //缓存对象 |
| 7210 | key, //单个key |
| 7211 | keys, //多个key |
| 7212 | current //当前虚拟dom |
| 7213 | ) { |
| 7214 | var cached$$1 = cache[key]; //获取值遍历中的值 |
| 7215 | if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { |
| 7216 | //判断遍历中的值 如果不等于当前活跃的组件则让他销毁 |
| 7217 | cached$$1.componentInstance.$destroy(); |
| 7218 | } |
| 7219 | |
| 7220 | cache[key] = null; |
| 7221 | remove(keys, key); |
| 7222 | } |
| 7223 | |
| 7224 | var patternTypes = [String, RegExp, Array]; //类型 |
| 7225 |
no test coverage detected