From 9cb21d7c603b273e7bd3fc0716c6a829a3f721c0 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Sun, 28 Apr 2024 12:56:46 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=9A=90=E8=97=8F=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=8C=89=E9=92=AE=20(#287)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/layout/components/top-bar/index.vue | 52 +++++++++++++++------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/ui/src/layout/components/top-bar/index.vue b/ui/src/layout/components/top-bar/index.vue index a4fa0fba7..cc240035e 100644 --- a/ui/src/layout/components/top-bar/index.vue +++ b/ui/src/layout/components/top-bar/index.vue @@ -12,25 +12,47 @@
- + - + - + - + - + @@ -41,15 +63,15 @@ import TopMenu from './top-menu/index.vue' import Avatar from './avatar/index.vue' import { useRouter } from 'vue-router' -import { langList } from '@/locales/index'; -import { useLocale } from '@/locales/useLocale'; +import { langList } from '@/locales/index' +import { useLocale } from '@/locales/useLocale' const router = useRouter() const defaultTitle = import.meta.env.VITE_APP_TITLE -const { changeLocale } = useLocale(); +const { changeLocale } = useLocale() const changeLang = (lang: string) => { - changeLocale(lang); -}; + changeLocale(lang) +} function toUrl(url: string) { window.open(url, '_blank') }