refactor(frontend): Reactivityで型を明示するように (#12791)
* refactor(frontend): Reactivityで型を明示するように * fix: プロパティの参照が誤っているのを修正 * fix: 初期化の値を空配列に書き換えていた部分をnullに置き換え
This commit is contained in:
@@ -13,10 +13,17 @@ import { Chart } from 'chart.js';
|
||||
import { useChartTooltip } from '@/scripts/use-chart-tooltip.js';
|
||||
import { initChart } from '@/scripts/init-chart.js';
|
||||
|
||||
export type InstanceForPie = {
|
||||
name: string,
|
||||
color: string | null,
|
||||
value: number,
|
||||
onClick?: () => void
|
||||
};
|
||||
|
||||
initChart();
|
||||
|
||||
const props = defineProps<{
|
||||
data: { name: string; value: number; color: string; onClick?: () => void }[];
|
||||
data: InstanceForPie[];
|
||||
}>();
|
||||
|
||||
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
||||
|
Reference in New Issue
Block a user