소스 검색

修复分屏组渲染异常的bug

Shinohara Haruna 6 달 전
부모
커밋
a7f24384f0
2개의 변경된 파일23개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 2
      smsb-plus-ui/src/layout/components/Sidebar/index.vue
  2. 20 5
      smsb-plus-ui/src/views/smsb/item/split.vue

+ 3 - 2
smsb-plus-ui/src/layout/components/Sidebar/index.vue

@@ -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

+ 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>