diff --git a/chat-client/.env.development b/chat-client/.env.development index 659b179..9799822 100644 --- a/chat-client/.env.development +++ b/chat-client/.env.development @@ -2,14 +2,14 @@ # 此文件修改后需要重启项目 NODE_ENV=development #VUE_APP_BASE_URL='/vab-mock-server' -# VUE_APP_BASE_URL='http://localhost:10001' -# VUE_APP_API_BASE_URL='http://localhost:8080' +VUE_APP_BASE_URL='http://localhost:10001' +VUE_APP_API_BASE_URL='http://localhost:8080' #北京服务器配置 # VUE_APP_BASE_URL='http://192.168.1.211:80/brichat' # VUE_APP_API_BASE_URL='http://192.168.1.211:80/brichat' # #武汉公司服务器 -VUE_APP_BASE_URL='http://192.168.8.253:80/brichat' -VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat' +# VUE_APP_BASE_URL='http://192.168.8.253:80/brichat' +# VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat' #总部服务器配置 # VUE_APP_BASE_URL='http://192.168.0.33:80/brichat' # VUE_APP_API_BASE_URL='http://192.168.0.33:80/brichat' diff --git a/chat-client/.env.production b/chat-client/.env.production index a10fb89..d6534da 100644 --- a/chat-client/.env.production +++ b/chat-client/.env.production @@ -8,8 +8,8 @@ VUE_APP_API_BASE_URL='http://localhost:10001' # VUE_APP_BASE_URL='http://192.168.1.211:80/brichat' # VUE_APP_API_BASE_URL='http://192.168.1.211:80/brichat' #武汉公司服务器 -VUE_APP_BASE_URL='http://192.168.8.253:80/brichat' -VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat' +# VUE_APP_BASE_URL='http://192.168.8.253:80/brichat' +# VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat' # 总部服务器 # VUE_APP_BASE_URL='http://192.168.0.33:80/brichat' # VUE_APP_API_BASE_URL='http://192.168.0.33:80/brichat' diff --git a/chat-client/library/components/VabTabs/index.vue b/chat-client/library/components/VabTabs/index.vue index 9bca560..90f468d 100644 --- a/chat-client/library/components/VabTabs/index.vue +++ b/chat-client/library/components/VabTabs/index.vue @@ -5,7 +5,9 @@ import { handleActivePath, handleTabs } from '@/utils/routes' import { translate } from '@/i18n' import { VabRoute, VabRouteRecord } from '/#/router' + import { useI18n } from 'vue-i18n' + const { t, locale } = useI18n() defineProps({ layout: { type: String, @@ -24,14 +26,7 @@ const { getRoutes: routes } = storeToRefs(routesStore) const tabsStore = useTabsStore() const { getVisitedRoutes: visitedRoutes } = storeToRefs(tabsStore) - const { - addVisitedRoute, - delVisitedRoute, - delOthersVisitedRoutes, - delLeftVisitedRoutes, - delRightVisitedRoutes, - delAllVisitedRoutes, - } = tabsStore + const { addVisitedRoute, delVisitedRoute, delOthersVisitedRoutes, delLeftVisitedRoutes, delRightVisitedRoutes, delAllVisitedRoutes } = tabsStore const tabActive = ref('') const active = ref(false) @@ -148,9 +143,7 @@ * 跳转最后一个标签页 */ const toLastTab = async () => { - const latestView = visitedRoutes.value - .filter((_: any) => _.path !== handleActivePath(route, true)) - .slice(-1)[0] + const latestView = visitedRoutes.value.filter((_: any) => _.path !== handleActivePath(route, true)).slice(-1)[0] if (latestView) await router.push(latestView) else await router.push('/') } @@ -196,20 +189,11 @@ @tab-click="handleTabClick" @tab-remove="handleTabRemove" > - + -