mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-30 09:53:58 +02:00
refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, shallowRef, ref } from 'vue';
|
||||
import { onMounted, useTemplateRef, ref } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import isChromatic from 'chromatic';
|
||||
@@ -34,8 +34,8 @@ import { initChart } from '@/utility/init-chart.js';
|
||||
initChart();
|
||||
|
||||
const chartLimit = 50;
|
||||
const chartEl = shallowRef<HTMLCanvasElement>();
|
||||
const chartEl2 = shallowRef<HTMLCanvasElement>();
|
||||
const chartEl = useTemplateRef('chartEl');
|
||||
const chartEl2 = useTemplateRef('chartEl2');
|
||||
const fetching = ref(true);
|
||||
|
||||
const { handler: externalTooltipHandler } = useChartTooltip();
|
||||
|
||||
Reference in New Issue
Block a user