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

请教下关于虚拟路由 native-scope 和 native 的区别,官网描述的太模糊,或者子应用的域名指向存在 bug #1428

Open
JifengZhang opened this issue Oct 29, 2024 · 2 comments

Comments

@JifengZhang
Copy link

JifengZhang commented Oct 29, 2024

文档中:“native-scope模式的功能和用法和native模式一样,唯一不同点在于native-scope模式下子应用的域名指向自身而非主应用”
这里的子应用的域名指的是什么 api 下的,子应用中的 window.host 指向还是主应用的域名啊。
还有无论 native 还是 native-scope,子应用调用 window.open 自动补全的域名是子应用的域名。

主应用:vue3 + vite + [email protected]
子应用: vue3 + vite
官网描述的太模糊了,有没有大佬可以举例指导一下

@JifengZhang JifengZhang changed the title 关于虚拟路由 native-scope 和 native 的区别 请教下关于虚拟路由 native-scope 和 native 的区别,官网描述的太模糊,或者子应用的域名指向存在 bug Oct 31, 2024
@timhub66
Copy link
Member

timhub66 commented Nov 1, 2024

@JifengZhang ,你那边现在遇到了什么问题?

@JifengZhang
Copy link
Author

@JifengZhang ,你那边现在遇到了什么问题?

我的问题是 router-mode native-scope 和 native 的区别是什么? 什么场景下应该使用 native-scope?
关于官网的描述“子应用的域名指向自身而非主应用” ,子应用 window.location.host 和 window.open 我自测都没有看出区别
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