feat(Popup): add click-close-icon event (#7599)
This commit is contained in:
+8
-1
@@ -44,6 +44,13 @@ export default createComponent({
|
||||
this.onClosed = createEmitter('closed');
|
||||
},
|
||||
|
||||
methods: {
|
||||
onClickCloseIcon(event) {
|
||||
this.$emit('click-close-icon', event);
|
||||
this.close();
|
||||
},
|
||||
},
|
||||
|
||||
render() {
|
||||
if (!this.shouldRender) {
|
||||
return;
|
||||
@@ -86,7 +93,7 @@ export default createComponent({
|
||||
tabindex="0"
|
||||
name={this.closeIcon}
|
||||
class={bem('close-icon', this.closeIconPosition)}
|
||||
onClick={this.close}
|
||||
onClick={this.onClickCloseIcon}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user