PopConfirm;
如果不去看源码的话不会知道该组件对应的事件;
看文档不认真啊
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');
},
}
// ...
@Link-Fight
+1文档一直没更新,比较奇怪
在jsx下不触发
Most helpful comment
在jsx下不触发