Skip to content

无界微前端配置getPopupContainer后报错 #8509

@linziguan

Description

@linziguan
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

"vite": "^8.0.0", "vue": "^3.5.0"

Reproduction link

http://www.baidu.com

Steps to reproduce

采用无界框架,antdv作为子应用,打算将antdv渲染弹出窗口渲染到top的body中function getPopupContainer() { return window.top.document.body }

What is expected?

跟弹出有关的组件报错

ant-design-vue.js?v=f3c4146b:6726 Uncaught (in promise) TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at _getComputedStyle (ant-design-vue.js?v=f3c4146b:6726:49) at Object.css (ant-design-vue.js?v=f3c4146b:6667:9) at isAncestorFixed (ant-design-vue.js?v=f3c4146b:7018:127) at getVisibleRectForElement (ant-design-vue.js?v=f3c4146b:7063:26) at doAlign (ant-design-vue.js?v=f3c4146b:7194:20) at alignElement (ant-design-vue.js?v=f3c4146b:7290:9) at ant-design-vue.js?v=f3c4146b:9162:57 at trigger (ant-design-vue.js?v=f3c4146b:7430:8) at watch.immediate (ant-design-vue.js?v=f3c4146b:9201:19) at callWithErrorHandling (vue.runtime.esm-bundler-G-QkqzdF.js?v=0eec0b68:1873:17)

What is actually happening?

正常渲染,正常弹出

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions