问题:TenantRoutingProperties 定义了配置但未被使用 解决方案: 1. TenantAwareLoadBalancer 注入 TenantRoutingProperties - 使用配置的 tenantHeader 名称 - 使用配置的 buildTenantGroup 方法 - 使用配置的 isSharedService 判断 - 使用配置的 isFallbackToShared 策略 2. 新增功能 - 支持 enabled=false 禁用租户路由 - 共享服务跳过租户过滤 - 可配置是否回退到共享实例 3. 更新测试适配新构造函数
47 lines
817 B
Vue
47 lines
817 B
Vue
<template>
|
|
<div class="app-container">
|
|
<router-view v-slot="{ Component }">
|
|
<transition name="fade" mode="out-in">
|
|
<component :is="Component" />
|
|
</transition>
|
|
</router-view>
|
|
<Tabbar v-if="showTabbar" />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useRoute } from 'vue-router'
|
|
import Tabbar from '@/components/Tabbar.vue'
|
|
|
|
const route = useRoute()
|
|
|
|
const showTabbar = computed(() => {
|
|
return route.path !== '/login'
|
|
})
|
|
</script>
|
|
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background: var(--mac-bg);
|
|
background-attachment: fixed;
|
|
}
|
|
|
|
.app-container {
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* 页面切换动画 */
|
|
.fade-enter-active,
|
|
.fade-leave-active {
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.fade-enter-from,
|
|
.fade-leave-to {
|
|
opacity: 0;
|
|
}
|
|
</style>
|