CN-1075 table自定义列缓存功能有时会因字段变化导致缓存数据使用报错

This commit is contained in:
hyx
2023-06-28 11:23:29 +08:00
parent ab1b551642
commit df89c61a65

View File

@@ -402,7 +402,11 @@ export default {
this.pageObj.pageSize = pageSize
}
const userId = localStorage.getItem(storageKey.userId)
let localStorageTableTitle = await indexedDBUtils.selectTable(dbTableColumnCustomizeConfigPre + '-' + this.tableId).get({ id: userId })
let tableName = dbTableColumnCustomizeConfigPre + '-' + this.tableId
let localStorageTableTitle = []
if(indexedDBUtils.selectTable(tableName)){
localStorageTableTitle = await indexedDBUtils.selectTable(tableName).get({ id: userId })
}
localStorageTableTitle = localStorageTableTitle && localStorageTableTitle.config
? localStorageTableTitle.config