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

弹窗无法监听close,弹窗关闭重新设置html后自动打开 #1846

Closed
szygiser opened this issue Sep 9, 2023 · 3 comments
Closed
Labels
👀 need more info issue 需要提供更多描述信息

Comments

@szygiser
Copy link

szygiser commented Sep 9, 2023

import { Scene, GaodeMap, Popup } from '@antv/l7';

const scene = new Scene({
id: 'map',
map: new GaodeMap({
pitch: 0,
style: 'normal',
center: [120.154672, 30.241095],
zoom: 12,
}),
logoVisible: false,
});
scene.on('loaded', () => {
const popup = new Popup({
title: '自定义标题',
html: '

Popup 示例的自定义内容

',
lngLat: {
lng: 120.154672,
lat: 30.241095,
},
});

scene.addPopup(popup);
popup.on('close',()=>{
alert('关闭')
})
setInterval(()=>{
popup.setHTML('

Popup 示例的

');
},10000)
});


  • L7 Version:
  • Platform:
  • Mini Showcase(like screenshots):
  • CodePen Link:
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2023

Hi @szygiser, Please star this repo if you find it useful! Thanks ⭐!
你好 @szygiser。如果该仓库对你有用,可以 star 一下,感谢你的 ⭐!

@lzxue lzxue added the 👀 need more info issue 需要提供更多描述信息 label Sep 11, 2023
@github-actions
Copy link
Contributor

Hello @szygiser. Please provide a online reproduction by forking codesandbox of @antv/l7 demo template Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @szygiser, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 @antv/l7 demo 模板 3 天内未跟进此 issue 将会被自动关闭。

@heiyexing
Copy link
Contributor

1.Popup 隐藏对应的是 hide 事件
2.setHTML 方法设计上就是会打开 Popup 的,不是 bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 need more info issue 需要提供更多描述信息
Projects
None yet
Development

No branches or pull requests

3 participants