为啥会报这个错呢
function getStorage<T>(key: string): T | null {
let parseObj: T | null = null
const storageValue: string = uni.getStorageSync(key) as string
if (storageValue != null) {
parseObj = JSON.parse<T>(storageValue)
}
return parseObj
}
0 个回复