1
0

2 Коммитууд c1480f8789 ... a7f24384f0

Эзэн SHA1 Мессеж Огноо
  Shinohara Haruna a7f24384f0 修复分屏组渲染异常的bug 6 сар өмнө
  Shinohara Haruna 7e42532937 修正节目审核页面侧边栏为空的bug 6 сар өмнө

+ 11 - 4
smsb-plus-ui/src/layout/components/Sidebar/index.vue

@@ -26,15 +26,22 @@ const appStore = useAppStore();
 const settingsStore = useSettingsStore();
 const permissionStore = usePermissionStore();
 // 只显示当前一级菜单下的二级菜单
-const topMenus = computed(() => permissionStore.getTopbarRoutes().filter(menu => menu.hidden !== true));
+const topMenus = computed(() => permissionStore.getTopbarRoutes().filter((menu) => menu.hidden !== true));
 const currentTopMenuPath = computed(() => {
+  // console.log("[Sidebar] route.path", route.path);
+  // 特例
+  if (route.path === '/source/push/approval' || route.path.startsWith('/source/split/edit')) {
+    return '/source';
+  }
   // 取当前路由的一级菜单 path
   const matched = route.matched?.[0];
-  return matched && matched.path !== '/' ? matched.path : (topMenus.value[0]?.path || '/');
+  // console.log("[Sidebar] matched", matched);
+  // console.log("[Sidebar] ret", matched && matched.path !== '/' ? matched.path : (topMenus.value[0]?.path || '/'));
+  return matched && matched.path !== '/' ? matched.path : topMenus.value[0]?.path || '/';
 });
 const sidebarRouters = computed<RouteRecordRaw[]>(() => {
-  const topMenu = topMenus.value.find(menu => menu.path === currentTopMenuPath.value);
-  return topMenu && topMenu.children ? topMenu.children.filter(item => item.hidden !== true) : [];
+  const topMenu = topMenus.value.find((menu) => menu.path === currentTopMenuPath.value);
+  return topMenu && topMenu.children ? topMenu.children.filter((item) => item.hidden !== true) : [];
 });
 const showLogo = computed(() => settingsStore.sidebarLogo);
 const sideTheme = computed(() => settingsStore.sideTheme);

+ 20 - 5
smsb-plus-ui/src/views/smsb/item/split.vue

@@ -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;
+  display: flex;
+  flex-direction: row;
+  height: calc(100vh - 60px);
+  /* 预留底部按钮区域高度 */
+  min-height: 0;
+}
+
 .table-container {
-  height: 900px;
-  /* 设置固定高度,根据需要调整 */
+  height: 100%;
+  min-height: 0;
   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>