mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
only navigate to transaction list page when click pie chart label in desktop version
This commit is contained in:
@@ -227,9 +227,19 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickItem: function (e) {
|
clickItem: function (e) {
|
||||||
if (this.enableClickItem && e.componentType === 'series' && e.seriesType ==='pie' && e.data && e.data.sourceItem) {
|
if (!this.enableClickItem || e.componentType !== 'series' || e.seriesType !=='pie') {
|
||||||
this.$emit('click', e.data.sourceItem);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.event && e.event.target && e.event.target.constructor && e.event.target.constructor.name === 'PiePiece2') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!e.data || !e.data.sourceItem) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$emit('click', e.data.sourceItem);
|
||||||
},
|
},
|
||||||
onLegendSelectChanged: function (e) {
|
onLegendSelectChanged: function (e) {
|
||||||
this.selectedLegends = e.selected;
|
this.selectedLegends = e.selected;
|
||||||
|
|||||||
Reference in New Issue
Block a user