Skip to content
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

弹窗中的下拉框会被主应用遮挡无法显示 #947

Open
wssnail opened this issue Jan 9, 2025 · 7 comments
Open

弹窗中的下拉框会被主应用遮挡无法显示 #947

wssnail opened this issue Jan 9, 2025 · 7 comments

Comments

@wssnail
Copy link

wssnail commented Jan 9, 2025

描述bug
弹窗中的下拉框会被主应用遮挡无法显示,或者说是下拉框都会被主应用挡住

如何复现
给出详细的复现步骤
1、第一步 主应用的菜单部分宽度设置为600px
2、 第二步 把示例中的下拉框,添加到示例工程的弹窗中

<a-modal v-model:visible="modalVisible" title="ant Modal" @ok="modalVisible = false">
      <div>
        <el-select v-model="value" placeholder="el-select">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
        </el-select>
      </div>
      <p>Some contents...</p>
      <p>Some contents...</p>
      <p>Some contents...</p>
      <div>
        <a-select placeholder="ant-select" style="margin-left: 20px; width: 200px">
          <a-select-option value="jack">Jack</a-select-option>
          <a-select-option value="lucy">Lucy</a-select-option>
          <a-select-option value="disabled" disabled>Disabled</a-select-option>
          <a-select-option value="Yiminghe">yiminghe</a-select-option>
        </a-select>
      </div>
      <p>Some contents...</p>
      <p>Some contents...</p>
      <p>Some contents...</p>
    </a-modal>

错误截图

  • 这是ant-design的下拉框
    image
  • 这是element-plus的下拉框
    image

最小复现仓库或者地址
重要!!!,请尽量给出复现仓库,这样能极大加快bug解决速度

@wssnail
Copy link
Author

wssnail commented Jan 9, 2025

使用:teleported="false"已经处理好了

@wssnail
Copy link
Author

wssnail commented Jan 13, 2025

使用:teleported="false"处理之后,card和table里的下拉框会被挡住显示不全

@PrayLS
Copy link

PrayLS commented Jan 16, 2025

在主应用的根元素上添加个绝对定位试一试position: relative;

@wssnail
Copy link
Author

wssnail commented Jan 16, 2025

在主应用的根元素上添加个绝对定位试一试position: relative;

不行,在主应用的body添加了position: absolute, 弹窗中的下拉框改成position: relative后,弹窗中的下拉框还是被遮挡,table中的下拉框也被挡住

@wssnail
Copy link
Author

wssnail commented Jan 16, 2025

在主应用的根元素上添加个绝对定位试一试position: relative;

目前把弹窗里表格内的下拉框改成position: fixed,然后自己计算位置,好麻烦在micro-app中没有这个问题

@PrayLS
Copy link

PrayLS commented Jan 16, 2025

在主应用的根元素上添加个绝对定位试一试position: relative;

不行,在主应用的body添加了position: absolute, 弹窗中的下拉框改成position: relative后,弹窗中的下拉框还是被遮挡,table中的下拉框也被挡住

<div id="wujie" style="position: relative;">
直接在这个根元素上面加,不用再body和下拉框中加,试一试行不行。

@wssnail
Copy link
Author

wssnail commented Jan 16, 2025

在主应用的根元素上添加个绝对定位试一试position: relative;

不行,在主应用的body添加了position: absolute, 弹窗中的下拉框改成position: relative后,弹窗中的下拉框还是被遮挡,table中的下拉框也被挡住

<div id="wujie" style="position: relative;"> 直接在这个根元素上面加,不用再body和下拉框中加,试一试行不行。

主应用中加载微应用的位置添加了,不行
Image

Image

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

No branches or pull requests

2 participants