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:
heiyexing 2022-12-13 10:07:08 +08:00 committed by GitHub
parent bbce4a205e
commit 4fa5a324db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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;
} }

View File

@ -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();
} }