fix: 表格自定义缓存修改(1. 初始化读取缓存时,判断缓存里的version和当前version是否一致,不一致则清掉缓存,改用代码里的tableTitle;2. 在保存时,version字段直接用当前version,不用加小版本)

This commit is contained in:
hanyuxia
2024-04-29 18:06:39 +08:00
parent 859a0ee2cf
commit 77001853b1

View File

@@ -432,7 +432,9 @@ export default {
let curTableConfig = dbTableColumnCustomizeConfig.find(item => item.tableName === tableName) let curTableConfig = dbTableColumnCustomizeConfig.find(item => item.tableName === tableName)
if(localStorageTableTitle && curTableConfig && if(localStorageTableTitle && curTableConfig &&
localStorageTableTitle.version !== curTableConfig.version && curTableTitles) { localStorageTableTitle.version !== curTableConfig.version && curTableTitles) {
this.$emit('update', curTableTitles) if(this.$refs.dataList) {
this.$refs.dataList.updateCustomTableTitle(curTableTitles)
}
await indexedDBUtils.selectTable(tableName).put({ await indexedDBUtils.selectTable(tableName).put({
id: userId, id: userId,
version: curTableConfig.version, version: curTableConfig.version,