mirror of https://github.com/ElemeFE/element
Table: stop expansion click from bubbling (#9654)
parent
d8c931274d
commit
645b30f1c7
|
@ -396,7 +396,8 @@ export default {
|
||||||
table.$emit(`row-${name}`, row, event, column);
|
table.$emit(`row-${name}`, row, event, column);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleExpandClick(row) {
|
handleExpandClick(row, e) {
|
||||||
|
e.stopPropagation();
|
||||||
this.store.toggleRowExpansion(row);
|
this.store.toggleRowExpansion(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ const forced = {
|
||||||
renderCell: function(h, { row, store }, proxy) {
|
renderCell: function(h, { row, store }, proxy) {
|
||||||
const expanded = store.states.expandRows.indexOf(row) > -1;
|
const expanded = store.states.expandRows.indexOf(row) > -1;
|
||||||
return <div class={ 'el-table__expand-icon ' + (expanded ? 'el-table__expand-icon--expanded' : '') }
|
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>
|
<i class='el-icon el-icon-arrow-right'></i>
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue