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

38 lines
570 B
Markdown
Raw Normal View History

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