Element: 2.13.0 版本组件介绍页面 PopConfirm 用法介绍中没有Events项!!!

Created on 28 Feb 2020  ·  5Comments  ·  Source: ElemeFE/element

PopConfirm
如果不去看源码的话不会知道该组件对应的事件;

Most helpful comment

在jsx下不触发

All 5 comments

看文档不认真啊

Basic usage
Popconfirm is similar to Popover. So for some duplicated attributes, please refer to the documentation of Popover.

Popconfirm 组件在源码中有自己的两个事件会emit,分别是onCancel和onConfirm,是Popover组件没有的事件,哈哈上面没说清楚,其实我主要指的是这一部分;

// ...
methods: {
  confirm() {
    this.visivle = false;
    this.$emit('onConfirm');
  },
  cancel() {
    this.visivle = false;
    this.$emit('onCancel');
  },
}
// ...

Source Code

@Link-Fight

+1文档一直没更新,比较奇怪

在jsx下不触发

Was this page helpful?
0 / 5 - 0 ratings