diff --git a/src/components/TableColumnsDnd/index.vue b/src/components/TableColumnsDnd/index.vue index d1e242f1..e4a3ab30 100644 --- a/src/components/TableColumnsDnd/index.vue +++ b/src/components/TableColumnsDnd/index.vue @@ -5,7 +5,7 @@ import useI18n from '@/hooks/useI18n'; import { type ColumnsType } from 'ant-design-vue/lib/table'; import { dbGetJSON, dbSetJSON } from '@/utils/cache-db-utils'; import { CACHE_DB_TABLE_DND } from '@/constants/cache-keys-constants'; -const { t } = useI18n(); +const { t, currentLocale } = useI18n(); const emit = defineEmits(['update:columns-dnd']); const props = defineProps({ @@ -98,7 +98,11 @@ function fnUpdateColumns() { if (props.cacheId) { // 存入数据 - dbSetJSON(CACHE_DB_TABLE_DND, props.cacheId, list); + dbSetJSON( + CACHE_DB_TABLE_DND, + `${props.cacheId}#${currentLocale.value}`, + list + ); } nextTick(() => { emit('update:columns-dnd', list); @@ -119,7 +123,7 @@ watch( onMounted(() => { if (props.cacheId) { // 读取数据后响应 - dbGetJSON(CACHE_DB_TABLE_DND, props.cacheId) + dbGetJSON(CACHE_DB_TABLE_DND, `${props.cacheId}#${currentLocale.value}`) .then(data => { if (data) { const titleList: string[] = [];