mirror of https://gitee.com/antv-l7/antv-l7
fix: 修复 isOpen 报错问题 (#1537)
* docs: 场景 Scene API 补充 addPopup 和 removePopup 方法说明 * fix: 修复 Popup title 设置先后问题 * fix: 修复 L7 Popup isOpen 报错问题 Co-authored-by: yanxiong <oujinhui.ojh@antgroup.com>
This commit is contained in:
parent
bbce4a205e
commit
4fa5a324db
|
@ -134,7 +134,7 @@ export default class Popup<O extends IPopupOption = IPopupOption>
|
||||||
|
|
||||||
// 移除popup
|
// 移除popup
|
||||||
public remove() {
|
public remove() {
|
||||||
if (!this.isOpen()) {
|
if (!this?.isOpen()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ export default class PopupService implements IPopupService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public removePopup(popup: IPopup): void {
|
public removePopup(popup: IPopup): void {
|
||||||
if (popup.isOpen()) {
|
if (popup?.isOpen()) {
|
||||||
popup.remove();
|
popup.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue