Skip to content

Commit 12e70c1

Browse files
committed
fix(modal): add onUpdate:open prop
1 parent 6c13c96 commit 12e70c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: components/modal/Modal.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export const modalProps = () => ({
5151
onOk: Function as PropType<(e: MouseEvent) => void>,
5252
onCancel: Function as PropType<(e: MouseEvent) => void>,
5353
'onUpdate:visible': Function as PropType<(visible: boolean) => void>,
54-
onChange: Function as PropType<(visible: boolean) => void>,
54+
'onUpdate:open': Function as PropType<(open: boolean) => void>,
55+
onChange: Function as PropType<(open: boolean) => void>,
5556
afterClose: Function as PropType<() => void>,
5657
centered: { type: Boolean, default: undefined },
5758
width: [String, Number],
@@ -179,6 +180,7 @@ export default defineComponent({
179180
};
180181

181182
const handleOk = (e: MouseEvent) => {
183+
emit('update:open', true);
182184
emit('ok', e);
183185
};
184186

0 commit comments

Comments
 (0)