ant-design-vue/components/popover/demo/control.md

39 lines
597 B
Markdown
Raw Normal View History

2018-04-16 13:54:37 +00:00
<cn>
#### 从浮层内关闭
使用 `visible` 属性控制浮层显示。
</cn>
<us>
#### Controlling the close of the dialog
Use `visible` prop to control the display of the card.
</us>
```html
2018-01-12 08:10:41 +00:00
<template>
2018-04-16 13:54:37 +00:00
<a-popover
2018-01-12 08:10:41 +00:00
title="Title"
trigger="click"
v-model="visible"
>
2018-01-19 10:01:43 +00:00
<a @click="hide" slot="content">Close</a>
2018-01-23 10:55:39 +00:00
<a-button type="primary">Click me</a-button>
2018-04-16 13:54:37 +00:00
</a-popover>
2018-01-12 08:10:41 +00:00
</template>
<script>
export default {
data () {
return {
visible: false,
}
},
methods: {
hide () {
console.log(111)
this.visible = false
},
},
}
</script>
2018-04-16 13:54:37 +00:00
```