@@ -28,8 +28,9 @@ const permissionStore = usePermissionStore();
// 只显示当前一级菜单下的二级菜单
const topMenus = computed(() => permissionStore.getTopbarRoutes().filter((menu) => menu.hidden !== true));
const currentTopMenuPath = computed(() => {
- // 特例:如果当前路由是 approval,则返回 /source 作为一级菜单
- if (route.path === '/source/push/approval') {
+ // console.log("[Sidebar] route.path", route.path);
+ // 特例
+ if (route.path === '/source/push/approval' || route.path.startsWith('/source/split/edit')) {
return '/source';
}
// 取当前路由的一级菜单 path
@@ -385,11 +385,27 @@ onMounted(() => {
});
</script>
<style scoped>
+.split-root {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ min-height: 0;
+ position: relative;
+}
+
+.split-root>.p-2.flex {
+ flex: 1 1 auto;
+ flex-direction: row;
+ height: calc(100vh - 60px);
+ /* 预留底部按钮区域高度 */
.table-container {
- height: 900px;
- /* 设置固定高度,根据需要调整 */
+ height: 100%;
overflow-y: auto;
- /* 当内容超出时显示滚动条 */
.button-container {
@@ -401,8 +417,7 @@ onMounted(() => {
right: 0;
padding: 10px 0;
background-color: white;
- /* 可选:根据需要设置背景色 */
box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
- /* 可选:添加阴影效果 */
+ z-index: 10;
</style>