ant-design-vue/components/popconfirm/demo/basic.md

33 lines
522 B
Markdown
Raw Normal View History

2018-03-22 08:19:02 +00:00
<cn>
#### 基本
最简单的用法。
</cn>
<us>
#### Basic
The basic example.
</us>
```html
<template>
<a-popconfirm title="Are you sure delete this task?" @confirm="confirm" @cancel="cancel" okText="Yes" cancelText="No">
<a href="#">Delete</a>
</a-popconfirm>
</template>
<script>
export default {
methods: {
confirm (e) {
console.log(e)
2018-05-15 01:52:44 +00:00
this.$message.success('Click on Yes')
2018-03-22 08:19:02 +00:00
},
cancel (e) {
console.log(e)
2018-05-15 01:52:44 +00:00
this.$message.error('Click on No')
2018-03-22 08:19:02 +00:00
},
},
}
</script>
```