| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { useI18n } from 'vue-i18n'; |
| | | import SvgIcon from '@/components/SvgIcon/index.vue'; |
| | | import { useAppStore } from '@/store/modules/app'; |
| | | import SvgIcon from '@/components/SvgIcon/index.vue'; |
| | | |
| | | const appStore = useAppStore(); |
| | | const { locale } = useI18n(); |
| | |
| | | zh_CN: '切换语言成功!', |
| | | en_US: 'Switch Language Successful!' |
| | | }; |
| | | const handleLanguageChange = (lang: string) => { |
| | | const handleLanguageChange = (lang: any) => { |
| | | locale.value = lang; |
| | | appStore.changeLanguage(lang); |
| | | ElMessage.success(message[lang] || '切换语言成功!'); |
| | |
| | | |
| | | const i18n = createI18n({ |
| | | globalInjection: true, |
| | | allowComposition: true, |
| | | legacy: false, |
| | | locale: getLanguage(), |
| | | messages |
| | |
| | | import useAppStore from '@/store/modules/app'; |
| | | import useUserStore from '@/store/modules/user'; |
| | | import useSettingsStore from '@/store/modules/settings'; |
| | | import useNoticeStore from '@/store/modules/notice'; |
| | | import { getTenantList } from '@/api/login'; |
| | | import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; |
| | | import { TenantVO } from '@/api/types'; |
| | | import notice from './notice/index.vue'; |
| | | import useNoticeStore from '@/store/modules/notice'; |
| | | |
| | | const appStore = useAppStore(); |
| | | const userStore = useUserStore(); |
| | |
| | | resolve: { |
| | | alias: { |
| | | '~': path.resolve(__dirname, './'), |
| | | '@': path.resolve(__dirname, './src'), |
| | | 'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js' |
| | | '@': path.resolve(__dirname, './src') |
| | | }, |
| | | extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] |
| | | }, |