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

在iframe模式下,引入view-design组件库,在使用Modal时候报错 #1177

Open
hehanli101 opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working sandbox sandbox

Comments

@hehanli101
Copy link

hehanli101 commented Apr 15, 2024

问题描述

在iframe模式下,使用view-design组件库,在使用Modal是报错

调试发现 iview里面使用了这个方法
function getTarget (node) { if (node === void 0) { node = window.rawWindow.document.body } if (node === true) { return document.body } return node instanceof window.rawWindow.Node ? node : document.querySelector(node) }

这个方法里面document.body instanceof window.Node 这个结果等于false,导致报错
我不清楚如何修改了

复现步骤

1.官网提供的例子,引入view-design组件库,使用iframe模式就可以复现
2.

上传截图

image

环境信息

  • micro-app版本:1.0.0-rc.4
  • 主应用前端框架&版本:官方例子-mian-vue2
  • 子应用前端框架&版本:官方例子-vue2
  • 构建工具&版本:
@hehanli101 hehanli101 changed the title 在iframe模式下,使用view-design组件库,在使用Modal是报错 在iframe模式下,引入view-design组件库,在使用Modal时候报错 Apr 15, 2024
@bailicangdu bailicangdu added bug Something isn't working sandbox sandbox labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sandbox sandbox
Projects
None yet
Development

No branches or pull requests

2 participants