chore: i18n
This commit is contained in:
parent
29d1e38843
commit
0a4388b05a
@ -25,6 +25,10 @@
|
|||||||
"placeholder": "Please select a tenant",
|
"placeholder": "Please select a tenant",
|
||||||
"switch": "Switch to tenant: ",
|
"switch": "Switch to tenant: ",
|
||||||
"reset": "Reset to default tenant"
|
"reset": "Reset to default tenant"
|
||||||
|
},
|
||||||
|
"notice": {
|
||||||
|
"title": "Notice",
|
||||||
|
"received": "You have received a new message"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pages": {
|
"pages": {
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
"placeholder": "选择租户",
|
"placeholder": "选择租户",
|
||||||
"switch": "切换当前租户为: ",
|
"switch": "切换当前租户为: ",
|
||||||
"reset": "还原为默认租户"
|
"reset": "还原为默认租户"
|
||||||
|
},
|
||||||
|
"notice": {
|
||||||
|
"title": "消息",
|
||||||
|
"received": "收到新消息"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pages": {
|
"pages": {
|
||||||
|
@ -3,6 +3,7 @@ import type { NotificationItem } from '@vben/layouts';
|
|||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { useAppConfig } from '@vben/hooks';
|
import { useAppConfig } from '@vben/hooks';
|
||||||
|
import { $t } from '@vben/locales';
|
||||||
import { useAccessStore, useUserStore } from '@vben/stores';
|
import { useAccessStore, useUserStore } from '@vben/stores';
|
||||||
|
|
||||||
import { useEventSource } from '@vueuse/core';
|
import { useEventSource } from '@vueuse/core';
|
||||||
@ -48,7 +49,7 @@ export const useNotifyStore = defineStore(
|
|||||||
autoReconnect: {
|
autoReconnect: {
|
||||||
delay: 1000,
|
delay: 1000,
|
||||||
onFailed() {
|
onFailed() {
|
||||||
console.log('sse重连失败.');
|
console.error('sse重连失败.');
|
||||||
},
|
},
|
||||||
retries: 3,
|
retries: 3,
|
||||||
},
|
},
|
||||||
@ -61,7 +62,7 @@ export const useNotifyStore = defineStore(
|
|||||||
notification.success({
|
notification.success({
|
||||||
description: message,
|
description: message,
|
||||||
duration: 3,
|
duration: 3,
|
||||||
message: '收到新消息',
|
message: $t('component.notice.received'),
|
||||||
});
|
});
|
||||||
|
|
||||||
notificationList.value.unshift({
|
notificationList.value.unshift({
|
||||||
@ -70,7 +71,7 @@ export const useNotifyStore = defineStore(
|
|||||||
date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
isRead: false,
|
isRead: false,
|
||||||
message,
|
message,
|
||||||
title: '消息',
|
title: $t('component.notice.title'),
|
||||||
userId: userId.value,
|
userId: userId.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user