tuqin
7 小时以前 bac41f84265ae40d71eeec16ccf6fb9a9c9fb0d6
style(bpm): 修复「发起流程」左侧分类栏超出卡片边界

问题:发起流程页用 Tabs(tab-position=left) 做左侧流程分类栏,
分类多达 22 个时左侧 tab 一直往下撑,超出卡片边界;加上 -ml-6
负边距,视觉上向左溢出更明显。

修复:
- 去掉 -ml-6 负边距,改用 .process-tabs 容器
- 卡片内容区固定为剩余高度(calc(100% - 57px)),避免被内容撑高
- 左侧分类栏限高 max-height:100% 并独立滚动,滚动条收细到 4px
- 右侧流程区独立滚动
- 分类名过长时限宽 200px + 省略号

已部署验证通过。
已修改1个文件
78 ■■■■■ 文件已修改
src/views/bpm/processInstance/create/index.vue 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bpm/processInstance/create/index.vue
@@ -208,7 +208,7 @@
          </div>
        </template>
        <div v-if="filteredProcessDefinitionList?.length" class="-ml-6">
        <div v-if="filteredProcessDefinitionList?.length" class="process-tabs">
          <Tabs v-model:active-key="activeCategory" tab-position="left">
            <Tabs.TabPane
              v-for="category in availableCategories"
@@ -301,4 +301,80 @@
.animate-bounce-once {
  animation: bounce 0.5s ease;
}
/**
 * 左侧流程分类栏样式修正:
 * 分类较多时(如 22 个)左侧 tab 会一直往下撑,超出卡片边界。
 * 这里把卡片内容区固定为剩余高度,左侧分类栏与右侧流程区各自独立滚动。
 */
:deep(.ant-card-body) {
  display: flex;
  flex-direction: column;
  height: calc(100% - 57px);
  min-height: 0;
  overflow: hidden;
}
.process-tabs {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  :deep(.ant-tabs) {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  /* 左侧分类栏:限高 + 独立滚动,不再撑破卡片 */
  :deep(.ant-tabs-left) {
    height: 100%;
    min-height: 0;
    > .ant-tabs-nav {
      flex: 0 0 auto;
      max-height: 100%;
      padding-right: 4px;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      /* 滚动条收细一点,避免占用标签宽度 */
      scrollbar-width: thin;
      &::-webkit-scrollbar {
        width: 4px;
      }
      &::-webkit-scrollbar-thumb {
        background: rgb(0 0 0 / 15%);
        border-radius: 2px;
      }
    }
    .ant-tabs-nav-list {
      width: 100%;
    }
    .ant-tabs-tab {
      max-width: 200px;
      padding: 8px 12px;
      .ant-tabs-tab-btn {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
    /* 右侧流程卡片区:独立滚动 */
    > .ant-tabs-content-holder {
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
    }
  }
}
</style>