diff --git a/ui/env.d.ts b/ui/env.d.ts index be1f8389d30..08bb5e826b0 100644 --- a/ui/env.d.ts +++ b/ui/env.d.ts @@ -1,5 +1,7 @@ /// declare module 'element-plus/dist/locale/zh-cn.mjs' +declare module 'element-plus/dist/locale/en.mjs' +declare module 'element-plus/dist/locale/zh-tw.mjs' declare module 'markdown-it-task-lists' declare module 'markdown-it-abbr' declare module 'markdown-it-anchor' diff --git a/ui/src/api/user.ts b/ui/src/api/user.ts index b0aca1e4ae2..417bb5e697b 100644 --- a/ui/src/api/user.ts +++ b/ui/src/api/user.ts @@ -176,6 +176,19 @@ const getWecomCallback: (code: string, loading?: Ref) => Promise) => Promise> = ( + data, + loading +) => { + return post('/user/language', data, undefined, loading) +} + export default { login, register, @@ -192,5 +205,6 @@ export default { getAuthType, getDingCallback, getQrType, - getWecomCallback + getWecomCallback, + postLanguage } diff --git a/ui/src/components/ai-chat/component/control/index.vue b/ui/src/components/ai-chat/component/control/index.vue index 9827149f4a2..9674a7452e9 100644 --- a/ui/src/components/ai-chat/component/control/index.vue +++ b/ui/src/components/ai-chat/component/control/index.vue @@ -16,7 +16,7 @@ import bus from '@/bus' import { ref, nextTick, onMounted } from 'vue' import { t } from '@/locales' const isOpen = ref(false) -const eventVal = ref() +const eventVal = ref({}) function getSelection() { const selection = window.getSelection() if (selection && selection.anchorNode == null) { diff --git a/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue b/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue index 6dfcfc7afbc..6abb966c942 100644 --- a/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue +++ b/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue @@ -1,6 +1,6 @@