From 2dd2c417d8f16fd1424e9eb5dc4b0daaef076165 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 8 Feb 2021 00:19:58 +0800 Subject: [PATCH] support click pie chart to change current selected item --- src/components/mobile/PieChart.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/mobile/PieChart.vue b/src/components/mobile/PieChart.vue index a69ace71..6bd4f5c9 100644 --- a/src/components/mobile/PieChart.vue +++ b/src/components/mobile/PieChart.vue @@ -11,7 +11,8 @@ :stroke="item.color | defaultIconColor('var(--default-icon-color)')" :stroke-width="diameter" :stroke-dasharray="item | itemStrokeDash(circumference)" - :stroke-dashoffset="item | itemDashOffset(validItems, circumference, itemCommonDashOffset)"> + :stroke-dashoffset="item | itemDashOffset(validItems, circumference, itemCommonDashOffset)" + @click="switchSelectedIndex(idx)">