feat(Row): add click event (#4170)

This commit is contained in:
neverland
2019-08-21 10:23:05 +08:00
committed by GitHub
parent 6b8fbfb290
commit 71501d0ac1
4 changed files with 27 additions and 0 deletions
+7
View File
@@ -17,6 +17,12 @@ export default createComponent({
}
},
methods: {
onClick(event) {
this.$emit('click', event);
}
},
render() {
const { align, justify } = this;
const flex = this.type === 'flex';
@@ -31,6 +37,7 @@ export default createComponent({
[`align-${align}`]: flex && align,
[`justify-${justify}`]: flex && justify
})}
onClick={this.onClick}
>
{this.slots()}
</this.tag>