2018-03-06 11:14:41 +00:00
|
|
|
<cn>
|
|
|
|
#### 基本
|
|
|
|
第一个对话框。
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
<us>
|
|
|
|
#### Basic
|
|
|
|
Basic modal.
|
|
|
|
</us>
|
|
|
|
|
2019-10-09 10:32:23 +00:00
|
|
|
```tpl
|
2018-03-06 11:14:41 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2018-12-09 09:34:27 +00:00
|
|
|
<a-button type="primary" @click="showModal">Open Modal</a-button>
|
2019-09-28 12:45:07 +00:00
|
|
|
<a-modal title="Basic Modal" v-model="visible" @ok="handleOk">
|
2018-03-06 11:14:41 +00:00
|
|
|
<p>Some contents...</p>
|
|
|
|
<p>Some contents...</p>
|
|
|
|
<p>Some contents...</p>
|
|
|
|
</a-modal>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2019-09-28 12:45:07 +00:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
visible: false,
|
|
|
|
};
|
2018-03-06 11:14:41 +00:00
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
methods: {
|
|
|
|
showModal() {
|
|
|
|
this.visible = true;
|
|
|
|
},
|
|
|
|
handleOk(e) {
|
|
|
|
console.log(e);
|
|
|
|
this.visible = false;
|
|
|
|
},
|
2018-03-06 11:14:41 +00:00
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
};
|
2018-03-06 11:14:41 +00:00
|
|
|
</script>
|
|
|
|
```
|