fix: 修复 Popup 中 title 和 content 设置先后问题 (#1534)

* docs: 场景 Scene API 补充 addPopup 和 removePopup 方法说明

* fix: 修复 Popup title 设置先后问题

Co-authored-by: yanxiong <oujinhui.ojh@antgroup.com>
This commit is contained in:
heiyexing 2022-12-10 00:19:17 +08:00 committed by GitHub
parent 7ec05e61de
commit bbce4a205e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -195,14 +195,14 @@ export default class Popup<O extends IPopupOption = IPopupOption>
// @ts-ignore
this.container = undefined;
}
if (this.popupOption.title) {
this.setTitle(this.popupOption.title);
}
if (this.popupOption.html) {
this.setHTML(this.popupOption.html);
} else if (this.popupOption.text) {
this.setText(this.popupOption.text);
}
if (this.popupOption.title) {
this.setTitle(this.popupOption.title);
}
}
if (this.checkUpdateOption(option, ['closeOnEsc'])) {
this.updateCloseOnEsc();