Dynamically import echarts and three.js (#2349)

This commit is contained in:
Gold856
2026-02-02 11:06:48 -05:00
committed by GitHub
parent 798b01c3a6
commit f4b30da6b3
5 changed files with 33 additions and 12 deletions

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
import * as echarts from "echarts";
import { onMounted, ref, onBeforeUnmount, watch } from "vue";
import { useTheme } from "vuetify";
@@ -198,7 +197,8 @@ const props = defineProps<{
color?: string;
}>();
onMounted(() => {
onMounted(async () => {
const echarts = await import("echarts");
chart = echarts.init(chartRef.value);
chart.setOption(getOptions(props.data));