From 4ba638787598216ec5186ad8c2a1ceb1a2252713 Mon Sep 17 00:00:00 2001 From: HCode <71808213+hyf-github-user@users.noreply.github.com> Date: Mon, 2 Sep 2024 12:16:51 +0800 Subject: [PATCH] Hcode/fix luma (#135) --- ...-8919d19f-2aef-4aca-a427-e12da5499e47.json | 7 ++ src/components/common/LanguageSelector.vue | 68 +++++++++++++++++++ src/components/common/TopHeader.vue | 7 +- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 change/@acedatacloud-nexior-8919d19f-2aef-4aca-a427-e12da5499e47.json create mode 100644 src/components/common/LanguageSelector.vue diff --git a/change/@acedatacloud-nexior-8919d19f-2aef-4aca-a427-e12da5499e47.json b/change/@acedatacloud-nexior-8919d19f-2aef-4aca-a427-e12da5499e47.json new file mode 100644 index 00000000..a9ebdbf2 --- /dev/null +++ b/change/@acedatacloud-nexior-8919d19f-2aef-4aca-a427-e12da5499e47.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "add language", + "packageName": "@acedatacloud/nexior", + "email": "1348977728@qq.com", + "dependentChangeType": "patch" +} diff --git a/src/components/common/LanguageSelector.vue b/src/components/common/LanguageSelector.vue new file mode 100644 index 00000000..45081bf9 --- /dev/null +++ b/src/components/common/LanguageSelector.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/components/common/TopHeader.vue b/src/components/common/TopHeader.vue index 14a990f3..8ba300d6 100644 --- a/src/components/common/TopHeader.vue +++ b/src/components/common/TopHeader.vue @@ -35,10 +35,12 @@ {{ $t('common.button.login') }} +
+
{{ $t('common.button.console') }}
@@ -63,6 +65,7 @@ import { getBaseUrlAuth } from '@/utils'; import { ROUTE_AUTH_LOGIN, ROUTE_CONSOLE_ROOT, ROUTE_INDEX } from '@/router'; import { ElCol, ElRow, ElDropdown, ElMenu, ElSubMenu, ElMenuItem, ElDropdownItem, ElButton } from 'element-plus'; import DarkSelector from './DarkSelector2.vue'; +import LanguageSelector from './LanguageSelector.vue'; import Logo from './Logo.vue'; export default defineComponent({ @@ -77,7 +80,8 @@ export default defineComponent({ ElMenuItem, ElDropdownItem, ElButton, - ElSubMenu + ElSubMenu, + LanguageSelector }, data() { return { @@ -197,6 +201,7 @@ $height: 60px; .locale { cursor: pointer; display: inline-block; + margin-left: 10px; // Add left margin if needed } } @media only screen and (max-width: 768px) {