Skip to content

Commit 00ee739

Browse files
authored
fix: modifying the modal component and clicking the confirm button accidentally triggered the close event (#2727)
1 parent 5579681 commit 00ee739

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/renderless/src/modal/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export const handleEvent =
207207
params.options = options
208208
}
209209

210-
type !== 'close' && emit(type, params, event)
210+
emit(type, params, event)
211211
events[type] && events[type].call(parent, params)
212212
api.close(type)
213213
}
@@ -374,7 +374,6 @@ export const close =
374374
setTimeout(() => {
375375
state.visible = false
376376
let params = { type, $modal: parent }
377-
emit('close', params)
378377
if (events.hide) {
379378
events.hide.call(parent, params)
380379
} else {

0 commit comments

Comments
 (0)