Skip to content

Bug: Vben Modal 弹窗中,使用 <el-scrollbar> 包裹 VbenTree 组件无法展开折叠 #6322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks done
elkon028 opened this issue Jun 2, 2025 · 0 comments
Open
5 tasks done

Comments

@elkon028
Copy link

elkon028 commented Jun 2, 2025

Version

Vben Admin V5

Describe the bug?

Vben Modal 弹窗中,使用 包裹 VbenTree 组件无法展开折叠

  • 好像触发了 outline
<template>
  <Modal title="数据权限" class="w-[40%]">
    <Form class="mr-4">
      <template #dataScopeDeptIds="slotProps">
        <div class="h-[260px] w-full">
          <el-scrollbar>
            <VbenTree
              :tree-data="deptTree"
              multiple
              bordered
              :expanded="expandedKeys"
              v-bind="slotProps"
              value-field="id"
              label-field="name"
              :auto-check-parent="false"
              :check-strictly="!isCheckStrictly" />
          </el-scrollbar>
        </div>
      </template>
    </Form>
    <template #prepend-footer>
      <div class="flex flex-auto items-center">
        <ElCheckbox v-model="isAllSelected" @change="toggleSelectAll"> 全选 </ElCheckbox>
        <ElCheckbox v-model="isExpanded" @change="toggleExpandAll"> 全部展开 </ElCheckbox>
        <ElCheckbox v-model="isCheckStrictly"> 父子联动 </ElCheckbox>
      </div>
    </template>
  </Modal>
</template>
Image

Reproduction

null

System Info

all

Relevant log output

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant