Skip to content

Commit

Permalink
fix: modal是否自动关闭问题
Browse files Browse the repository at this point in the history
  • Loading branch information
QiuShuiBai committed Feb 26, 2025
1 parent 48dcad9 commit e7732e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mpx-cube-ui/src/components/modal/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ createModalComponent({
this.triggerEvent(EVENT_CONFIRM)
},
onCancel() {
if (this.callbackHideModal) {
if (this.callbackHideModal && this.hideOnCancel) {
this.hide()
}
// 点击顶部/底部取消按钮触发事件
this.triggerEvent(EVENT_CANCEL)
},
onClose() {
if (this.callbackHideModal) {
if (this.callbackHideModal && this.hideOnClose) {
this.hide()
}
// 点击顶部关闭icon或遮盖层触发事件
Expand Down

0 comments on commit e7732e4

Please sign in to comment.