File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,13 @@ const getIconRender = computed(() => {
91
91
});
92
92
93
93
function doCancel() {
94
- isConfirm . value = false ;
94
+ handleCancel () ;
95
95
handleOpenChange (false );
96
96
}
97
97
98
98
function doConfirm() {
99
- isConfirm . value = true ;
99
+ handleConfirm () ;
100
100
handleOpenChange (false );
101
- emits (' confirm' );
102
101
}
103
102
104
103
provideAlertContext ({
@@ -117,11 +116,13 @@ function handleCancel() {
117
116
118
117
const loading = ref (false );
119
118
async function handleOpenChange(val : boolean ) {
119
+ const confirmState = isConfirm .value ;
120
+ isConfirm .value = false ;
120
121
await nextTick ();
121
122
if (! val && props .beforeClose ) {
122
123
loading .value = true ;
123
124
try {
124
- const res = await props .beforeClose ({ isConfirm: isConfirm . value });
125
+ const res = await props .beforeClose ({ isConfirm: confirmState });
125
126
if (res !== false ) {
126
127
open .value = false ;
127
128
}
You can’t perform that action at this time.
0 commit comments