(key)
| 77 | } |
| 78 | |
| 79 | removeItem(key) { |
| 80 | if (!key || typeof key !== 'string') return |
| 81 | |
| 82 | const oldValue = this.$_map[key] || null |
| 83 | delete this.$_map[key] |
| 84 | |
| 85 | // 删除 key |
| 86 | const index = this.$_keys.indexOf(key) |
| 87 | if (index >= 0) this.$_keys.splice(index, 1) |
| 88 | |
| 89 | this.$_triggerStorage(key, null, oldValue) |
| 90 | } |
| 91 | |
| 92 | clear() { |
| 93 | this.$_map = {} |
nothing calls this directly
no test coverage detected