mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 05:10:57 +00:00
feat(store): 为 notice、user 和 config store 启用持久化
在 store/index.js 中为 noticeStore、userStore 和 configStore 添加了 persist: true,以确保这些 store 的状态在页面刷新后能够持久化保存。 refactor(layout): 优化退出登录逻辑 在 basicLayout.vue 中,退出登录时增加了清空 Pinia 状态的逻辑,确保用户信息、配置和通知等状态在退出时被重置。 fix(dict): 修复字典类型选项加载问题 在 system/dict/data.vue 中,确保在 onMounted 钩子中加载字典类型选项,并根据路由参数初始化查询状态。
This commit is contained in:
@@ -444,6 +444,13 @@ const loadingData = () => {
|
||||
// 生命周期钩子
|
||||
onMounted(async () => {
|
||||
await getOptions();
|
||||
// 加载字典类型选项
|
||||
await loadDictTypes(); // 确保 dictTypeOptions 已经加载
|
||||
|
||||
const routeDictType = route.query.dict_type;
|
||||
if (routeDictType && !queryState.dict_type) {
|
||||
queryState.dict_type = Array.isArray(routeDictType) ? routeDictType[0] : routeDictType;
|
||||
}
|
||||
loadingData();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user