修改升级日志

This commit is contained in:
guanj
2026-07-20 09:33:10 +08:00
parent a7b5762946
commit b4c706407f
32 changed files with 1780 additions and 142 deletions

View File

@@ -3,8 +3,13 @@
* @method set 设置
* @method get 获取
* @method remove 移除
* @method clear 移除全部
* @method clear 移除全部保留表格列配置、Pinia DevTools 设置)
*/
const LOCAL_STORAGE_PRESERVE_KEYS = [
'VXE_CUSTOM_STORE',
'__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__dev.esm.pinia__'
]
export const Local = {
set(key: string, val: any) {
window.localStorage.setItem(key, JSON.stringify(val))
@@ -17,7 +22,15 @@ export const Local = {
window.localStorage.removeItem(key)
},
clear() {
const preserved: Record<string, string> = {}
for (const key of LOCAL_STORAGE_PRESERVE_KEYS) {
const value = window.localStorage.getItem(key)
if (value !== null) preserved[key] = value
}
window.localStorage.clear()
for (const [key, value] of Object.entries(preserved)) {
window.localStorage.setItem(key, value)
}
},
}