Table: stop expansion click from bubbling (#9654)

This commit is contained in:
杨奕 2018-02-04 15:25:04 +08:00 committed by GitHub
parent d8c931274d
commit 645b30f1c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -396,7 +396,8 @@ export default {
table.$emit(`row-${name}`, row, event, column);
},
handleExpandClick(row) {
handleExpandClick(row, e) {
e.stopPropagation();
this.store.toggleRowExpansion(row);
}
}

View File

@ -74,7 +74,7 @@ const forced = {
renderCell: function(h, { row, store }, proxy) {
const expanded = store.states.expandRows.indexOf(row) > -1;
return <div class={ 'el-table__expand-icon ' + (expanded ? 'el-table__expand-icon--expanded' : '') }
on-click={ () => proxy.handleExpandClick(row) }>
on-click={ e => proxy.handleExpandClick(row, e) }>
<i class='el-icon el-icon-arrow-right'></i>
</div>;
},