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

vue3+vite 子应用微前端模式,百度地图加载不出来 #1408

Closed
txlwelling opened this issue Oct 15, 2024 · 4 comments
Closed

vue3+vite 子应用微前端模式,百度地图加载不出来 #1408

txlwelling opened this issue Oct 15, 2024 · 4 comments
Labels
Need Reproduction 需要复现步骤

Comments

@txlwelling
Copy link

主应用和子应用都是,
子应用 index.html引入百度地图sdk

<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&type=world&ak=xxx"></script>

const initMap = ()=> {
map.value = new BMap.Map("map"); // 创建Map实例
let point = new BMap.Point(116.404, 39.915); // 创建点坐标
mapSearchService.value = new BMap.LocalSearch(map.value, {
renderOptions: { map: map.value }
});
// map.enableScrollWheelZoom(true)
map.value.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别
// 添加缩放控件
map.value.addControl(new BMap.NavigationControl());

}
微信截图_20241015174348

@txlwelling
Copy link
Author

主应用和子应用都是vue3+vite

@timhub66 timhub66 added the Need Reproduction 需要复现步骤 label Oct 16, 2024
Copy link

Hello @txlwelling. In order to facilitate location and troubleshooting, we need you to provide a realistic GitHub repository.
您好 @txlwelling, 为了方便定位和排查问题,我们需要您提供一个重现实例,请提供一个尽可能精简的 GitHub 仓库地址。

@woaini521
Copy link

子应用和主应用的widow不一致

Copy link

Since the issue was labeled with Need Reproduction, but no response in 7 days. This issue will be close. If you have any questions, you can comment and reply.
由于该 issue 被标记为需要可复现步骤,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need Reproduction 需要复现步骤
Projects
None yet
Development

No branches or pull requests

3 participants