Skip to content

Commit

Permalink
removeStorage 删除js侧缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdsax committed May 18, 2024
1 parent 2bd714a commit d52ada5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/taro-platform-harmony-hybrid/src/api/apis/NativeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,16 @@ class CacheStorageProxy {
return status
}
}
if (prop === 'removeStorageSync') {
return (...args: any[]) => {
const { key } = args[0]
const status = this.asyncToSyncProxy.removeStorageSync({ key })
if (status.done && status.errorMsg === '') {
this.cacheMap.delete(key)
}
return status
}
}
return (...args: any[]) => {
return this.asyncToSyncProxy[prop](...args)
}
Expand Down

0 comments on commit d52ada5

Please sign in to comment.