From 9f70a1ee5cdffaef3a96e4042c8eea251df2fa0d Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期三, 06 八月 2025 17:21:56 +0800 Subject: [PATCH] feat: 字典 --- src/hooks/dic.ts | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/hooks/dic.ts b/src/hooks/dic.ts index ee037f2..8543fa8 100644 --- a/src/hooks/dic.ts +++ b/src/hooks/dic.ts @@ -25,6 +25,12 @@ }); } + function updateDictionaryCategorySelect() { + queryClient.invalidateQueries({ + queryKey: ['dictionaryServices/getDictionaryCategorySelect'], + }); + } + function getDictionaryCategoryById(id: string) { return dictionaryCategoryList.value.find((x) => x.value === id); } @@ -43,6 +49,7 @@ getDictionaryCategoryById, getDictionaryCategoryNameByCode, getDictionaryCategoryByCode, + updateDictionaryCategorySelect, }; } @@ -96,6 +103,12 @@ }); } + function updateDictionaryDataSelect() { + queryClient.invalidateQueries({ + queryKey: ['dictionaryServices/getDictionaryDataSelect'], + }); + } + return { dictionaryDataList, ensureQueryData, @@ -103,5 +116,6 @@ getDictionaryDataNameById, getDictionaryDataNameByCode, getDictionaryDataByCode, + updateDictionaryDataSelect, }; } -- Gitblit v1.9.1