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

vite子应用使用window.open打开新窗口,点击新窗口页面左上角的关闭按钮无法关闭窗口 #1211

Open
NNTYM opened this issue May 13, 2024 · 4 comments

Comments

@NNTYM
Copy link

NNTYM commented May 13, 2024

环境信息
micro-app版本:"1.0.0-beta.5"
主应用前端框架&版本:"vite": "4.4.4".
子应用前端框架&版本:"vite": "4.4.4".
问题描述
vite子应用使用window.open打开新窗口,点击新窗口页面左上角的关闭按钮无法关闭窗口,关闭按钮执行window.close

@lilu0826
Copy link

试试 window.rawWindow.close()

@NNTYM
Copy link
Author

NNTYM commented May 16, 2024

好像不行,会提示window上不存在rawWindow属性

@lilu0826
Copy link

那打开新页面时尝试用这个打开呢,window.rawWindow.open(),打开后再用window.close()试试

@NNTYM
Copy link
Author

NNTYM commented May 16, 2024

还是不行,我能不能通过主应用来关闭子应用打开的这个新窗口,就是子应用点击关闭按钮的时候通知主应用window.close

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