(key, data)
| 129 | } |
| 130 | |
| 131 | setItem(key, data) { |
| 132 | if (!key || typeof key !== 'string') return |
| 133 | data = '' + data |
| 134 | |
| 135 | const oldValue = wx.getStorageSync(key) || null |
| 136 | |
| 137 | wx.setStorageSync(key, data) |
| 138 | this.$_updateInfo() |
| 139 | this.$_triggerStorage(key, data, oldValue) |
| 140 | } |
| 141 | |
| 142 | removeItem(key) { |
| 143 | if (!key || typeof key !== 'string') return |
no test coverage detected