feat:导出功能重构
This commit is contained in:
@@ -336,8 +336,10 @@ export const useAgentsStore = defineStore('agents', () => {
|
||||
)
|
||||
// 监听 configStore.config.agentRepository.storageVersionIdentifier 改变
|
||||
watch(
|
||||
() => configStore.config.agentRepository.storageVersionIdentifier,
|
||||
() => configStore.config.agentRepository?.storageVersionIdentifier,
|
||||
(value) => {
|
||||
// 跳过无效值
|
||||
if (!value) return
|
||||
// value与storageVersionIdentifier不一致清除所有storageKey开头的localStorage
|
||||
if (value !== storageVersionIdentifier.value) {
|
||||
clearStorageByVersion()
|
||||
|
||||
@@ -28,7 +28,7 @@ export const useConfigStore = defineStore('config', () => {
|
||||
const data = await readConfig<Config>('config.json')
|
||||
config.value = {
|
||||
...defaultConfig,
|
||||
...data
|
||||
...(data || {})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user