mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-05 13:39:40 +08:00
632 B
632 B
#### 基本
第一个对话框。
#### Basic
Basic modal.
<template>
<div>
<a-button type="primary" @click="showModal">Open</a-button>
<a-modal
title="Basic Modal"
v-model="visible"
@ok="handleOk"
>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</a-modal>
</div>
</template>
<script>
export default {
data() {
return {
visible: false,
}
},
methods: {
showModal() {
this.visible = true
},
handleOk(e) {
console.log(e);
this.visible = false
},
}
}
</script>