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

38 lines
565 B
Vue
Raw Normal View History

2018-01-12 08:10:41 +00:00
<template>
<div>
<md>
## 从浮层内关闭
使用 `visible` 属性控制浮层显示
</md>
<Popover
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-01-12 08:10:41 +00:00
</Popover>
</div>
</template>
<script>
import { Popover, Button } from 'antd'
export default {
data () {
return {
visible: false,
}
},
methods: {
hide () {
console.log(111)
this.visible = false
},
},
components: {
Popover,
2018-01-23 10:55:39 +00:00
2018-01-12 08:10:41 +00:00
},
}
</script>