-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.2.14
Environment
windows10,vue:3.2.41,ant-design-vue:3.2.14
Reproduction link
Steps to reproduce
<template>
<div>
<a-button type="primary" @click="showModal">Open Modal</a-button>
<a-modal v-model:visible="visible" title="Basic Modal" @ok="handleOk">
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</a-modal>
</div>
</template>
<script>
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
const visible = ref(false);
const showModal = () => {
visible.value = true;
};
const handleOk = e => {
console.log(e);
visible.value = false;
};
return {
visible,
showModal,
handleOk,
};
},
});
</script>
What is expected?
能够正常显示弹窗且不报错
What is actually happening?
Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a Symbol.iterator method.