|
@@ -4,6 +4,7 @@ import { useLocale } from '@/hooks/web/useLocale'
|
|
|
import { propTypes } from '@/utils/propTypes'
|
|
|
import { useDesign } from '@/hooks/web/useDesign'
|
|
|
import {useCache,CACHE_KEY} from "@/hooks/web/useCache";
|
|
|
+import { useDictStoreWithOut } from '@/store/modules/dict'
|
|
|
|
|
|
defineOptions({ name: 'LocaleDropdown' })
|
|
|
|
|
@@ -15,6 +16,7 @@ defineProps({
|
|
|
color: propTypes.string.def('black')
|
|
|
})
|
|
|
|
|
|
+const dictStore = useDictStoreWithOut()
|
|
|
const localeStore = useLocaleStore()
|
|
|
const { wsCache } = useCache()
|
|
|
|
|
@@ -31,6 +33,7 @@ const setLang = (lang: LocaleType) => {
|
|
|
})
|
|
|
const { changeLocale } = useLocale()
|
|
|
changeLocale(lang)
|
|
|
+ dictStore.resetDict()
|
|
|
// 清空,从而触发刷新
|
|
|
wsCache.delete(CACHE_KEY.USER)
|
|
|
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
|