mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
perf: Div 嵌入式切换语言后会整体刷新页面
This commit is contained in:
committed by
fit2cloud-chenyw
parent
72d446baff
commit
42aa87f318
@@ -2,7 +2,9 @@ import { defineStore } from 'pinia'
|
||||
import { store } from '../index'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { useLocaleStoreWithOut } from './locale'
|
||||
import { useLocale } from '@/hooks/web/useLocale'
|
||||
const { wsCache } = useCache()
|
||||
const { changeLocale } = useLocale()
|
||||
|
||||
interface UserState {
|
||||
token: string
|
||||
@@ -102,6 +104,7 @@ export const userStore = defineStore('user', {
|
||||
wsCache.set('user.language', language)
|
||||
this.language = language
|
||||
locale.setLang(language)
|
||||
changeLocale(language as any)
|
||||
},
|
||||
clear() {
|
||||
const keys: string[] = ['token', 'uid', 'name', 'oid', 'language', 'exp', 'time']
|
||||
|
||||
Reference in New Issue
Block a user